Followups for using __states__

This commit is contained in:
Ryan Lane 2015-09-28 16:36:28 -07:00
parent a01f8ac62c
commit 5e25454fc1
2 changed files with 2 additions and 6 deletions

View File

@ -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', {}) != {}:

View File

@ -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", {}) != {}: