Merge "Fix the interface to call update_server_volume"
This commit is contained in:
commit
5a8c1affa1
@ -175,9 +175,10 @@ class API(base.Base):
|
||||
|
||||
def update_server_volume(self, context, server_id, attachment_id,
|
||||
new_volume_id):
|
||||
novaclient(context).volumes.update_server_volume(server_id,
|
||||
attachment_id,
|
||||
new_volume_id)
|
||||
nova = novaclient(context, admin_endpoint=True, privileged_user=True)
|
||||
nova.volumes.update_server_volume(server_id,
|
||||
attachment_id,
|
||||
new_volume_id)
|
||||
|
||||
def create_volume_snapshot(self, context, volume_id, create_info):
|
||||
nova = novaclient(context, admin_endpoint=True, privileged_user=True)
|
||||
|
@ -162,7 +162,9 @@ class NovaApiTestCase(test.TestCase):
|
||||
self.api.update_server_volume(self.ctx, 'server_id',
|
||||
'attach_id', 'new_volume_id')
|
||||
|
||||
mock_novaclient.assert_called_once_with(self.ctx)
|
||||
mock_novaclient.assert_called_once_with(self.ctx,
|
||||
admin_endpoint=True,
|
||||
privileged_user=True)
|
||||
mock_update_server_volume.assert_called_once_with(
|
||||
'server_id',
|
||||
'attach_id',
|
||||
|
Loading…
Reference in New Issue
Block a user