heat clients : Make boto client select http/https from configfile

Currently we hardcode is_secure=False, but boto supports configuration
of this option from the config file (either ~/.boto or /etc/boto.cfg)
so better to do that

NOTE - you will need to update your boto config to include is_secure=0
to retain current (non https) behavior, since it defaults to on

ref bug 1117594

Change-Id: Ic13e8604f12d3d5be4ec132a1bc04ae7624ec85d
Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
Steven Hardy 2013-02-08 11:34:58 +00:00
parent d83b7911f0
commit d4999382a5
2 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,9 @@
# Make boto output verbose debugging information
debug = 0
# Disable https connections
is_secure = 0
# Override the default AWS endpoint to connect to heat on localhost
cfn_region_name = heat
cfn_region_endpoint = 127.0.0.1

View File

@ -286,11 +286,9 @@ def get_client(host, port=None, username=None,
# 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
# set is_secure=0 in the config to disable https
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: