new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java
public static boolean createPvc(V1PersistentVolumeClaim persistentVolumeClaim) throws ApiException {
    if (persistentVolumeClaim == null) {
      throw new IllegalArgumentException(
              "Parameter 'persistentVolume' cannot be null when calling createPvc()");
    }

    if (persistentVolumeClaim.getMetadata() == null) {
      throw new IllegalArgumentException(
              "'metadata' field of the parameter 'persistentVolumeClaim' cannot be null when calling createPvc()");
    }

    if (persistentVolumeClaim.getMetadata().getNamespace() == null) {
      throw new IllegalArgumentException(
              "'namespace' field in the metadata cannot be null when calling createPvc()");
    }

    String namespace = persistentVolumeClaim.getMetadata().getNamespace();

    V1PersistentVolumeClaim pvc;
    try {
      pvc = coreV1Api.createNamespacedPersistentVolumeClaim(
              namespace, // name of the Namespace
              persistentVolumeClaim, // persistent volume claim configuration data
              PRETTY, // pretty print output
              null, // indicates that modifications should not be persisted
              null // fieldManager is a name associated with the actor
      );
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }

    return true;
  }
/**
   * Create a Kubernetes Persistent Volume Claim.
   *
   * @param persistentVolumeClaim V1PersistentVolumeClaim object containing Kubernetes persistent volume claim
  configuration data
   * @return true if successful
   * @throws ApiException if Kubernetes client API call fails
   */
Create a Kubernetes Persistent Volume Claim.
@param persistentVolumeClaim V1PersistentVolumeClaim object containing Kubernetes persistent volume claim
configuration data
@return true if successful
@throws ApiException if Kubernetes client API call fails
Create a Kubernetes Persistent Volume Claim . @param persistentVolumeClaim V1PersistentVolumeClaim object containing Kubernetes persistent volume claim configuration data @return true if successful @throws ApiException if Kubernetes client API call fails
public static boolean createPvc(V1PersistentVolumeClaim persistentVolumeClaim) throws ApiException {
    if (persistentVolumeClaim == null) {
      throw new IllegalArgumentException(
              "Parameter 'persistentVolume' cannot be null when calling createPvc()");
    }
    if (persistentVolumeClaim.getMetadata() == null) {
      throw new IllegalArgumentException(
              "'metadata' field of the parameter 'persistentVolumeClaim' cannot be null when calling createPvc()");
    }
    if (persistentVolumeClaim.getMetadata().getNamespace() == null) {
      throw new IllegalArgumentException(
              "'namespace' field in the metadata cannot be null when calling createPvc()");
    }
    String namespace = persistentVolumeClaim.getMetadata().getNamespace();
    V1PersistentVolumeClaim pvc;
    try {
      pvc = coreV1Api.createNamespacedPersistentVolumeClaim(
              namespace, 
              persistentVolumeClaim, 
              PRETTY, 
              null, 
              null 
      );
    } catch (ApiException apex) {
      getLogger().severe(apex.getResponseBody());
      throw apex;
    }
    return true;
  }
public static boolean createPvc ( V1PersistentVolumeClaim persistentVolumeClaim ) throws ApiException { if ( persistentVolumeClaim == null ) { throw new IllegalArgumentException ( "Parameter 'persistentVolume' cannot be null when calling createPvc()" ) ; } if ( persistentVolumeClaim . getMetadata ( ) == null ) { throw new IllegalArgumentException ( "'metadata' field of the parameter 'persistentVolumeClaim' cannot be null when calling createPvc()" ) ; } if ( persistentVolumeClaim . getMetadata ( ) . getNamespace ( ) == null ) { throw new IllegalArgumentException ( "'namespace' field in the metadata cannot be null when calling createPvc()" ) ; } String namespace = persistentVolumeClaim . getMetadata ( ) . getNamespace ( ) ; V1PersistentVolumeClaim pvc ; try { pvc = coreV1Api . createNamespacedPersistentVolumeClaim ( namespace , persistentVolumeClaim , PRETTY , null , null ) ; } catch ( ApiException apex ) { getLogger ( ) . severe ( apex . getResponseBody ( ) ) ; throw apex ; } return true ; }
Create a Kubernetes Persistent Volume Claim.
Create a Kubernetes Persistent Volume Claim .
// name of the Namespace // persistent volume claim configuration data // pretty print output // indicates that modifications should not be persisted // fieldManager is a name associated with the actor