ocs_ci/deployment/deployment.py
def deploy_ocs_via_operator(self):
        """
        Method for deploy OCS via OCS operator
        """
        logger.info("Deployment of OCS via OCS operator")
        olm_manifest = self.get_olm_manifest()
        self.label_and_taint_nodes()
        run_cmd(f"oc create -f {olm_manifest}")
        # wait for package manifest
        package_manifest = PackageManifest(
            resource_name=defaults.OCS_OPERATOR_NAME
        )
        # Wait for package manifest is ready
        package_manifest.wait_for_resource()
        channel = config.DEPLOYMENT.get('ocs_csv_channel')
        csv_name = package_manifest.get_current_csv(channel=channel)
        csv = CSV(
            resource_name=csv_name, kind="csv",
            namespace=self.namespace
        )
        csv.wait_for_phase("Succeeded")
        ocs_operator_storage_cluster_cr = config.DEPLOYMENT.get(
            'ocs_operator_storage_cluster_cr'
        )
        cluster_data = templating.load_yaml(
            ocs_operator_storage_cluster_cr
        )
        cluster_data['metadata']['name'] = config.ENV_DATA[
            'storage_cluster_name'
        ]
        deviceset_data = templating.load_yaml(
            constants.DEVICESET_YAML
        )
        device_size = int(
            config.ENV_DATA.get('device_size', defaults.DEVICE_SIZE)
        )
        deviceset_data['dataPVCTemplate']['spec']['resources']['requests'][
            'storage'
        ] = f"{device_size}Gi"
        cluster_data['spec']['storageDeviceSets'] = [deviceset_data]
        cluster_data_yaml = tempfile.NamedTemporaryFile(
            mode='w+', prefix='cluster_storage', delete=False
        )
        templating.dump_data_to_temp_yaml(
            cluster_data, cluster_data_yaml.name
        )
        run_cmd(f"oc create -f {cluster_data_yaml.name}")

        Method for deploy OCS via OCS operator
        
Method for deploy OCS via OCS operator
Method for deploy OCS via OCS operator
def deploy_ocs_via_operator(self):
        logger.info("Deployment of OCS via OCS operator")
        olm_manifest = self.get_olm_manifest()
        self.label_and_taint_nodes()
        run_cmd(f"oc create -f {olm_manifest}")
        package_manifest = PackageManifest(
            resource_name=defaults.OCS_OPERATOR_NAME
        )
        package_manifest.wait_for_resource()
        channel = config.DEPLOYMENT.get('ocs_csv_channel')
        csv_name = package_manifest.get_current_csv(channel=channel)
        csv = CSV(
            resource_name=csv_name, kind="csv",
            namespace=self.namespace
        )
        csv.wait_for_phase("Succeeded")
        ocs_operator_storage_cluster_cr = config.DEPLOYMENT.get(
            'ocs_operator_storage_cluster_cr'
        )
        cluster_data = templating.load_yaml(
            ocs_operator_storage_cluster_cr
        )
        cluster_data['metadata']['name'] = config.ENV_DATA[
            'storage_cluster_name'
        ]
        deviceset_data = templating.load_yaml(
            constants.DEVICESET_YAML
        )
        device_size = int(
            config.ENV_DATA.get('device_size', defaults.DEVICE_SIZE)
        )
        deviceset_data['dataPVCTemplate']['spec']['resources']['requests'][
            'storage'
        ] = f"{device_size}Gi"
        cluster_data['spec']['storageDeviceSets'] = [deviceset_data]
        cluster_data_yaml = tempfile.NamedTemporaryFile(
            mode='w+', prefix='cluster_storage', delete=False
        )
        templating.dump_data_to_temp_yaml(
            cluster_data, cluster_data_yaml.name
        )
        run_cmd(f"oc create -f {cluster_data_yaml.name}")
def deploy_ocs_via_operator ( self ) : logger . info ( "Deployment of OCS via OCS operator" ) olm_manifest = self . get_olm_manifest ( ) self . label_and_taint_nodes ( ) run_cmd ( f"oc create -f {olm_manifest}" ) package_manifest = PackageManifest ( resource_name = defaults . OCS_OPERATOR_NAME ) package_manifest . wait_for_resource ( ) channel = config . DEPLOYMENT . get ( 'ocs_csv_channel' ) csv_name = package_manifest . get_current_csv ( channel = channel ) csv = CSV ( resource_name = csv_name , kind = "csv" , namespace = self . namespace ) csv . wait_for_phase ( "Succeeded" ) ocs_operator_storage_cluster_cr = config . DEPLOYMENT . get ( 'ocs_operator_storage_cluster_cr' ) cluster_data = templating . load_yaml ( ocs_operator_storage_cluster_cr ) cluster_data [ 'metadata' ] [ 'name' ] = config . ENV_DATA [ 'storage_cluster_name' ] deviceset_data = templating . load_yaml ( constants . DEVICESET_YAML ) device_size = int ( config . ENV_DATA . get ( 'device_size' , defaults . DEVICE_SIZE ) ) deviceset_data [ 'dataPVCTemplate' ] [ 'spec' ] [ 'resources' ] [ 'requests' ] [ 'storage' ] = f"{device_size}Gi" cluster_data [ 'spec' ] [ 'storageDeviceSets' ] = [ deviceset_data ] cluster_data_yaml = tempfile . NamedTemporaryFile ( mode = 'w+' , prefix = 'cluster_storage' , delete = False ) templating . dump_data_to_temp_yaml ( cluster_data , cluster_data_yaml . name ) run_cmd ( f"oc create -f {cluster_data_yaml.name}" )
Method for deploy OCS via OCS operator
Method for deploy OCS via OCS operator
"""
        Method for deploy OCS via OCS operator
        """ # wait for package manifest # Wait for package manifest is ready
self