Use __states__ for calls to other boto states

This commit is contained in:
Ryan Lane 2015-09-28 13:44:08 -07:00
parent 9202f956f3
commit a01f8ac62c
2 changed files with 4 additions and 5 deletions

View file

@ -408,7 +408,7 @@ def present(
for cfg in launch_config:
args.update(cfg)
if not __opts__['test']:
lc_ret = __salt__['state.single']('boto_lc.present', **args)
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']:
@ -612,7 +612,7 @@ def _alarms_present(name, alarms, alarms_from_pillar, region, key, keyid, profil
'keyid': keyid,
'profile': profile,
}
ret = __salt__['state.single']('boto_cloudwatch_alarm.present', **kwargs)
ret = __states__['boto_cloudwatch_alarm.present'](**kwargs)
results = next(six.itervalues(ret))
if not results['result']:
merged_return_value['result'] = False

View file

@ -335,8 +335,7 @@ def present(
name, region, key, keyid, profile
)
for cname in cnames:
_ret = __salt__['state.single'](
'boto_route53.present',
_ret = __states__['boto_route53.present'](
name=cname.get('name'),
value=lb['dns_name'],
zone=cname.get('zone'),
@ -912,7 +911,7 @@ def _alarms_present(name, alarms, alarms_from_pillar, region, key, keyid, profil
"keyid": keyid,
"profile": profile,
}
ret = __salt__["state.single"]('boto_cloudwatch_alarm.present', **kwargs)
ret = __states__['boto_cloudwatch_alarm.present'](**kwargs)
results = next(six.itervalues(ret))
if not results["result"]:
merged_return_value["result"] = results["result"]