Example #1
0
    def deployment_with_ui(self):
        """
        Deployment OCS Operator via OpenShift Console

        """
        setup_ui = login_ui()
        deployment_obj = DeploymentUI(setup_ui)
        deployment_obj.install_ocs_ui()
        close_browser(setup_ui)
Example #2
0
def ocs_odf_upgrade_ui():
    """
    Function to upgrade OCS 4.8 to ODF 4.9 via UI on OCP 4.9
    Pass proper versions and upgrade_ui.yaml while running this function for validation to pass

    """

    setup_ui = login_ui()
    val_obj = ValidationUI(setup_ui)
    pagenav_obj = ValidationUI(setup_ui)
    dep_obj = DeploymentUI(setup_ui)
    dep_obj.operator = ODF_OPERATOR
    dep_obj.install_ocs_operator()
    original_ocs_version = config.ENV_DATA.get("ocs_version")
    upgrade_in_current_source = config.UPGRADE.get("upgrade_in_current_source",
                                                   False)
    upgrade_ocs = OCSUpgrade(
        namespace=config.ENV_DATA["cluster_namespace"],
        version_before_upgrade=original_ocs_version,
        ocs_registry_image=config.UPGRADE.get("upgrade_ocs_registry_image"),
        upgrade_in_current_source=upgrade_in_current_source,
    )
    logger.info(
        "Click on Storage System under Provided APIs on Installed Operators Page"
    )
    val_obj.do_click(
        upgrade_ocs.validation_loc["storage-system-on-installed-operators"])
    logger.info(
        "Click on 'ocs-storagecluster-storagesystem' on Operator details page")
    val_obj.do_click(
        upgrade_ocs.validation_loc["ocs-storagecluster-storgesystem"],
        enable_screenshot=True,
    )
    logger.info("Click on Resources")
    val_obj.do_click(upgrade_ocs.validation_loc["resources-tab"],
                     enable_screenshot=True)
    logger.info("Storage Cluster Status Check")
    storage_cluster_status_check = val_obj.wait_until_expected_text_is_found(
        locator=("//*[text()= 'Ready']", By.XPATH),
        expected_text="Ready",
        timeout=1200)
    assert (
        storage_cluster_status_check
    ), "Storage Cluster Status reported on UI is not 'Ready', Timeout 1200 seconds exceeded"
    logger.info(
        "Storage Cluster Status reported on UI is 'Ready', verification successful"
    )
    logger.info("Click on 'ocs-storagecluster")
    val_obj.do_click(upgrade_ocs.validation_loc["ocs-storagecluster"])
    val_obj.take_screenshot()
    pagenav_obj.odf_overview_ui()
    pagenav_obj.odf_storagesystems_ui()
Example #3
0
    def deployment_with_ui(self):
        """
        Deployment OCS Operator via OpenShift Console

        """
        from ocs_ci.ocs.ui.base_ui import login_ui, close_browser
        from ocs_ci.ocs.ui.deployment_ui import DeploymentUI

        create_catalog_source()
        setup_ui = login_ui()
        deployment_obj = DeploymentUI(setup_ui)
        deployment_obj.install_ocs_ui()
        close_browser(setup_ui)
Example #4
0
    def deployment_with_ui(self):
        """
        Deployment OCS Operator via OpenShift Console

        """
        setup_ui = login_ui()
        deployment_obj = DeploymentUI(setup_ui)

        if config.DEPLOYMENT.get("local_storage"):
            deployment_obj.mode = "lso"
        else:
            deployment_obj.mode = "internal"

        if config.ENV_DATA["platform"].lower() == constants.VSPHERE_PLATFORM:
            deployment_obj.storage_class_type = "thin_sc"
        elif config.ENV_DATA["platform"].lower() == constants.AWS_PLATFORM:
            deployment_obj.storage_class_type = "gp2_sc"

        device_size = str(config.ENV_DATA.get("device_size"))
        if device_size in ("512", "2048", "4096"):
            deployment_obj.osd_size = device_size
        else:
            deployment_obj.osd_size = "512"

        deployment_obj.is_wide_encryption = config.ENV_DATA.get("encryption_at_rest")
        deployment_obj.is_class_encryption = False
        deployment_obj.is_use_kms = False
        deployment_obj.install_ocs_ui()
        close_browser(setup_ui)