heat : boto_client_cloudwatch allow credentials override
Allow the AWS key/secret to be passed in when making the client connection like boto_client.py Ref #222 Change-Id: Iee24120eb52c8ffb97b1b421b0a27313e5f5cbdd Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
parent
b1c97d1455
commit
98b6c2a566
|
@ -189,7 +189,7 @@ class BotoCWClient(CloudWatchConnection):
|
||||||
return '\n'.join(ret)
|
return '\n'.join(ret)
|
||||||
|
|
||||||
|
|
||||||
def get_client(port=None):
|
def get_client(port=None, aws_access_key=None, aws_secret_key=None):
|
||||||
"""
|
"""
|
||||||
Returns a new boto CloudWatch client connection to a heat server
|
Returns a new boto CloudWatch client connection to a heat server
|
||||||
Note : Configuration goes in /etc/boto.cfg, not via arguments
|
Note : Configuration goes in /etc/boto.cfg, not via arguments
|
||||||
|
@ -198,8 +198,8 @@ def get_client(port=None):
|
||||||
# Note we pass None/None for the keys so boto reads /etc/boto.cfg
|
# Note we pass None/None for the keys so boto reads /etc/boto.cfg
|
||||||
# Also note is_secure is defaulted to False as HTTPS connections
|
# Also note is_secure is defaulted to False as HTTPS connections
|
||||||
# don't seem to work atm, FIXME
|
# don't seem to work atm, FIXME
|
||||||
cloudwatch = BotoCWClient(aws_access_key_id=None,
|
cloudwatch = BotoCWClient(aws_access_key_id=aws_access_key,
|
||||||
aws_secret_access_key=None, is_secure=False,
|
aws_secret_access_key=aws_secret_key, is_secure=False,
|
||||||
port=port, path="/v1")
|
port=port, path="/v1")
|
||||||
if cloudwatch:
|
if cloudwatch:
|
||||||
logger.debug("Got CW connection object OK")
|
logger.debug("Got CW connection object OK")
|
||||||
|
|
Loading…
Reference in New Issue