Pass in service name to nova constructor.

Because, you know, we should have to do this.

Rackspace publishes two things called "compute" into their catalog for
customers who still have the old compute service.

Change-Id: I27d5a78fc743057a270acd4bf7c85fd998f9074d
This commit is contained in:
Monty Taylor 2015-02-26 16:30:13 -05:00
parent b16e07d25c
commit 7b761f4148
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,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']
NOVA_SERVICE_NAME = os.environ.get('OS_SERVICE_NAME', 'compute')
NOVACLIENT_INSECURE = os.getenv('NOVACLIENT_INSECURE', None)
IPV6 = os.environ.get('IPV6', '0') is 1
@ -43,6 +44,7 @@ def get_client():
kwargs = {}
kwargs['region_name'] = NOVA_REGION_NAME
kwargs['service_type'] = 'compute'
kwargs['service_name'] = NOVA_SERVICE_NAME
if NOVACLIENT_INSECURE:
kwargs['insecure'] = True