new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/Pod.java
public static boolean patchDomainUsingServerStartPolicy(String domainUid,
                                                          String namespace,
                                                          String serverName,
                                                          String policy) throws ApiException {
    final String patchFormat = "application/json-patch+json";
    StringBuffer patchData = new StringBuffer("[{");
    patchData.append("\"op\": \"replace\",")
        .append(" \"path\": \"/spec/managedServers\",")
        .append(" \"value\":[{\"serverName\":\"")
        .append(serverName)
        .append("\",\"serverStartPolicy\": \"")
        .append(policy)
        .append("\"}]}]");
    getLogger().info("Patch data to change serverStartPolicy is: {0}", patchData);

    // call Kubernetes API GenericKubernetesApi.patch to patch the domain
    V1Patch patch = new V1Patch(new String(patchData));

    return Kubernetes.patchDomainCustomResource(domainUid, namespace, patch, patchFormat);
  }
/**
   * Patch domain to change the serverStartPolicy property of a WebLogic server.
   *
   * @param domainUid  unique domain identifier
   * @param namespace  name of the namespace
   * @param serverName name of the WebLogic server
   * @param policy     value for serverStartPolicy property
   * @return true if patching domain operation succeeds or false if the operation fails
   * @throws ApiException if Kubernetes client API call fails
   **/
Patch domain to change the serverStartPolicy property of a WebLogic server.
Patch domain to change the serverStartPolicy property of a WebLogic server .
public static boolean patchDomainUsingServerStartPolicy(String domainUid,
                                                          String namespace,
                                                          String serverName,
                                                          String policy) throws ApiException {
    final String patchFormat = "application/json-patch+json";
    StringBuffer patchData = new StringBuffer("[{");
    patchData.append("\"op\": \"replace\",")
        .append(" \"path\": \"/spec/managedServers\",")
        .append(" \"value\":[{\"serverName\":\"")
        .append(serverName)
        .append("\",\"serverStartPolicy\": \"")
        .append(policy)
        .append("\"}]}]");
    getLogger().info("Patch data to change serverStartPolicy is: {0}", patchData);
    V1Patch patch = new V1Patch(new String(patchData));
    return Kubernetes.patchDomainCustomResource(domainUid, namespace, patch, patchFormat);
  }
public static boolean patchDomainUsingServerStartPolicy ( String domainUid , String namespace , String serverName , String policy ) throws ApiException { final String patchFormat = "application/json-patch+json" ; StringBuffer patchData = new StringBuffer ( "[{" ) ; patchData . append ( "\"op\": \"replace\"," ) . append ( " \"path\": \"/spec/managedServers\"," ) . append ( " \"value\":[{\"serverName\":\"" ) . append ( serverName ) . append ( "\",\"serverStartPolicy\": \"" ) . append ( policy ) . append ( "\"}]}]" ) ; getLogger ( ) . info ( "Patch data to change serverStartPolicy is: {0}" , patchData ) ; V1Patch patch = new V1Patch ( new String ( patchData ) ) ; return Kubernetes . patchDomainCustomResource ( domainUid , namespace , patch , patchFormat ) ; }
Patch domain to change the serverStartPolicy property of a WebLogic server.
Patch domain to change the serverStartPolicy property of a WebLogic server .
// call Kubernetes API GenericKubernetesApi.patch to patch the domain