Merge "Remove a dead cinder v1 check"
This commit is contained in:
commit
5ce3fada48
@ -281,17 +281,6 @@ class CinderApiTestCase(test.NoDBTestCase):
|
||||
mock_volumes.attach.assert_called_once_with('id1', 'uuid', 'point',
|
||||
mode='ro')
|
||||
|
||||
@mock.patch('nova.volume.cinder.cinderclient')
|
||||
def test_detach_v1(self, mock_cinderclient):
|
||||
mock_volumes = mock.MagicMock()
|
||||
mock_cinderclient.return_value = mock.MagicMock(version='1',
|
||||
volumes=mock_volumes)
|
||||
|
||||
self.api.detach(self.ctx, 'id1', instance_uuid='fake_uuid')
|
||||
|
||||
mock_cinderclient.assert_called_with(self.ctx)
|
||||
mock_volumes.detach.assert_called_once_with('id1')
|
||||
|
||||
@mock.patch('nova.volume.cinder.cinderclient')
|
||||
def test_detach(self, mock_cinderclient):
|
||||
mock_volumes = mock.MagicMock()
|
||||
|
@ -319,10 +319,6 @@ class API(object):
|
||||
def detach(self, context, volume_id, instance_uuid=None,
|
||||
attachment_id=None):
|
||||
client = cinderclient(context)
|
||||
if client.version == '1':
|
||||
client.volumes.detach(volume_id)
|
||||
return
|
||||
|
||||
if attachment_id is None:
|
||||
volume = self.get(context, volume_id)
|
||||
if volume['multiattach']:
|
||||
|
Loading…
Reference in New Issue
Block a user