diff --git a/nova/tests/unit/volume/test_cinder.py b/nova/tests/unit/volume/test_cinder.py index a0a2f8987e..6d3aaf5441 100644 --- a/nova/tests/unit/volume/test_cinder.py +++ b/nova/tests/unit/volume/test_cinder.py @@ -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() diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py index 531e32d07d..98794058b2 100644 --- a/nova/volume/cinder.py +++ b/nova/volume/cinder.py @@ -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']: