You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/05/19 11:59:59 UTC

[1/3] stratos git commit: This closes #338 on GitHub

Repository: stratos
Updated Branches:
  refs/heads/master e5b18001a -> 75d55a0fc


This closes #338 on GitHub


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

Branch: refs/heads/master
Commit: 75d55a0fc16c6d47c23853d04e6260394dc577f3
Parents: 4db5fcc
Author: Imesh Gunaratne <im...@apache.org>
Authored: Tue May 19 15:29:54 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue May 19 15:29:54 2015 +0530

----------------------------------------------------------------------

----------------------------------------------------------------------



[3/3] stratos git commit: Changing listing of autoscaling policies in CLI

Posted by im...@apache.org.
Changing listing of autoscaling policies in CLI


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

Branch: refs/heads/master
Commit: 806a615dfdee213effd779ac76c0ed30c060a726
Parents: e5b1800
Author: Pubudu Gunatilaka <pu...@gmail.com>
Authored: Tue May 19 11:38:20 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue May 19 15:29:54 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/cli/RestCommandLineService.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/806a615d/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 0e81efd..a6fd1a9 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
@@ -1064,8 +1064,11 @@ public class RestCommandLineService {
             RowMapper<AutoscalePolicyBean> rowMapper = new RowMapper<AutoscalePolicyBean>() {
 
                 public String[] getData(AutoscalePolicyBean policy) {
-                    String[] data = new String[1];
+                    String[] data = new String[4];
                     data[0] = policy.getId();
+                    data[1] = String.valueOf(policy.getLoadThresholds().getRequestsInFlight().getThreshold());
+                    data[2] = String.valueOf(policy.getLoadThresholds().getMemoryConsumption().getThreshold());
+                    data[3] = String.valueOf(policy.getLoadThresholds().getLoadAverage().getThreshold());
                     return data;
                 }
             };
@@ -1074,7 +1077,7 @@ public class RestCommandLineService {
             array = list.toArray(array);
 
             System.out.println("Autoscaling policies found:");
-            CliUtils.printTable(array, rowMapper, "ID", "Accessibility");
+            CliUtils.printTable(array, rowMapper, "ID", "Requests In Flight","Memory Consumption","Load Average");
         } catch (Exception e) {
             String message = "Could not list autoscaling policies";
             printError(message, e);


[2/3] stratos git commit: Fixed formatting issues

Posted by im...@apache.org.
Fixed formatting issues


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

Branch: refs/heads/master
Commit: 4db5fcc13b8c61e559c30378320408236f9da1ef
Parents: 806a615
Author: Pubudu Gunatilaka <pu...@gmail.com>
Authored: Tue May 19 11:40:29 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue May 19 15:29:54 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/cli/RestCommandLineService.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/4db5fcc1/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 a6fd1a9..f878e5f 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
@@ -508,11 +508,11 @@ public class RestCommandLineService {
                     + ENDPOINT_ADD_TENANT, jsonString);
 
             int responseCode = response.getStatusLine().getStatusCode();
-            if (responseCode ==201) {
+            if (responseCode == 201) {
                 System.out.println("Tenant added successfully: " + domain);
             } else {
                 String resultString = CliUtils.getHttpResponseString(response);
-                String errorMsg= gson.fromJson(resultString, ResponseMessageBean.class).getMessage();
+                String errorMsg = gson.fromJson(resultString, ResponseMessageBean.class).getMessage();
                 System.out.println(errorMsg);
             }
         } catch (Exception e) {
@@ -1077,7 +1077,7 @@ public class RestCommandLineService {
             array = list.toArray(array);
 
             System.out.println("Autoscaling policies found:");
-            CliUtils.printTable(array, rowMapper, "ID", "Requests In Flight","Memory Consumption","Load Average");
+            CliUtils.printTable(array, rowMapper, "ID", "Requests In Flight", "Memory Consumption", "Load Average");
         } catch (Exception e) {
             String message = "Could not list autoscaling policies";
             printError(message, e);