ocs_ci.ocs.ui package¶
Submodules¶
ocs_ci.ocs.ui.add_replace_device_ui module¶
-
class
ocs_ci.ocs.ui.add_replace_device_ui.AddReplaceDeviceUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorInfraUI 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.base_ui module¶
-
class
ocs_ci.ocs.ui.base_ui.BaseUI(driver)¶ Bases:
objectBase Class for UI Tests
-
check_element_text(expected_text, element='*')¶ Check if the text matches the expected text.
- Parameters
expected_text (string) – The expected text.
- 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 (set): (GUI element needs to operate on (str), type (By))
-
do_click(locator, timeout=30)¶ Click on Button/link on OpenShift Console
locator (set): (GUI element needs to operate on (str), type (By)) timeout (int): Looks for a web element repeatedly until timeout (sec) happens.
-
do_click_by_id(id, timeout=30)¶
-
do_send_keys(locator, text, timeout=30)¶ Send text to element on OpenShift Console
locator (set): (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.
-
get_checkbox_status(locator, timeout=30)¶ Checkbox Status
- Parameters
locator (set) – (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 is Enabled, False otherwise
- Return type
bool
-
is_expanded(locator, timeout=30)¶ Check whether an element is in an expanded or collapsed state
- Parameters
locator (set) – (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 expended, False otherwise
- Return type
bool
-
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 (set): (GUI element needs to operate on (str), type (By))
-
take_screenshot()¶ Take screenshot using python code
-
Bases:
ocs_ci.ocs.ui.base_ui.BaseUIPage Navigator Class
Navigate to Alerting Page
Navigate to Dashboards Page
Navigate to Events Page
Navigate to Explore Page
Navigate to Installed Operators Page
Navigate to Metrics Page
Navigate to Object Bucket Claims Page
Navigate to Object Buckets Page
Navigate to OperatorHub Page
Navigate to Overview Page
Navigate to Persistent Volume Claims Page
Navigate to Persistent Volumes Page
Navigate to Pods Page
Navigate to Projects Page
Navigate to Quickstarts Page
Navigate to Search Page
Navigate to Storage Classes Page
Navigate to the OCS Operator management page
Navigate to Volume Snapshot Classes Page
Navigate to Volume Snapshot Contents Page
Navigate to Storage Volume Snapshots Page
Compares a given status string to the one shown in the resource’s UI page
- Parameters
status_to_check (str) – The status that will be compared with the one in the UI
timeout (int) – How long should the check run before moving on
- Returns
True if the resource was found, False otherwise
- Return type
bool
-
ocs_ci.ocs.ui.base_ui.close_browser(driver)¶ Close Selenium WebDriver
- Parameters
driver (Selenium WebDriver) –
-
ocs_ci.ocs.ui.base_ui.login_ui()¶ Login to OpenShift Console
- Returns
driver (Selenium WebDriver)
-
ocs_ci.ocs.ui.base_ui.take_screenshot(driver)¶ Take screenshot using python code
- Parameters
driver (Selenium WebDriver) –
ocs_ci.ocs.ui.deployment_ui module¶
-
class
ocs_ci.ocs.ui.deployment_ui.DeploymentUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorDeployment OCS Operator via User Interface
-
configure_encryption()¶ Configure Encryption
-
create_catalog_source_yaml()¶ Create OLM YAML file
-
create_storage_cluster()¶ Review and Create storage cluster
-
install_internal_cluster()¶ Install Internal Cluster
-
install_local_storage_operator()¶ Install local storage operator
-
install_lso_cluster()¶ Install LSO cluster via UI
-
install_ocs_operator()¶ Install OCS Opeartor
-
install_ocs_ui()¶ Install OCS via UI
-
install_storage_cluster()¶ Install Storage Cluster
-
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=300, 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
-
ocs_ci.ocs.ui.mcg_ui module¶
-
class
ocs_ci.ocs.ui.mcg_ui.BucketClassUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorA 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.MCGStoreUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorA class representation for abstraction of MCG store related OpenShift UI actions
-
create_store_ui(kind, store_name, secret_name, target_bucket)¶ Create an MCG store via the UI
- Parameters
kind (str) – The store kind - backingstore | namespacestore
store_name (str) – The name to grant to the store
secret_name (str) – The name of the secret to used to connect the store to AWS
target_bucket (str) – The AWS S3 bucket to use as a host for the store
-
delete_store_ui(kind, store_name)¶ Delete an MCG store via the UI
store_name (str): Name of the store to be deleted
-
-
class
ocs_ci.ocs.ui.mcg_ui.ObcUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorA class representation for abstraction of OBC-related OpenShift UI actions
-
create_obc_ui(obc_name, storageclass, bucketclass=None)¶ Create an OBC via the UI
- Parameters
obc_name (str) – The name to grant the OBC
storageclass (str) – The storageclass to be used by the OBC
bucketclass (str) – The bucketclass to be used by the OBC
-
delete_obc_ui(obc_name)¶ Delete an OBC via the UI
obc_name (str): Name of the OBC to be deleted
-
ocs_ci.ocs.ui.pvc_ui module¶
-
class
ocs_ci.ocs.ui.pvc_ui.PvcUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorUser Interface Selenium
-
create_pvc_ui(sc_type, pvc_name, access_mode, pvc_size)¶ Create PVC via UI.
sc_type (str): storage class type pvc_name (str): the name of pvc access_mode (str): access mode pvc_size (str): the size of pvc (GB)
-
delete_pvc_ui(pvc_name)¶ Delete pvc via UI
pvc_name (str): Name of the pvc
-
ocs_ci.ocs.ui.validation_ui module¶
-
class
ocs_ci.ocs.ui.validation_ui.ValidationUI(driver)¶ Bases:
ocs_ci.ocs.ui.base_ui.PageNavigatorUser Interface Validation Selenium
-
verification_ui()¶ Verification UI
-
verify_object_service_page()¶ Verify Object Service Page UI
-
verify_ocs_operator_tabs()¶ Verify OCS Operator Tabs
-
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
-