In previous code we didn't set the bootable flag in volume
serializer, and even didn't check it in test. This is the
root cause for bug #
1207155
This patch fixed this issue by set the bootable flag in serializer.
Fixed bug #
1207155
Change-Id: I0219785aa7f30036747c230800447e99c383042c
elem.set('availability_zone')
elem.set('created_at')
elem.set('display_name')
+ elem.set('bootable')
elem.set('display_description')
elem.set('volume_type')
elem.set('snapshot_id')
elem.set('availability_zone')
elem.set('created_at')
elem.set('name')
+ elem.set('bootable')
elem.set('description')
elem.set('volume_type')
elem.set('snapshot_id')
for attr in ('id', 'status', 'size', 'availability_zone', 'created_at',
'display_name', 'display_description', 'volume_type',
- 'snapshot_id'):
+ 'bootable', 'snapshot_id'):
self.assertEqual(str(vol[attr]), tree.get(attr))
for child in tree:
status='vol_status',
size=1024,
availability_zone='vol_availability',
+ bootable=False,
created_at=datetime.datetime.now(),
attachments=[dict(id='vol_id',
volume_id='vol_id',
status='vol1_status',
size=1024,
availability_zone='vol1_availability',
+ bootable=True,
created_at=datetime.datetime.now(),
attachments=[dict(id='vol1_id',
volume_id='vol1_id',
status='vol2_status',
size=1024,
availability_zone='vol2_availability',
+ bootable=False,
created_at=datetime.datetime.now(),
attachments=[dict(id='vol2_id',
volume_id='vol2_id',
self.assertEqual(tree.tag, NS + 'volume')
for attr in ('id', 'status', 'size', 'availability_zone', 'created_at',
- 'name', 'description', 'volume_type',
+ 'name', 'description', 'volume_type', 'bootable',
'snapshot_id', 'source_volid'):
self.assertEqual(str(vol[attr]), tree.get(attr))
status='vol_status',
size=1024,
availability_zone='vol_availability',
+ bootable=False,
created_at=datetime.datetime.now(),
attachments=[
dict(
status='vol1_status',
size=1024,
availability_zone='vol1_availability',
+ bootable=True,
created_at=datetime.datetime.now(),
attachments=[
dict(
status='vol2_status',
size=1024,
availability_zone='vol2_availability',
+ bootable=False,
created_at=datetime.datetime.now(),
attachments=[dict(id='vol2_id',
volume_id='vol2_id',