From 9d80fb6070a1ecd49ce84db8bb777e09dc7186bd Mon Sep 17 00:00:00 2001 From: Nasenbaer Date: Mon, 2 Nov 2015 14:53:05 +0100 Subject: [PATCH] Fix invalid usage of _get_conn causing #28484 --- salt/modules/boto_elasticache.py | 6 +++--- salt/modules/boto_iam.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/salt/modules/boto_elasticache.py b/salt/modules/boto_elasticache.py index f5d49c3798..249048f188 100644 --- a/salt/modules/boto_elasticache.py +++ b/salt/modules/boto_elasticache.py @@ -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: diff --git a/salt/modules/boto_iam.py b/salt/modules/boto_iam.py index d8b60d9485..30a1595d26 100644 --- a/salt/modules/boto_iam.py +++ b/salt/modules/boto_iam.py @@ -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(