From 637875f729538ac5cf294ce20fd37babd84587ff Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 5 Jul 2012 21:51:55 +0100 Subject: [PATCH] heat : heat-boto remove boto.cfg reading Remove code directly reading boto.cfg, looks like the problem with boto not reading the config file internally is fixed upstream Signed-off-by: Steven Hardy Change-Id: I57e1d89d0fa83793d51d5cf6266c200d7abc7d57 --- bin/heat-boto | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/bin/heat-boto b/bin/heat-boto index 8c6e85bd..40a06ea1 100755 --- a/bin/heat-boto +++ b/bin/heat-boto @@ -438,29 +438,14 @@ def get_client(options): Returns a new boto client object to a heat server """ - logging.debug("boto config expected in /etc/boto.cfg, reading contents") - - # Retrieve the credentials from the config file - # FIXME : send patch to boto so it retrives these credentials from its - # config file, we shouldn't need to manually parse it... - access_key_id = boto.config.get_value('Credentials', 'aws_access_key_id') - secret_access_key = boto.config.get_value('Credentials', - 'aws_secret_access_key') - if (access_key_id and secret_access_key): - logging.debug("Got credentials id=%s secret=%s" % (access_key_id, - secret_access_key)) - else: - logging.error( - "Failed to get required credentials, please pass in /etc/boto.cfg") - # FIXME : reopen boto pull-request so that --host can override the # host specified in the hostname by passing it via the constructor # I implemented this previously, but they preferred the config-file # solution.. - cloudformation = boto.connect_cloudformation( - aws_access_key_id=access_key_id, - aws_secret_access_key=secret_access_key, - debug=options.debug, is_secure=False, port=options.port, path="/v1") + # Note we pass None/None for the keys so boto reads /etc/boto.cfg + cloudformation = boto.connect_cloudformation(aws_access_key_id=None, + aws_secret_access_key=None, debug=options.debug, is_secure=False, + port=options.port, path="/v1") if cloudformation: logging.debug("Got CF connection object OK") else: -- 2.45.2