Merge "nova client cinder query param changed to display_name"
This commit is contained in:
commit
b4fc9e0d2c
novaclient
@ -2145,7 +2145,7 @@ class ShellTest(utils.TestCase):
|
||||
|
||||
def test_volume_show(self):
|
||||
self.run_command('volume-show Work')
|
||||
self.assert_called('GET', '/volumes?name=Work', pos=-2)
|
||||
self.assert_called('GET', '/volumes?display_name=Work', pos=-2)
|
||||
self.assert_called(
|
||||
'GET',
|
||||
'/volumes/15e59938-07d5-11e1-90e3-e3dffe0c5983',
|
||||
|
@ -86,6 +86,9 @@ class VolumeManager(base.ManagerWithFind):
|
||||
"""
|
||||
search_opts = search_opts or {}
|
||||
|
||||
if 'name' in search_opts.keys():
|
||||
search_opts['display_name'] = search_opts.pop('name')
|
||||
|
||||
qparams = dict((k, v) for (k, v) in six.iteritems(search_opts) if v)
|
||||
|
||||
query_string = '?%s' % parse.urlencode(qparams) if qparams else ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user