Skip to content

Commit

Permalink
Updated clean_disk method
Browse files Browse the repository at this point in the history
Signed-off-by: Amrita Mahapatra <[email protected]>
  • Loading branch information
amr1ta committed Jun 6, 2024
1 parent 6f82a9e commit f0eb507
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions ocs_ci/deployment/baremetal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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):
"""
Expand Down
1 change: 1 addition & 0 deletions ocs_ci/ocs/ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions ocs_ci/ocs/resources/storage_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit f0eb507

Please sign in to comment.