new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java
public static boolean deleteNamespace(String name) {

    KubernetesApiResponse<V1Namespace> response = namespaceClient.delete(name);

    if (!response.isSuccess()) {
      // status 409 means contents in the namespace being removed,
      // once done namespace will be purged
      if (response.getHttpStatusCode() == 409) {
        getLogger().warning(response.getStatus().getMessage());
        return false;
      } else {
        getLogger().warning("Failed to delete namespace: "
                + name + " with HTTP status code: " + response.getHttpStatusCode());
        return false;
      }
    }

    withStandardRetryPolicy
        .conditionEvaluationListener(
          condition -> getLogger().info("Waiting for namespace {0} to be deleted "
            + "(elapsed time {1}ms, remaining time {2}ms)",
          name,
          condition.getElapsedTimeInMS(),
          condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(() -> namespaceDeleted(name),
          String.format("namespaceExists failed with ApiException for namespace %s",
          name)));

    return true;
  }
/**
   * Delete a namespace for the given name.
   *
   * @param name name of namespace
   * @return true if successful delete request, false otherwise.
   */
Delete a namespace for the given name.
@param name name of namespace
@return true if successful delete request, false otherwise.
Delete a namespace for the given name . @param name name of namespace @return true if successful delete request false otherwise .
public static boolean deleteNamespace(String name) {
    KubernetesApiResponse<V1Namespace> response = namespaceClient.delete(name);
    if (!response.isSuccess()) {
      if (response.getHttpStatusCode() == 409) {
        getLogger().warning(response.getStatus().getMessage());
        return false;
      } else {
        getLogger().warning("Failed to delete namespace: "
                + name + " with HTTP status code: " + response.getHttpStatusCode());
        return false;
      }
    }
    withStandardRetryPolicy
        .conditionEvaluationListener(
          condition -> getLogger().info("Waiting for namespace {0} to be deleted "
            + "(elapsed time {1}ms, remaining time {2}ms)",
          name,
          condition.getElapsedTimeInMS(),
          condition.getRemainingTimeInMS()))
        .until(assertDoesNotThrow(() -> namespaceDeleted(name),
          String.format("namespaceExists failed with ApiException for namespace %s",
          name)));
    return true;
  }
public static boolean deleteNamespace ( String name ) { KubernetesApiResponse < V1Namespace > response = namespaceClient . delete ( name ) ; if ( ! response . isSuccess ( ) ) { if ( response . getHttpStatusCode ( ) == 409 ) { getLogger ( ) . warning ( response . getStatus ( ) . getMessage ( ) ) ; return false ; } else { getLogger ( ) . warning ( "Failed to delete namespace: " + name + " with HTTP status code: " + response . getHttpStatusCode ( ) ) ; return false ; } } withStandardRetryPolicy . conditionEvaluationListener ( condition -> getLogger ( ) . info ( "Waiting for namespace {0} to be deleted " + "(elapsed time {1}ms, remaining time {2}ms)" , name , condition . getElapsedTimeInMS ( ) , condition . getRemainingTimeInMS ( ) ) ) . until ( assertDoesNotThrow ( ( ) -> namespaceDeleted ( name ) , String . format ( "namespaceExists failed with ApiException for namespace %s" , name ) ) ) ; return true ; }
Delete a namespace for the given name.
Delete a namespace for the given name .
// status 409 means contents in the namespace being removed, // once done namespace will be purged