Skip to content

Commit

Permalink
v2 api - return bootable attr value on volume list
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Bill Owen committed Sep 30, 2013
1 parent 0f7d937 commit db3088b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cinder/api/v2/views/volumes.py
Expand Up @@ -67,7 +67,8 @@ def detail(self, request, volume):
'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()
}
}

Expand Down
8 changes: 8 additions & 0 deletions cinder/tests/api/v2/test_volumes.py
Expand Up @@ -246,6 +246,7 @@ def test_volume_update(self):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'Updated Test Name',
'attachments': [
{
Expand Down Expand Up @@ -292,6 +293,7 @@ def test_volume_update_metadata(self):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [{
'id': '1',
Expand Down Expand Up @@ -349,6 +351,7 @@ def test_volume_update_with_admin_metadata(self):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [{
'id': '1',
Expand Down Expand Up @@ -446,6 +449,7 @@ def test_volume_list_detail(self):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{
Expand Down Expand Up @@ -501,6 +505,7 @@ def test_volume_list_detail_with_admin_metadata(self):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{
Expand Down Expand Up @@ -832,6 +837,7 @@ def test_volume_show(self):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{
Expand Down Expand Up @@ -877,6 +883,7 @@ def stub_volume_get(self, context, volume_id):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [],
'user_id': 'fakeuser',
Expand Down Expand Up @@ -930,6 +937,7 @@ def test_volume_show_with_admin_metadata(self):
'status': 'fakestatus',
'description': 'displaydesc',
'availability_zone': 'fakeaz',
'bootable': 'false',
'name': 'displayname',
'attachments': [
{
Expand Down

0 comments on commit db3088b

Please sign in to comment.