Use clouds.yaml
Instead of passing all things to the client, and forgetting some, we should directly load the config, and use the cloud configuration for creating connections. Change-Id: I8e66ff033b6d49537b161710e983750f40d5e93d
This commit is contained in:
parent
cb77f7e3d2
commit
4df9332649
@ -91,15 +91,8 @@ class ServiceTest(object):
|
|||||||
|
|
||||||
def get_connection(self):
|
def get_connection(self):
|
||||||
"""Get an OpenStackSDK connection"""
|
"""Get an OpenStackSDK connection"""
|
||||||
auth_url = os.environ['OS_AUTH_URL']
|
|
||||||
password = os.environ['OS_PASSWORD']
|
|
||||||
|
|
||||||
conn = connection.Connection(auth_url=auth_url,
|
conn = connection.from_config(cloud_name='default')
|
||||||
username='admin',
|
|
||||||
password=password,
|
|
||||||
project_name='admin',
|
|
||||||
user_domain_id='default',
|
|
||||||
project_domain_id='default')
|
|
||||||
self.conn = conn
|
self.conn = conn
|
||||||
|
|
||||||
return conn
|
return conn
|
||||||
|
Loading…
x
Reference in New Issue
Block a user