From 7590fa4e29a8d5f3b0ae36d420eef341fc75f8fd Mon Sep 17 00:00:00 2001 From: Philip Schwartz Date: Thu, 10 Apr 2014 15:46:24 -0400 Subject: [PATCH] Adds insecure option to launch_node.py Added the abillity to use launch_node.py to connect to and create infrastructure instances in openstack setups that are not setup to use the ssl secured clients. This matches the functionality of the nova cli to accept NOVACLIENT_INSECURE. Change-Id: Ibfb5bb4665f36a155ec488c475e03f9cd901e9d6 Signed-off-by: Philip Schwartz --- launch/launch-node.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/launch/launch-node.py b/launch/launch-node.py index 3150083e5e..a379777c33 100755 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -33,6 +33,7 @@ NOVA_PASSWORD = os.environ['OS_PASSWORD'] NOVA_URL = os.environ['OS_AUTH_URL'] NOVA_PROJECT_ID = os.environ['OS_TENANT_NAME'] NOVA_REGION_NAME = os.environ['OS_REGION_NAME'] +NOVACLIENT_INSECURE = os.getenv('NOVACLIENT_INSECURE', None) IPV6 = os.environ.get('IPV6', '0') is 1 SCRIPT_DIR = os.path.dirname(sys.argv[0]) @@ -46,6 +47,10 @@ def get_client(): kwargs = {} kwargs['region_name'] = NOVA_REGION_NAME kwargs['service_type'] = 'compute' + + if NOVACLIENT_INSECURE: + kwargs['insecure'] = True + from novaclient.v1_1.client import Client client = Client(*args, **kwargs) return client