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

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

Reply via email to