mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #28485 from eyj/fix_28484
Fix invalid usage of _get_conn causing #28484
This commit is contained in:
commit
ec0cbec00b
@ -338,7 +338,7 @@ def subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, prof
|
||||
salt myminion boto_elasticache.subnet_group_exists my-param-group \
|
||||
region=us-east-1
|
||||
'''
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
if not conn:
|
||||
return False
|
||||
try:
|
||||
@ -364,7 +364,7 @@ def create_subnet_group(name, description, subnet_ids, tags=None, region=None,
|
||||
"group description" '[subnet-12345678, subnet-87654321]' \
|
||||
region=us-east-1
|
||||
'''
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
if not conn:
|
||||
return False
|
||||
if subnet_group_exists(name, tags, region, key, keyid, profile):
|
||||
@ -438,7 +438,7 @@ def delete_subnet_group(name, region=None, key=None, keyid=None, profile=None):
|
||||
salt myminion boto_elasticache.delete_subnet_group my-subnet-group \
|
||||
region=us-east-1
|
||||
'''
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
if not conn:
|
||||
return False
|
||||
try:
|
||||
|
@ -509,7 +509,7 @@ def put_group_policy(group_name, policy_name, policy_json, region=None, key=None
|
||||
if not group:
|
||||
log.error('Group {0} does not exist'.format(group_name))
|
||||
return False
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
try:
|
||||
if not isinstance(policy_json, string_types):
|
||||
policy_json = json.dumps(policy_json)
|
||||
@ -538,7 +538,7 @@ def delete_group_policy(group_name, policy_name, region=None, key=None,
|
||||
|
||||
salt myminion boto_iam.delete_group_policy mygroup mypolicy
|
||||
'''
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
if not conn:
|
||||
return False
|
||||
_policy = get_group_policy(
|
||||
@ -599,7 +599,7 @@ def get_all_group_policies(group_name, region=None, key=None, keyid=None,
|
||||
|
||||
salt myminion boto_iam.get_all_group_policies mygroup
|
||||
'''
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
if not conn:
|
||||
return False
|
||||
try:
|
||||
@ -1144,7 +1144,7 @@ def put_user_policy(user_name, policy_name, policy_json, region=None, key=None,
|
||||
if not user:
|
||||
log.error('User {0} does not exist'.format(user_name))
|
||||
return False
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
try:
|
||||
if not isinstance(policy_json, string_types):
|
||||
policy_json = json.dumps(policy_json)
|
||||
@ -1172,7 +1172,7 @@ def delete_user_policy(user_name, policy_name, region=None, key=None, keyid=None
|
||||
|
||||
salt myminion boto_iam.delete_user_policy myuser mypolicy
|
||||
'''
|
||||
conn = _get_conn(region, key, keyid, profile)
|
||||
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
|
||||
if not conn:
|
||||
return False
|
||||
_policy = get_user_policy(
|
||||
|
Loading…
Reference in New Issue
Block a user