From f0eb507675682c191df4e06117e606937eaeb349 Mon Sep 17 00:00:00 2001 From: Amrita Mahapatra <49347640+amr1ta@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:26:00 +0530 Subject: [PATCH] Updated clean_disk method Signed-off-by: Amrita Mahapatra <49347640+amr1ta@users.noreply.github.com> --- ocs_ci/deployment/baremetal.py | 1 + .../provider_client/storage_client_deployment.py | 5 ----- ocs_ci/ocs/ocp.py | 1 + ocs_ci/ocs/resources/storage_client.py | 10 ++++------ 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ocs_ci/deployment/baremetal.py b/ocs_ci/deployment/baremetal.py index a2c1c8db12f..4cf04328007 100644 --- a/ocs_ci/deployment/baremetal.py +++ b/ocs_ci/deployment/baremetal.py @@ -1282,6 +1282,7 @@ def clean_disk(worker, namespace=constants.DEFAULT_NAMESPACE): selected_disks_to_ignore_cleanup.append( str(disk_to_ignore_cleanup["kname"]) ) + out = ocp_obj.exec_oc_debug_cmd( node=worker.name, cmd_list=["lsblk -nd -e252,7 --output NAME --json"], diff --git a/ocs_ci/deployment/provider_client/storage_client_deployment.py b/ocs_ci/deployment/provider_client/storage_client_deployment.py index 593fcb69e08..41dc84e2f14 100644 --- a/ocs_ci/deployment/provider_client/storage_client_deployment.py +++ b/ocs_ci/deployment/provider_client/storage_client_deployment.py @@ -13,8 +13,6 @@ ) from ocs_ci.deployment.helpers.lso_helpers import setup_local_storage from ocs_ci.ocs.node import label_nodes, get_all_nodes, get_node_objs - -# from ocs_ci.ocs.ui.validation_ui import ValidationUI from ocs_ci.ocs.utils import ( setup_ceph_toolbox, enable_console_plugin, @@ -47,7 +45,6 @@ def __init__(self): def initial_function(self): log.info("initial_function called during initialization.") - # self.validation_ui_obj = ValidationUI() self.ns_obj = ocp.OCP(kind=constants.NAMESPACES) self.ocp_obj = ocp.OCP() self.storage_cluster_obj = ocp.OCP( @@ -276,12 +273,10 @@ def odf_subscription_on_provider(self): ocs_version = version.get_semantic_ocs_version_from_config() log.info(f"Installed odf version: {ocs_version}") - # self.validation_ui_obj.refresh_web_console() # Enable odf-console: enable_console_plugin() time.sleep(30) - # self.validation_ui_obj.refresh_web_console() def verify_provider_mode_deployment(self): """ diff --git a/ocs_ci/ocs/ocp.py b/ocs_ci/ocs/ocp.py index 115a8e40976..a9cf3201ee6 100644 --- a/ocs_ci/ocs/ocp.py +++ b/ocs_ci/ocs/ocp.py @@ -240,6 +240,7 @@ def exec_oc_debug_cmd(self, node, cmd_list, timeout=300, namespace=None): self.exec_oc_cmd(command=debug_cmd, out_yaml_format=False, timeout=timeout) ) if err_msg in out: + log.info(f"The output: {out}") raise CommandFailed else: return out diff --git a/ocs_ci/ocs/resources/storage_client.py b/ocs_ci/ocs/resources/storage_client.py index e24e9c1861d..03873688dc8 100644 --- a/ocs_ci/ocs/resources/storage_client.py +++ b/ocs_ci/ocs/resources/storage_client.py @@ -12,7 +12,6 @@ from ocs_ci.ocs.utils import enable_console_plugin from ocs_ci.utility import templating, version from ocs_ci.utility.retry import retry -from ocs_ci.ocs.ui.validation_ui import ValidationUI from ocs_ci.helpers.managed_services import ( get_all_storageclassclaims, ) @@ -63,7 +62,6 @@ def odf_installation_on_client( client_subcription_image(str): image details for client subscription """ - # validation_ui_obj = ValidationUI() # Check namespace for storage-client is available or not is_available = self.ns_obj.is_exist( resource_name=constants.OPENSHIFT_STORAGE_CLIENT_NAMESPACE, @@ -116,7 +114,6 @@ def odf_installation_on_client( if enable_console: enable_console_plugin(value="[odf-client-console]") - # validation_ui_obj.refresh_web_console() def create_storage_client( self, @@ -455,9 +452,10 @@ def create_native_storage_client( ) # Generate onboarding token from UI - validation_ui_obj = ValidationUI() - storage_client_obj = validation_ui_obj.verify_storage_clients_page() - onboarding_token = storage_client_obj.generate_client_onboarding_ticket() + from ocs_ci.ocs.ui.page_objects.page_navigator import PageNavigator + + storage_clients = PageNavigator().nav_to_storageclients_page() + onboarding_token = storage_clients.generate_client_onboarding_ticket() # Create ODF subscription for storage-client self.odf_installation_on_client()