Remove liberty special case (#944)

* Remove liberty special case

* Update unit test
This commit is contained in:
Liam Young
2022-10-03 12:52:30 +01:00
committed by GitHub
parent 5f60808b2e
commit 65cc55a5db
2 changed files with 1 additions and 16 deletions

View File

@@ -180,13 +180,6 @@ class TestOpenStackUtils(ut_utils.BaseTestCase):
network_msg)
def test_get_keystone_scope(self):
self.patch_object(openstack_utils, "get_current_os_versions")
# <= Liberty
self.get_current_os_versions.return_value = {"keystone": "liberty"}
self.assertEqual(openstack_utils.get_keystone_scope(), "DOMAIN")
# > Liberty
self.get_current_os_versions.return_value = {"keystone": "mitaka"}
self.assertEqual(openstack_utils.get_keystone_scope(), "PROJECT")
def _test_get_overcloud_auth(self, tls_relation=False, ssl_cert=False,

View File

@@ -487,15 +487,7 @@ def get_keystone_scope(model_name=None):
:returns: String keystone scope
:rtype: string
"""
os_version = get_current_os_versions("keystone",
model_name=model_name)["keystone"]
# Keystone policy.json shipped the charm with liberty requires a domain
# scoped token. Bug #1649106
if os_version == "liberty":
scope = "DOMAIN"
else:
scope = "PROJECT"
return scope
return "PROJECT"
def get_keystone_session(openrc_creds, scope='PROJECT', verify=None):