[openstack-dev] [nova] volume dictionary

Tobias Engelbert tobias.engelbert at ericsson.com
Fri Jan 16 14:54:17 UTC 2015


I am working on the Nova side of "Add volume multi-attach support"  https://review.openstack.org/#/c/143114/5.
I see a problem with the volume dictionary in nova code while running unit tests (with the multiattach patches).

I get the following error by running the unit test nova.tests.functional.test_api_samples.VolumesSampleJsonTest.test_volumes_index / nova.tests.functional.test_api_samples.VolumesSampleJsonTest.test_volumes_detail:

NoMatch: Extra list items in template:
{u'status': u'in-use', u'displayDescription': u'%(volume_desc)s', u'availabilityZone': u'zone1:host1',
u'displayName': u'%(volume_name)s', u'attachments': [{u'device': u'/', u'serverId': u'%(uuid)s', u'id': u'%(uuid)s',
u'volumeId': u'%(uuid)s'}], u'volumeType': u'Backup', u'snapshotId': None, u'size': 100, u'id': u'%(uuid)s',
u'createdAt': u'%(strtime)s', u'metadata': {}}
Extra list items in Response:
{u'status': u'in-use', u'displayDescription': u'Volume Description', u'availabilityZone': u'zone1:host1',
u'displayName': u'Volume Name', u'attachments': [{}], u'volumeType': u'Backup', u'snapshotId': None,
u'size': 100, u'id': u'a26887c6-c47b-4654-abb5-dfadf7d3f803', u'createdAt': u'2008-12-01T11:01:55.000000', u'metadata': {}}

Nova can't find e.g. the key "instance_uuid" in the volume dictionary if the attachments key is empty.

There are different "types" of volume dictionaries in the code and I am a bit confused which one I should use for multiattach..
It looks like in one case there are keys like instance_uuid or mountpoint outside of the attachments dict,
in another case these keys are outside and inside of the attachments. In another case just inside the attachment dict.

Does anybody has a clue about this?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150116/745d43c2/attachment.html>

More information about the OpenStack-dev mailing list