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
This commit is contained in:
Prateek Arora 2017-05-02 07:53:40 -04:00
parent d430dcd548
commit d03fa08aba
4 changed files with 15 additions and 4 deletions

View File

@ -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')

View File

@ -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')

View File

@ -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):

View File

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