integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java
public void undeployWebAppViaRest(
      String webappName, String webappLocation, String username, String password) throws Exception {
    StringBuffer cmd = new StringBuffer();
    cmd.append("curl --noproxy '*' --silent  --user ")
        .append(username)
        .append(":")
        .append(password)
        .append(" -H X-Requested-By:MyClient -H Accept:application/json")
        .append(" -H Content-Type:application/json -d \"{}\" ")
        .append(" -X DELETE http://")
        .append(getNodeHost())
        .append(":")
        .append(getNodePort())
        .append("/management/weblogic/latest/edit/appDeployments/")
        .append(webappName)
        .append(" --write-out %{http_code} -o /dev/null");
    LoggerHelper.getLocal().fine("Command to undeploy webapp " + cmd);
    ExecResult result = TestUtils.execOrAbortProcess(cmd.toString());
    String output = result.stdout().trim();
    if (!output.contains("200")) {
      throw new RuntimeException(
          "FAILURE: Webapp undeployment failed with response code " + output);
    }
  }
/**
   * Undeploy webapp using nodehost and nodeport.
   *
   * @throws Exception if failed to undeploy the app
   */
Undeploy webapp using nodehost and nodeport.
@throws Exception if failed to undeploy the app
Undeploy webapp using nodehost and nodeport . @throws Exception if failed to undeploy the app
public void undeployWebAppViaRest(
      String webappName, String webappLocation, String username, String password) throws Exception {
    StringBuffer cmd = new StringBuffer();
    cmd.append("curl --noproxy '*' --silent  --user ")
        .append(username)
        .append(":")
        .append(password)
        .append(" -H X-Requested-By:MyClient -H Accept:application/json")
        .append(" -H Content-Type:application/json -d \"{}\" ")
        .append(" -X DELETE http://")
        .append(getNodeHost())
        .append(":")
        .append(getNodePort())
        .append("/management/weblogic/latest/edit/appDeployments/")
        .append(webappName)
        .append(" --write-out %{http_code} -o /dev/null");
    LoggerHelper.getLocal().fine("Command to undeploy webapp " + cmd);
    ExecResult result = TestUtils.execOrAbortProcess(cmd.toString());
    String output = result.stdout().trim();
    if (!output.contains("200")) {
      throw new RuntimeException(
          "FAILURE: Webapp undeployment failed with response code " + output);
    }
  }
public void undeployWebAppViaRest ( String webappName , String webappLocation , String username , String password ) throws Exception { StringBuffer cmd = new StringBuffer ( ) ; cmd . append ( "curl --noproxy '*' --silent  --user " ) . append ( username ) . append ( ":" ) . append ( password ) . append ( " -H X-Requested-By:MyClient -H Accept:application/json" ) . append ( " -H Content-Type:application/json -d \"{}\" " ) . append ( " -X DELETE http://" ) . append ( getNodeHost ( ) ) . append ( ":" ) . append ( getNodePort ( ) ) . append ( "/management/weblogic/latest/edit/appDeployments/" ) . append ( webappName ) . append ( " --write-out %{http_code} -o /dev/null" ) ; LoggerHelper . getLocal ( ) . fine ( "Command to undeploy webapp " + cmd ) ; ExecResult result = TestUtils . execOrAbortProcess ( cmd . toString ( ) ) ; String output = result . stdout ( ) . trim ( ) ; if ( ! output . contains ( "200" ) ) { throw new RuntimeException ( "FAILURE: Webapp undeployment failed with response code " + output ) ; } }
Undeploy webapp using nodehost and nodeport.
Undeploy webapp using nodehost and nodeport .