def _cleanup_resize(self, instance, network_info):
    pre_grizzly_name = libvirt_utils.get_instance_path(instance, forceold=True)
    target = (pre_grizzly_name + '_resize')
    if (not os.path.exists(target)):
        target = (libvirt_utils.get_instance_path(instance) + '_resize')
    if os.path.exists(target):
        utils.execute('rm', '-rf', target, delay_on_retry=True, attempts=5)
    if (instance['host'] != CONF.host):
        self._undefine_domain(instance)
        self.unplug_vifs(instance, network_info)
        self.firewall_driver.unfilter_instance(instance, network_info)
def _cleanup_resize(self, instance, network_info):
    pre_grizzly_name = libvirt_utils.get_instance_path(instance, forceold=True)
    target = (pre_grizzly_name + '_resize')
    if (not os.path.exists(target)):
        target = (libvirt_utils.get_instance_path(instance) + '_resize')
    if os.path.exists(target):
        utils.execute('rm', '-rf', target, delay_on_retry=True, attempts=5)
    if (instance['host'] != CONF.host):
        self._undefine_domain(instance)
        self.unplug_vifs(instance, network_info)
        self.firewall_driver.unfilter_instance(instance, network_info)