Skip to content

Commit

Permalink
Updated local storage option operator image details
Browse files Browse the repository at this point in the history
Signed-off-by: Amrita Mahapatra <[email protected]>
  • Loading branch information
amr1ta committed Jun 4, 2024
1 parent 4cb8748 commit 016fd35
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
24 changes: 15 additions & 9 deletions ocs_ci/ocs/resources/storage_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ def create_storage_client(
log.info("Creating storageclient CR")
self.ocp_obj.exec_oc_cmd(f"apply -f {storage_client_data_yaml.name}")

def fetch_storage_client_status(
self, namespace=config.ENV_DATA["cluster_namespace"], storageclient_name=None
):
def fetch_storage_client_status(self, namespace=None, storageclient_name=None):
"""
Fetch storageclient status
Expand All @@ -180,6 +178,9 @@ def fetch_storage_client_status(
storageclient_status(str): storageclient phase
"""
if not namespace:
namespace = (config.ENV_DATA["cluster_namespace"],)

cmd = (
f"oc get storageclient {storageclient_name} -n {namespace} "
"-o=jsonpath='{.items[*].status.phase}'"
Expand Down Expand Up @@ -315,7 +316,7 @@ def verify_storagerequest_exists(
def verify_storageclient_status(
self,
storageclient_name,
namespace=config.ENV_DATA["cluster_namespace"],
namespace=None,
expected_storageclient_status="Connected",
):
"""
Expand All @@ -330,6 +331,8 @@ def verify_storageclient_status(
storagerequest_phase == expected_storageclient_status
"""
if not namespace:
namespace = (config.ENV_DATA["cluster_namespace"],)

# Check storage client is in 'Connected' status
storage_client_status = self.fetch_storage_client_status(
Expand Down Expand Up @@ -430,7 +433,7 @@ def create_native_storage_client(
onboarding_token=onboarding_token,
)

if self.ocs_version < 4.16:
if self.ocs_version < version.VERSION_4_16:
self.create_storageclaim(
storageclaim_name="ocs-storagecluster-ceph-rbd",
type="blockpool",
Expand All @@ -451,7 +454,7 @@ def verify_native_storageclient(self):
storageclaims, associated storageclasses and storagerequests are created successfully.
"""
if self.ocs_version >= 4.16:
if self.ocs_version >= version.VERSION_4_16:
namespace = config.ENV_DATA["cluster_namespace"]
else:
namespace = constants.OPENSHIFT_STORAGE_CLIENT_NAMESPACE
Expand All @@ -460,12 +463,15 @@ def verify_native_storageclient(self):
kind=constants.STORAGECLIENT,
namespace=namespace,
)
storageclient = storageclient_obj.get()["items"][0]
storageclient_name = storageclient["metadata"]["name"]

# Verify storageclient is in Connected status
assert self.verify_storageclient_status(namespace=namespace)
assert self.verify_storageclient_status(
storageclient_name=storageclient_name, namespace=namespace
)

# Validate storageclaims are Ready and associated storageclasses are created
storageclient = storageclient_obj.get()["items"][0]
storageclient_name = storageclient["metadata"]["name"]
verify_storageclient_storageclass_claims(storageclient_name)

# Validate storagerequests are created successfully
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ spec:
icon:
base64data: ""
mediatype: ""
image: quay.io/openshift-qe-optional-operators/ocp4-index:latest
image: quay.io/openshift-qe-optional-operators/aosqe-index:latest
publisher: Red Hat
sourceType: grpc

0 comments on commit 016fd35

Please sign in to comment.