v2 api - return bootable attr value on volume list

Add bootable to the list of values returned by display_list.  This
was returned in v1 api, and is still in v2 header, but was missed
in the new implementation.

Closes-Bug: #1232287

Change-Id: If7460b1c8ab4af417117c4bf6cfdccc5fcf21f46
This commit is contained in:
Bill Owen 2013-09-27 16:22:41 -07:00
parent 0f7d937786
commit db3088b888
2 changed files with 10 additions and 1 deletions

View File

@ -67,7 +67,8 @@ class ViewBuilder(common.ViewBuilder):
'source_volid': volume.get('source_volid'),
'metadata': self._get_volume_metadata(volume),
'links': self._get_links(request, volume['id']),
'user_id': volume.get('user_id')
'user_id': volume.get('user_id'),
'bootable': str(volume.get('bootable')).lower()
}
}

View File

@ -246,6 +246,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'Updated Test Name',
'attachments': [
{
@ -292,6 +293,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [{
'id': '1',
@ -349,6 +351,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [{
'id': '1',
@ -446,6 +449,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{
@ -501,6 +505,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{
@ -832,6 +837,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{
@ -877,6 +883,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [],
'user_id': 'fakeuser',
@ -930,6 +937,7 @@ class VolumeApiTest(test.TestCase):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{