def _neutron_failed_callback(self, event_name, instance): LOG.error(_LE('Neutron Reported failure on event ' '%(event)s for instance %(uuid)s'), {'event': event_name, 'uuid': instance.uuid}, instance=instance) if CONF.vif_plugging_is_fatal: raise exception.VirtualInterfaceCreateException()
def _cleanup_key(self, instance, id): if isinstance(id, dict): id = id.get('id') dir = os.path.join(CONF.instances_path, id) if os.path.exists(dir): LOG.info(_LI('Deleting instance files %s'), dir, instance=instance) try: shutil.rmtree(dir) except OSError as e: LOG.error(_LE('Failed to cleanup directory %(target)s: ' '%(e)s'), {'target': dir, 'e': e}, instance=instance)