mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Followups for using __states__
This commit is contained in:
parent
a01f8ac62c
commit
5e25454fc1
@ -409,7 +409,6 @@ def present(
|
||||
args.update(cfg)
|
||||
if not __opts__['test']:
|
||||
lc_ret = __states__['boto_lc.present'](**args)
|
||||
lc_ret = next(six.itervalues(lc_ret))
|
||||
if lc_ret['result'] is True and lc_ret['changes']:
|
||||
if 'launch_config' not in ret['changes']:
|
||||
ret['changes']['launch_config'] = {}
|
||||
@ -612,8 +611,7 @@ def _alarms_present(name, alarms, alarms_from_pillar, region, key, keyid, profil
|
||||
'keyid': keyid,
|
||||
'profile': profile,
|
||||
}
|
||||
ret = __states__['boto_cloudwatch_alarm.present'](**kwargs)
|
||||
results = next(six.itervalues(ret))
|
||||
results = __states__['boto_cloudwatch_alarm.present'](**kwargs)
|
||||
if not results['result']:
|
||||
merged_return_value['result'] = False
|
||||
if results.get('changes', {}) != {}:
|
||||
|
@ -347,7 +347,6 @@ def present(
|
||||
keyid=keyid,
|
||||
profile=profile
|
||||
)
|
||||
_ret = _ret.values()[0]
|
||||
ret['changes'] = dictupdate.update(ret['changes'], _ret['changes'])
|
||||
ret['comment'] = ' '.join([ret['comment'], _ret['comment']])
|
||||
if not _ret['result']:
|
||||
@ -911,8 +910,7 @@ def _alarms_present(name, alarms, alarms_from_pillar, region, key, keyid, profil
|
||||
"keyid": keyid,
|
||||
"profile": profile,
|
||||
}
|
||||
ret = __states__['boto_cloudwatch_alarm.present'](**kwargs)
|
||||
results = next(six.itervalues(ret))
|
||||
results = __states__['boto_cloudwatch_alarm.present'](**kwargs)
|
||||
if not results["result"]:
|
||||
merged_return_value["result"] = results["result"]
|
||||
if results.get("changes", {}) != {}:
|
||||
|
Loading…
Reference in New Issue
Block a user