Bump to hacking 1.1.0
This brings in a couple of new checks which must be addressed, many of which involve a rather large amount of changes, so these are ignored for now. A series of follow-up changes will resolved these. 'pycodestyle' is added as a dependency rather than it being pulled in transitively. This is necessary since we're using it in tests. Change-Id: I35c654bd39f343417e0a1124263ff31dcd0b05c9 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
@@ -1101,7 +1101,7 @@ def fake_fetch_image(context, instance, host, port, dc_name, ds_name,
|
||||
def _get_vm_mdo(vm_ref):
|
||||
"""Gets the Virtual Machine with the ref from the db."""
|
||||
if _db_content.get("VirtualMachine", None) is None:
|
||||
raise exception.NotFound("There is no VM registered")
|
||||
raise exception.NotFound("There is no VM registered")
|
||||
if vm_ref not in _db_content.get("VirtualMachine"):
|
||||
raise exception.NotFound("Virtual Machine with ref %s is not "
|
||||
"there" % vm_ref)
|
||||
|
||||
@@ -153,17 +153,17 @@ class VMwareVolumeOpsTestCase(test.NoDBTestCase):
|
||||
@mock.patch.object(vm_util, 'reconfigure_vm')
|
||||
def test_update_volume_details(self, reconfigure_vm,
|
||||
get_vm_extra_config_spec):
|
||||
volume_uuid = '26f5948e-52a3-4ee6-8d48-0a379afd0828'
|
||||
device_uuid = '0d86246a-2adb-470d-a9f7-bce09930c5d'
|
||||
self._volumeops._update_volume_details(
|
||||
mock.sentinel.vm_ref, volume_uuid, device_uuid)
|
||||
volume_uuid = '26f5948e-52a3-4ee6-8d48-0a379afd0828'
|
||||
device_uuid = '0d86246a-2adb-470d-a9f7-bce09930c5d'
|
||||
self._volumeops._update_volume_details(
|
||||
mock.sentinel.vm_ref, volume_uuid, device_uuid)
|
||||
|
||||
get_vm_extra_config_spec.assert_called_once_with(
|
||||
self._volumeops._session.vim.client.factory,
|
||||
{'volume-%s' % volume_uuid: device_uuid})
|
||||
reconfigure_vm.assert_called_once_with(self._volumeops._session,
|
||||
mock.sentinel.vm_ref,
|
||||
mock.sentinel.extra_config)
|
||||
get_vm_extra_config_spec.assert_called_once_with(
|
||||
self._volumeops._session.vim.client.factory,
|
||||
{'volume-%s' % volume_uuid: device_uuid})
|
||||
reconfigure_vm.assert_called_once_with(self._volumeops._session,
|
||||
mock.sentinel.vm_ref,
|
||||
mock.sentinel.extra_config)
|
||||
|
||||
def _fake_connection_info(self):
|
||||
return {'driver_volume_type': 'vmdk',
|
||||
|
||||
Reference in New Issue
Block a user