Pass in 'pack' variable to utils.boto.assign_funcs function from ALL boto modules.

This commit is contained in:
rallytime 2016-02-03 11:57:44 -07:00 committed by Colton Myers
parent 1efaff107d
commit 1ae022dbfe
14 changed files with 18 additions and 17 deletions

View file

@ -78,7 +78,7 @@ def __virtual__():
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'asg', module='ec2.autoscale')
__utils__['boto.assign_funcs'](__name__, 'asg', module='ec2.autoscale', pack=__salt__)
setattr(sys.modules[__name__], '_get_ec2_conn',
__utils__['boto.get_connection_func']('ec2'))
return True

View file

@ -62,9 +62,9 @@ def __virtual__():
return True
def __init__(opts):
def __init__(opts, pack=None):
if HAS_BOTO:
__utils__['boto.assign_funcs'](__name__, 'cfn', module='cloudformation')
__utils__['boto.assign_funcs'](__name__, 'cfn', module='cloudformation', pack=pack)
def exists(name, region=None, key=None, keyid=None, profile=None):

View file

@ -76,7 +76,8 @@ def __virtual__():
if not HAS_BOTO:
return (False, 'The boto_cloudwatch module cannot be loaded: boto libraries are unavailable.')
__utils__['boto.assign_funcs'](__name__, 'cloudwatch',
module='ec2.cloudwatch')
module='ec2.cloudwatch',
pack=__salt__)
return True

View file

@ -75,7 +75,7 @@ def __virtual__():
'''
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'dynamodb2')
__utils__['boto.assign_funcs'](__name__, 'dynamodb2', pack=__salt__)
return True

View file

@ -83,7 +83,7 @@ def __virtual__():
elif _LooseVersion(boto.__version__) < _LooseVersion(required_boto_version):
return False
else:
__utils__['boto.assign_funcs'](__name__, 'ec2')
__utils__['boto.assign_funcs'](__name__, 'ec2', pack=__salt__)
return True

View file

@ -74,7 +74,7 @@ def __virtual__():
'''
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'elasticache')
__utils__['boto.assign_funcs'](__name__, 'elasticache', pack=__salt__)
return True

View file

@ -86,7 +86,7 @@ def __virtual__():
'''
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'elb', module='ec2.elb')
__utils__['boto.assign_funcs'](__name__, 'elb', module='ec2.elb', pack=__salt__)
return True

View file

@ -67,7 +67,7 @@ def __virtual__():
'''
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'iam')
__utils__['boto.assign_funcs'](__name__, 'iam', pack=__salt__)
return True

View file

@ -77,10 +77,10 @@ def __virtual__():
return True
def __init__(opts):
def __init__(opts, pack=None):
salt.utils.compat.pack_dunder(__name__)
if HAS_BOTO:
__utils__['boto.assign_funcs'](__name__, 'kms')
__utils__['boto.assign_funcs'](__name__, 'kms', pack=__salt__)
def create_alias(alias_name, target_key_id, region=None, key=None, keyid=None,

View file

@ -70,7 +70,7 @@ def __virtual__():
'''
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'rds', module='rds2')
__utils__['boto.assign_funcs'](__name__, 'rds', module='rds2', pack=__salt__)
return True

View file

@ -85,10 +85,10 @@ def __virtual__():
return True
def __init__(opts):
def __init__(opts, pack=None):
salt.utils.compat.pack_dunder(__name__)
if HAS_BOTO:
__utils__['boto.assign_funcs'](__name__, 'route53')
__utils__['boto.assign_funcs'](__name__, 'route53', pack=pack)
def _get_split_zone(zone, _conn, private_zone):

View file

@ -85,7 +85,7 @@ def __virtual__():
elif _LooseVersion(boto.__version__) < _LooseVersion(required_boto_version):
return False
else:
__utils__['boto.assign_funcs'](__name__, 'ec2')
__utils__['boto.assign_funcs'](__name__, 'ec2', pack=__salt__)
return True

View file

@ -66,7 +66,7 @@ def __virtual__():
'''
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'sns')
__utils__['boto.assign_funcs'](__name__, 'sns', pack=__salt__)
return True

View file

@ -73,7 +73,7 @@ def __virtual__():
'''
if not HAS_BOTO:
return False
__utils__['boto.assign_funcs'](__name__, 'sqs')
__utils__['boto.assign_funcs'](__name__, 'sqs', pack=__salt__)
return True