'name': 'testvolume',
'sid': 'a9b9aba7'})
- @mock.patch(NIMBLE_RANDOM)
@mock.patch(NIMBLE_URLLIB2)
@mock.patch(NIMBLE_CLIENT)
@NimbleDriverBaseTestCase.client_mock_decorator(create_configuration(
'nimble', 'nimble_pass', '10.18.108.55', 'default', '*', False))
+ @mock.patch(NIMBLE_RANDOM)
def test_create_cloned_volume(self, mock_random):
mock_random.sample.return_value = 'abcdefghijkl'
self.mock_client_service.service.snapVol.return_value = \
self.mock_client_service.method_calls,
expected_call_list)
- @mock.patch(NIMBLE_RANDOM)
@mock.patch(NIMBLE_URLLIB2)
@mock.patch(NIMBLE_CLIENT)
@NimbleDriverBaseTestCase.client_mock_decorator(create_configuration(
'nimble', 'nimble_pass', '10.18.108.55', 'default', '*'))
+ @mock.patch(NIMBLE_RANDOM)
def test_initialize_connection_igroup_not_exist(self, mock_random):
mock_random.sample.return_value = 'abcdefghijkl'
self.mock_client_service.service.getInitiatorGrpList.return_value = \
self.assertEqual(volume.status, "error")
db.volume_destroy(context.get_admin_context(), volume_id)
- @mock.patch.object(QUOTAS, 'reserve')
- @mock.patch.object(QUOTAS, 'commit')
@mock.patch.object(QUOTAS, 'rollback')
+ @mock.patch.object(QUOTAS, 'commit')
+ @mock.patch.object(QUOTAS, 'reserve')
def test_delete_driver_not_initialized(self, reserve, commit, rollback):
# NOTE(flaper87): Set initialized to False
self.volume.driver._initialized = False
@mock.patch.object(db, 'volume_get')
@mock.patch.object(db, 'volume_update')
def test_initialize_connection_export_failure(self,
- _mock_volume_get,
_mock_volume_update,
+ _mock_volume_get,
_mock_create_export):
"""Test exception path for create_export failure."""
_fake_admin_meta = {'fake-key': 'fake-value'}