new-integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java
public static void createPVC(String pvName, String pvcName, String domainUid, String namespace) {

    LoggingFacade logger = getLogger();
    logger.info("creating persistent volume claim for pvName {0}, pvcName {1}, "
        + "domainUid: {2}, namespace: {3}", pvName, pvcName, domainUid, namespace);
    V1PersistentVolumeClaim v1pvc = new V1PersistentVolumeClaim()
        .spec(new V1PersistentVolumeClaimSpec()
            .addAccessModesItem("ReadWriteMany")
            .storageClassName("weblogic-domain-storage-class")
            .volumeName(pvName)
            .resources(new V1ResourceRequirements()
                .putRequestsItem("storage", Quantity.fromString("5Gi"))))
        .metadata(new V1ObjectMeta()
            .name(pvcName)
            .namespace(namespace)
            .putLabelsItem("weblogic.resourceVersion", "domain-v2")
            .putLabelsItem("weblogic.domainUid", domainUid));

    boolean success = assertDoesNotThrow(() -> createPersistentVolumeClaim(v1pvc),
        "Failed to create persistent volume claim");
    assertTrue(success, "PersistentVolumeClaim creation failed");
  }
/**
   * Create a persistent volume claim.
   *
   * @param pvName name of the persistent volume
   * @param pvcName name of the persistent volume claim to create
   * @param domainUid UID of the WebLogic domain
   * @param namespace name of the namespace in which to create the persistent volume claim
   */
Create a persistent volume claim.
@param pvName name of the persistent volume
@param pvcName name of the persistent volume claim to create
@param domainUid UID of the WebLogic domain
@param namespace name of the namespace in which to create the persistent volume claim
Create a persistent volume claim . @param pvName name of the persistent volume @param pvcName name of the persistent volume claim to create @param domainUid UID of the WebLogic domain @param namespace name of the namespace in which to create the persistent volume claim
public static void createPVC(String pvName, String pvcName, String domainUid, String namespace) {
    LoggingFacade logger = getLogger();
    logger.info("creating persistent volume claim for pvName {0}, pvcName {1}, "
        + "domainUid: {2}, namespace: {3}", pvName, pvcName, domainUid, namespace);
    V1PersistentVolumeClaim v1pvc = new V1PersistentVolumeClaim()
        .spec(new V1PersistentVolumeClaimSpec()
            .addAccessModesItem("ReadWriteMany")
            .storageClassName("weblogic-domain-storage-class")
            .volumeName(pvName)
            .resources(new V1ResourceRequirements()
                .putRequestsItem("storage", Quantity.fromString("5Gi"))))
        .metadata(new V1ObjectMeta()
            .name(pvcName)
            .namespace(namespace)
            .putLabelsItem("weblogic.resourceVersion", "domain-v2")
            .putLabelsItem("weblogic.domainUid", domainUid));
    boolean success = assertDoesNotThrow(() -> createPersistentVolumeClaim(v1pvc),
        "Failed to create persistent volume claim");
    assertTrue(success, "PersistentVolumeClaim creation failed");
  }
public static void createPVC ( String pvName , String pvcName , String domainUid , String namespace ) { LoggingFacade logger = getLogger ( ) ; logger . info ( "creating persistent volume claim for pvName {0}, pvcName {1}, " + "domainUid: {2}, namespace: {3}" , pvName , pvcName , domainUid , namespace ) ; V1PersistentVolumeClaim v1pvc = new V1PersistentVolumeClaim ( ) . spec ( new V1PersistentVolumeClaimSpec ( ) . addAccessModesItem ( "ReadWriteMany" ) . storageClassName ( "weblogic-domain-storage-class" ) . volumeName ( pvName ) . resources ( new V1ResourceRequirements ( ) . putRequestsItem ( "storage" , Quantity . fromString ( "5Gi" ) ) ) ) . metadata ( new V1ObjectMeta ( ) . name ( pvcName ) . namespace ( namespace ) . putLabelsItem ( "weblogic.resourceVersion" , "domain-v2" ) . putLabelsItem ( "weblogic.domainUid" , domainUid ) ) ; boolean success = assertDoesNotThrow ( ( ) -> createPersistentVolumeClaim ( v1pvc ) , "Failed to create persistent volume claim" ) ; assertTrue ( success , "PersistentVolumeClaim creation failed" ) ; }
Create a persistent volume claim.
Create a persistent volume claim .