Honor CLOUD_VERIFY_SSL variable in rax import

This commit is contained in:
James Laska
2016-06-16 15:49:08 -04:00
parent bdcb6e5c20
commit af8011cd91
2 changed files with 5 additions and 1 deletions

View File

@@ -385,6 +385,10 @@ def parse_args():
def setup():
default_creds_file = os.path.expanduser('~/.rackspace_cloud_credentials')
# pyrax does not honor the environment variable CLOUD_VERIFY_SSL=False, so let's help pyrax
if 'CLOUD_VERIFY_SSL' in os.environ:
pyrax.set_setting('verify_ssl', os.environ['CLOUD_VERIFY_SSL'])
env = get_config(p, 'rax', 'environment', 'RAX_ENV', None)
if env:
pyrax.set_environment(env)