Merge "Use resource_id_set to clear resource ID's"
This commit is contained in:
commit
8c7872e148
@ -484,7 +484,7 @@ class Instance(resource.Resource):
|
||||
try:
|
||||
server.get()
|
||||
except clients.novaclient.exceptions.NotFound:
|
||||
self.resource_id = None
|
||||
self.resource_id_set(None)
|
||||
break
|
||||
|
||||
def _detach_volumes_task(self):
|
||||
@ -507,7 +507,7 @@ class Instance(resource.Resource):
|
||||
try:
|
||||
server = self.nova().servers.get(self.resource_id)
|
||||
except clients.novaclient.exceptions.NotFound:
|
||||
self.resource_id = None
|
||||
self.resource_id_set(None)
|
||||
return
|
||||
|
||||
server_delete_task = scheduler.TaskRunner(self._delete_server,
|
||||
|
@ -189,7 +189,7 @@ class SecurityGroup(resource.Resource):
|
||||
pass
|
||||
|
||||
self.nova().security_groups.delete(self.resource_id)
|
||||
self.resource_id = None
|
||||
self.resource_id_set(None)
|
||||
|
||||
def _handle_delete_neutron(self):
|
||||
from neutronclient.common.exceptions import NeutronClientException
|
||||
@ -215,7 +215,7 @@ class SecurityGroup(resource.Resource):
|
||||
except NeutronClientException as ex:
|
||||
if ex.status_code != 404:
|
||||
raise
|
||||
self.resource_id = None
|
||||
self.resource_id_set(None)
|
||||
|
||||
def FnGetRefId(self):
|
||||
if self.properties['VpcId']:
|
||||
|
@ -472,7 +472,7 @@ class Server(resource.Resource):
|
||||
delete = scheduler.TaskRunner(nova_utils.delete_server, server)
|
||||
delete(wait_time=0.2)
|
||||
|
||||
self.resource_id = None
|
||||
self.resource_id_set(None)
|
||||
|
||||
def handle_suspend(self):
|
||||
'''
|
||||
|
@ -124,7 +124,7 @@ class Volume(resource.Resource):
|
||||
yield
|
||||
vol.get()
|
||||
except clients.cinderclient.exceptions.NotFound:
|
||||
self.resource_id = None
|
||||
self.resource_id_set(None)
|
||||
|
||||
if volume_backups is not None:
|
||||
def handle_snapshot_delete(self, state):
|
||||
|
Loading…
Reference in New Issue
Block a user