Merge branch 'BANS-341' into 'dev_rc-5.2.6'
Add LB starting logic in LB restoring logic and fix DecortController.lb_state... See merge request rudecs/dev/decort-ansible!61
This commit is contained in:
@@ -135,8 +135,7 @@ class decort_lb(DecortController):
|
||||
self.lb_restore(lb_id=self.lb_id)
|
||||
_, self.lb_facts = self._lb_get_by_id(lb_id=self.lb_id)
|
||||
self.lb_state(self.lb_facts, 'enabled')
|
||||
self.lb_facts['status'] = "ENABLED"
|
||||
self.lb_facts['techStatus'] = "STARTED"
|
||||
_, self.lb_facts = self._lb_get_by_id(lb_id=self.lb_id)
|
||||
|
||||
self.lb_update(
|
||||
self.lb_facts['primaryNode'],
|
||||
@@ -322,7 +321,7 @@ def main():
|
||||
decon.action(amodule.params['state'])
|
||||
elif decon.lb_facts['status'] == "DELETED":
|
||||
if amodule.params['state'] in ['present', 'enabled']:
|
||||
decon.action(restore=True)
|
||||
decon.action(d_state='started', restore=True)
|
||||
elif (amodule.params['state'] == 'absent' and
|
||||
amodule.params['permanently']):
|
||||
decon.delete()
|
||||
|
||||
@@ -4177,7 +4177,7 @@ class DecortController(object):
|
||||
|
||||
NOP_STATES_FOR_LB_CHANGE = ["MODELED", "DISABLING", "ENABLING", "DELETING", "DELETED", "DESTROYING",
|
||||
"DESTROYED"]
|
||||
VALID_TARGET_STATES = ["enabled", "disabled","restart"]
|
||||
VALID_TARGET_STATES = ["enabled", "disabled","restart", 'started']
|
||||
VALID_TARGET_TSTATES = ["STARTED","STOPPED"]
|
||||
|
||||
if lb_dict['status'] in NOP_STATES_FOR_LB_CHANGE:
|
||||
|
||||
Reference in New Issue
Block a user