Merge "Adds insecure option to launch_node.py"
This commit is contained in:
commit
5424d7aca7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user