Abort instance provision if it goes to some status
If the instance goes to some status like deleting, we should abort the provision. Change-Id: Id6382388af7a15636f7dd102e4f1d0d0fbf31113
This commit is contained in:
@@ -87,3 +87,8 @@ class Instance(base.MoganObject, object_base.VersionedObjectDictCompat):
|
||||
updates = self.obj_get_changes()
|
||||
self.dbapi.instance_update(context, self.uuid, updates)
|
||||
self.obj_reset_changes()
|
||||
|
||||
def refresh(self, context=None):
|
||||
"""Refresh the object by re-fetching from the DB."""
|
||||
current = self.__class__.get(context, self.uuid)
|
||||
self.obj_refresh(current)
|
||||
|
||||
Reference in New Issue
Block a user