You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Rohit Yadav <ro...@citrix.com> on 2012/12/17 07:24:26 UTC

API response change

I've modified api layer to return cloudstack-version (prev. cloud-stack-version in xml) as part of the api cmd response for json type, to be consistent with xml response which includes version number:
https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=commit;h=f8a483fc5a47cb66ac4788fcd7d53da0c9d6ea2b

The "cloudstack-version" information in response can be used by a client, for example an api discovery service which cloudmonkey can use to process/request/cache apis from cloudstack mgmt server based on the version and checksum of api information (api info would be a datastructure sent as json or xml from api server that has apiname, docstring, args etc. all the info that cloudmonkey pre-caches during build time).
The version info can be obtained using the listCapability api, share your concern if there is some better way to do this or if we should revert this.

Lastly, if you look at the code, string builders are used to build xml and json responses (primitive c like coding), any suggestions if we can use any APL compliant xml and json libraries to build them?

Regards.

Re: API response change

Posted by Prasanna Santhanam <ts...@apache.org>.
On Mon, Dec 17, 2012 at 01:24:26AM -0500, Rohit Yadav wrote:
> Lastly, if you look at the code, string builders are used to build
> xml and json responses (primitive c like coding), any suggestions if
> we can use any APL compliant xml and json libraries to build them?

Something from apache commons? There are quite a few places that build
file paths as well by concatenating strings. I was planning to use
commons.io.FileNameUtils for those.

-- 
Prasanna.,