From: Steven Hardy Date: Tue, 11 Sep 2012 18:07:00 +0000 (+0100) Subject: heat : allow boto_client to accept credentials X-Git-Tag: 2014.1~1438 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ff352a0d10dbac6864bff65cb98b100107fb5060;p=openstack-build%2Fheat-build.git heat : allow boto_client to accept credentials Allow ec2 credentials to optionally be passed in to boto rather than purely relying on config-files Change-Id: Ib821f2bca9bc3f61af521955a9ed52f0059e70e4 Signed-off-by: Steven Hardy --- diff --git a/heat/boto_client.py b/heat/boto_client.py index d2de0000..9a61111e 100644 --- a/heat/boto_client.py +++ b/heat/boto_client.py @@ -274,17 +274,19 @@ def get_client(host, port=None, username=None, password=None, tenant=None, auth_url=None, auth_strategy=None, auth_token=None, region=None, - is_silent_upload=False, insecure=True): + is_silent_upload=False, insecure=True, + aws_access_key=None, aws_secret_key=None): """ Returns a new boto Cloudformation client connection to a heat server """ - # Note we pass None/None for the keys so boto reads /etc/boto.cfg + # Note we pass None/None for the keys by default + # This means boto reads /etc/boto.cfg, or ~/.boto # Also note is_secure is defaulted to False as HTTPS connections # don't seem to work atm, FIXME - cloudformation = BotoClient(aws_access_key_id=None, - aws_secret_access_key=None, is_secure=False, + cloudformation = BotoClient(aws_access_key_id=aws_access_key, + aws_secret_access_key=aws_secret_key, is_secure=False, port=port, path="/v1") if cloudformation: logger.debug("Got CF connection object OK")