new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMonitoringExporter.java
private static void uninstallDeploymentService(V1Deployment deployment, V1Service service) {
    String namespace = null;
    String serviceName = null;
    String deploymentName = null;
    try {
      if (service != null) {
        serviceName = service.getMetadata().getName();
        namespace = service.getMetadata().getNamespace();
        Kubernetes.deleteService(serviceName, namespace);
      }
    } catch (Exception ex) {
      logger.warning(ex.getMessage());
      logger.warning("Failed to delete service {0} in namespace {1} ",
          serviceName, namespace);
    }
    try {
      if (deployment != null) {
        deploymentName = deployment.getMetadata().getName();
        namespace = deployment.getMetadata().getNamespace();
        Kubernetes.deleteDeployment(namespace, deploymentName);
      }
    } catch (Exception ex) {
      logger.warning(ex.getMessage());
      logger.warning("Failed to delete deployment {0} in namespace {1}",
          deploymentName, namespace);
    }
    if (namespace != null) {
      deleteNamespace(namespace);
    }
  }
/**
   * Uninstall provided deployment and service.
   */
Uninstall provided deployment and service.
Uninstall provided deployment and service .
private static void uninstallDeploymentService(V1Deployment deployment, V1Service service) {
    String namespace = null;
    String serviceName = null;
    String deploymentName = null;
    try {
      if (service != null) {
        serviceName = service.getMetadata().getName();
        namespace = service.getMetadata().getNamespace();
        Kubernetes.deleteService(serviceName, namespace);
      }
    } catch (Exception ex) {
      logger.warning(ex.getMessage());
      logger.warning("Failed to delete service {0} in namespace {1} ",
          serviceName, namespace);
    }
    try {
      if (deployment != null) {
        deploymentName = deployment.getMetadata().getName();
        namespace = deployment.getMetadata().getNamespace();
        Kubernetes.deleteDeployment(namespace, deploymentName);
      }
    } catch (Exception ex) {
      logger.warning(ex.getMessage());
      logger.warning("Failed to delete deployment {0} in namespace {1}",
          deploymentName, namespace);
    }
    if (namespace != null) {
      deleteNamespace(namespace);
    }
  }
private static void uninstallDeploymentService ( V1Deployment deployment , V1Service service ) { String namespace = null ; String serviceName = null ; String deploymentName = null ; try { if ( service != null ) { serviceName = service . getMetadata ( ) . getName ( ) ; namespace = service . getMetadata ( ) . getNamespace ( ) ; Kubernetes . deleteService ( serviceName , namespace ) ; } } catch ( Exception ex ) { logger . warning ( ex . getMessage ( ) ) ; logger . warning ( "Failed to delete service {0} in namespace {1} " , serviceName , namespace ) ; } try { if ( deployment != null ) { deploymentName = deployment . getMetadata ( ) . getName ( ) ; namespace = deployment . getMetadata ( ) . getNamespace ( ) ; Kubernetes . deleteDeployment ( namespace , deploymentName ) ; } } catch ( Exception ex ) { logger . warning ( ex . getMessage ( ) ) ; logger . warning ( "Failed to delete deployment {0} in namespace {1}" , deploymentName , namespace ) ; } if ( namespace != null ) { deleteNamespace ( namespace ) ; } }
Uninstall provided deployment and service.
Uninstall provided deployment and service .