<div dir="ltr">Hi all,<div><br></div><div>Thanks for your replies on this topic ! </div><div>As I am new to Python, I have taken a look at WSME/Pecan as suggested. It seems to be great and clean web application framework.</div>
<div>I might not have get the total picture but it seems to me that there is not a real validation but a strongly typed type declaration (using <span style="line-height:15.4375px;color:rgb(85,85,85);font-size:13px;white-space:pre-wrap;font-family:monospace">wtypes</span><span style="line-height:15.4375px;color:rgb(102,102,102);font-size:13px;white-space:pre-wrap;font-family:monospace">.</span><span style="line-height:15.4375px;color:rgb(85,85,85);font-size:13px;white-space:pre-wrap;font-family:monospace">Base)</span> which seems to be very much like the java framework JAXB. Using json schema looks easier and more flexible as I can set validation constraints on min/max size, pattern, format without creating custom getter/setter for each property.</div>
<div>Keystone is not using it for the moment, it will be a deep rewrite.</div><div><br></div><div>My primary thought<font color="#000000" face="sans-serif"><span style="font-size:12px;line-height:14px"> was to keep it very simple, it looks a bit like what have been done for Barbican.</span></font></div>
<div><font color="#000000" face="sans-serif"><span style="font-size:12px;line-height:14px"> - One schema per type describing it completely : User, Group... These schemas can be regroup in a single file as they should not be too big.</span></font></div>
<div><font color="#000000" face="sans-serif"><span style="font-size:12px;line-height:14px"> - A set of functions to load appropriate schema, set the required fields as they can be different for create/update operations (this should avoid schema jungle), validate and get the errors.</span></font></div>
<div><font color="#000000" face="sans-serif"><span style="font-size:12px;line-height:14px"> - Explicitly call validation in keystone.identity.controller or maybe do a decorator</span></font></div><div><br></div><div>
Dolph, I'm not familiar with the middleware mechanism in <span style="font-family:arial,sans-serif;font-size:13px">keystone.contrib, can you provide a bit more explanation about your idea ? It would be a good thing if keystoneclient can reuse the schema to do data validation as well but why should the client provide the schemas ? </span><span style="font-family:arial,sans-serif;font-size:13px">I was more thinking of schemas accessible through the public API for client to validate it's requests.</span><span style="font-family:arial,sans-serif;font-size:13px"> For me the only critical point for data validation is server input data.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">A newbie's question : What is the standard way to share my current code with you all ? I've seen the command "git review -D" to make a draft, is it the correct way ? If yes, is the branch name important ?</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
<div class="gmail_extra">Regards,</div><div class="gmail_extra"><br clear="all"><div>--<br>Bruno Semperlotti</div>
<br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 10:11 PM, Jarret Raim <span dir="ltr"><<a href="mailto:jarret.raim@rackspace.com" target="_blank">jarret.raim@rackspace.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>> > I don't get the same impression. The consensus is that we're going to<br>
> > move to Pecan/WSME as projects need to write an API, but we were not<br>
> > going to both re-writing old API code just for the fun of it.<br>
> ><br>
> > Off the top of my head, I believe that in addition to ceilometer and<br>
> > ironic are both using pecan, and someone else was talking about it for<br>
> > their next api rev - but I honestly don't remember.<br>
> ><br>
> > At the very least I believe it was as decided as anything is around<br>
> > here that we'd start using pecan/WSME for new things.<br>
><br>
> Right.<br>
<br>
</div>Alright, fair enough. I'll take a deeper look at Pecan.<br>
<span><font color="#888888"><br>
<br>
<br>
Jarret<br>
</font></span><div><div><br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>