stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject [2/4] stratos git commit: Adding undeploying check to rest API
Date Mon, 22 Jun 2015 06:09:50 GMT
Adding undeploying check to rest API


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/0f796c83
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/0f796c83
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/0f796c83

Branch: refs/heads/master
Commit: 0f796c8348e36f6960eb47223470b37d79c79df6
Parents: efbd865
Author: anuruddhal <anuruddha789@gmail.com>
Authored: Wed Jun 17 20:09:03 2015 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Mon Jun 22 11:39:42 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java  | 3 ++-
 .../org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java  | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/0f796c83/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 11ecb30..34417ff 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -1245,7 +1245,8 @@ public class StratosApiV41 extends AbstractApi {
             return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessageBean(
                     ResponseMessageBean.ERROR, msg)).build();
         }
-        if (!applicationDefinition.getStatus().equalsIgnoreCase(StratosApiV41Utils.APPLICATION_STATUS_DEPLOYED))
{
+        if (!applicationDefinition.getStatus().equalsIgnoreCase(StratosApiV41Utils.APPLICATION_STATUS_DEPLOYED)
||
+                !applicationDefinition.getStatus().equalsIgnoreCase(StratosApiV41Utils.APPLICATION_STATUS_UNDEPLOYING))
{
             String message = String.format("Could not undeploy since application is not in
DEPLOYED status " +
                     "[application-id] %s [current status] %S", applicationId, applicationDefinition.getStatus());
             log.info(message);

http://git-wip-us.apache.org/repos/asf/stratos/blob/0f796c83/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index f644a26..c8928f9 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -103,6 +103,7 @@ import java.util.regex.Pattern;
 public class StratosApiV41Utils {
     public static final String APPLICATION_STATUS_DEPLOYED = "Deployed";
     public static final String APPLICATION_STATUS_CREATED = "Created";
+    public static final String APPLICATION_STATUS_UNDEPLOYING = "Undeploying";
 
     private static final Log log = LogFactory.getLog(StratosApiV41Utils.class);
 


Mime
View raw message