Driver interface updates

The "destroy_secrets" argument has been added to the "destroy" and
"cleanup" driver methods [1]. At the moment, it's only passed by the
Libvirt driver, so this interface change didn't break our driver.

At the same time, the "needs_legacy_block_device_info" property has
been removed [2].

[1] I856268b371f7ba712b02189db3c927cd762a4dc3
[2] I3895b61b436b9bb882477d2d1b3f4907f03b3b1c

Change-Id: I62b45bb8c3677e0117cbe2d86764ebb904deac90
This commit is contained in:
Lucian Petrut 2021-11-08 09:42:55 +02:00
parent b76e4867bd
commit 74c6d24e29
2 changed files with 4 additions and 7 deletions

View File

@ -48,7 +48,7 @@ class HyperVClusterDriver(driver.HyperVDriver):
self._clops.add_to_cluster(instance)
def destroy(self, context, instance, network_info, block_device_info=None,
destroy_disks=True):
destroy_disks=True, destroy_secrets=True):
self._clops.remove_from_cluster(instance)
super(HyperVClusterDriver, self).destroy(
context, instance, network_info, block_device_info,

View File

@ -160,10 +160,6 @@ class HyperVDriver(driver.ComputeDriver):
'has been deprecated In Queens, and will be removed '
'in Rocky.')
@property
def need_legacy_block_device_info(self):
return False
def init_host(self, host):
self._serialconsoleops.start_console_handlers()
@ -199,12 +195,13 @@ class HyperVDriver(driver.ComputeDriver):
self._vmops.reboot(instance, network_info, reboot_type)
def destroy(self, context, instance, network_info, block_device_info=None,
destroy_disks=True):
destroy_disks=True, destroy_secrets=True):
self._vmops.destroy(instance, network_info, block_device_info,
destroy_disks)
def cleanup(self, context, instance, network_info, block_device_info=None,
destroy_disks=True, migrate_data=None, destroy_vifs=True):
destroy_disks=True, migrate_data=None, destroy_vifs=True,
destroy_secrets=True):
"""Cleanup after instance being destroyed by Hypervisor."""
self.unplug_vifs(instance, network_info)