From 683aa147a4963ec1050afd7b81a56753a9fb11ac Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 16 Oct 2017 16:40:12 +0100 Subject: [PATCH] Remove dead parameter from '_create_domain_and_network' The last use of this was removed in change Id188d48609f3d22d14e16c7f6114291d547a8986. It can now be removed. Change-Id: I13de970c3beed29311d43991115a0c6d28ac14e0 --- nova/tests/unit/virt/libvirt/test_driver.py | 2 +- nova/virt/libvirt/driver.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py index 119705286975..a720bfad0e3f 100755 --- a/nova/tests/unit/virt/libvirt/test_driver.py +++ b/nova/tests/unit/virt/libvirt/test_driver.py @@ -10819,7 +10819,7 @@ class LibvirtConnTestCase(test.NoDBTestCase, def fake_create_domain_and_network( context, xml, instance, network_info, - block_device_info=None, power_on=True, reboot=False, + block_device_info=None, power_on=True, vifs_already_plugged=False, post_xml_callback=None, destroy_disks_on_failure=False): # The config disk should be created by this callback, so we need diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 7941df5cfb1d..2b548fef3102 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -5180,8 +5180,7 @@ class LibvirtDriver(driver.ComputeDriver): destroy_disks=destroy_disks) def _create_domain_and_network(self, context, xml, instance, network_info, - block_device_info=None, - power_on=True, reboot=False, + block_device_info=None, power_on=True, vifs_already_plugged=False, post_xml_callback=None, destroy_disks_on_failure=False): @@ -5193,7 +5192,7 @@ class LibvirtDriver(driver.ComputeDriver): for vol in block_device_mapping: connection_info = vol['connection_info'] - if (not reboot and 'data' in connection_info and + if ('data' in connection_info and 'volume_id' in connection_info['data']): volume_id = connection_info['data']['volume_id'] encryption = encryptors.get_encryption_metadata(