Skip to content

Commit

Permalink
Add te field user_id into the volume detailed information.
Browse files Browse the repository at this point in the history
Fixed Bug 1200555.

Change-Id: Ibc36453caa174432b69597b1b2a0b314a7730357
  • Loading branch information
Vincent Hou committed Jul 16, 2013
1 parent 521ebe3 commit c562ac7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cinder/api/v2/views/volumes.py
Expand Up @@ -66,7 +66,8 @@ def detail(self, request, volume):
'snapshot_id': volume.get('snapshot_id'),
'source_volid': volume.get('source_volid'),
'metadata': self._get_volume_metadata(volume),
'links': self._get_links(request, volume['id'])
'links': self._get_links(request, volume['id']),
'user_id': volume.get('user_id')
}
}

Expand Down
5 changes: 5 additions & 0 deletions cinder/tests/api/v2/test_volumes.py
Expand Up @@ -239,6 +239,7 @@ def test_volume_update(self):
'device': '/',
}
],
'user_id': 'fakeuser',
'volume_type': 'vol_type_name',
'snapshot_id': None,
'source_volid': None,
Expand Down Expand Up @@ -280,6 +281,7 @@ def test_volume_update_metadata(self):
'host_name': None,
'device': '/',
}],
'user_id': 'fakeuser',
'volume_type': 'vol_type_name',
'snapshot_id': None,
'source_volid': None,
Expand Down Expand Up @@ -373,6 +375,7 @@ def test_volume_list_detail(self):
'volume_id': '1'
}
],
'user_id': 'fakeuser',
'volume_type': 'vol_type_name',
'snapshot_id': None,
'source_volid': None,
Expand Down Expand Up @@ -608,6 +611,7 @@ def test_volume_show(self):
'volume_id': '1'
}
],
'user_id': 'fakeuser',
'volume_type': 'vol_type_name',
'snapshot_id': None,
'source_volid': None,
Expand Down Expand Up @@ -644,6 +648,7 @@ def stub_volume_get(self, context, volume_id):
'availability_zone': 'fakeaz',
'name': 'displayname',
'attachments': [],
'user_id': 'fakeuser',
'volume_type': 'vol_type_name',
'snapshot_id': None,
'source_volid': None,
Expand Down

0 comments on commit c562ac7

Please sign in to comment.