ocs_ci.ocs.ui.page_objects package

Submodules

ocs_ci.ocs.ui.page_objects.alerting module

class ocs_ci.ocs.ui.page_objects.alerting.AlertDetails

Bases: PageNavigator

Alert Details page object

get_raw_runbook()

Get Runbook

Returns:

Runbook page

Return type:

Runbook

Get Runbook Link

Returns:

Runbook link

Return type:

str

class ocs_ci.ocs.ui.page_objects.alerting.Alerting

Bases: PageNavigator

Alerting page that contains 3 tabs - Alerts, Silences and Alerting Rules The default tab is Alerts

nav_alerting_rules()

Navigate to Alerting Rules tab

Returns:

Alerting Rules page

Return type:

AlertingRules

nav_alerts()

Navigate to Alerts tab. Default tab when opening the Alerting page

Returns:

Alerts page

Return type:

Alerts

nav_silences()

Navigate to Silences tab

Returns:

Silences page

Return type:

Silences

class ocs_ci.ocs.ui.page_objects.alerting.AlertingRules

Bases: Alerting, SearchBar

Alerting Rules page object. Contains all the alerts existing in the cluster that are being monitored. Use ‘oc get prometheusrules -n openshift-storage ocs-prometheus-rules -o yaml’ to get the list of alerts

navigate_alerting_rule_details(alert_name)

Navigate to Alerting Rule Details

Parameters:

alert_name (str) – Alert name

Returns:

Alert Rule Details page

Return type:

AlertDetails

class ocs_ci.ocs.ui.page_objects.alerting.Alerts

Bases: Alerting, SearchBar

Alerts page object

search_alert(search_text)

Search for Alerts

Parameters:

search_text (str) – Text to search

class ocs_ci.ocs.ui.page_objects.alerting.Runbook(text=None, runbook_hash=None)

Bases: object

Runbook object used for checking the runbook content. May be instantiated with the runbook hash value as expected result for the test; If the runbook hash value is not provided, text should be provided and the hash value will be calculated

check_text_content(headers, *args)

Check if the text is valid

Returns:

True if the text is valid, False otherwise

Return type:

bool

class ocs_ci.ocs.ui.page_objects.alerting.Silences

Bases: Alerting

Silences page object where all the silences are listed and new silences may be created.

Convert GitHub link to raw link

Parameters:

link (str) – GitHub link

Returns:

Raw GitHub link or None if the link is not valid

ocs_ci.ocs.ui.page_objects.backing_store_tab module

class ocs_ci.ocs.ui.page_objects.backing_store_tab.BackingStoreTab

Bases: ObjectStorage, CreateResourceForm

nav_backing_store_list_breadcrumb()

Navigate to backing store breadcrumbs

nav_to_backing_store(backing_store_name: str)

Navigate to backing store page

Parameters:

backing_store_name (str) – backing store name

validate_backing_store_ready() bool

Validate backing store is Ready :returns: True if backing store is Ready, False otherwise :rtype: bool

ocs_ci.ocs.ui.page_objects.block_and_file module

class ocs_ci.ocs.ui.page_objects.block_and_file.BlockAndFile

Bases: PageNavigator

check_pvc_to_namespace_ui_card(namespace, check_name: str)

Initial page - Data Foundation / Storage Cluster / Storage pools / ocs-storagecluster-cephblockpool

Method to check that the pvc’s from the UI are the same as the expected pvc’s. For each pvc, initially added, filled and saved in PvcCapacityDeploymentList the method checks that the pvc is displayed in the UI, and the value under each PVC name matches to expected.

Important that the method is called after the pvc’s are created and filled in PvcCapacityDeploymentList.

Parameters:
  • namespace (str) – Namespace name to select

  • check_name (str) – Name of the check to be displayed in the report

Returns:

Dictionary of the check results or None if all checks passed

Return type:

dict

get_avg_consumption_from_ui()

Get the value of ‘Average storage consumption’ from the UI

Returns:

Average of storage consumption per day

Return type:

float

get_est_days_from_ui()

Get the value of ‘Estimated days until full’ from the UI

Returns:

Estimated days until full from UI

Return type:

int

get_estimated_days_from_consumption_trend()

This will fetch information from DataFoundation>>Storage>>Block and File page>>Consumption trend card

Returns:

(get_est_days_from_element, get_avg_from_element)

Return type:

tuple

get_raw_capacity_card_values()

Initial page - Data Foundation / Storage Cluster / Block and File Get the raw capacity card values

Returns:

Used and available capacity values in format similar to “1.23 TiB”

Return type:

tuple

get_storage_cluster_status()

Verify status of the Storage Cluster on ceph blockpool page, reading from the Status Card

Returns:

True if status is Healthy, False otherwise

Return type:

bool

odf_storagesystems_consumption_trend()

Function to verify changes and validate elements on ODF storage consumption trend for ODF 4.17 This will navigate through below order DataFoundation>>Storage>>storagecluster_storagesystem_details>>Block and File page Further it looks for the Consumption trend card

Returns:

tpl_of_days_and_avg ex: (Estimated days, Average)

Return type:

tuple

read_capacity_breakdown()

Initial page - Data Foundation / Storage Cluster / Storage pools / ocs-storagecluster-cephblockpool Read the capacity breakdown from the table

Returns:

Dictionary of capacity breakdown

Return type:

dict

resiliency_ok()

Verify resiliency status of the Storage Cluster on ceph blockpool pag is Healthy, reading from the Status Card

Returns:

True if status is Healthy, False otherwise

Return type:

bool

select_capacity_resource(resource_name: str, namespace_name: str = None)

Initial page - Storage / Storage cluster / Block and File Select the capacity resource from the dropdown

Parameters:
  • resource_name (str) – resource name to select

  • namespace_name (str) – namespace name to select

select_namespace_for_pvcs(namespace_name: str)

Initial page - Storage / Storage cluster / Block and File tab Select the namespace for PVs from the dropdown

Parameters:
  • namespace_name (str) – Namespace name to select. Namespace should be unique,

  • selected (otherwise the first one will be) –

select_requested_capacity_dropdown(dropdown_val: str)

Initial page - Data Foundation / Storage Cluster / Block and File Select the requested capacity from the dropdown

Parameters:

dropdown_val (str) – Dropdown value to select

verify_utilization_is_good()

Verify that the utilization status is ‘Good’ on the Block and File page

Returns:

True if the utilization status is ‘Good’, False otherwise

Return type:

bool

ocs_ci.ocs.ui.page_objects.block_pools module

class ocs_ci.ocs.ui.page_objects.block_pools.StoragePools(pool_existed: list = None)

Bases: CreateResourceForm, EditLabelForm, ResourceList

Class to represent the Storage Pools page and its functionalities.

delete_block_pool(block_pool_name: str, cannot_be_deleted: bool = False)

Deletes the block pool, does not verify the deletion, but verifies the alert if the block pool cannot be deleted

Parameters:
  • block_pool_name (str) – Name of the block pool to be deleted

  • cannot_be_deleted (bool) – Whether the block pool cannot be deleted

Returns:

True if the block pool delete via UI performed, False otherwise

Return type:

bool

is_block_pool_exist(block_pool_name: str)

Checks if the block pool exists in the list

Parameters:

block_pool_name (str) – Name of the block pool

navigate_to_block_pool(block_pool_name: str)

Navigate to the specific block pool details page

Parameters:

block_pool_name (str) – Name of the block pool

Returns:

BlockPoolDetails page object

Return type:

BlockPoolDetails

proceed_resource_creation()

Method to proceed to resource creation form, when Create button is visible

verify_cephblockpool_status(status_exp: str = 'Ready')

Verifies the status of the default cephblockpool

Parameters:

status_exp (str) – Expected status of the cephblockpool, default is “Ready

verify_cephfs_status(status_exp: str = 'Ready')

Verifies the status of the default cephfilesystem

Raises:

CephHealthException – If the cephfilesystem status is not as expected

ocs_ci.ocs.ui.page_objects.bucket_class_tab module

class ocs_ci.ocs.ui.page_objects.bucket_class_tab.BucketClassTab

Bases: ObjectStorage, CreateResourceForm

nav_bucket_class_breadcrumb()

Navigate to bucket class breadcrumb

nav_to_bucket_class(bucket_class_name: str)

Navigate to bucket class with the given name.

Parameters:

bucket_class_name (str) – bucket class name

validate_bucket_class_ready() bool

Validate the status of default bucket class is ‘Ready’

Returns:

True if the status of default bucket class is ‘Ready’, False otherwise.

Return type:

bool

ocs_ci.ocs.ui.page_objects.bucket_lifecycle_ui module

class ocs_ci.ocs.ui.page_objects.bucket_lifecycle_ui.BucketLifecycleUI

Bases: ObjectStorage, ConfirmDialog

A class for bucket lifecycle policy UI operations

create_lifecycle_rule(rule_name: str, scope: str = 'whole_bucket', rules: dict = None, **kwargs)

Create a new lifecycle rule using the interface-based approach

Parameters:
  • rule_name (str) – Name for the rule

  • scope (str) – ‘whole_bucket’ or ‘targeted’

  • rules (dict) – Dictionary mapping rule types to their parameters, {“expiration”: {“days”: 30}}

delete_lifecycle_rule(rule_name: str) None

Delete a lifecycle rule

Parameters:

rule_name (str) – Name of the rule to delete

Raises:
  • NoSuchElementException – If rule kebab menu or delete option not found

  • TimeoutException – If UI elements fail to load within timeout period

  • WebDriverException – If browser interaction fails

  • ImportError – If format_locator cannot be imported

edit_lifecycle_rule(rule_name: str, new_rules: dict) None

Edit an existing lifecycle rule

Parameters:
  • rule_name (str) – Name of the rule to edit

  • new_rules (dict) – Dictionary of new rules to apply, mapping rule types to their parameters

Raises:
  • NoSuchElementException – If rule kebab menu or edit option not found

  • TimeoutException – If UI elements fail to load within timeout period

  • WebDriverException – If browser interaction fails

  • ImportError – If format_locator cannot be imported

  • ValueError – If invalid rule parameters provided or unknown rule type

get_lifecycle_policy_from_backend(bucket_name: str, mcg_obj) dict

Get lifecycle policy from backend S3 API

Parameters:
  • bucket_name (str) – Name of the bucket

  • mcg_obj – MCG object with S3 client

Returns:

The lifecycle configuration from backend, or {“Rules”: []} if no configuration exists,

or None if an error occurs

Return type:

dict

Raises:

ClientError – If S3 API call fails (except for NoSuchLifecycleConfiguration)

get_lifecycle_rules_list()

Get list of all lifecycle rules for current bucket

Returns:

List of rule names

Return type:

list

navigate_to_bucket_lifecycle(bucket_name: str) None

Navigate to a specific bucket’s lifecycle rules page

Parameters:

bucket_name (str) – Name of the bucket

Raises:
  • NoSuchElementException – If bucket not found in search results or UI elements not found

  • TimeoutException – If page elements fail to load within timeout period

class ocs_ci.ocs.ui.page_objects.bucket_lifecycle_ui.ExpirationRuleUI(ui_instance)

Bases: LifecycleRuleInterface

Implementation for object expiration rule

apply(params: dict, edit_mode: bool = False) None

Apply object expiration rule

get_required_params() list

Get required parameters

validate_params(params: dict) bool

Validate parameters for expiration rule

class ocs_ci.ocs.ui.page_objects.bucket_lifecycle_ui.ExpiredDeleteMarkerRuleUI(ui_instance)

Bases: LifecycleRuleInterface

Implementation for expired delete marker cleanup rule

apply(params: dict, edit_mode: bool = False) None

Apply expired delete marker cleanup rule

get_required_params() list

Get required parameters

validate_params(params: dict) bool

Validate parameters for expired delete marker rule

class ocs_ci.ocs.ui.page_objects.bucket_lifecycle_ui.IncompleteMultipartRuleUI(ui_instance)

Bases: LifecycleRuleInterface

Implementation for incomplete multipart upload cleanup rule

apply(params: dict, edit_mode: bool = False) None

Apply incomplete multipart upload cleanup rule

get_required_params() list

Get required parameters

validate_params(params: dict) bool

Validate parameters for incomplete multipart rule

class ocs_ci.ocs.ui.page_objects.bucket_lifecycle_ui.LifecycleRuleInterface(ui_instance)

Bases: ABC

Base interface for lifecycle rule UI implementations

abstract apply(params: dict, edit_mode: bool = False) None

Apply the rule with given parameters

Parameters:
  • params – Dictionary of parameters specific to this rule type

  • edit_mode – True if editing existing rule, False if creating new

abstract get_required_params() list

Get list of required parameter names

Returns:

List of required parameter names

Return type:

list

abstract validate_params(params: dict) bool

Validate parameters before applying

Parameters:

params – Dictionary of parameters to validate

Returns:

True if parameters are valid

Return type:

bool

class ocs_ci.ocs.ui.page_objects.bucket_lifecycle_ui.NoncurrentVersionRuleUI(ui_instance)

Bases: LifecycleRuleInterface

Implementation for noncurrent version expiration rule

apply(params: dict, edit_mode: bool = False) None

Apply noncurrent version expiration rule

get_required_params() list

Get required parameters

validate_params(params: dict) bool

Validate parameters for noncurrent version rule

ocs_ci.ocs.ui.page_objects.bucket_tab_permissions module

class ocs_ci.ocs.ui.page_objects.bucket_tab_permissions.BlockPublicAccessType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

BLOCK_ALL = 'BlockAllPublicAccess'
BLOCK_CROSS_ACCOUNT = 'BlockCrossAccountAccess'
BLOCK_NEW_POLICIES = 'BlockAccessByNewPolicies'
class ocs_ci.ocs.ui.page_objects.bucket_tab_permissions.BucketsTabPermissions

Bases: ObjectStorage, ConfirmDialog

A class representation for abstraction of Buckets tab permissions related OpenShift UI actions

activate_policy_editor() None

Activate the policy editor by intelligently choosing between ‘Edit policy’ and ‘Start from scratch’.

This method checks if a policy already exists on the bucket: - If policy exists: clicks ‘Edit policy’ button - If no policy exists: clicks ‘Start from scratch’ button

Raises:

NoSuchElementException – If UI elements are not found.

apply_bucket_policy() None

Apply the selected bucket policy and confirm in modal.

Raises:
  • NoSuchElementException – If UI elements are not found.

  • TimeoutException – If modal or toast elements are not found within timeout.

  • PolicyApplicationError – If policy application fails with an error.

delete_bucket_policy_ui(bucket_name: str = None) None

Complete workflow to delete bucket policy via UI.

This method orchestrates the complete deletion workflow: 1. Resolves bucket name 2. Validates policy exists 3. Activates policy editor 4. Initiates deletion 5. Handles confirmation dialog

Parameters:

bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

Raises:
  • ValueError – If no bucket policy exists to delete or no buckets are available.

  • NoSuchElementException – If UI elements are not found.

  • TimeoutException – If elements are not found within timeout.

get_buckets_list() list

Get list of all buckets using href pattern

Returns:

List of bucket names as strings

Return type:

list

navigate_back_to_buckets_list()

Navigate back to buckets list page.

Returns:

Instance of BucketsTab page object.

Return type:

BucketsTab

navigate_to_block_public_access_tab() None

Navigate to the ‘Block public access’ tab from within the bucket ‘Permissions’ tab.

Raises:

NoSuchElementException – If ‘Block public access’ tab is not found.

set_bucket_policy_enforce_https_ui(bucket_name: str = None) None

Complete workflow to set EnforceSecureTransportHTTPS bucket policy via UI.

Parameters:

bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

Raises:

ValueError – If no buckets are available.

set_bucket_policy_folder_access_ui(bucket_name: str = None, folder_path: str = None, account_list: list[str] | None = None) None

Complete workflow to set AllowReadWriteAccessToFolder bucket policy via UI.

Parameters:
  • bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

  • folder_path (str, optional) – Folder path within the bucket. If None, uses “documents”.

  • account_list (list[str], optional) – List of AWS account IDs (ignored - real account from bucket is used).

Raises:

ValueError – If no buckets are available.

set_bucket_policy_specific_account_ui(bucket_name: str = None, account_list: list[str] | None = None) None

Complete workflow to set AllowAccessToSpecificAccount bucket policy via UI.

Parameters:
  • bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

  • account_list (list[str], optional) – List of AWS account IDs (ignored - real account from bucket is used).

Raises:

ValueError – If no buckets are available.

set_bucket_policy_ui(bucket_name: str = None) None

Complete workflow to set AllowPublicReadAccess bucket policy via UI.

Parameters:

bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

Raises:

ValueError – If no buckets are available.

set_policy_json_in_editor(policy_json: str) None

Set the policy JSON content in the code editor.

Parameters:

policy_json (str) – JSON string to set in the editor.

Raises:

NoSuchElementException – If UI elements are not found.

verify_block_public_access(block_public_access: BlockPublicAccessType) None

Verifies that block public access button is working as expected.

The workflow is as follows: 1. Check the corresponding checkbox and save the page 2. Verify that the checkbox is indeed checked and the text appearing near it is the expected one 3. Uncheck the corresponding checkbox and save the page 4. Verify that the checkbox is indeed unchecked and the text appearing near it is the expected one

Parameters:

block_public_access (BlockPublicAccessType) – Block public access type to be verified.

Raises:

NoSuchElementException – If UI elements are not found.

class ocs_ci.ocs.ui.page_objects.bucket_tab_permissions.PolicyConfig(bucket_name: str, account_list: list[str] | None = None, folder_path: str | None = None)

Bases: object

Configuration for bucket policy creation.

account_list: list[str] | None = None
bucket_name: str
folder_path: str | None = None
class ocs_ci.ocs.ui.page_objects.bucket_tab_permissions.PolicyType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Enumeration of supported bucket policy types.

ALLOW_FOLDER_ACCESS = 'AllowReadWriteAccessToFolder'
ALLOW_PUBLIC_READ = 'AllowPublicReadAccess'
ALLOW_SPECIFIC_ACCOUNT = 'AllowAccessToSpecificAccount'
ENFORCE_HTTPS = 'EnforceSecureTransportHTTPS'

ocs_ci.ocs.ui.page_objects.bucket_versioning module

class ocs_ci.ocs.ui.page_objects.bucket_versioning.BucketVersioning

Bases: ObjectStorage, ConfirmDialog

A class representation for bucket versioning UI operations. Inherits from ObjectStorage and ConfirmDialog for base UI functionality.

DIALOG_TIMEOUT = 10
UI_UPDATE_WAIT_TIME = 2
enable_versioning(bucket_name: str | None = None) bool

Enable versioning for the specified bucket.

Parameters:

bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

Returns:

True if versioning was enabled, False if already enabled or failed.

Return type:

bool

Raises:

NoSuchElementException – If UI elements are not found.

is_versioning_enabled(bucket_name: str | None = None) bool

Check if versioning is already enabled for the specified bucket.

Parameters:

bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

Returns:

True if versioning is enabled, False otherwise.

Return type:

bool

Raises:

NoSuchElementException – If UI elements are not found.

set_versioning_state(enabled: bool, bucket_name: str | None = None) bool

Set versioning state to enabled or disabled (following base_ui pattern).

Parameters:
  • enabled (bool) – True to enable versioning, False to disable.

  • bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

Returns:

True if state was changed, False if already in desired state.

Return type:

bool

Raises:

NoSuchElementException – If UI elements are not found.

ocs_ci.ocs.ui.page_objects.buckets_tab module

class ocs_ci.ocs.ui.page_objects.buckets_tab.BucketsTab

Bases: ObjectStorage, ConfirmDialog

A class representation for abstraction of Buckets tab related OpenShift UI actions

create_bucket_ui(method: str, return_name: bool = False)

Creates a bucket via UI using specified method.

Note: For new code, consider using create_bucket_ui_with_details() which always returns a consistent type (tuple[ObjectStorage, str]).

Parameters:
  • method (str) – Creation method, either ‘obc’ or ‘s3’.

  • return_name (bool) – If True, returns tuple of (ObjectStorage, bucket_name). If False, returns ObjectStorage (for backward compatibility).

Returns:

Instance of ObjectStorage class or tuple of (ObjectStorage, bucket_name).

Return type:

ObjectStorage or tuple

Raises:

ValueError – If method is not ‘obc’ or ‘s3’.

create_bucket_ui_with_details(method: str) tuple[ocs_ci.ocs.ui.page_objects.object_storage.ObjectStorage, str]

Creates a bucket via UI using specified method and returns both ObjectStorage and bucket name. This method always returns both values for predictable behavior.

Parameters:

method (str) – Method to use for bucket creation (‘obc’ or ‘s3’).

Returns:

Always returns tuple of (ObjectStorage instance, bucket name).

Return type:

tuple[ObjectStorage, str]

Raises:

ValueError – If method is not ‘obc’ or ‘s3’.

create_bucket_via_obc(return_name: bool = False)

Creates bucket via OBC with improved dropdown handling.

Parameters:

return_name (bool) – If True, returns tuple of (ObjectStorage, bucket_name). If False, returns ObjectStorage (for backward compatibility).

Returns:

Instance of ObjectStorage class or tuple of (ObjectStorage, bucket_name).

Return type:

ObjectStorage or tuple

Raises:

NoSuchElementException – If UI elements are not found.

create_bucket_via_obc_with_details() tuple[ocs_ci.ocs.ui.page_objects.object_storage.ObjectStorage, str]

Creates bucket via OBC and returns both ObjectStorage and bucket name. This method always returns both values for predictable behavior.

Returns:

Always returns tuple of (ObjectStorage instance, bucket name).

Return type:

tuple[ObjectStorage, str]

Raises:

NoSuchElementException – If UI elements are not found.

create_bucket_via_s3(return_name: bool = False)

Creates bucket via S3 method.

Parameters:

return_name (bool) – If True, returns tuple of (ObjectStorage, bucket_name). If False, returns ObjectStorage (for backward compatibility).

Returns:

Instance of ObjectStorage class or tuple of (ObjectStorage, bucket_name).

Return type:

ObjectStorage or tuple

Raises:

NoSuchElementException – If UI elements are not found.

create_bucket_via_s3_with_details() tuple[ocs_ci.ocs.ui.page_objects.object_storage.ObjectStorage, str]

Creates bucket via S3 and returns both ObjectStorage and bucket name. This method always returns both values for predictable behavior.

Returns:

Always returns tuple of (ObjectStorage instance, bucket name).

Return type:

tuple[ObjectStorage, str]

Raises:

NoSuchElementException – If UI elements are not found.

create_folder_in_bucket(bucket_name: str = None, folder_name: str = None) str

Creates folder in specified bucket and uploads a file to it.

Parameters:
  • bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

  • folder_name (str, optional) – Name of the folder. If None, generates random name.

Returns:

Name of the created folder.

Return type:

str

Raises:

NoSuchElementException – If UI elements are not found.

create_multiple_buckets_ui(s3_buckets: int = 0, obc_buckets: int = 0) list

Creates multiple S3 and OBC buckets.

Parameters:
  • s3_buckets (int) – Number of S3 buckets to create.

  • obc_buckets (int) – Number of OBC buckets to create.

Returns:

List of created bucket names.

Return type:

list

Raises:

ValueError – If both s3_buckets and obc_buckets are 0.

delete_bucket_ui(delete_via, expect_fail, resource_name)

Delete an Object Bucket via the UI

Parameters:
  • delete_via (str) – delete via ‘OB/Actions’ or via ‘three dots’

  • expect_fail (bool) – verify if OB removal fails with proper PopUp message

  • resource_name (str) – Object Bucket Claim’s name. The resource with its suffix will be deleted

get_buckets_list() list

Get list of all buckets using href pattern

Returns:

List of bucket names as strings

Return type:

list

has_pagination_controls() bool

Check if pagination controls are visible by attempting to find the next button.

Returns:

True if pagination controls are found, False otherwise

Return type:

bool

navigate_to_bucket(bucket_name: str) None

Navigate to object storage and select the specific test bucket by name.

Parameters:

bucket_name (str) – Name of the bucket to navigate to.

navigate_to_bucket_by_name(bucket_name: str)

Navigate to a specific bucket by clicking on its name in the buckets list.

Parameters:

bucket_name (str) – Name of the bucket to navigate to.

Raises:

NoSuchElementException – If bucket with given name is not found.

navigate_to_bucket_permissions(bucket_name: str = None)

Navigate to bucket permissions tab.

Parameters:

bucket_name (str, optional) – Name of the bucket. If None, uses first bucket.

Returns:

Instance of BucketsTabPermissions page object.

Return type:

BucketsTabPermissions

Raises:

NoSuchElementException – If UI elements are not found.

navigate_to_folder_and_enable_versions(folder_name: str, bucket_name: str, navigation_wait_time: int = 2, versions_load_wait_time: int = 3) None

Navigate to the test folder and enable version listing.

Parameters:
  • folder_name (str) – Name of the folder to navigate to.

  • bucket_name (str) – Name of the bucket to work with.

  • navigation_wait_time (int) – Time to wait after navigation (default: 2 seconds).

  • versions_load_wait_time (int) – Time to wait for versions to load (default: 3 seconds).

navigate_to_next_page() bool

Navigate to the next page of buckets if available.

Returns:

True if successfully navigated to next page, False otherwise

Return type:

bool

navigate_to_previous_page() bool

Navigate to the previous page of buckets if available.

Returns:

True if successfully navigated to previous page, False otherwise

Return type:

bool

upload_folder_to_bucket(folder_path: str, wait_time: int = 2) None

Upload a folder to the bucket.

Parameters:
  • folder_path (str) – Path to the folder to upload.

  • wait_time (int) – Time to wait after upload (default: 2 seconds).

ocs_ci.ocs.ui.page_objects.ceph_block_pool module

class ocs_ci.ocs.ui.page_objects.ceph_block_pool.CephBlockPool

Bases: BlockAndFile

Ceph Block Pool page Class Navigation: PageNavigator / Storage Cluster / Storage pools / Block pool <any>

block_pool_ready()

Verify that the Block Pool is in ‘Ready’ state.

Returns:

True if the Block Pool is in ‘Ready’ state, False otherwise.

Return type:

bool

get_storage_cluster_status()

Verify status of the Storage Cluster on ceph blockpool page, reading from the Status Card

Returns:

True if status is Healthy, False otherwise

Return type:

bool

navigate_storage_pools_via_breadcrumb()

Navigate to Storage Pools page via breadcrumb link.

Returns:

StoragePools page object

Return type:

StoragePools

ocs_ci.ocs.ui.page_objects.confirm_dialog module

class ocs_ci.ocs.ui.page_objects.confirm_dialog.ConfirmDialog

Bases: BaseUI

Page object for Confirm Dialog

dialog_cancel()

Clicks on Cancel button

dialog_close()

Close the dialog

dialog_confirm()

Clicks on Delete button

dialog_confirm_delete(resource_name)

Action to confirm delete resource

dialog_type_resource_name(resource_name)

Type the resource name in the dialog

ocs_ci.ocs.ui.page_objects.data_foundation_tabs_common module

class ocs_ci.ocs.ui.page_objects.data_foundation_tabs_common.CreateResourceForm

Bases: PageNavigator

check_error_messages()

Performs a series of checks to verify if the error messages for the input fields meet the expected requirements. It clicks on the “create resource” button and verifies the existence of all expected rules in the input field. It then checks the error messages for each input field based on the expected rules and raises a failure if the actual error message does not match the expected message. Finally, it navigates back to the previous page.

create_store(store_name: str, provider: str, region: str, secret: str, uls_name: str)

Create backing store via UI.

! Backing Store with PVC option is not supported yet ! ! Namespace Store with FS option is supported with NamespaceStoreUI().create_namespace_store() !

Parameters:
  • store_name (str) – backing store or namespace store name

  • provider (str) – backing store or namespace store provider

  • region (str) – backing store or namespace store region

  • secret (str) – backing store or namespace store secret

  • uls_name (str) – uls name

Returns:

The page object of the newly created Store (Namespace store or Backing Store)

Return type:

ResourcePage

create_store_verify_state(kind, store_name: str, provider: str, region: str, secret: str, uls_name: str, expected_state='Ready')

Create backing store via UI and verify its state.

! Backing Store with PVC option is not supported yet ! ! Namespace Store with FS option is supported with NamespaceStoreUI().create_namespace_store() !

Parameters:
  • kind (str) – backing store or namespace store kind

  • store_name (str) – backing store or namespace store name

  • provider (str) – backing store or namespace store provider

  • region (str) – backing store or namespace store region

  • secret (str) – backing store or namespace store secret

  • uls_name (str) – uls name

  • expected_state (str) – expected state of the store

Returns:

The page object of the newly created Store (Namespace store or Backing Store) bool: True if the store is ready, False otherwise

Return type:

ResourcePage

get_rules_from_popup(strip_status: bool = True) list[str]

Retrieve rule entries from the input validation popup.

Parameters:

strip_status (bool) – If True (default) return only rule names with status removed. If False return the full rule text (name + status) as displayed.

Returns:

A list of rule strings (either names only or full texts depending on strip_status).

Return type:

List[str]

proceed_resource_creation()

Method to proceed to resource creation form, when Create button is visible

class ocs_ci.ocs.ui.page_objects.data_foundation_tabs_common.DataFoundationDefaultTab

Bases: DataFoundationTabBar

Default Foundation default Tab: OverviewTab

is_block_and_file_tab()

Check if the current tab is Overview tab

Returns:

True if the current tab is Overview tab, False otherwise

Return type:

bool

class ocs_ci.ocs.ui.page_objects.data_foundation_tabs_common.DataFoundationTabBar

Bases: PageNavigator

nav_block_and_file_tab()

Navigate to Block and File tab. Accessible from any Data Foundation tabs

nav_object_tab()

Navigate to Object tab. Accessible from any Data Foundation tabs

nav_storage_pools_tab()

Navigate to Storage Pools tab. Accessible from any Data Foundation tabs

nav_topology_tab()

Navigate to ODF Topology tab. Accessible from any Data Foundation tabs

ocs_ci.ocs.ui.page_objects.df_overview module

class ocs_ci.ocs.ui.page_objects.df_overview.DataFoundationOverview

Bases: InfraHealthModal, PageNavigator

Class to represent the Data Foundation Overview page and its functionalities. Available starting from ODF 4.20.

Navigation: PageNavigator / Data Foundation Available active links to View Storage, View Buckets, Activity monitor

available_vs_used_capacity_present()

Check if Available vs Used Capacity panel is present on the Data Foundation Overview page.

Returns:

True if the panel is present, False otherwise.

Return type:

bool

navigate_to_external_storage_systems()

Navigate to External Storage Systems page via External Storage Systems link.

Returns:

ExternalStorageSystems page object

Return type:

ExternalStorageSystems

navigate_to_view_buckets()

Navigate to Buckets page via View Buckets link.

Returns:

Buckets page object

Return type:

BucketsPage

navigate_to_view_storage()

Navigate to Storage Cluster page via View Storage link.

Returns:

StorageCluster page object

Return type:

StorageClusterPage

ocs_ci.ocs.ui.page_objects.edit_label_form module

class ocs_ci.ocs.ui.page_objects.edit_label_form.EditLabelForm

Bases: BaseUI

cancel_edit_label()

Cancel the edit label operation.

check_edit_labels(block_pool_name: str = None)
Method to validate that warning message appears when input rule is violated
Rule (visible on warning):

Labels must start and end with an alphanumeric character, can consist of lower-case letters, numbers and non-consecutive dots (.), and hyphens (-), forward slash (/), underscore(_) and equal to (=)

Error (visible on metadata.label rule violated):

Error “Invalid value: <value>: name part must consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’, and must start and end with an alphanumeric character (e.g. ‘MyName’, or ‘my.name’, or ‘123-abc’, regex used for validation is <regex> for field “metadata.labels”.

Args:
block_pool_name (str): Name of the block pool. If not provided, the value will be retrieved from the

instance attribute block_pool_name if available. If neither block_pool_name argument nor the instance attribute is provided, an IncorrectUIOptionRequested exception will be raised.

Returns:

bool: The result of the validation.

Raises:
IncorrectUIOptionRequested: If block_pool_name argument is not provided and the instance attribute

block_pool_name is not available.

enter_label_and_save(label)

Enter the specified label in the edit label input field and save it.

Parameters:

label (str) – The label to enter.

open_edit_label_of_block_pool(block_pool_name)

Opens the edit label popup of a Block Pool specified by the given block_pool_name.

Parameters:

block_pool_name (str) – The name of the block pool to open the edit label page for.

save_edit_label()

Save the changes made in the edit label operation.

ocs_ci.ocs.ui.page_objects.encryption_module module

class ocs_ci.ocs.ui.page_objects.encryption_module.EncryptionModule

Bases: DataFoundationTabBar

get_block_file_encryption_summary()

Retrieve the encryption summary for the block and file page.

Returns:

Encryption summary on block and file page.

Return type:

dict

get_object_encryption_summary()

Retrieve the encryption summary for the object details page.

Returns:

Encryption summary on object details page.

Return type:

dict

ocs_ci.ocs.ui.page_objects.external_storage_systems module

class ocs_ci.ocs.ui.page_objects.external_storage_systems.ExternalStorageCluster

Bases: DataFoundationDefaultTab, BlockAndFile

UI representation of External Storage Cluster page - a resource from the list of External Systems 1. Navigation: PageNavigator (Storage) / Data Foundation Overview / External Systems / External Storage Cluster from the list 2. Navigation: PageNavigator (Storage) / External Systems / External Storage Cluster from the list

validate_block_and_file_tab_active() bool

Validate Overview tab is active

Returns:

True if active, False otherwise

Return type:

bool

class ocs_ci.ocs.ui.page_objects.external_storage_systems.ExternalSystems

Bases: ResourceList

UI representation of External Systems page - a resource list of External Storage Cluster(s) 1. Navigation: PageNavigator (Storage) / Data Foundation Overview / External Systems 2. Navigation: PageNavigator (Storage) / External Systems

Possible actions via kebab menu per resource: edit labels, edit annotations, Edit storage system Possible to navigate to a resource page via name link

connect_external_system()

Click Connect external systems button.

connect_flash(ip_address, username, password, pool_name, volume_mode='Thick')

Connect IBM FlashSystem as External system

Parameters:
  • ip_address (str) – FlashSystem’s IP address

  • username (str) – username

  • password (str) – password to Flashsystems

  • pool_name (str) – pool name

  • volume_mode (str) – volume mode - Thick, Thin, Compressed, Deduplicated etd

connect_scale(system_name, endpoint, port, username, password, filesystem_name)

Connect IBM Scale as External system

Parameters:
  • system_name (str) – unique connection name

  • endpoint (str) – Scale management endpoint

  • port (str) – Port

  • username (str) – username

  • password (str) – password

  • filesystem_name (str) – name of the filesystem

connect_scale_filesystem(scale_name, filesystem_name)

Connect an additional scale filesystem

Parameters:
  • scale_name (str) – name of the scale cluster

  • filesystem_name (str) – name of the additional filesystem

delete_scale_filesystem(scale_name, filesystem_name)

Delete a scale filesystem

Parameters:
  • scale_name (str) – name of the scale cluster

  • filesystem_name (str) – name of the filesystem

disconnect_scale(scale_name)

Removing a connection to scale is going to be possible in UI but now it’s only done via CLI

nav_to_external_storage_cluster(esc_name='ocs-external-storagecluster')

Navigate to External Storage Cluster page

Parameters:

esc_name (str) – External Storage Cluster name

Returns:

ExternalStorageCluster page object

Return type:

ExternalStorageCluster

scale_present_on_page(scale_name)

Check that scale connection with the given name is present on External Systems page

Parameters:

scale_name (str) – scale connection name

scale_status_ok(scale_name)

Check the status of the scale operator and connection

Parameters:

scale_name (str) – name of the scale cluster

Returns:

True if Operator status and Connection status are Healthy False othewise

ocs_ci.ocs.ui.page_objects.infra_health module

class ocs_ci.ocs.ui.page_objects.infra_health.AlertRow(start_time: datetime.datetime, end_time: datetime.datetime | None, duration: int, check: str, details: Dict[str, Any])

Bases: object

check: str
details: Dict[str, Any]
duration: int
end_time: datetime | None
start_time: datetime
class ocs_ci.ocs.ui.page_objects.infra_health.InfraHealthModal

Bases: DataFoundationTabBar

Class to represent the Infrastructure Health Modal and its functionalities.

get_health_score() str

Get Infrastructure Health Score value from UI

Returns:

Health score (0–100)

Return type:

str

nav_health_view_checks() InfraHealthOverview

Navigate to Infrastructure Health View checks tab

Returns:

Infrastructure Health Overview page object

Return type:

InfraHealthOverview

class ocs_ci.ocs.ui.page_objects.infra_health.InfraHealthOverview

Bases: PageNavigator

Class to represent the Infrastructure Health Overview page and its functionalities. Navigation: PageNavigator / Data Foundation / View Health Checks

click_last_24_hours_alerts()

Click on Last 24 hours alerts filter

click_silenced_alerts()

Click on Silenced alerts filter

collect_checks() list[ocs_ci.ocs.ui.page_objects.infra_health.AlertRow]

Collect and parse alert rows from the health checks table.

filter_by_name_or_details(filter_string: str)

Filter checks by name or details

Parameters:

filter_string (str) – The string to filter checks by

filter_checks_by_severity(severity)
get_all_checks()
navigate_overview_via_breadcrumbs()

Navigate to Infrastructure Health Overview via breadcrumbs

Returns:

Data Foundation Overview page object

Return type:

DataFoundationOverview

print_checks(checks: list[ocs_ci.ocs.ui.page_objects.infra_health.AlertRow] = None)

Print the list of checks in a readable format. If no checks are provided, prints the class attribute self.alerts.

Parameters:

checks (list, optional) – List of AlertRow objects to print. If None, uses self.alerts.

select_all_alerts()
select_checkbox_by_details(check_name)

Select check by its name; may repeat for multiple checks with the same name

Parameters:

check_name (str) – The name of the check to select

Returns:

List of selected check elements

Return type:

list

silence_alerts(silent_duration: int)

This method is necessary to silence alerts.

silence_all_alerts(silent_duration: int)

Silence all alerts for a given duration

Parameters:

silent_duration (int) – Duration in hours to silence alerts

unsilence_alert_by_name(alert_name)

Unsilence alert based on name :param alert_name: Name of the alert to unsilence :type alert_name: str

unsilence_alerts()

This method is necessary to unsilence alerts.

unsilence_all_alerts()

Unsilence all alerts

wait_for_table(timeout=10)

Wait until at least one table row is visible using shared UI helper.

ocs_ci.ocs.ui.page_objects.mco_operator_page module

class ocs_ci.ocs.ui.page_objects.mco_operator_page.MCOOperatorPage

Bases: AcmPageNavigator

Page Object for MCO (Multicluster Orchestrator) Operator details on the ACM hub cluster UI.

click_mco_operator()

Click on the MCO operator row to view details.

Raises:

AssertionError – If the operator is not found, or if it still displays the old (pre-rebranding) name.

get_capability_levels()

Check which capability levels are present on the operator details page.

Returns:

A dict with capability names as keys and booleans

indicating presence as values.

Return type:

dict

get_channel_and_version()

Get the channel and installed version from the operator details page.

Returns:

(channel, version) strings, either may be None

if not found.

Return type:

tuple

get_operator_display_name()

Get the operator display name from the details page.

Returns:

The operator display name text

Return type:

str

get_operator_provider()

Get the operator provider from the details page.

Returns:

The provider text, or None if not found

Return type:

str

navigate_to_installed_operators()

Navigate directly to the Installed Operators page in the openshift-operators namespace.

The ACM console opens in “Fleet Management” perspective, so we bypass the perspective switcher by loading the Installed Operators URL directly.

search_for_operator(operator_name)

Search for an operator by name in the Installed Operators page.

Parameters:

operator_name (str) – Name of the operator to search for

verify_operator_installed_status()

Verify the operator shows ‘Installed’ status.

Raises:

AssertionError – If the Installed status indicator is not found or not displayed.

ocs_ci.ocs.ui.page_objects.namespace_store_tab module

class ocs_ci.ocs.ui.page_objects.namespace_store_tab.NameSpaceStoreTab

Bases: ObjectStorage, CreateResourceForm

is_namespace_store_tab_active()

Check if namespace store tab is selected

Returns:

True if namespace store tab is selected, False otherwise

Return type:

bool

ocs_ci.ocs.ui.page_objects.object_bucket_claims_tab module

class ocs_ci.ocs.ui.page_objects.object_bucket_claims_tab.ObjectBucketClaimsTab

Bases: ObjectStorage, CreateResourceForm

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

check_obc_option(username, text='Object Bucket Claims')

Check OBC is visible to user after giving admin access

Parameters:
  • username (str) – user’s username

  • text (str) – text to be found on OBC page

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

Returns:

The page object of the newly created OBC

Return type:

ResourcePage

delete_obc_ui(obc_name, delete_via)

Delete an OBC via the UI

obc_name (str): Name of the OBC to be deleted delete_via (str): delete via ‘OBC/Actions’ or via ‘three dots’

select_bucket_class(bucketclass)

Select a bucket class from the dropdown

select_openshift_storage_default_project()

Helper function to select openshift-storage project

Notice: the func works from PersistantVolumeClaims, VolumeSnapshots and OBC pages

ocs_ci.ocs.ui.page_objects.object_storage module

class ocs_ci.ocs.ui.page_objects.object_storage.ObjectStorage

Bases: EncryptionModule, ResourceList

Object Service page object under EncryptionModule(PageNavigator) / Storage version 4.14 and above

nav_backing_store_tab()

Navigate to Backing Store tab. Accessible from Object Storage page

Returns:

BackingStoreTab page object

Return type:

BackingStoreTab

nav_bucket_class_tab()

Navigate to Bucket class tab. Accessible from Object Storage page

Returns:

BucketClassTab page object

Return type:

BucketClassTab

nav_buckets_tab()

Navigate to Object Buckets tab. Accessible from Object Storage page

Returns:

ObjectBucketTab page object

Return type:

ObjectBucketTab

nav_namespace_store_tab()

Navigate to Namespace Store tab. Accessible from Object Storage page

Returns:

NameSpaceStoreTab page object

Return type:

NameSpaceStoreTab

nav_object_buckets_claims_tab()

Navigate to Object Buckets Claims tab. Accessible from Object Storage page

Returns:

ObjectBucketClaimTab page object

Return type:

ObjectBucketClaimTab

select_project(cluster_namespace)

Helper function to select a project via UI. e.g. ‘openshift-storage’

Parameters:

cluster_namespace (str) – project name will be selected from the list

ocs_ci.ocs.ui.page_objects.odf_topology_tab module

class ocs_ci.ocs.ui.page_objects.odf_topology_tab.AbstractTopologyView

Bases: ABC, TopologySidebar

Abstract class for ODF Topology layers operated by Selenium webdriver

Note

This class should not be instantiated directly. Instead, it serves as a base class for concrete implementation classes.

check_entity_selected(entity_name)

Checks if the specified entity is selected.

Parameters:

entity_name (str) – Name of the entity.

Returns:

True if the entity is selected, False otherwise.

Return type:

bool

expand_to_full_screen()

Expands the topology view to full screen.

get_entity_name_from_df(index: int)

Returns the name of an entity at the specified index in the dataframe, if the dataframe is filled.

Parameters:

index (int) – The index of the entity in the dataframe.

Returns:

The name of the entity at the given index, or None if the index is not found.

Return type:

str

get_nested_deployment_names_of_node_from_df_ui(node_name)

Retrieves the names of nested deployments associated with a node from the UI dataframe.

Parameters:

node_name (str) – Name of the node.

Returns:

List of deployment names associated with the specified node.

Return type:

list

Example

get_nested_deployment_names_of_node_from_df_ui(“my-node”) # Returns [‘deployment-1’, ‘deployment-2’, ‘deployment-3’]

get_nested_deployments_of_node_from_df_ui(node_name)

Retrieves the nested deployments of a node from the UI dataframe.

Parameters:

node_name (str) – Name of the node.

Returns:

Dictionary representing the nested deployments of the node.

Return type:

dict

Example

get_nested_deployments_of_node_from_df_ui(“node-1”) # Returns {‘entity_name’: ‘nested-deployment-1’, ‘entity_status’: ‘Running’, …}

initiate_topology_df(reinit: bool = True)

Initializes the topology DataFrame if not already set or if explicitly requested.

Parameters:

reinit (bool, optional) – Whether to reinitialize the topology DataFrame. Defaults to True.

Raises:

NoSuchElementException – If the element text cannot be read.

Note

The method assumes the availability of the self.topology_df DataFrame and certain constants.

is_cluster_in_danger() bool

Method checks whether the cluster is red-labeled on ODF Topology canvas or not

is_entity_present(entity_name) bool

Checks if the specified entity is present.

Parameters:

entity_name (str) – The name of the entity to search for.

Returns:

True if the entity is present, False otherwise.

Return type:

bool

nav_back_main_topology_view(soft: bool = False)

Navigate back to the higher hierarchy level in the topology view. Can be used in any level of topology, but will be performed only if button back exists when param soft is True

Parameters:

soft (bool, optional) – If True, performs a navigation back if the “back” button is present. If False, performs a navigation back by clicking the “back” button. Defaults to False.

Note

The “back” button exists only on the deployment level.

property nodes_view

Property to create OdfTopologyNodesView only once per cluster.

This property ensures that an instance of OdfTopologyNodesView is created only once per cluster. It checks if the instance already exists as the ‘cluster_topology’ attribute, and if not, creates a new instance. The property then returns the instance.

Returns:

The instance of OdfTopologyNodesView.

Return type:

OdfTopologyNodesView

Note

The property assumes the availability of the OdfTopologyNodesView class.

read_presented_topology()

Reads and retrieves the presented topology from the current view.

The method attempts to read the presented topology by zooming out up to three times if the topology is larger than the browser window can fit. After successfully reading the topology, it updates the status and logs the entity names and their corresponding statuses. Finally, it returns the topology DataFrame.

Returns:

DataFrame containing the presented topology with entity names and statuses.

Return type:

pd.DataFrame

Example

topology = read_presented_topology() # Returns a DataFrame with entity names and statuses: # entity_name | entity_status # —————-+—————– # Node 1 | Ready # Node 2 | Not Ready # Node 3 | Ready # …

Resets the search bar.

reset_view()

Resets the topology view.

Selects the specified entity using the search bar.

Parameters:

entity_name (str) – Name of the entity to select.

update_topology_status()

Updates the status of entities in the topology.

This method iterates over the rows of the topology dataframe and updates the entity status, status XPath, select node XPath, and navigate into XPath (if applicable) for each entity.

Note

The method assumes the availability of the topology dataframe, certain locators, and a brief pause of 0.1 seconds between iterations.

zoom_in_view()

Zooms in the topology view.

zoom_out_view()

Zooms out the topology view.

This method performs a zoom-out action on the topology view, effectively reducing the level of zoom.

class ocs_ci.ocs.ui.page_objects.odf_topology_tab.OdfTopologyDeploymentsView

Bases: TopologyTab

Represents the view of deployments in the ODF topology.

This class extends the TopologyTab class and provides functionality specific to deployments. The class is accessible mainly via OdfTopologyNodesView.nav_into_node(args)

filter_node_by_toggle_from_deployments_level(node_name)

Filters the node by toggle from the deployments level in the topology view.

Parameters:

node_name (str) – Name of the node to filter.

Raises:

IncorrectUiOptionRequested – If topology node filtering exists only on the Deployment Topology level.

get_current_selected_node_from_deployments_level() str

Retrieves the name of the currently selected node from the deployments level in the topology view.

Returns:

Name of the currently selected node.

Return type:

str

Raises:

IncorrectUiOptionRequested – If the topology node filtering is not available on the deployments level.

Example

get_current_selected_node_from_deployments_level() # Returns ‘my-node-1’ if the node is currently selected.

read_details() dict

Reads and retrieves details of a deploymen from the UI. Side-bar of deployment should be open.

Returns:

Dictionary containing the node details.

Return type:

dict

Raises:

IncorrectUiOptionRequested – If the wrong level of topology is opened instead of the Node level.

class ocs_ci.ocs.ui.page_objects.odf_topology_tab.OdfTopologyNodesView

Bases: TopologyTab

The OdfTopologyNodesView class represents a view of the ODF topology at the nodes level. The class initializes the topology_df DataFrame with specific column names and data types to store information about entity names, entity status, XPath expressions for status, navigation, and node selection, as well as nested deployments. The DataFrame is initially empty but can be populated with data iteratively.

get_cluster_name() str

Get cluster name from Topology canvas. Sidebar is not used

Returns:

name of the cluster such as ‘ocs-storagecluster’

get_group_names() list

Get racks/zones names from Topology canvas. Sidebar is not used

Returns:

names of the groups

nav_into_node(node_index_option: int = None, node_name_option: str = None)

Navigates into a specific node in the Topology UI.

Parameters:
  • node_index_option (int) – Index of the node by order.

  • node_name_option (str) – Name of the node.

Returns:

Instance of the class representing the UI Topology.

Return type:

OdfTopologyDeploymentsView

Raises:

IncorrectUiOptionRequested – If incorrect arguments are provided.

Note

This method should be used only after reading the presented topology with read_presented_topology().

Example

nav_into_node(node_index_option=0) # Returns an instance of OdfTopologyDeploymentsView representing the UI Topology.

read_details() dict

Reads and retrieves details of a node from the UI.

Returns:

Dictionary containing the node details.

Return type:

dict

Raises:

IncorrectUiOptionRequested – If the wrong level of topology is opened instead of the Node level.

Example

read_details() # 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’}

record_nested_deployments(node_index: int, df: DataFrame) DataFrame

Records nested deployments for a specific node in the Topology.

Parameters:
  • node_index (int) – Index of the node in the Topology.

  • df (pd.DataFrame) – DataFrame representing the nested deployments.

Returns:

Updated Topology DataFrame.

Return type:

pd.DataFrame

Example

record_nested_deployments(0, nested_deployments_df) # Returns the updated Topology DataFrame with nested deployments recorded.

class ocs_ci.ocs.ui.page_objects.odf_topology_tab.TopologySidebar

Bases: BaseUI

Class a child to AbstractTopologyView (it has base_ui methods) and may be used only if Topology view is opened

close_sidebar(soft=False)

Closes the sidebar in the topology view.

Parameters:

soft (bool, optional) – If True and the sidebar is visible, closes the sidebar with a transition. If False (default) or the sidebar is not visible, closes the sidebar immediately and may get exception if sidebar is not open.

get_number_of_alerts()

Retrieves the number of alerts categorized by severity level.

Returns:

Dictionary containing the number of alerts for each severity level:

{‘Critical’: <critical_alerts>, ‘Warning’: <warning_alerts>, ‘Info’: <info_alerts>}

Return type:

dict

is_alert_tab_present() bool

Useful to check condition: Alert tab should not be present in External mode

is_node_down_alert_in_alerts_ui(entity=None, read_canvas_alerts=False)

Checks if a NodeDown alert is present in the UI alerts.

Parameters:
  • entity (str, optional) – Entity name to filter alerts (default: None).

  • read_canvas_alerts (bool, optional) – Whether to read alerts from the canvas (default: False).

Returns:

if the node down alert visible in Alerts tab of the Topology

Return type:

bool

open_alerts_tab()

Method opens the alerts tab in the user interface.

open_details_tab()

Opens the details tab in the UI.

open_observe_tab()

Opens the observe tab in the UI.

open_resources_tab()

Opens the resources tab in the UI.

open_side_bar_of_entity(entity_name: str = None, canvas: bool = False)

Opens the sidebar of an entity in the topology view.

Parameters:
  • entity_name (str, optional) – Name of the entity to open the side bar for.

  • canvas (bool, optional) – Flag indicating whether to click on the topology graph canvas.

Note

If canvas is True, the method clicks on the topology graph canvas to open the side bar. Otherwise, it searches for the entity and clicks on it. The method attempts to open the sidebar up to three times, zooming out the topology view if necessary.

read_alerts() dict

Reads alerts from the alert tab and retrieves their details.

Returns:

Dictionary containing the alerts and their corresponding levels. Each alert level is associated with a list of alert titles.

Return type:

dict

Note

Alerts tab should be opened. The alert levels are expanded to read the titles and then shrunk back.

read_alerts_procedure(entity=None, read_canvas_alerts=False)

Reads alerts for a specific entity using the procedure.

This method follows a procedure to read alerts for the specified entity. It closes the sidebar, opens the sidebar of the entity (optionally reading alerts in the canvas), opens the alerts tab, reads the alerts, and finally closes the sidebar.

Parameters:
  • entity (str) – Optional. The entity for which alerts need to be read.

  • read_canvas_alerts (bool) – Optional. Indicates whether to read alerts in the canvas or not.

Returns:

A list of alerts detected in side-bar

Return type:

list

take_screenshot_for_llm(name_suffix='', region=None)

Takes two screenshots to capture the full ODF topology sidebar content.

Overrides BaseUI.take_screenshot_for_llm to handle the scrollable sidebar panel in ODF topology. The sidebar (div.odf-topology__sidebar) has a fixed height and overflows — a single viewport screenshot cuts off lower fields like addresses, annotations, and creation timestamp.

This method temporarily resizes the window to the resolution set in UI_SELENIUM.llm_screenshot_resolution, takes one screenshot at the current scroll position, scrolls the sidebar halfway down and takes a second screenshot, then restores the original window size.

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

  • region (str) – Optional region to crop ("right_side" or "left_side"). Passed to _crop_screenshot().

Returns:

List of absolute paths to the saved screenshot files

(typically two: top and bottom of the sidebar).

Return type:

list

class ocs_ci.ocs.ui.page_objects.odf_topology_tab.TopologyTab

Bases: DataFoundationDefaultTab, AbstractTopologyView

Topology tab Class Content of Data Foundation/Topology tab (default for ODF 4.13 and above)

get_topology_df()

Retrieves the recorded topology DataFrame.

Returns:

DataFrame containing the recorded topology information.

Return type:

pd.DataFrame

get_topology_str()
Method to get a dataframe with Topology as a str to print in console

# +—-+————–+—————+—————————————————————-+ # | | entity_name | entity_status | nested_deployments | # +====+==============+===============+================================================================+ # | 0 | compute-0 | success | entity_name entity_status | # | | | | 0 rook-ceph-osd-1 success | # | | | | 1 csi-cephfsplugin-provisioner success | # | | | | … | # +—-+————–+—————+—————————————————————-+ # | 1 | compute-1 | success | entity_name entity_status | # | | | | 0 rook-ceph-osd-1 success | # | | | | 1 csi-cephfsplugin-provisioner success | # +—-+————–+—————+—————————————————————-+

Returns:

text representation of pandas Dataframe of ODF Topology view, where cluster with node names, node statuses and their deployment names and statuses may be found

Return type:

str

read_all_topology()

Reads and records the topology of the cluster at the nodes level.

Returns:

DataFrame containing the recorded topology information.

Return type:

pd.DataFrame

Note

The recorded topology information is stored in the ‘__topology_df’ attribute and accessible via get_topology_df()

validate_node_group_names(cluster_app_name_cli, topology_deviation, zoom_out_times)

Validates the node group names (such as rack or zone) from the ODF Topology UI against names taken from CLI. :param cluster_app_name_cli: cluster name visible in Topology UI :param topology_deviation: dictionary to store deviations if found :param zoom_out_times: number of times to zoom out the Topology view to see whole cluster representation

validate_topology_configuration()

Validates the configuration of the topology.

Returns:

A dictionary indicating the deviations found during validation. The keys represent specific deviations

and the values are booleans indicating whether the deviation was detected or not.

Return type:

dict

validate_topology_navigation_bar(entity_name)

Validates the navigation bar functionality in the topology view.

This method verifies that the provided entity name can be selected using the search bar in the topology view. It ensures that the entity is correctly selected and then resets the search bar.

Parameters:

entity_name (str) – The name of the entity to be selected in the topology view.

Returns:

True if the entity is successfully selected, False otherwise.

Return type:

bool

ocs_ci.ocs.ui.page_objects.page_navigator module

class ocs_ci.ocs.ui.page_objects.page_navigator.PageNavigator

Bases: BaseUI

Page Navigator Class

nav_buckets_page()

Navigate to Buckets page

nav_external_systems_page()

Navigate to External Storage Systems Page

Returns:

External Storage Systems page object

Return type:

ExternalStorageSystems

nav_object_storage_page()

Navigate to Object Storage page

nav_storage_cluster_default_page()

Navigate to OpenShift Data Foundation default page Default Data foundation page is Overview at ODF 4.13

nav_storage_data_foundation_overview_page()

Navigate to OpenShift Data Foundation Overview page

Returns:

StorageCluster page object

Return type:

DataFoundationOverview

nav_to_attach_storage_page()

Navigate to Attach Storage Page

Returns:

Attach Storage page object

Return type:

AttachStorage

nav_to_storageclients_page()

Navigate to Storage Clients Page

Returns:

Storage Clients page object

Return type:

StorageClients

navigate_OCP_home_page()

Navigate to Home Page

navigate_alerting_page()

Navigate to Alerting Page

navigate_buckets_page()

Navigate to Object Buckets Page

navigate_cluster_overview_page()

Navigate to Cluster Overview Page

navigate_dashboards_page()

Navigate to Dashboards Page

navigate_events_page()

Navigate to Events Page

navigate_explore_page()

Navigate to Explore Page

navigate_installed_operators_page()

Navigate to Installed Operators Page

navigate_metrics_page()

Navigate to Metrics Page

navigate_object_bucket_claims_page()

Navigate to Object Bucket Claims Page

navigate_object_tab()

Navigate to Object tab of Storage cluster page

navigate_operatorhub_page()

Navigate to OperatorHub Page, renamed to Software Catalog in version 4.20

navigate_persistentvolumeclaims_page()

Navigate to Persistent Volume Claims Page

navigate_persistentvolumes_page()

Navigate to Persistent Volumes Page

navigate_pods_page()

Navigate to Pods Page

navigate_projects_page()

Navigate to Projects Page

navigate_quickstarts_page()

Navigate to Quickstarts Page

navigate_search_page()

Navigate to Search Page

navigate_storage()
navigate_storage_pools_page()

Navigate to storage pools tab of Storage cluster page

navigate_storageclasses_page()

Navigate to Storage Classes Page

navigate_to_mco_operator_page()

Navigate to the ODF Multicluster Orchestrator Operator page

navigate_to_ocs_operator_page()

Navigate to the OCS Operator management page

navigate_volumesnapshotclasses_page()

Navigate to Volume Snapshot Classes Page

navigate_volumesnapshotcontents_page()

Navigate to Volume Snapshot Contents Page

navigate_volumesnapshots_page()

Navigate to Storage Volume Snapshots Page

select_administrator_user()

Select the administrator user role from the dropdown

select_namespace(project_name)

This function selects the namespace on UI. The timeout is hard-coded to 10 seconds in the below function call which is more than sufficient.

Parameters:

project_name (str) – Name of the project to be selected

Returns:

True if the project is found, raises NoSuchElementException otherwise with a log message

Return type:

bool

verify_current_page_resource_status(status_to_check, timeout=30)

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.page_objects.resource_list module

class ocs_ci.ocs.ui.page_objects.resource_list.ResourceList

Bases: SearchBar

Resource List module presented in OBC, OB, PVC, PV, BucketClass, BackingStore, StorageClass, VolumeSnapshotClasses, BlockPools, etc.

This module is for selecting resource, navigation into, filtering, deletion, edition, etc.

delete_resource(delete_via, resource)

Delete Object Bucket, Object Bucket Claim, PVC, PV, BucketClass, BackingStore, StorageClass, Namespace, etc.

Parameters:
  • delete_via (str) – supported values: ‘three_dots’ or ‘Actions’ delete using ‘three dots’ icon, from the Resource List page or click on specific resource and delete it using ‘Actions’ dropdown list

  • resource (str) – resource name to delete.

nav_to_resource_via_label(resource_label: str)

Navigate to resource searching it via label

Parameters:

resource_label (str) – Resource label

nav_to_resource_via_name(resource_name: str = None)

Navigate to resource searching it via name

Parameters:

resource_name (str) – Resource name

ocs_ci.ocs.ui.page_objects.resource_page module

class ocs_ci.ocs.ui.page_objects.resource_page.ResourcePage

Bases: BaseUI

Class represents Resource List UI module - the body of pages ObjectBucketClaim tab, Object Bucket tab, Namespace store tab, Persistent Volume Claim page, Volume Snapshots, etc.

is_backing_store_open()

Check if backing store is open

Returns:

True if backing store is open, False otherwise

Return type:

bool

is_namespace_store_open()

Check if namespace store is open

Returns:

True if namespace store is open, False otherwise

Return type:

bool

is_ob_open()

Check if namespace store is open

Returns:

True if namespace store is open, False otherwise

Return type:

bool

is_obc_open()

Check if namespace store is open

Returns:

True if namespace store is open, False otherwise

Return type:

bool

nav_resource_list_via_breadcrumbs()

Navigate to Resource List page via breadcrumbs

Returns:

ResourceList page object, depends on which page was open before

Return type:

object

verify_current_page_resource_status(status_to_check, timeout=30)

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.page_objects.s3_login_form module

class ocs_ci.ocs.ui.page_objects.s3_login_form.S3LoginForm

Bases: BaseUI

Page object for S3 login form on Object Storage buckets page.

Handles authentication via Secret namespace + Secret name selection. This form appears on /odf/object-storage/buckets when not authenticated.

click_sign_in() None

Click the Sign in button.

is_signed_in() bool

Check if currently signed in.

Returns:

True if “Signed in with credentials” label is visible.

Return type:

bool

select_project(namespace: str) None

Select the secret namespace from dropdown.

Parameters:

namespace (str) – The namespace containing the secret (e.g., “openshift-storage”).

select_secret(secret_name: str) None

Select the secret from dropdown.

Parameters:

secret_name (str) – The secret name (e.g., “noobaa-account-dev-xyz”).

sign_in_with_secret(namespace: str, secret_name: str) None

Complete S3 sign-in flow: select project, select secret, click sign in.

Parameters:
  • namespace (str) – The namespace containing the secret.

  • secret_name (str) – The secret name with S3 credentials.

wait_for_login_success(timeout: int = 30) None

Wait for login to complete successfully.

Parameters:

timeout (int) – Maximum wait time in seconds.

Raises:

TimeoutException – If login does not complete within timeout.

ocs_ci.ocs.ui.page_objects.searchbar module

class ocs_ci.ocs.ui.page_objects.searchbar.SearchBar

Bases: BaseUI

Clear search input

search(search_text: str)

Search for text :param search_text: Text to search :type search_text: str

select_search_by(search_by: str)

Select search by option

Parameters:

search_by (str) – search by option Name | Label

ocs_ci.ocs.ui.page_objects.storage_clients module

class ocs_ci.ocs.ui.page_objects.storage_clients.StorageClients

Bases: BaseUI

Storage Client page object under PageNavigator / Storage (version 4.14 and above)

close_onboarding_token_modal()

Close the onboarding token modal

generate_client_onboarding_ticket()

Generate a client onboarding ticket

Returns:

onboarding_key

Return type:

str

ocs_ci.ocs.ui.page_objects.storage_cluster module

class ocs_ci.ocs.ui.page_objects.storage_cluster.StorageClusterPage

Bases: BlockAndFile, ObjectStorage, StoragePools, TopologyTab, EncryptionModule

Storage cluster tab Class Content of Storage cluster (navigation link) / Storage cluster page (default for Storage / Storage cluster)

get_blockpools_compression_status_from_storagesystem() tuple

Initial page - Data Foundation / Storage Cluster / Storage pools / ocs-storagecluster-cephblockpool Get compression status from storagesystem details and ocs-storagecluster-cephblockpool

Returns:

String representation of ‘Compression status’ from the block pool page String representation of ‘Compression status’ from ocs-storagecluster-cephblockpool page

Return type:

tuple

nav_cephblockpool_verify_statusready()

Initial page - Data Foundation / Storage pools / block pool page Navigate to ocs-storagecluster-cephblockpool Verify cephblockpool status is ‘Ready’

Raises:

CephHealthException if cephblockpool_status != 'Ready'

nav_storage_pools()

Navigate to Block pools (for version 4.16 or lower)/Storage pools tab

validate_block_and_file_tab_active() bool

Validate Overview tab is active

Returns:

True if active, False otherwise

Return type:

bool

Module contents