diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-07-02 19:25:38 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-07-02 19:25:38 +0000 |
commit | 29c74f40d4913fb34b2a32295bd1187ad055c2f3 (patch) | |
tree | b2b451208514230fa17b6ba2ad56e48baa5f7066 | |
parent | a62bf594e6e7c0e6d27d58d524a6e9b239571023 (diff) | |
parent | 301af8d4003dfe7390c7939936c3bcb2169008c4 (diff) | |
download | ironic-29c74f40d4913fb34b2a32295bd1187ad055c2f3.tar.gz |
Merge "Update Nova Ironic Driver destroy() method"
-rw-r--r-- | ironic/nova/virt/ironic/driver.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ironic/nova/virt/ironic/driver.py b/ironic/nova/virt/ironic/driver.py index 7699c8cb2..1aea18fb0 100644 --- a/ironic/nova/virt/ironic/driver.py +++ b/ironic/nova/virt/ironic/driver.py @@ -34,7 +34,7 @@ from nova import exception from nova.objects import flavor as flavor_obj from nova.objects import instance as instance_obj from nova.openstack.common import excutils -from nova.openstack.common.gettextutils import _ +from nova.openstack.common.gettextutils import _, _LW from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import loopingcall @@ -547,13 +547,24 @@ class IronicDriver(virt_driver.ComputeDriver): timer.start(interval=CONF.ironic.api_retry_interval).wait() def destroy(self, context, instance, network_info, - block_device_info=None): + block_device_info=None, destroy_disks=True): + """Destroy the specified instance, if it can be found. + + :param context: The security context. + :param instance: The instance object. + :param network_info: Instance network information. + :param block_device_info: Instance block device + information. Ignored by this driver. + :param destroy_disks: Indicates if disks should be + destroyed. Ignored by this driver. + + """ icli = client_wrapper.IronicClientWrapper() try: node = validate_instance_and_node(icli, instance) except exception.InstanceNotFound: - LOG.debug("Destroy called on non-existing instance %s." - % instance['uuid']) + LOG.warning(_LW("Destroy called on non-existing instance %s."), + instance['uuid']) # NOTE(deva): if nova.compute.ComputeManager._delete_instance() # is called on a non-existing instance, the only way # to delete it is to return from this method |