Small fixes: customizing endpoint type; find project in certain domain
Related-PROD: PROD-36943
Change-Id: I496e037e4e125a571edd4fb7518b344e02006bdf
diff --git a/fixtures/base.py b/fixtures/base.py
index 9774e5b..ec422a3 100644
--- a/fixtures/base.py
+++ b/fixtures/base.py
@@ -35,6 +35,7 @@
password=os.environ['OS_PASSWORD'],
project_name=os.environ['OS_PROJECT_NAME'],
auth_url=os.environ['OS_AUTH_URL'],
+ endpoint_type=os.environ["OS_ENDPOINT_TYPE"],
cert=False,
domain=os.environ['OS_PROJECT_DOMAIN_NAME'],
)
diff --git a/utils/os_client.py b/utils/os_client.py
index 6694813..7febc30 100644
--- a/utils/os_client.py
+++ b/utils/os_client.py
@@ -220,7 +220,8 @@
self.create_fake_ext_net = False
def get_project_by_name(self, name):
- return self.os_clients.auth.projects.find(name=name)
+ return self.os_clients.auth.projects.find(
+ name=name, domain_id=self.os_clients.auth.user_domain_id)
def get_internal_network(self):
networks = [