new-integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/Kubernetes.java
public static boolean isPodTerminating(String namespace, String domainUid, String podName)
      throws ApiException {
    LoggingFacade logger = getLogger();
    boolean terminating = false;
    String labelSelector = null;
    if (domainUid != null) {
      labelSelector = String.format("weblogic.domainUID=%s", domainUid);
    }
    V1Pod pod = getPod(namespace, labelSelector, podName);
    if (null == pod) {
      logger.severe("pod does not exist");
      return false;
    } else if (pod.getMetadata().getDeletionTimestamp() != null) {
      terminating = true;
      logger.info("{0} : !!!Terminating!!!, DeletionTimeStamp : {1}",
          pod.getMetadata().getName(), pod.getMetadata().getDeletionTimestamp());
    }
    return terminating;
  }
/**
   * Check if a pod exists in a given namespace and is terminating.
   * @param namespace in which to check for the pod
   * @param domainUid the label the pod is decorated with
   * @param podName name of the pod to check for
   * @return true if pod is terminating otherwise false
   * @throws ApiException when there is error in querying the cluster
   */
Check if a pod exists in a given namespace and is terminating.
Check if a pod exists in a given namespace and is terminating .
public static boolean isPodTerminating(String namespace, String domainUid, String podName)
      throws ApiException {
    LoggingFacade logger = getLogger();
    boolean terminating = false;
    String labelSelector = null;
    if (domainUid != null) {
      labelSelector = String.format("weblogic.domainUID=%s", domainUid);
    }
    V1Pod pod = getPod(namespace, labelSelector, podName);
    if (null == pod) {
      logger.severe("pod does not exist");
      return false;
    } else if (pod.getMetadata().getDeletionTimestamp() != null) {
      terminating = true;
      logger.info("{0} : !!!Terminating!!!, DeletionTimeStamp : {1}",
          pod.getMetadata().getName(), pod.getMetadata().getDeletionTimestamp());
    }
    return terminating;
  }
public static boolean isPodTerminating ( String namespace , String domainUid , String podName ) throws ApiException { LoggingFacade logger = getLogger ( ) ; boolean terminating = false ; String labelSelector = null ; if ( domainUid != null ) { labelSelector = String . format ( "weblogic.domainUID=%s" , domainUid ) ; } V1Pod pod = getPod ( namespace , labelSelector , podName ) ; if ( null == pod ) { logger . severe ( "pod does not exist" ) ; return false ; } else if ( pod . getMetadata ( ) . getDeletionTimestamp ( ) != null ) { terminating = true ; logger . info ( "{0} : !!!Terminating!!!, DeletionTimeStamp : {1}" , pod . getMetadata ( ) . getName ( ) , pod . getMetadata ( ) . getDeletionTimestamp ( ) ) ; } return terminating ; }
Check if a pod exists in a given namespace and is terminating.
Check if a pod exists in a given namespace and is terminating .