diff --git a/.stestr.blacklist.functional b/.stestr.blacklist.functional index 5e1b145c9..db3bd12f9 100644 --- a/.stestr.blacklist.functional +++ b/.stestr.blacklist.functional @@ -25,3 +25,4 @@ otcextensions.tests.functional.sdk.sfsturbo* otcextensions.tests.functional.osclient.vpc.v1.test_peering* otcextensions.tests.functional.sdk.waf.v1.test_domain* otcextensions.tests.functional.sdk.tms* +otcextensions.tests.functional.osclient.kms* diff --git a/otcextensions/sdk/kms/v1/key.py b/otcextensions/sdk/kms/v1/key.py index 3b8c33ae0..bc2cffea5 100644 --- a/otcextensions/sdk/kms/v1/key.py +++ b/otcextensions/sdk/kms/v1/key.py @@ -57,7 +57,13 @@ class Key(_base.Resource): error_msg = resource.Body('error_msg') def fetch(self, session, requires_id=None, - base_path=None, error_message=None): + base_path=None, error_message=None, + skip_cache=False, + *, + resource_response_key=None, + microversion=None, + **params, + ): if not self.allow_fetch: raise exceptions.MethodNotSupported(self, "fetch") url = self.get_path diff --git a/otcextensions/tests/functional/osclient/kms/__init__.py b/otcextensions/tests/functional/osclient/kms/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/otcextensions/tests/functional/osclient/kms/v1/test_cmk.py b/otcextensions/tests/functional/osclient/kms/v1/test_cmk.py new file mode 100644 index 000000000..718ccd45a --- /dev/null +++ b/otcextensions/tests/functional/osclient/kms/v1/test_cmk.py @@ -0,0 +1,27 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +import json + +from openstackclient.tests.functional import base + + +class TestCmk(base.TestCase): + """Functional tests for KMS CMK. """ + + def test_cmk_list(self): + json_output = json.loads(self.openstack( + 'kms cmk list -f json', + cloud='functest_cloud') + ) + self.assertGreater(len(json_output), 0) + name = json_output[0]['key_alias'] + self.openstack(f'kms cmk show {name}', cloud='terraform')