Merge "Error occurred while removing instance due to neutron api updated"
This commit is contained in:
commit
f9e39580dc
@ -31,6 +31,7 @@ from nova.openstack.common import timeutils
|
|||||||
from nova.openstack.common import loopingcall
|
from nova.openstack.common import loopingcall
|
||||||
from nova.openstack.common.loopingcall import LoopingCallDone
|
from nova.openstack.common.loopingcall import LoopingCallDone
|
||||||
from nova.openstack.common import jsonutils
|
from nova.openstack.common import jsonutils
|
||||||
|
from nova import objects
|
||||||
from nova.objects import instance as instance_obj
|
from nova.objects import instance as instance_obj
|
||||||
from nova.objects import base as obj_base
|
from nova.objects import base as obj_base
|
||||||
from powervc.nova.driver.compute import computes
|
from powervc.nova.driver.compute import computes
|
||||||
@ -635,6 +636,13 @@ class PowerVCCloudManager(manager.Manager):
|
|||||||
local_instance.get('name'))
|
local_instance.get('name'))
|
||||||
|
|
||||||
# delete network resource
|
# delete network resource
|
||||||
|
# transfer db object to nova instance obj to meet latest community
|
||||||
|
# change
|
||||||
|
if not isinstance(local_instance, obj_base.NovaObject):
|
||||||
|
local_instance = \
|
||||||
|
objects.Instance._from_db_object(ctx,
|
||||||
|
objects.Instance(),
|
||||||
|
local_instance)
|
||||||
self.network_api.deallocate_for_instance(ctx, local_instance)
|
self.network_api.deallocate_for_instance(ctx, local_instance)
|
||||||
|
|
||||||
# Send notification about instance deletion due to sync operation
|
# Send notification about instance deletion due to sync operation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user