commit | b18a6bf265b8c6dea25708c017b86ba81a5efe9b | [log] [tgz] |
---|---|---|
author | Lukáš Piwowarski <lpiwowar@redhat.com> | Tue Apr 25 17:48:44 2023 +0200 |
committer | Lukáš Piwowarski <lpiwowar@redhat.com> | Wed Apr 26 12:00:23 2023 +0200 |
tree | 613b5732a0046dd35e0f0b8f6adb67edad835adf | |
parent | 30e50ef9c85bf008c7c3e5aeb6b009629a2013c9 [diff] [blame] |
Set a default region for clients Clients initialized for tests.api.* tests do not have defined values for region [1]. Because of that the clients connect to the first available service endpoint that they find (see this line in tempest [2]). This can cause issues when there are multiple endpoints on a system for barbican (admin, internal, public). This change sets a default value for key_manager.region config option to 'regionOne' and ensures that clients defined on the side of barbican-tempest-plugin are intialised with this value. [1] https://opendev.org/openstack/barbican-tempest-plugin/src/branch/master/barbican_tempest_plugin/tests/api/base.py#L91 [2] https://opendev.org/openstack/tempest/src/branch/master/tempest/lib/auth.py#L586 Change-Id: Ic9ae00c663cca6b83dc961b984cf129d1c33afc4
diff --git a/barbican_tempest_plugin/config.py b/barbican_tempest_plugin/config.py index da78d15..446a327 100644 --- a/barbican_tempest_plugin/config.py +++ b/barbican_tempest_plugin/config.py
@@ -43,7 +43,12 @@ "min_microversion and max_microversion. " "If both values are not specified, Tempest avoids tests " "which require a microversion. Valid values are string " - "with format 'X.Y' or string 'latest'") + "with format 'X.Y' or string 'latest'"), + cfg.StrOpt('region', + default='regionOne', + help="The barbican region name to use. If no such region is" + "found in the service catalog, the first found one is " + "used.") ] barbican_tempest_group = cfg.OptGroup(