You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/05/20 12:08:48 UTC
[1/3] stratos git commit: This closes #350 on GitHub
Repository: stratos
Updated Branches:
refs/heads/master 11bc6bb33 -> d5a4932c3
This closes #350 on GitHub
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d5a4932c
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d5a4932c
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d5a4932c
Branch: refs/heads/master
Commit: d5a4932c3a27abd353de5f64ac3660f3b03a5d2d
Parents: 3c09660
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 20 15:38:41 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 20 15:38:41 2015 +0530
----------------------------------------------------------------------
----------------------------------------------------------------------
[3/3] stratos git commit: Fixed issues found when undeploying a non
existing application
Posted by la...@apache.org.
Fixed issues found when undeploying a non existing application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b5b6eed4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b5b6eed4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b5b6eed4
Branch: refs/heads/master
Commit: b5b6eed4d506d2351e18094406cafecf5631d858
Parents: 11bc6bb
Author: Dinithi <di...@wso2.com>
Authored: Wed May 20 10:11:49 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 20 15:38:41 2015 +0530
----------------------------------------------------------------------
.../org/apache/stratos/cli/RestCommandLineService.java | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/b5b6eed4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 01bc45d..edca089 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -1559,20 +1559,11 @@ public class RestCommandLineService {
try {
HttpResponse response = restClient.doPost(httpClient, restClient.getBaseURL()
+ ENDPOINT_UNDEPLOY_APPLICATION.replace("{id}", applicationId), "");
-
- String responseCode = "" + response.getStatusLine().getStatusCode();
+ String result = getHttpResponseString(response);
GsonBuilder gsonBuilder = new GsonBuilder();
Gson gson = gsonBuilder.create();
-
- if (Integer.parseInt(responseCode) < 300 && Integer.parseInt(responseCode) >= 200) {
- System.out.println("You have successfully undeployed application: " + applicationId);
- } else {
- String resultString = CliUtils.getHttpResponseString(response);
- ExceptionMapper exception = gson.fromJson(resultString, ExceptionMapper.class);
- System.out.println(exception);
- }
-
+ System.out.println(gson.fromJson(result, ResponseMessageBean.class).getMessage());
} catch (Exception e) {
String message = "Could not undeploy application: " + applicationId;
printError(message, e);
[2/3] stratos git commit: Fixed issues found when deploying a non
existing application
Posted by la...@apache.org.
Fixed issues found when deploying a non existing application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3c09660e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3c09660e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3c09660e
Branch: refs/heads/master
Commit: 3c09660e99dec176a386157f14ca899bd896e9a6
Parents: b5b6eed
Author: Dinithi <di...@wso2.com>
Authored: Wed May 20 11:05:50 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 20 15:38:41 2015 +0530
----------------------------------------------------------------------
.../org/apache/stratos/cli/RestCommandLineService.java | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3c09660e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index edca089..d430572 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -1525,18 +1525,11 @@ public class RestCommandLineService {
HttpResponse response = restClient.doPost(httpClient, restClient.getBaseURL()
+ url, "");
- String responseCode = "" + response.getStatusLine().getStatusCode();
+ String result = getHttpResponseString(response);
GsonBuilder gsonBuilder = new GsonBuilder();
Gson gson = gsonBuilder.create();
-
- if (Integer.parseInt(responseCode) < 300 && Integer.parseInt(responseCode) >= 200) {
- System.out.println("You have successfully deployed application: " + applicationId);
- } else {
- String resultString = CliUtils.getHttpResponseString(response);
- ExceptionMapper exception = gson.fromJson(resultString, ExceptionMapper.class);
- System.out.println(exception);
- }
+ System.out.println(gson.fromJson(result, ResponseMessageBean.class).getMessage());
} catch (Exception e) {
String message = "Could not deploy application: " + applicationId;