ocs_ci/deployment/aws.py
def destroy_cluster(self, log_level="DEBUG"):
        """
        Destroy OCP cluster specific to AWS IPI

        Args:
            log_level (str): log level openshift-installer (default: DEBUG)
        """
        super(AWSIPI, self).destroy_cluster(log_level)

        try:
            # Retrieve cluster name and AWS region from metadata
            cluster_name = self.ocp_deployment.metadata.get("clusterName")
            # Find and delete volumes
            volume_pattern = f"{cluster_name}*"
            logger.debug(f"Finding volumes with pattern: {volume_pattern}")
            volumes = self.aws.get_volumes_by_name_pattern(volume_pattern)
            logger.debug(f"Found volumes: \n {volumes}")
            for volume in volumes:
                self.aws.detach_and_delete_volume(
                    self.aws.ec2_resource.Volume(volume['id'])
                )
        except Exception:
            logger.error(traceback.format_exc())

        Destroy OCP cluster specific to AWS IPI

        Args:
            log_level (str): log level openshift-installer (default: DEBUG)
        
Destroy OCP cluster specific to AWS IPI
Destroy OCP cluster specific to AWS IPI
def destroy_cluster(self, log_level="DEBUG"):
        super(AWSIPI, self).destroy_cluster(log_level)
        try:
            cluster_name = self.ocp_deployment.metadata.get("clusterName")
            volume_pattern = f"{cluster_name}*"
            logger.debug(f"Finding volumes with pattern: {volume_pattern}")
            volumes = self.aws.get_volumes_by_name_pattern(volume_pattern)
            logger.debug(f"Found volumes: \n {volumes}")
            for volume in volumes:
                self.aws.detach_and_delete_volume(
                    self.aws.ec2_resource.Volume(volume['id'])
                )
        except Exception:
            logger.error(traceback.format_exc())
def destroy_cluster ( self , log_level = "DEBUG" ) : super ( AWSIPI , self ) . destroy_cluster ( log_level ) try : cluster_name = self . ocp_deployment . metadata . get ( "clusterName" ) volume_pattern = f"{cluster_name}*" logger . debug ( f"Finding volumes with pattern: {volume_pattern}" ) volumes = self . aws . get_volumes_by_name_pattern ( volume_pattern ) logger . debug ( f"Found volumes: \n {volumes}" ) for volume in volumes : self . aws . detach_and_delete_volume ( self . aws . ec2_resource . Volume ( volume [ 'id' ] ) ) except Exception : logger . error ( traceback . format_exc ( ) )
Destroy OCP cluster specific to AWS IPI
Destroy OCP cluster specific to AWS IPI
"""
        Destroy OCP cluster specific to AWS IPI

        Args:
            log_level (str): log level openshift-installer (default: DEBUG)
        """ # Retrieve cluster name and AWS region from metadata # Find and delete volumes
self
log_level
log level openshift-installer (default: DEBUG)
log level openshift - installer ( default : DEBUG )