Merge branch 'fix/rc-5.2.6/decort_utils.py' into 'rc-5.2.6'

Fix account vins find logic

See merge request rudecs/dev/decort-ansible!7
rc-5.3.0^2
Алексей Даньков 11 months ago
commit 5b66c98cc6

@ -2250,9 +2250,9 @@ class DecortController(object):
# self.result['msg'] = "vins_find(): cannot find Account ID {}.".format(account_id) # self.result['msg'] = "vins_find(): cannot find Account ID {}.".format(account_id)
# self.amodule.fail_json(**self.result) # self.amodule.fail_json(**self.result)
# NOTE: account's 'vins' attribute does not list destroyed ViNSes! # NOTE: account's 'vins' attribute does not list destroyed ViNSes!
for runner in rg_facts['vins']: account_vinses = self._get_all_account_vinses(account_id)
# api_params['vinsId'] = runner for vins in account_vinses:
ret_vins_id, ret_vins_facts = self._vins_get_by_id(runner) ret_vins_id, ret_vins_facts = self._vins_get_by_id(vins['id'])
if ret_vins_id and ret_vins_facts['name'] == vins_name: if ret_vins_id and ret_vins_facts['name'] == vins_name:
if not check_state or ret_vins_facts['status'] not in VINS_INVALID_STATES: if not check_state or ret_vins_facts['status'] not in VINS_INVALID_STATES:
return ret_vins_id, ret_vins_facts return ret_vins_id, ret_vins_facts

Loading…
Cancel
Save