new-integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/PersistentVolumeClaim.java
public static Callable<Boolean> pvcExists(String pvcName, String namespace) {
    return () -> {

      List<V1PersistentVolumeClaim> v1PersistentVolumeClaims = new ArrayList<>();

      V1PersistentVolumeClaimList v1PersistentVolumeClaimList = Kubernetes.listPersistentVolumeClaims(namespace);
      if (v1PersistentVolumeClaimList != null) {
        v1PersistentVolumeClaims = v1PersistentVolumeClaimList.getItems();
      }

      for (V1PersistentVolumeClaim v1PersistentVolumeClaim : v1PersistentVolumeClaims) {
        if (v1PersistentVolumeClaim.getMetadata() != null) {
          if (v1PersistentVolumeClaim.getMetadata().getName() != null) {
            if (v1PersistentVolumeClaim.getMetadata().getName().equals(pvcName)) {
              return true;
            }
          }
        }
      }

      return false;
    };
  }
/**
   * Check whether persistent volume claims with pvcName exists in the specified namespace.
   *
   * @param pvcName persistent volume claim to check
   * @param namespace the namespace in which the persistent volume claim to be checked
   * @return true if the persistent volume claim exists in the namespace, false otherwise
   */
Check whether persistent volume claims with pvcName exists in the specified namespace.
@param pvcName persistent volume claim to check
@param namespace the namespace in which the persistent volume claim to be checked
@return true if the persistent volume claim exists in the namespace, false otherwise
Check whether persistent volume claims with pvcName exists in the specified namespace . @param pvcName persistent volume claim to check @param namespace the namespace in which the persistent volume claim to be checked @return true if the persistent volume claim exists in the namespace false otherwise
public static Callable<Boolean> pvcExists(String pvcName, String namespace) {
    return () -> {
      List<V1PersistentVolumeClaim> v1PersistentVolumeClaims = new ArrayList<>();
      V1PersistentVolumeClaimList v1PersistentVolumeClaimList = Kubernetes.listPersistentVolumeClaims(namespace);
      if (v1PersistentVolumeClaimList != null) {
        v1PersistentVolumeClaims = v1PersistentVolumeClaimList.getItems();
      }
      for (V1PersistentVolumeClaim v1PersistentVolumeClaim : v1PersistentVolumeClaims) {
        if (v1PersistentVolumeClaim.getMetadata() != null) {
          if (v1PersistentVolumeClaim.getMetadata().getName() != null) {
            if (v1PersistentVolumeClaim.getMetadata().getName().equals(pvcName)) {
              return true;
            }
          }
        }
      }
      return false;
    };
  }
public static Callable < Boolean > pvcExists ( String pvcName , String namespace ) { return ( ) -> { List < V1PersistentVolumeClaim > v1PersistentVolumeClaims = new ArrayList < > ( ) ; V1PersistentVolumeClaimList v1PersistentVolumeClaimList = Kubernetes . listPersistentVolumeClaims ( namespace ) ; if ( v1PersistentVolumeClaimList != null ) { v1PersistentVolumeClaims = v1PersistentVolumeClaimList . getItems ( ) ; } for ( V1PersistentVolumeClaim v1PersistentVolumeClaim : v1PersistentVolumeClaims ) { if ( v1PersistentVolumeClaim . getMetadata ( ) != null ) { if ( v1PersistentVolumeClaim . getMetadata ( ) . getName ( ) != null ) { if ( v1PersistentVolumeClaim . getMetadata ( ) . getName ( ) . equals ( pvcName ) ) { return true ; } } } } return false ; } ; }
Check whether persistent volume claims with pvcName exists in the specified namespace.
Check whether persistent volume claims with pvcName exists in the specified namespace .