[Openstack] [OpenStack] JSON Naming convention

Joe Gordon joe.gordon0 at gmail.com
Tue May 28 12:02:49 UTC 2013


We cannot go back and change past APIs, but standardization would be nice
for future APIs such as nova V3.


On Fri, May 17, 2013 at 1:20 PM, Balamurugan V G <balamuruganvg at gmail.com>wrote:

> Hi,
>
> I see that the REST API using both the camelCase and underscore separated
> names for the JSON attributes. An example is below:
>
>
> curl  -X 'POST' http://1.1.1.1:5000/v2.0/tokens -d
> '{"auth":{"passwordCredentials":{"username": "admin",
> "password":"admin_pass"}, "tenantName":"test"}}' -H 'Content-type:
> application/json'
> {"access": {"token": {"expires": "2013-05-18T06:10:07Z", "id":
> "d92aebd5112f44b9b13dfabbf4283110", "tenant": {"enabled": true,
> "description": null, "name": "automation", "id":
> "4a8c3029619e4afbaa39f85fcd121003"}}, "serviceCatalog": [{"endpoints":
> [{"adminURL": "http://2.2.2.2:8774/v2/4a8c3029619e4afbaa39f85fcd121003",
> "region": "RegionOne", "internalURL": "
> http://2.2.2.2:8774/v2/4a8c3029619e4afbaa39f85fcd121003", "id":
> "5c3598dc6b384a598046471858b55417", "publicURL": "
> http://1.1.1.1:8774/v2/4a8c3029619e4afbaa39f85fcd121003"}],
> "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints":
> [{"adminURL": "http://2.2.2.2:9696/", "region": "RegionOne",
> "internalURL": "http://2.2.2.2:9696/", "id":
> "18ffe92b8db242d8b39991b4dceafe6c", "publicURL": "http://1.1.1.1:9696/"}],
> "endpoints_links": [], "type": "network", "name": "quantum"}, {"endpoints":
> [{"adminURL": "http://2.2.2.2:9292/v2", "region": "RegionOne",
> "internalURL": "http://2.2.2.2:9292/v2", "id":
> "91bce3f20f704165bd430629a1446baf", "publicURL": "http://1.1.1.1:9292/v2"}],
> "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints":
> [{"adminURL": "http://2.2.2.2:8776/v1/4a8c3029619e4afbaa39f85fcd121003",
> "region": "RegionOne", "internalURL": "
> http://2.2.2.2:8776/v1/4a8c3029619e4afbaa39f85fcd121003", "id":
> "710bb818196f4f06a12f4efc4e32b47a", "publicURL": "
> http://1.1.1.1:8776/v1/4a8c3029619e4afbaa39f85fcd121003"}],
> "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
> [{"adminURL": "http://2.2.2.2:8773/services/Admin", "region":
> "RegionOne", "internalURL": "http://2.2.2.2:8773/services/Cloud", "id":
> "01b49f1552dd486cba9499e567aa3774", "publicURL": "
> http://1.1.1.1:8773/services/Cloud"}], "endpoints_links": [], "type":
> "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "
> http://2.2.2.2:35357/v2.0", "region": "RegionOne", "internalURL": "
> http://2.2.2.2:5000/v2.0", "id": "f6305996eb8a49ff8fca9c40f1a78ae8",
> "publicURL": "http://1.1.1.1:5000/v2.0"}], "endpoints_links": [], "type":
> "identity", "name": "keystone"}], "user": {"username": "admin",
> "roles_links": [], "id": "b254901420994f3895fed48073761b00", "roles":
> [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles":
> ["55e3d24acce64b8bb29955945de47d21"]}}}
>
> For example, 'publicURL' and 'endpoint_links'.
>
> Is there any plan/blueprint to standardize on one naming convention?
>
> Regards,
> Balu
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130528/e0d28a7c/attachment.html>


More information about the Openstack mailing list