Browse Source

Add new parameter in place of deprecated one

The allow_tenant_isolation parameter has been replaced by
use_dynamic_credentials. As such added the parameter and removed
the old one. The default location from where tempest expects
to pick up the file containing credentials is also added
in the patch. The file location is only added when the file
is being used.

Change-Id: I2e2ec3bcc88570a55cf97bd4b74278970ffa0564
changes/93/511193/1
Prateek Arora 5 years ago
parent
commit
d03fa08aba
  1. 6
      config_tempest/config_tempest.py
  2. 4
      config_tempest/tests/base.py
  3. 3
      config_tempest/tests/test_config_tempest.py
  4. 6
      releasenotes/notes/replace-tenant-isolation-with-dynamic-creds-e79e46c03851ff1c.yaml

6
config_tempest/config_tempest.py

@ -161,9 +161,11 @@ def main():
# To maintain backward compatibility
# Moved to auth
conf.set("identity", "admin_password", "")
conf.set("auth", "allow_tenant_isolation", "False")
conf.set("auth", "use_dynamic_credentials", "False")
if args.use_test_accounts:
conf.set("auth", "allow_tenant_isolation", "True")
# new way for running using accounts file
conf.set("auth", "use_dynamic_credentials", "False")
conf.set("auth", "test_accounts_file", "etc/accounts.yaml")
clients = ClientManager(conf, not args.non_admin, args)
swift_discover = conf.get_defaulted('object-storage-feature-enabled',
'discoverability')

4
config_tempest/tests/base.py

@ -41,7 +41,7 @@ class BaseConfigTempestTest(base.BaseTestCase):
conf.set("identity", "admin_username", "admin")
conf.set("identity", "admin_tenant_name", "adminTenant")
conf.set("identity", "admin_password", "adminPass")
conf.set("auth", "allow_tenant_isolation", "False")
conf.set("auth", "use_dynamic_credentials", "False")
return conf
def _get_alt_conf(self, V2, V3):
@ -58,7 +58,7 @@ class BaseConfigTempestTest(base.BaseTestCase):
conf.set("auth", "admin_username", "admin")
conf.set("auth", "admin_project_name", "adminTenant")
conf.set("auth", "admin_password", "adminPass")
conf.set("auth", "allow_tenant_isolation", "False")
conf.set("auth", "use_dynamic_credentials", "True")
return conf
@mock.patch('os_client_config.cloud_config.CloudConfig')

3
config_tempest/tests/test_config_tempest.py

@ -129,6 +129,9 @@ class TestClientManager(BaseConfigTempestTest):
# check if admin tenant id was set
admin_tenant_id = self.conf.get("identity", "admin_tenant_id")
self.assertEqual(admin_tenant_id, "my_fake_id")
use_dynamic_creds_bool = self.conf.get("auth",
"use_dynamic_credentials")
self.assertEqual(use_dynamic_creds_bool, "True")
class TestOsClientConfigSupport(BaseConfigTempestTest):

6
releasenotes/notes/replace-tenant-isolation-with-dynamic-creds-e79e46c03851ff1c.yaml

@ -0,0 +1,6 @@
---
prelude: >
Deprecate allow_tenant_isolation parameter.
deprecations:
- |
Replace allow_tenant_isolation with use_dynamic_credentials
Loading…
Cancel
Save