cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Sorensen" <shadow...@gmail.com>
Subject Re: Review Request 14889: Expose as much type information to commands.xml as well as to the generated python clasesss for Marvin
Date Thu, 24 Oct 2013 17:06:26 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14889/#review27461
-----------------------------------------------------------

Ship it!


Looks cool to me, will give Prasanna time to respond.


- Marcus Sorensen


On Oct. 23, 2013, 9:38 p.m., Ryan Dietrich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14889/
> -----------------------------------------------------------
> 
> (Updated Oct. 23, 2013, 9:38 p.m.)
> 
> 
> Review request for cloudstack, Marcus Sorensen and Prasanna Santhanam.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> I have a requirement for some work I am doing to "fail early".  The existing marvin cloudstackAPI
classes give me both the "legal" and "required" elements for each API call as well as the
response attributes.  However, they do not tell me the types of each value.  I've gone ahead
and exposed that type information to python and to commands.xml as well.  I decided to try
and expose things so we're being as descriptive as possible.  It's a little deflating how
the Request/Response annotations aren't equal (Requests can expose "strings" as "uuid's",
allowing me to auto generate regex's for validation).  Responses however, simply fall back
to the specific java type, (Integer, Long, String, Boolean).
> 
> I believe cloudmonkey could take advantage of this, by stopping invalid parameters from
being sent to Cloudstack in the first place (client side validation is good, right?)
> I also think the UI could use this as part of their validation routines, if they're using
commands.xml as part of their build process.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/api/doc/ApiXmlDocWriter.java c3c0cab 
>   server/src/com/cloud/api/doc/Argument.java 29c361e 
>   tools/marvin/marvin/codegenerator.py 96729f6 
> 
> Diff: https://reviews.apache.org/r/14889/diff/
> 
> 
> Testing
> -------
> 
> mvn clean
> mvn
> cd tools/apidoc
> mvn
> inspect target/commands.xml
> cd ../tools/marvin
> mvn
> inspect python classes
> 
> 
> Thanks,
> 
> Ryan Dietrich
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message