Skip to content

Commit

Permalink
Add ibmcos nss creation support and basic test case (red-hat-storage#…
Browse files Browse the repository at this point in the history
…9392)

Signed-off-by: Sagi Hirshfeld <[email protected]>
  • Loading branch information
sagihirshfeld authored Mar 11, 2024
1 parent 55afc13 commit 32e495c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ocs_ci/ocs/resources/namespacestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
15 changes: 15 additions & 0 deletions tests/functional/object/mcg/test_namespace_crd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 32e495c

Please sign in to comment.