diff --git a/ocs_ci/ocs/resources/namespacestore.py b/ocs_ci/ocs/resources/namespacestore.py index c804f33f157..0703e3e7c89 100644 --- a/ocs_ci/ocs/resources/namespacestore.py +++ b/ocs_ci/ocs/resources/namespacestore.py @@ -337,6 +337,18 @@ def oc_create_namespacestore( "subPath": nss_tup[2] if nss_tup[2] else "", }, }, + constants.IBM_COS_PLATFORM: lambda: { + "type": "ibm-cos", + "ibmCos": { + "targetBucket": uls_name, + "signatureVersion": "v2", + "endpoint": get_attr_chain(cld_mgr, "ibmcos_client.endpoint"), + "secret": { + "name": get_attr_chain(cld_mgr, "ibmcos_client.secret.name"), + "namespace": nss_data["metadata"]["namespace"], + }, + }, + }, } if ( diff --git a/tests/functional/object/mcg/test_namespace_crd.py b/tests/functional/object/mcg/test_namespace_crd.py index 7ab5539de3d..9e4e03d1115 100644 --- a/tests/functional/object/mcg/test_namespace_crd.py +++ b/tests/functional/object/mcg/test_namespace_crd.py @@ -3,6 +3,7 @@ These tests are valid only for OCS version 4.7 and above because in later versions are for Namespace bucket creation used CRDs instead of NooBaa RPC calls. """ + import logging from time import sleep import uuid @@ -129,6 +130,19 @@ def test_namespace_store_creation_crd(self, namespace_store_factory, nss_tup): pytest.mark.polarion_id("OCS-2407"), ], ), + pytest.param( + { + "interface": "OC", + "namespace_policy_dict": { + "type": "Single", + "namespacestore_dict": {"ibmcos": [(1, None)]}, + }, + }, + marks=[ + tier1, + pytest.mark.polarion_id("OCS-5442"), + ], + ), pytest.param( { "interface": "OC", @@ -187,6 +201,7 @@ def test_namespace_store_creation_crd(self, namespace_store_factory, nss_tup): "AWS-OC-Single", "Azure-OC-Single", "RGW-OC-Single", + "IBM-OC-Single", "AWS+Azure-OC-Multi", "AWS+AWS-OC-Multi", "AZURE+AZURE-OC-Multi",