Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

API inconsistency in list-volumes response on cinder vs nova?

Hello,

I noticed that when I directly call the cinder API and ask for a 'list-volumes' the response returned differs from the same list-volumes call made in nova.

Here is the object returned by cinder: (/volumes/detail?all_tenants=1)

{'volumes': [{'attachments': [{'device': '/dev/vdb',
 'id': '8b9b1db6-fbcb-4ff5-8e46-375556a8b317',
 'server_id': '0445014a-7028-443b-a97c-d098fc22a55d',
 'volume_id': '8b9b1db6-fbcb-4ff5-8e46-375556a8b317'}],
'availability_zone': 'ValhallaRegion',
'bootable': 'false',
'created_at': '2013-10-24T18:50:57.000000',
'display_description': u'',
'display_name': 'Volumename',
'id': '8b9b1db6-fbcb-4ff5-8e46-375556a8b317',
'metadata': {},
'os-vol-host-attr:host': 'thor',
'os-vol-tenant-attr:tenant_id': '8a5cd2e83dba4b8888c078fe6236acba',
'size': 45,
'snapshot_id': None,
'source_volid': None,
'status': 'in-use',
'volume_type': 'None'}]}

Here is the object returned by nova (/os-volumes extension):

{'volumes': [{'attachments': [{'device': '/dev/vdb',
 'id': '8b9b1db6-fbcb-4ff5-8e46-375556a8b317',
 'serverId': '0445014a-7028-443b-a97c-d098fc22a55d',
 'volumeId': '8b9b1db6-fbcb-4ff5-8e46-375556a8b317'}],
 'availabilityZone': 'ValhallaRegion',
 'createdAt': '2013-10-24T18:50:57.000000',
 'displayDescription': u'',
 'displayName': 'RExplorer_temp2',
 'id': '8b9b1db6-fbcb-4ff5-8e46-375556a8b317',
 'metadata': {},
 'size': 45,
 'snapshotId': None,
 'status': 'in-use',
 'volumeType': 'None'}]}

Is there a reason the API returns an inconsistent value? Which one is 'correct', camelCased or separated_by_underscores?