You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ma...@apache.org on 2013/12/11 11:10:53 UTC

[1/2] git commit: Remove unnecessary print statements

Updated Branches:
  refs/heads/master 221f3dbfe -> 0590f2ff4


Remove unnecessary print statements


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

Branch: refs/heads/master
Commit: 8a03dc0bd03cf8e3f3c16ad72dca0d57bb652341
Parents: 2bd2d4a
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Wed Dec 11 15:40:10 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Wed Dec 11 15:40:10 2013 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/cli/RestClient.java |  3 ---
 .../stratos/cli/RestCommandLineService.java     | 27 +++++++-------------
 2 files changed, 9 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8a03dc0b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
index c4d1b9a..1faee57 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
@@ -59,7 +59,6 @@ public class RestClient implements GenericRestClient{
             httpClient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpClient);
             HttpResponse response = httpClient.execute(postRequest);
 
-            System.out.println("Response : " + response.getStatusLine().getStatusCode());
             int responseCode = response.getStatusLine().getStatusCode();
 
             if (responseCode == CliConstants.RESPONSE_AUTHORIZATION_FAIL) {
@@ -104,8 +103,6 @@ public class RestClient implements GenericRestClient{
             httpClient = (DefaultHttpClient) WebClientWrapper.wrapClient(httpClient);
             HttpResponse response = httpClient.execute(getRequest);
 
-            System.out.println("Response : " + response.getStatusLine().getStatusCode());
-
             if (response.getStatusLine().getStatusCode() != 200) {
                 throw new RuntimeException("Failed : HTTP error code : " + response.getStatusLine().getStatusCode());
             }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/8a03dc0b/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 a4f28dc..edfb15b 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
@@ -466,13 +466,10 @@ public class RestCommandLineService {
             String result = restClientService.doPost(restClientService.getUrl() + partitionDeploymentEndPoint,
                     partitionDefinition, restClientService.getUsername(), restClientService.getPassword());
 
-            System.out.println(result);
-
-            if (Integer.parseInt(result) == CliConstants.RESPONSE_AUTHORIZATION_FAIL) {
-                System.out.println("Invalid operations. Authorization failed");
-            }
-            else {
+            if (result.equals("true")) {
                 System.out.println("You have successfully deployed the partition");
+            }else if (Integer.parseInt(result) == CliConstants.RESPONSE_AUTHORIZATION_FAIL) {
+                System.out.println("Invalid operations. Authorization failed");
             }
 
         } catch (Exception e) {
@@ -485,13 +482,10 @@ public class RestCommandLineService {
             String result = restClientService.doPost(restClientService.getUrl() + autoscalingPolicyDeploymentEndPoint,
                     autoScalingPolicy, restClientService.getUsername(), restClientService.getPassword());
 
-            System.out.println(result);
-
-            if (Integer.parseInt(result) == CliConstants.RESPONSE_AUTHORIZATION_FAIL) {
-                System.out.println("Invalid operations. Authorization failed");
-            }
-            else {
+            if (result.equals("true")) {
                 System.out.println("You have successfully deployed the autoscaling policy");
+            }else if (Integer.parseInt(result) == CliConstants.RESPONSE_AUTHORIZATION_FAIL) {
+                System.out.println("Invalid operations. Authorization failed");
             }
 
         } catch (Exception e) {
@@ -504,13 +498,10 @@ public class RestCommandLineService {
             String result = restClientService.doPost(restClientService.getUrl() + deploymentPolicyDeploymentEndPoint,
                     deploymentPolicy, restClientService.getUsername(), restClientService.getPassword());
 
-            System.out.println(result);
-
-            if (Integer.parseInt(result) == CliConstants.RESPONSE_AUTHORIZATION_FAIL) {
-                System.out.println("Invalid operations. Authorization failed");
-            }
-            else {
+            if (result.equals("true")) {
                 System.out.println("You have successfully deployed the deployment policy");
+            }else if (Integer.parseInt(result) == CliConstants.RESPONSE_AUTHORIZATION_FAIL) {
+                System.out.println("Invalid operations. Authorization failed");
             }
 
         } catch (Exception e) {


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos

Posted by ma...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos


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

Branch: refs/heads/master
Commit: 0590f2ff476d87b04ee5d84d667482153b2c82ff
Parents: 8a03dc0 221f3db
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Wed Dec 11 15:40:37 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Wed Dec 11 15:40:37 2013 +0530

----------------------------------------------------------------------
 .../CompleteTopologyEventProcessor.java         | 122 +++++++++++++++++++
 .../processor/InstanceStatusProcessor.java      |   2 +
 .../processor/TopologyEventProcessorChain.java  |  15 ++-
 .../impl/CloudControllerServiceImpl.java        |   4 -
 .../controller/topology/TopologyManager.java    |   1 -
 .../rest/endpoint/services/ServiceUtils.java    |   4 +-
 .../pom.xml                                     |   3 +-
 7 files changed, 137 insertions(+), 14 deletions(-)
----------------------------------------------------------------------