ocs_ci.ocs.ui package

Subpackages

Submodules

ocs_ci.ocs.ui.acm_ui module

class ocs_ci.ocs.ui.acm_ui.ACMOCPClusterDeployment(platform, cluster_conf)

Bases: AcmPageNavigator

Everything related to cluster creation through ACM goes here

acm_bailout_if_failed()
acm_cluster_status_creating(timeout=120)
acm_cluster_status_failed(timeout=5)
acm_cluster_status_ready(timeout=120)
click_next_button()
click_platform_and_credentials()
create_cluster(cluster_config=None)

Create cluster using ACM UI

Parameters:

cluster_config (Config) – framework.Config object of complete configuration required for deployment

create_cluster_prereq()
destroy_cluster()

ACM UI based destroy cluster, select the cluster from UI, click on destroy

download_cluster_conf_files()

Download install-config and kubeconfig to cluster dir

download_kubeconfig(authdir)
fill_multiple_textbox(key_val)

In a page if we want to fill multiple text boxes we can use this function which iteratively fills in values from the dictionary parameter

key_val (dict): keys corresponds to the xpath of text box, value corresponds

to the value to be filled in

get_deployment_status()
get_destroy_status()

Return the current status of destroy operation

goto_cluster_details_page()
navigate_create_clusters_page()
post_destroy_ops()

Post destroy ops should be implemented by child classes because post destroy ops are mostly specific to the platform

wait_for_cluster_create()
class ocs_ci.ocs.ui.acm_ui.ACMOCPDeploymentFactory

Bases: object

get_platform_instance(cluster_config)
Parameters:

cluster_config (dict) – Cluster Config object

class ocs_ci.ocs.ui.acm_ui.ACMOCPPlatformVsphereIPI(cluster_conf=None)

Bases: ACMOCPClusterDeployment

This class handles all behind the scene activities for cluster creation through ACM for vsphere platform

add_different_pod_network()

Edit online cluster yaml to add network info

create_cluster()

This function navigates through following pages in the UI 1. Cluster details 2. Node poools 3. Networks 4. Proxy 5. Automation 6. Review

Raises:

ACMClusterDeployException – If deployment failed for the cluster

create_cluster_prereq(timeout=600)

Perform all prereqs before vsphere cluster creation from ACM

Parameters:

timeout (int) – Timeout for any UI operations

fill_cluster_details_page()

Fill in following details in “Cluster details” page 1. Cluster name 2. Base DNS domain 3. Release image

fill_network_info()

We need to fill following network info 1. vSphere network name 2. API VIP 3. Ingress VIP

get_ocp_release_img()
post_destroy_ops()

Post destroy ops includes 1. Deleting DNS entries 2. Freeing the ips assigned

class ocs_ci.ocs.ui.acm_ui.AcmPageNavigator

Bases: BaseUI

ACM Page Navigator Class

navigate_applications_page()

Navigate to ACM Applications Page

navigate_automation_page()

Navigate to ACM Automation Page

navigate_bare_metal_assets_page()

Navigate to ACM Bare Metal Assets Page

navigate_clusters_page(timeout=120)

Navigate to ACM Clusters Page

Parameters:

timeout (int) – Timeout for which an element presence should be checked

navigate_credentials_page()

Navigate to ACM Credentials Page

navigate_data_services()

Navigate to Data Services page on ACM UI, supported for ACM version 2.9 and above

navigate_from_ocp_to_acm_cluster_page(locator='click-local-cluster')

For ACM version 2.7 and above we need to navigate from OCP console to ACM multicluster page

navigate_governance_page()

Navigate to ACM Governance Page

navigate_infrastructure_env_page()

Navigate to ACM Infrastructure Environments Page

navigate_overview_page()

Navigate to ACM Overview Page

navigate_welcome_page()

Navigate to ACM Welcome Page

ocs_ci.ocs.ui.add_replace_device_ui module

class ocs_ci.ocs.ui.add_replace_device_ui.AddReplaceDeviceUI

Bases: PageNavigator

InfraUI class for add capacity, device replacement, node replacement

add_capacity_ui()

Add Capacity via UI

verify_pod_status(pod_names, pod_state='Running')

Verify pod status

Parameters:
  • pod_names (list) – list of pod names

  • pod_state (string) – the desired pod state

ocs_ci.ocs.ui.attach_storage module

class ocs_ci.ocs.ui.attach_storage.AttachStorage

Bases: BaseUI

Class to handle the ‘Attach Storage’ action in Storage Cluster details page.

send_form_with_default_values()

Send the form for attaching storage with the default values. This method assumes we are already on the ‘Attach Storage’ form page.

The default values are: - Device class: The default value shown in the form (retrieved from the input field) - Volume type: Block - Pool name: Same as the device class value (With the added prefix ‘ocs-storagecluster-cephblockpool’ as defined in the ‘Attach Storage’ form) - Data protection policy: 3-way Replication - New StorageClass name: <device_class_value>-sc

Returns:

The device class value used in the form. This can be used for further validation

after the form is submitted and the storage is attached.

Return type:

str

ocs_ci.ocs.ui.base_ui module

class ocs_ci.ocs.ui.base_ui.BaseUI

Bases: object

Base Class for UI Tests

check_element_presence(locator, timeout=5)

Check if an web element is present on the web console or not.

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By))

  • timeout (int) – Looks for a web element repeatedly until timeout (sec) occurs

Returns:

True if the element is found, returns False otherwise and raises NoSuchElementException

Return type:

bool

check_element_text(expected_text, element='*', take_screenshot=False)

Check if the text matches the expected text.

Parameters:
  • expected_text (string) – The expected text.

  • element (str) – element

  • take_screenshot (bool) – if screenshot should be taken

Returns:

True if the text matches the expected text, False otherwise

Return type:

bool

check_number_occurrences_text(expected_text, number, element='*')

The number of times the string appears on the web page

Parameters:
  • expected_text (string) – The expected text.

  • number (int) – The number of times the string appears on the web page

Returns:

True if the text matches the expected text, False otherwise

Return type:

bool

choose_expanded_mode(mode, locator)

Select the element mode (expanded or collapsed)

mode (bool): True if element expended, False otherwise locator (tuple): (GUI element needs to operate on (str), type (By))

clear_input_gradually(locator)

Clean input field by gradually deleting characters one by one. This way we avoid common automation issue when input field is not cleared.

Returns:

True if the input element is successfully cleared, False otherwise.

Return type:

bool

clear_with_ctrl_a_del(locator, timeout=30)

Clear the existing text using CTRL + a and then Del keys, as on some elements .clear() function doesn’t always work correctly.

click_with_script(locator)

Click a web element using JavaScript dispatchEvent instead of Selenium’s native coordinate-based click. Use as a fallback when ElementClickInterceptedException occurs because an overlay covers the element’s click coordinates (e.g. SVG nodes in the ODF Topology view that are positioned outside the scrollable content area).

Parameters:

locator (tuple) – (selector string, By type) identifying the element to click.

copy_dom(name_suffix: str = '')

Get page source of the webpage

classmethod deep_get(dictionary, *keys)
do_clear(locator, timeout=30)

Clear the existing text from UI

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By))

  • timeout (int) – Looks for a web element until timeout (sec) occurs

do_click(locator, timeout=30, enable_screenshot=False, copy_dom=False, avoid_stale=False, use_fallback=True)

Click on Button/link on OpenShift Console

locator (tuple): (GUI element needs to operate on (str), type (By)) timeout (int): Looks for a web element repeatedly until timeout (sec) happens. enable_screenshot (bool): take screenshot copy_dom (bool): copy page source of the webpage avoid_stale (bool): if got StaleElementReferenceException, caused by reference to stale, cached element, refresh the page once and try click again * don’t use when refreshed page expected to be different from initial page, or loose input values use_fallback (bool): if True, attempt AI locator fallback on TimeoutException

do_click_by_id(id, timeout=30)
do_click_by_xpath(xpath, timeout=30)

Function to click on a web element using XPATH :param xpath: xpath to interact with web element :type xpath: str :param timeout: timeout until which an exception won’t be raised :type timeout: int

Returns:

Clicks on the web element found

do_send_keys(locator, text, timeout=30)

Send text to element on OpenShift Console

locator (tuple): (GUI element needs to operate on (str), type (By)) text (str): Send text to element timeout (int): Looks for a web element repeatedly until timeout (sec) happens.

find_an_element_by_xpath(locator)

Function to find an element using xpath

Parameters:

locator (str) – locator of the element to be found

Returns:

an object of the type WebElement

get_checkbox_status(locator, timeout=30, *, wait_for_clickable=True, expected_state=None)

Checkbox Status

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By))

  • timeout (int) – Looks for a web element repeatedly until timeout (sec) happens.

  • wait_for_clickable (bool) – When True wait for element to be clickable; otherwise wait for presence.

  • expected_state (bool | None) – When provided, wait for checkbox selection state to match before returning.

Returns:

True if element is selected, False otherwise

Return type:

bool

get_element_attribute(locator, attribute, safe: bool = False)

Get attribute from WebElement

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By)).

  • attribute (str) – the value of this attribute will be extracted from WebElement

  • safe (bool) – if True exception will not raise when element not found. Default option - not safe

Returns:

value of the attribute of requested and found WebElement

Return type:

str

get_element_text(locator)

Get the inner text of an element in locator.

Parameters:

locator (tuple) – (GUI element needs to operate on (str), type (By)).

Returns:

The text captured.

Return type:

str

get_elements(locator)

Get an elements list. Useful to count number of elements presented on page, etc.

Parameters:

locator (tuple) – (GUI element needs to operate on (str), type (By)).

Returns:

The list of WebElements

Return type:

list

is_expanded(locator, timeout=30)

Check whether an element is in an expanded or collapsed state

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By))

  • timeout (int) – Looks for a web element repeatedly until timeout (sec) happens.

Returns:

True if element expanded, False otherwise

Return type:

bool

property locator_fallback
navigate_backward()

Navigate to a previous Web Page

page_has_loaded(retries=5, sleep_time=2, module_loc=('html', 'tag name'))

Waits for page to completely load by comparing current page hash values. Not suitable for pages that use frequent dynamically content (less than sleep_time)

Parameters:
  • retries (int) – How much time in sleep_time to wait for page to load

  • sleep_time (int) – Time to wait between every pool of dom hash

  • module_loc (tuple) – locator of the module of the page awaited to be loaded

refresh_page()

Refresh Web Page

scroll_into_view(locator)

Scroll element into view

select_checkbox_status(status, locator)

Select checkbox status (enable or disable)

status (bool): True if checkbox enable, False otherwise locator (tuple): (GUI element needs to operate on (str), type (By))

take_screenshot(name_suffix: str = '')

Take screenshot using python code

take_screenshot_for_llm(name_suffix='', region=None)

Takes a screenshot for LLM-based UI analysis and returns the file path.

This base implementation captures a single viewport screenshot. Subclasses that operate on scrollable panels (e.g. TopologySidebar) should override this method to capture additional screenshots after scrolling, so the LLM receives the full content of the panel.

The window is temporarily resized to the resolution configured in UI_SELENIUM.llm_screenshot_resolution (default "1920,1400") before the screenshot and restored afterwards so that the LLM always receives a consistent, high-resolution image regardless of the current browser window size.

Parameters:
  • name_suffix (str) – Optional suffix for the screenshot filename.

  • region (str) – Optional region to crop. "right_side" keeps the right half, "left_side" keeps the left half. None keeps the full viewport.

Returns:

List of absolute paths to the saved screenshot files.

Return type:

list

wait_for_element_attribute(locator, attribute, attribute_value, timeout, sleep)

Method to wait attribute have specific value. Fails the test if attribure value not equal to expected :param locator: (GUI element needs to operate on (str), type (By)). :type locator: tuple :param attribute: the value of this attribute will be extracted from WebElement :type attribute: str :param attribute_value: the value attribute (can be None as well) :type attribute_value: str :param timeout: timeout in seconds :type timeout: int :param sleep: sleep interval in seconds :type sleep: int

wait_for_element_to_be_present(locator, timeout=30, ignored_exceptions=None)

Wait for element to be present. Use when Web element should be present, but may be placed above another element on the z-layer Method does not fail when Web element not found Example: WebDriverWait(driver, 30, 1, (ElementNotVisibleException)

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By)).

  • timeout (int) – Looks for a web element until timeout (sec) occurs

  • ignored_exceptions (Exception or tuple) – exceptions to ignore during the wait.

wait_for_element_to_be_visible(locator, timeout=30, ignored_exceptions=None)

Wait for element to be visible. Use when Web element is not have to be clickable (icons, disabled btns, etc.) Method does not fail when Web element not found. Example: WebDriverWait(driver, 30, 1, (ElementNotVisibleException)

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By)).

  • timeout (int) – Looks for a web element until timeout (sec) occurs

  • ignored_exceptions (Exception or tuple) – exceptions to ignore during the wait.

wait_for_endswith_url(endswith, timeout=60)

Wait for endswith url to load

Parameters:
  • endswith (string) – url endswith string for which we need to wait

  • timeout (int) – Timeout in seconds

wait_until_expected_text_is_found(locator, expected_text, timeout=60)

Method to wait for a expected text to appear on the UI (use of explicit wait type), this method is helpful in working with elements which appear on completion of certain action and ignores all the listed exceptions for the given timeout.

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By))

  • expected_text (str) – Text which needs to be searched on UI

  • timeout (int) – Looks for a web element repeatedly until timeout (sec) occurs

Returns:

Returns True if the expected element text is found, False otherwise

Return type:

bool

class ocs_ci.ocs.ui.base_ui.SeleniumDriver

Bases: WebDriver

classmethod remove_instance()
ocs_ci.ocs.ui.base_ui.close_browser()

Close Selenium WebDriver

ocs_ci.ocs.ui.base_ui.copy_dom(name_suffix: str = '', dom_folder=None)

Copy DOM using python code

Parameters:
  • name_suffix (str) – name suffix, will be added before extension. Optional argument

  • dom_folder (str) – path to folder where dom text file will be saved

ocs_ci.ocs.ui.base_ui.garbage_collector_webdriver()

Garbage Collector for webdriver objs

ocs_ci.ocs.ui.base_ui.generate_otp_token(secret)

Generate OTP token for specific OTP secret

Parameters:

secret (string) – OTP secret phrase

Returns:

OTP token

Return type:

str

ocs_ci.ocs.ui.base_ui.login_ui(console_url=None, username=None, password=None, otp_secret=None, **kwargs)

Login to OpenShift Console

Parameters:
  • console_url (str) – ocp console url

  • username (str) – User which is other than admin user,

  • password (str) – Password of user other than admin user

  • otp_secret (str) – Secret for OTP 2F authentication from which we generate token

Returns:

driver (Selenium WebDriver)

ocs_ci.ocs.ui.base_ui.logout_ui()

Logout from OpenShift Console via UI.

Clicks the user dropdown menu in the masthead and selects ‘Log out’. After logout, the browser remains open at the login page.

Raises:

TimeoutException – If user dropdown or logout button not found.

ocs_ci.ocs.ui.base_ui.navigate_to_all_clusters(**kwargs)

Navigate to All Clusters page, if not already there :param kwargs: acm_page locators dict, timeout

Raises:

TimeoutException – if timeout occurs, and All clusters acm page is not loaded

ocs_ci.ocs.ui.base_ui.navigate_to_local_cluster(**kwargs)

Navigate to Local Cluster page, if not already there :param kwargs: acm_page locators dict, timeout

Raises:

TimeoutException – if timeout occurs, and local clusters page is not loaded

ocs_ci.ocs.ui.base_ui.proceed_to_login_console()

Proceed to the login console, if needed to confirm this action in a page that appears before. This is required to be as a solo function, because the driver initializes in the login_ui function. Function needs to be called just before login

Returns:

None

ocs_ci.ocs.ui.base_ui.screenshot_dom_location(type_loc='screenshot')

Get the location for copy DOM/screenshot

Parameters:

type_loc (str) – if type_loc is “screenshot” the location for copy screeenshot else DOM

ocs_ci.ocs.ui.base_ui.take_screenshot(name_suffix: str = '', screenshots_folder=None)

Take screenshot using python code

Parameters:
  • name_suffix (str) – name suffix, will be added before extension. Optional argument

  • screenshots_folder (str) – path to folder where screenshot will be saved

ocs_ci.ocs.ui.base_ui.wait_for_element_to_be_clickable(locator, timeout=30)

Wait for an element to be clickable.

Parameters:
  • locator (tuple) – A tuple containing the locator strategy (e.g., By.ID, By.XPATH) and the locator value.

  • timeout (int) – Maximum time (in seconds) to wait for the element to be clickable. Defaults to 30 seconds.

Returns:

The clickable web element.

Return type:

selenium.webdriver.remote.webelement.WebElement

ocs_ci.ocs.ui.base_ui.wait_for_element_to_be_visible(locator, timeout=30)

Wait for element to be visible. Use when Web element is not have to be clickable (icons, disabled btns, etc.) Method does not fail when Web element not found

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By)).

  • timeout (int) – Looks for a web element until timeout (sec) occurs

Returns:

Visible web element.

Return type:

selenium.webdriver.remote.webelement.WebElement

ocs_ci.ocs.ui.block_pool module

class ocs_ci.ocs.ui.block_pool.BlockPoolUI

Bases: PageNavigator

User Interface Selenium for Block Pools page

check_pool_avail_capacity(pool_name)

Check the available capacity of the blockpool

Parameters:

pool_name (str) – Name of the pool to check

Returns:

The total available capacity of blockpool

Return type:

str

check_pool_compression_eligibility(pool_name)

Check the pool the percentage of incoming data that is compressible

Parameters:

pool_name (str) – Name of the pool to check

Returns:

percentage of incoming compressible data

Return type:

str

check_pool_compression_ratio(pool_name)

Check the blockpool compression ratio

Parameters:

pool_name (str) – Name of the pool to check

Returns:

Compression ratio of blockpool

Return type:

str

check_pool_compression_savings(pool_name)

Check the total savings gained from compression for this pool, including replicas

Parameters:

pool_name (str) – Name of the pool to check

Returns:

The total savings gained from compression for this pool, including replicas

Return type:

str

check_pool_compression_status(pool_name)

Check what is the status of pool compression

Parameters:

pool_name (str) – Name of the pool to check

Returns:

True if pool is in the Enabled, otherwise False

Return type:

bool

check_pool_existence(pool_name)

Check if pool appears in the block pool list

Parameters:

pool_name (str) – Name of the pool to check

Returns:

True if pool is in the list of pools page, otherwise False

Return type:

bool

check_pool_replicas(pool_name)

Check the number of replicas for the pool

Parameters:

pool_name (str) – Name of the pool to check

Returns:

Number of replicas for the pool

Return type:

int

check_pool_status(pool_name)

Check the status of the pool

Parameters:

pool_name (str) – Name of the pool to check

Returns:

status of the pool

Return type:

str

check_pool_used_capacity(pool_name)

Check the total used capacity of the blockpool

Parameters:

pool_name (str) – Name of the pool to check

Returns:

The total used capacity of the blockpool

Return type:

str

check_pool_volume_type(pool_name)

Check the volume type of the pool

Parameters:

pool_name (str) – Name of the pool to check

Returns:

Volume type of pool if set otherwise

Return type:

str

check_storage_class_attached(pool_name)

Checks the number of storage class attached to the pool.

Parameters:

pool_name (str) – Name of the pool to check

Returns:

The total number of storage classes attached to the pool.

Return type:

int

create_pool(replica, compression, pool_type_block=True)

Create block pool via UI

Parameters:
  • pool_type_block – True if type of storage pool is block, False otherwise

  • replica (int) – replica size usually 2,3

  • compression (bool) – True to enable compression otherwise False

Returns:

pool name (str) pool status (bool) #pool can be created with failure status

Return type:

array

cross_check_raw_capacity(pool_name)

Takes pool name and returns True if the raw capacity of the block pool is same in GUI as obtained from CLI or returns False if the raw capacity of the block pool doesnt match with CLI

Parameters:

pool_name (str) – The name of the pool to be deleted

Returns:

True if raw capacity of the blockpool is is same in GUI as obtained from CLI, otherwise False

Return type:

bool

custom_round(number)

Rounds a number down for values ending in exactly “.5”.

Args: number: The number to round.

Returns: The rounded number (down for values ending in “.5”).

delete_pool(pool_name)

Delete pool from pool page

Parameters:

pool_name (str) – The name of the pool to be deleted

Returns:

True if pool is not found in pool list, otherwise false

Return type:

bool

edit_pool_parameters(pool_name, replica=3, compression=True)

Edit an already existing pool

Parameters:
  • pool_name (str) – The name of the pool to change.

  • replica (int) – size of replica. Available in OCS now 2,3.

  • compression (bool) – True if enable compression. False otherwise.

pool_raw_capacity_loaded(pool_name)

Takes pool name and returns True if the raw capacity of the block pool is loaded or returns False if the capacity is not loaded.

Parameters:

pool_name (str) – The name of the pool to be deleted

Returns:

True if raw capacity of the blockpool is loaded, otherwise False

Return type:

bool

reach_pool_limit(replica, compression)

Add pools till pool fails because of pg limit.

Parameters:
  • replica (int) – size of pool.

  • compression (bool) – True for enabling compression. Otherwise False.

select_blockpool(pool_name)

Selects and clicks on the blockpool according to the blockpool name passed.

Parameters:

pool_name (str) – Block pool name that is to be selected.

Returns:

Successfull selection of the blockpool

Return type:

True (bool)

validate_performance_card_header_present() bool

Validate Performance Card is present on Overview page

Returns:

True if present, False otherwise

Return type:

bool

ocs_ci.ocs.ui.deployment_ui module

class ocs_ci.ocs.ui.deployment_ui.DeploymentUI

Bases: PageNavigator

Deployment OCS/ODF Operator via User Interface

check_odf_operators_succeeded(operator)

Check that exactly 2 rows whose data-test-operator-row contains the given operator name show a Succeeded status-text span.

This targets the operator rows directly via data-test-operator-row, so it is not affected by the page-level name filter or by other operators such as Package Server that also show Succeeded.

Parameters:

operator (str) – operator name substring to match, e.g. “OpenShift Data Foundation”

Returns:

True when exactly 2 matching operator rows show Succeeded

Return type:

bool

configure_data_protection()

Configure Data Protection

configure_encryption()

Configure Encryption

configure_in_transit_encryption()

Configure in_transit_encryption

configure_osd_size()

Configure OSD Size

configure_performance()

Configure performance mode

create_storage_cluster()

Review and Create StorageCluster/StorageSystem

enable_taint_nodes()

Enable taint Nodes

install_internal_cluster()

Install Internal Cluster

install_local_storage_operator()

Install local storage operator

install_lso_cluster()

Install LSO cluster via UI

install_mcg_only_cluster()

Install MCG ONLY cluster via UI

install_ocs_operator()

Install OCS/ODF Opeartor

install_ocs_ui()

Install OCS/ODF via UI

install_storage_cluster()

Install StorageCluster/StorageSystem

refresh_popup(timeout=30)

Refresh PopUp

search_operator_installed_operators_page(operator='OpenShift Container Storage')

Search Operator on Installed Operators Page

Parameters:

operator (str) – type of operator

verify_disks_lso_attached(timeout=600, sleep=20)

Verify Disks Attached

Parameters:
  • timeout (int) – Time in seconds to wait

  • sleep (int) – Sampling time in seconds

verify_operator_succeeded(operator='OpenShift Container Storage', timeout_install=600, sleep=20)

Verify Operator Installation

Parameters:
  • operator (str) – type of operator

  • timeout_install (int) – Time in seconds to wait

  • sleep (int) – Sampling time in seconds

wait_next_button_lso()

ocs_ci.ocs.ui.helpers_ui module

ocs_ci.ocs.ui.helpers_ui.extract_encryption_status(root_element, svg_path)

Function to extract encryption status from an SVG element

Parameters:
  • root_element (str) – Dom root element

  • svg_element (str) – svg element path

Returns:

if encryption status is enable for given element return True otherwise False.

Return type:

bool

Raises:

ResourceNotFoundError – If given resource is not found.

ocs_ci.ocs.ui.helpers_ui.format_locator(locator, *args, **kwargs)

Use this function format_locator when working with dynamic locators.

Parameters:
  • locator (tuple) – (GUI element needs to operate on (str), type (By))

  • *args (str) – Name of the variable (string) which contains the dynamic web element when generated on certain action

  • **kwargs (str) – Keyword arguments(string) where the key matches the placeholder name in the locator to which value is assigned to dynamically format the web element.

Returns:

formats the locator using .format() function which takes string to be inserted as an argument

ocs_ci.ocs.ui.helpers_ui.get_element_by_text(text)

This function accepts a text as an argument and returns the element type by creating XPATH for it. This is helpful when we are creating dynamic names for PVC’s, Pod’s, Namespaces’s etc. and want to interact with the same on UI.

ocs_ci.ocs.ui.helpers_ui.get_element_type(element_name)

This function accepts an element name as a argument and returns the element type by creating XPATH for it. This is helpful when we are creating dynamic names for PVC’s, Pod’s, Namespaces’s etc. and want to interact with the same on UI.

ocs_ci.ocs.ui.helpers_ui.is_ui_deployment()

This function checks if the current deployment is UI deployment or not.

ocs_ci.ocs.ui.helpers_ui.ui_add_capacity(osd_size_capacity_requested)

Add Capacity via UI

Parameters:

osd_size_capacity_requested (int) – Requested osd size capacity

Returns:

Returns True if all OSDs are in Running state

Return type:

new_storage_devices_sets_count (int)

ocs_ci.ocs.ui.helpers_ui.ui_add_capacity_conditions()

Conditions for add capacity via UI

Returns:

True if support UI add capacity, False otherwise

Return type:

bool

ocs_ci.ocs.ui.helpers_ui.ui_deployment_conditions()

Conditions for installing the OCS operator via UI

Returns:

True if support UI deployment, False otherwise

Return type:

bool

ocs_ci.ocs.ui.mcg_ui module

class ocs_ci.ocs.ui.mcg_ui.BucketClassUI

Bases: PageNavigator

A class representation for abstraction of BC-related OpenShift UI actions

create_namespace_bucketclass_ui(bc_name, policy, nss_name_lst, bs_name_lst)

Create a namespace BC via the UI

Parameters:
  • bc_name (str) – The name to grant the BC

  • policy (str) – The policy type to use. Single/Multi/Cache

  • nss_name_lst (list[str]) – A list of namespacestore names to be used by the bucketclass

  • bs_name_lst (list[str]) – A list of backingstore names to be used by the bucketclass

create_standard_bucketclass_ui(bc_name, policy, store_list)

Create a standard BC via the UI

Parameters:
  • bc_name (str) – The name to grant the BC

  • policy (str) – The policy type to use. Spread/Mirror

  • store_list (list[str]) – A list of backingstore names to be used by the bucketclass

delete_bucketclass_ui(bc_name)

Delete a BC via the UI

bc_name (str): Name of the BC to be deleted

set_cache_namespacestore_policy(nss_name_lst, bs_name_lst)
set_multi_namespacestore_policy(nss_name_lst)
set_namespacestore_policy = {'cache': <function BucketClassUI.set_cache_namespacestore_policy>, 'multi': <function BucketClassUI.set_multi_namespacestore_policy>, 'single': <function BucketClassUI.set_single_namespacestore_policy>}
set_single_namespacestore_policy(nss_name_lst)
class ocs_ci.ocs.ui.mcg_ui.NamespaceStoreUI

Bases: ObjectStorage

create_namespace_store(namespace_store_name, namespace_store_provider, namespace_store_pvc_name, namespace_store_folder)
Parameters:
  • namespace_store_name (str) – the namespace store

  • namespace_store_provider (str) – the provider [aws, filesystem, azure]

  • namespace_store_pvc_name (str) – pvc name for file system mode

  • namespace_store_folder (str) – the folder name for mount point to fs.

ocs_ci.ocs.ui.odf_topology module

class ocs_ci.ocs.ui.odf_topology.OdfTopologyHelper

Bases: object

Helper class to automate procedures necessary for ODF Topology related tests

get_deployment_names_from_node_df_cli(node_name) list

Retrieves the deployment names associated with a node from the CLI-based topology DataFrame.

Parameters:

node_name (str) – Name of the node.

Returns:

List of deployment names associated with the given node.

Return type:

list

get_deployment_obj_from_node_df_cli(node_name, deployment_name)

Retrieves the deployment OCP object associated with a specific node and deployment name from the dataframe taken from CLI.

Parameters:
  • node_name (str) – Name of the node.

  • deployment_name (str) – Name of the deployment.

Returns:

Deployment object associated with the specified node and deployment.

Return type:

ocs_ci.ocs.ocp.OCP

Raises:
  • ValueError – If no deployment with the specified name is found in the given node.

  • ValueError – If an incorrect object is requested (invalid node name or deployment name).

get_node_names_df_cli() list

Retrieves a list of node names from the CLI topology DataFrame.

Returns:

A list of node names extracted from the CLI topology DataFrame.

Return type:

list

get_pod_obj_from_node_and_depl_df_cli(node_name, deployment_name, pod_name)

Retrieves the Pod object from the CLI based on the node name, deployment name, and pod name.

Parameters:
  • node_name (str) – Name of the node.

  • deployment_name (str) – Name of the deployment.

  • pod_name (str) – Name of the pod.

Returns:

The pod object matching the specified node, deployment, and pod names.

Return type:

Pod

Example

get_pod_obj_from_node_and_depl_df_cli(“node-1”, “my-deployment”, “my-pod”) # Returns the Pod object for the specified node, deployment, and pod names.

get_pod_status_df_cli(node_name, deployment_name, pod_name)

Retrieves the status of a pod from the CLI and returns it as a dictionary.

Parameters:
  • node_name (str) – Name of the node.

  • deployment_name (str) – Name of the deployment.

  • pod_name (str) – Name of the pod.

Returns:

Dictionary containing the status of the pod.

Return type:

dict

get_topology_cli_str()

Retrieves the topology CLI string representation.

Returns:

Object representing the topology CLI string.

Return type:

TopologyCliStr

read_topology_cli_all()

Gather data about cluster in form of table where columns are node names and rows are deployments. If node has a deployment the table will have a reference to OCP object

Returns: pd.DataFrame similar to: # +————————+—————————+—————————+——————–+ # | | compute-2 | compute-1 | compute-0 | # +========================+===========================+===========================+====================+ # | csi-addo…manager | [<ocs_ci.ocs.OCP object>, | nan | nan | # +————————+—————————+—————————+——————–+ # | csi-rbd…provisioner | [<ocs_ci.ocs.OCP object>, | [<ocs_ci.ocs.OCP object>, | nan | # +————————+—————————+—————————+——————–+ # | rook-rgw-ocs-storagecl.| [<ocs_ci.ocs.OCP object>, | nan | nan | # +————————+—————————+—————————+——————–+ # | csi-…plugin-prov | nan | [<ocs_ci.ocs.OCP object>, | [<ocs_ci.ocs.OCP>, | # +————————+—————————+—————————+——————–+

reload_depl_data_obj_from_node_df_cli(node_name, deployment_name)

Reloads the data object for a deployment from the CLI.

This method retrieves the deployment object associated with the provided node and deployment names, and then reloads its data to have DataFrame objects updated

Parameters:
  • node_name (str) – Name of the node.

  • deployment_name (str) – Name of the deployment.

reload_pod_obj_from_node_and_depl_df_cli(node_name, deployment_name, pod_name)

Reloads the data of a pod object from the CLI using node, deployment, and pod names to have DataFrame objects updated

Parameters:
  • node_name (str) – Name of the node associated with the pod.

  • deployment_name (str) – Name of the deployment associated with the pod.

  • pod_name (str) – Name of the pod.

set_resource_obj_of_node_df_cli(node_name, deployment_name, obj_new)

Sets a new resource OCP object in the node dataframe for a given node and deployment.

Parameters:
  • node_name (str) – Name of the node.

  • deployment_name (str) – Name of the deployment.

  • obj_new (ocs_ci.ocs.ocp.OCP or Pod) – New resource object to be set.

Returns:

The newly set resource object.

Example

set_resource_obj_of_node_df_cli(“node-1”, “my-deployment”, new_pod_object) # Returns the new_pod_object that has been set in the node dataframe.

Note

The method assumes the availability of the OCP and Pod classes.

topology_cli_df = Empty DataFrame Columns: [] Index: []
class ocs_ci.ocs.ui.odf_topology.TopologyCliStr(topology_df)

Bases: object

Class-helper to visualize Topology configuration saved in dataframe gathered with cli output.

class ocs_ci.ocs.ui.odf_topology.TopologyUiStr(topology_df)

Bases: object

Class-helper to visualize Topology configuration saved in dataframe gathered with Selenium driver.

ocs_ci.ocs.ui.odf_topology.get_creation_ts_with_offset(node_metadata) str

Retrieves the creation timestamp of a node with offset similar to what we see on ODF Management console.

Parameters:

node_metadata (dict) – Node metadata containing the ‘creationTimestamp’ value.

Returns:

Formatted creation timestamp with offset.

Return type:

str

Example

get_creation_ts_with_offset({‘creationTimestamp’: ‘2022-01-01T12:34:56Z’}) # Returns ‘Jan 1, 2022, 12:34 PM’.

Note

Assumes ‘creationTimestamp’ is in the format ‘%Y-%m-%dT%H:%M:%SZ’.

ocs_ci.ocs.ui.odf_topology.get_deployment_details_cli(deployment_name) dict

Retrieves detailed information about a deployment from the CLI.

Parameters:

deployment_name (str) – Name of the deployment.

Returns:

Dictionary containing the deployment details, including its name, namespace, labels,

number of annotations, owner, and creation timestamp.

Return type:

dict

Example

get_deployment_details_cli(“my-deployment”) # Returns {‘name’: ‘my-deployment’, ‘namespace’: ‘my-namespace’, ‘labels’: {‘app’: ‘my-app’}, # ‘annotation’: ‘3 annotations’, ‘owner’: ‘my-owner’, ‘created_at’: ‘Jun 1, 2023, 10:00 AM’}

ocs_ci.ocs.ui.odf_topology.get_node_details_cli(node_name) dict

Retrieves detailed information about a node from the CLI.

Parameters:

node_name (str) – Name of the node.

Returns:

Dictionary containing the node details, including its name, status, role, operating system,

kernel version, instance type, OS image, architecture, addresses, kubelet version, provider ID, number of annotations, external ID, and creation timestamp.

Return type:

dict

Example

get_node_details_cli(“node-1”) # Returns {‘name’: ‘node-1’, ‘status’: ‘Ready’, ‘role’: ‘worker’, ‘operating_system’: ‘linux’, # ‘kernel_version’: ‘4.18.0-305.12.1.el8_4.x86_64’, ‘instance_type’: ‘m5.large’, # ‘OS_image’: ‘CentOS Linux 8 (Core)’, ‘architecture’: ‘amd64’, # ‘addresses’: ‘External IP: 203.0.113.10; Hostname: node-1; Internal IP: 192.168.0.1’, # ‘kubelet_version’: ‘v1.21.2’, ‘provider_ID’: ‘aws’, ‘annotations_number’: ‘5 annotations’, # ‘external_id’: ‘-’, ‘created’: ‘Jun 1, 2023, 10:00 AM’}

ocs_ci.ocs.ui.odf_topology.get_node_names_of_the_pods_by_pattern(pattern)

Get the node names of the pods matching the given pattern.

Parameters:

pattern (str) – The pattern to match the pod names.

Returns:

A dictionary mapping pod names to their corresponding node names.

Return type:

dict

ocs_ci.ocs.ui.pvc_ui module

class ocs_ci.ocs.ui.pvc_ui.PvcUI

Bases: PageNavigator

User Interface Selenium

create_pvc_ui(project_name, sc_name, pvc_name, access_mode, pvc_size, vol_mode)

Create PVC via UI. :param project_name: name of test project :type project_name: str :param sc_name: storage class name :type sc_name: str :param pvc_name: the name of pvc :type pvc_name: str :param access_mode: access mode :type access_mode: str :param pvc_size: the size of pvc (GB) :type pvc_size: str :param vol_mode: volume mode type :type vol_mode: str

delete_pvc_ui(pvc_name, project_name)

Delete pvc via UI :param pvc_name: Name of the pvc :type pvc_name: str :param project_name: name of test project :type project_name: str

pvc_clone_ui(project_name, pvc_name, cloned_pvc_access_mode='ReadWriteOnce', cloned_pvc_name=None)

Clone PVC via UI

Parameters:
  • project_name (str) – The name of project

  • pvc_name (str) – The name of PVC

  • cloned_pvc_access_mode (str) – Access mode for cloned PVC

  • cloned_pvc_name (str) – The name for cloned PVC

pvc_resize_ui(project_name, pvc_name, new_size)

Resizing pvc via UI :param project_name: name of test project :type project_name: str :param pvc_name: the name of pvc :type pvc_name: str :param new_size: the new size of pvc (GB) :type new_size: int

select_name_filter_if_needed()

Select Name filter before searching by name

In OCP 4.21+, the filter dropdown defaults to ‘Status’. This method switches it to ‘Name’ filter. For older OCP versions where the Name was default, this is a no-op.

verify_pvc_resize_ui(project_name, pvc_name, expected_capacity)

Verifying PVC resize via UI :param project_name: name of test project :type project_name: str :param pvc_name: the name of pvc :type pvc_name: str :param expected_capacity: the new size of pvc (GiB) :type expected_capacity: str

verify_pvc_ui(pvc_size, access_mode, vol_mode, sc_name, pvc_name, project_name)

Verifying PVC details via UI

Parameters:
  • pvc_size (str) – the size of pvc (GB)

  • access_mode (str) – access mode

  • vol_mode (str) – volume mode type

  • sc_name (str) – storage class name

  • pvc_name (str) – the name of pvc

  • project_name (str) – name of test project

ocs_ci.ocs.ui.storageclass module

class ocs_ci.ocs.ui.storageclass.StorageClassUI

Bases: PageNavigator

User Interface Selenium

create_encrypted_storage_class_ui(backend_path=None, reclaim_policy='Delete', provisioner='openshift-storage.rbd.csi.ceph.com', vol_binding_mode='Immediate', service_name=None, kms_address=None, tls_server_name=None)

Test for creation of storage class with encryption via UI :param backend_path: name of the vault backend path :type backend_path: str :param reclaim_policy: value of the reclaim policy, it could be ‘Delete’ or ‘Retain’ :type reclaim_policy: str :param provisioner: type of provisioner used, it could be ‘rbd’ or ‘cephfs’ :type provisioner: str :param vol_binding_mode: value of the volume binding mode, it could be ‘WaitForFirstConsumer’ or ‘Immediate’ :type vol_binding_mode: str :param service_name: the default value is None which can be changed in the function call :type service_name: str :param kms_address: the default value is None which can be changed in the function call :type kms_address: str :param tls_server_name: the default value is None which can be changed in the function call :type tls_server_name: str

Returns:

sc_name (str) if the storage class creation is successful, returns False otherwise

create_storageclass(pool_name)

Basic function to create RBD based storageclass

Parameters:

pool_name (str) – The pool to choose in the storageclass.

Returns:

the name of the storageclass created, otherwise return None.

Return type:

sc_name (str)

delete_rbd_storage_class(sc_name)

Delete RBD storageclass

Parameters:

sc_name (str) – Name of the storageclass to delete.

Returns:

True if deletion succeeded otherwise False.

Return type:

(bool)

verify_storageclass_existence(sc_name)

Check if storageclass is existing in the storageclass list page

Parameters:

sc_name (str) – The name of storageclass to verify.

Returns:

True is it exist otherwise False.

ocs_ci.ocs.ui.validation_ui module

class ocs_ci.ocs.ui.validation_ui.ValidationUI

Bases: PageNavigator

User Interface Validation Selenium

calculate_est_days_and_average_manually()

Calculates the ‘Estimated days until full’ manually by: 1. Get the age of the cluster in days 2. Get used capacity of the cluster 3. Get total capacity of the cluster 4. Calculate average consumption of the storage per day 5. Calculate the ‘Estimated days until full’ by using average and available capacity.

Returns:

Estimated days until full which calculated manually

Return type:

tuple

check_capacity_breakdown(project_name, pod_name)

Check Capacity Breakdown

Parameters:
  • project_name (str) – The name of the project

  • pod_name (str) – The name of pod

Returns:

True if project_name and pod_name exist on capacity_breakdown, False otherwise

Return type:

bool

odf_console_plugin_check()

Function to verify if console plugin is enabled on UI or not, if not, this function will enable it so as to see ODF tab under Storage section

odf_overview_ui()

Method to verify changes and validate elements on ODF Storage and Data Foundation web pages

Steps

  1. Validate ODF console plugin is enabled, if not enable it

  2. Navigate to Data Foundation page via PageNavigator and Data Foundation

  3. If storage is on cluster or configuration is multi storagecluster:

    • Validate that the legend for Available vs Used capacity is present.

    • Verify that Overview navigates to the Storage Cluster page.

    • Ensure the Used Raw Capacity string is visible in the System Capacity card.

    • Verify that the Block and File tab is active.

    • Verify that utilization is good in the Block and File tab.

    • Verify that resiliency is OK in the Block and File tab.

    • Verify that CephBlockPool status is Ready.

    • Verify that CephFS data pool status is Ready.

    • Navigate to the default CephBlockPool using the search filter.

    • Verify that the Storage Cluster is healthy on the CephBlockPool page.

    • Verify that the Performance Card is present.

    • Navigate to the Storage Pools page via the breadcrumb link.

    • Navigate to the ODF Backing Store tab via the Object Storage tab or PageNavigator.

    • Verify that all tabs are working.

  4. If external mode or multi–storagecluster:

    • Navigate to External Systems

    • Verify if Block and File tab is active

    • verify content of External Storage Cluster / Block and File tab

    • Check if PersistentVolumeClaims capacity breakdown is available

    • Navigate to Object tab from External cluster

  5. Navigate to Buckets page via View Buckets link

  6. Navigate to Backing Store tab via Buckets tab

  7. Verify if Backing Store is present and link to Backing Store resource works

  8. Navigate to Backing Store tab via breadcrumb

  9. Navigate to Bucket class tab via Backing Store tab

  10. Navigate to the default Bucket Class details via Bucket Class tab

  11. Verify the status of a default bucket class

  12. Navigate to Bucket class via breadcrumb

  13. Navigate to Namespace Store tab via Bucket Class tab, verify if it works

  14. If not external mode: - Navigate to Storage Cluster via Page navigator - Verify if Block and File tab is active

  15. If external mode: - Navigate to External Systems page via Page navigator - Verify if External Systems page is opening

  16. Process results

Raises:

AssertionError – If one of the verifications fails

odf_storagesystems_ui()

Function to verify changes and validate elements on ODF Storage Systems tab for ODF 4.9

refresh_web_console()
validate_unprivileged_access()

Function to verify the unprivileged users can’t access ODF dashbaord

verification_ui()

Verification UI

verify_object_service_page()

Verify Object Service Page UI

verify_ocs_operator_tabs()

Verify OCS Operator Tabs

verify_odf_without_ocs_in_installed_operator() tuple

Function to validate ODF operator is present post ODF installation, expectation is only ODF operator should be present in Installed operators tab and OCS operator shouldn’t be present. This function is only written for 4.9+ versions

Returns: tuple: odf_operator_presence, ocs_operator_presence

verify_page_contain_strings(strings_on_page, page_name)

Verify Page Contain Strings

Parameters:
  • strings_on_page (list) – list of strings on page

  • page_name (str) – the name of the page

verify_persistent_storage_page()

Verify Persistent Storage Page

verify_storage_clients_page()

Verify storage clients page in UI

Returns: StorageClients: Storage Clients page object

ocs_ci.ocs.ui.views module

ocs_ci.ocs.ui.views.locators_for_current_ocp_version()

ocs_ci.ocs.ui.workload_ui module

class ocs_ci.ocs.ui.workload_ui.PvcCapacityDeployment(pvc_obj: PVC, capacity_float: float, deployment: str = None)

Bases: object

Class to store PVC capacity and deployment name to avoid unnecessary queries to a cluster and speed-up the test

class ocs_ci.ocs.ui.workload_ui.PvcCapacityDeploymentList(*args, **kwargs)

Bases: list

Subclass of list to store a list of PvcCapacityDeployment objects and provide additional methods.

add_instance(pvc_obj: PVC, capacity_float: float, deployment: str = None)

Add a PvcCapacityDeployment object to the list.

Parameters:
  • pvc_obj (PVC) – The PVC object.

  • capacity_float (float) – The capacity in float.

  • deployment (str, optional) – The deployment name. Defaults to None.

delete_deployment(deployment: Deployment)

Deletes the deployment from the cluster and from the list. :param deployment:

delete_pvc(pvc: PVC)

Delete the PVC with or without data and remove the PvcCapacityDeployment object from list, make sure that PV is deleted as well.

It is designed to delete mounted PVC with mounted PV as we want to test the behavior of management-console :param pvc: PVC object

get_deployment_names_list()

Get the list of deployments.

Returns:

The list of deployments.

Return type:

list

get_pvc_capacity_deployment(index: int) PvcCapacityDeployment

Get the PvcCapacityDeployment object at the specified index.

Parameters:

index (int) – The index of the PvcCapacityDeployment object to retrieve.

Returns:

The PvcCapacityDeployment object at the specified index.

Return type:

PvcCapacityDeployment

get_pvc_capacity_deployment_by_deployment(deployment: str)

Get the PvcCapacityDeployment object by deployment.

Parameters:

deployment (str) – The deployment name.

Returns:

The PvcCapacityDeployment object that matches the pvc_obj and deployment.

Return type:

PvcCapacityDeployment

get_pvc_names_list()

Get the list of pvcs.

Returns:

The list of pvcs.

Return type:

list

set_pvc_capacity_deployment(index: int, pvc_obj: PVC, capacity_float: float, deployment: str = None)

Set the PvcCapacityDeployment object at the specified index.

Parameters:
  • index (int) – The index of the PvcCapacityDeployment object to set.

  • pvc_obj (PVC) – The PVC object.

  • capacity_float (float) – The capacity in float.

  • deployment (str, optional) – The deployment name. Defaults to None.

class ocs_ci.ocs.ui.workload_ui.SingletonMeta

Bases: type

Singleton class to ensure only one instance of WorkloadUi is created.

class ocs_ci.ocs.ui.workload_ui.WorkloadUi(*args, **kwargs)

Bases: object

Class to handle workload UI related operations

delete_all_deployments()

Deletes all test deployments from cluster created for ui tests.

delete_depl(depl_name: str, force: bool = False)

Deletes deployment from cluster.

Parameters:
  • force (bool, optional) – If True, force deletion even if the deployment is not found. Defaults to False.

  • depl_name (str) – Name of the deployment to be deleted. Defaults to None.

Returns:

The deletion result if deployment exists and is successfully deleted.

Returns None otherwise.

Return type:

dict

deploy_app(node: str = None, namespace='openshift-storage', depl_name='ui-test-app', pvc_name: str = None) tuple

Deploys a testing app container to a randomly selected worker node.

node (str): Name of the node where the app container is to be deployed. If not specified, a random worker node is selected. namespace (str): Namespace where deployment is to be deployed. depl_name (str): Name of the deployment to be created. Defaults to None. pvc_name (str): Name of the PVC to be attached by the test app container. Defaults to None.

Returns:

The name of the node where the container is deployed, and a deployment name if deployed, otherwise None.

Return type:

tuple

deployment_list = []
wait_app_scaled_up(timeout: int, depl_name: str, namespace: str) bool

Waits for the ‘busybox’ or ‘ubi8’ or other test deployment to be scaled up within the specified timeout.

Parameters:
  • timeout (int) – The maximum time to wait for the deployment to be scaled up, in seconds.

  • depl_name (str) – Name of the deployment to be scaled up.

  • namespace (str) – Namespace where the deployment is located.

Returns:

True if the deployment is successfully scaled up within the timeout, False otherwise.

Return type:

bool

ocs_ci.ocs.ui.workload_ui.compare_mem_usage(mem_float: float, mem_str: str, deviation_accepted: int = 10) bool

Compare memory usage in bytes and in string format :param mem_float: memory in float format :param mem_str: memory in string format such as “1.5 GiB” or “1.5 GB” :param deviation_accepted: deviation accepted in percentage

Returns:

True if the deviation is within the acceptable range, False otherwise

ocs_ci.ocs.ui.workload_ui.divide_capacity(total, num)

Get n random numbers that sum up to a total. For example: 10 = 3 + 4 + 3

Parameters:
  • total – number to divide

  • num – number of parts

Returns:

list of numbers

ocs_ci.ocs.ui.workload_ui.fill_attached_pv(data_struct: PvcCapacityDeployment, pod: Pod) bool

Fill the attached PV with data until it is full or disc quota is exceeded. A PvcCapacityDeployment object will be updated with capacity of copied data if the disc quota is exceeded.

Parameters:
  • data_struct – a PvcCapacityDeployment object consisting of a PVC and a capacity and a Deployment

  • pod – a Pod object to fill the PV attached to it

Returns:

True if the PV is filled, False otherwise

ocs_ci.ocs.ui.workload_ui.wait_for_container_status_ready(pod: Pod, timeout=300, interval=5)

Wait for all containers of the pod to move to ready state.

Parameters:
  • pod – a pod object of the pod whose containers are to be checked

  • timeout – overall timeout in seconds

  • interval – polling interval in seconds

Returns:

True if all containers are ready within timeout, False otherwise

Module contents