ocs_ci.ocs.acm package

Submodules

ocs_ci.ocs.acm.acm module

class ocs_ci.ocs.acm.acm.AcmAddClusters

Bases: AcmPageNavigator

ACM Page Navigator Class

import_cluster(cluster_name, kubeconfig_location)

Import cluster using UI

Parameters:
  • cluster_name – (str): cluster name to import

  • kubeconfig_location – (str): kubeconfig location

Returns:

None, but exits if sample object is not None using TimeoutSampler

import_cluster_ui(cluster_name, kubeconfig_location)
Parameters:
  • cluster_name (str) – cluster name to import

  • kubeconfig_location (str) – kubeconfig file location of imported cluster

install_submariner_ui(globalnet=True)

Installs the Submariner on the ACM Hub cluster and expects 2 OCP clusters to be already imported on the Hub Cluster to create a link between them

Parameters:

globalnet (bool) – Globalnet is set to True by default for ODF versions greater than or equal to 4.13

submariner_unreleased_downstream_info()
submariner_validation_ui()

This function validates submariner status on ACM console which connects 2 managed OCP clusters. This is a mandatory pre-check for Regional DR.

ocs_ci.ocs.acm.acm.copy_kubeconfig(file=None, return_str=False)
Parameters:
  • file – (str): kubeconfig file location

  • return_str – (bool): if True return kubeconfig content as string

  • content (else return list of lines of kubeconfig) –

Returns:

kubeconfig content

Return type:

list/str

ocs_ci.ocs.acm.acm.get_acm_url()

Gets ACM console url

Returns:

url of ACM console

Return type:

str

ocs_ci.ocs.acm.acm.get_clusters_env()

Stores cluster’s kubeconfig location and clusters name, in case of multi-cluster setup. Function will switch to context index zero before returning :returns: with clusters names, clusters kubeconfig locations :rtype: dict

ocs_ci.ocs.acm.acm.import_clusters_via_cli(clusters)

Import clusters via cli

Parameters:

clusters (list) – list of tuples (cluster name, kubeconfig path)

ocs_ci.ocs.acm.acm.import_clusters_with_acm()

Run Procedure of: detecting acm, login to ACM console, import 2 clusters

ocs_ci.ocs.acm.acm.login_to_acm()

Login to ACM console and validate by its title

Returns:

driver (Selenium WebDriver)

ocs_ci.ocs.acm.acm.validate_cluster_import(cluster_name, switch_ctx=None)

Validate ACM status of managed cluster

Parameters:
  • cluster_name – (str): cluster name to validate

  • switch_ctx (int) – The cluster index by the cluster name

Assert:

All conditions of selected managed cluster should be “True”, Failed otherwise

Returns:

True, if not AssertionError

ocs_ci.ocs.acm.acm.validate_page_title(title)

Validates Page HTML Title :param title: required title :type title: str

ocs_ci.ocs.acm.acm.verify_running_acm()

Detect ACM and its version on Cluster

ocs_ci.ocs.acm.acm_constants module

Module contents