Minor bug fixes and add missing waypoints logging for compute mgmt
This commit is contained in:
@@ -829,7 +829,7 @@ def main():
|
||||
if subj.comp_info['status'] in ("DISABLED", "MIGRATING", "DELETING", "DESTROYING", "ERROR", "REDEPLOYING"):
|
||||
# cannot do anything on the existing Compute in the listed states
|
||||
subj.error() # was subj.nop()
|
||||
elif subj.comp_info['status'] == "ENABLED":
|
||||
elif subj.comp_info['status'] in ("ENABLED", "DISABLED"):
|
||||
if amodule.params['state'] == 'absent':
|
||||
subj.destroy()
|
||||
elif amodule.params['state'] in ('present', 'paused', 'poweredon', 'poweredoff', 'halted'):
|
||||
@@ -843,8 +843,9 @@ def main():
|
||||
_, subj.comp_info, _ = subj.compute_find(comp_id=subj.comp_id)
|
||||
subj.modify()
|
||||
elif amodule.params['state'] == 'absent':
|
||||
subj.nop()
|
||||
subj.comp_should_exist = False
|
||||
# subj.nop()
|
||||
# subj.comp_should_exist = False
|
||||
subj.destroy()
|
||||
elif amodule.params['state'] in ('paused', 'poweredoff', 'halted'):
|
||||
subj.error()
|
||||
elif subj.comp_info['status'] == "DESTROYED":
|
||||
|
||||
@@ -625,6 +625,8 @@ class DecortController(object):
|
||||
@return: (int) ret_rg_id - validated ID of the RG, where this Compute instance was found.
|
||||
"""
|
||||
|
||||
self.result['waypoints'] = "{} -> {}".format(self.result['waypoints'], "compute_find")
|
||||
|
||||
COMP_INVALID_STATES = ["DESTROYED", "DELETED", "ERROR", "DESTROYING"]
|
||||
|
||||
ret_comp_id = 0
|
||||
@@ -1251,7 +1253,7 @@ class DecortController(object):
|
||||
|
||||
if self.amodule.check_mode:
|
||||
self.result['failed'] = False
|
||||
self.result['msg'] = "rg_delete() in check mode: delete RG ID {} was requested.".format(arg_rg_id)
|
||||
self.result['msg'] = "rg_delete() in check mode: delete RG ID {} was requested.".format(rg_id)
|
||||
return
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user