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 13:26:13 UTC
[1/3] stratos git commit: This closes #340 on GitHub
Repository: stratos
Updated Branches:
refs/heads/master a60cedf50 -> 55cd65292
This closes #340 on GitHub
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/55cd6529
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/55cd6529
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/55cd6529
Branch: refs/heads/master
Commit: 55cd65292c0580f0775a0f24660b76ac203f759d
Parents: 2830f3c
Author: Imesh Gunaratne <im...@apache.org>
Authored: Tue May 19 16:56:07 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue May 19 16:56:07 2015 +0530
----------------------------------------------------------------------
----------------------------------------------------------------------
[2/3] stratos git commit: adding a proper response message when
trying to deploy a non existing application
Posted by im...@apache.org.
adding a proper response message when trying to deploy 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/2830f3c9
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/2830f3c9
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/2830f3c9
Branch: refs/heads/master
Commit: 2830f3c9f97c2f500380f4b429cec4fb2e74f817
Parents: 36c0e12
Author: Dinithi <di...@wso2.com>
Authored: Tue May 19 15:32:46 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue May 19 16:56:07 2015 +0530
----------------------------------------------------------------------
.../org/apache/stratos/rest/endpoint/api/StratosApiV41.java | 7 ++++++-
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/2830f3c9/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 9f977ee..f62c193 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
@@ -800,7 +800,12 @@ public class StratosApiV41 extends AbstractApi {
return Response.status(Response.Status.CONFLICT).entity(new ResponseMessageBean(
ResponseMessageBean.ERROR, "Application policy already deployed")).build();
} catch (RestAPIException e) {
- throw e;
+ if (e.getMessage().contains("Application not found")) {
+ return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
+ ResponseMessageBean.ERROR, e.getMessage())).build();
+ } else {
+ throw e;
+ }
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/2830f3c9/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 4e90a0b..794907b 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
@@ -1622,7 +1622,7 @@ public class StratosApiV41Utils {
ApplicationContext application = autoscalerServiceClient.getApplication(applicationId);
if (application == null) {
- String message = String.format("Application is not found: [application-id] %s", applicationId);
+ String message = String.format("Application not found: [application-id] %s", applicationId);
log.error(message);
throw new RestAPIException(message);
}
[3/3] stratos git commit: Modified service group into cartridge group
Posted by im...@apache.org.
Modified service group into cartridge group
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/36c0e120
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/36c0e120
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/36c0e120
Branch: refs/heads/master
Commit: 36c0e120dbfdb63c5af85da6dbbd7f33126c0e4b
Parents: a60cedf
Author: Dinithi <di...@wso2.com>
Authored: Tue May 19 13:35:33 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue May 19 16:56:07 2015 +0530
----------------------------------------------------------------------
.../org/apache/stratos/autoscaler/util/AutoscalerUtil.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/36c0e120/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index fc3e6a6..8200b3b 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -870,7 +870,8 @@ public class AutoscalerUtil {
for (String splittedStartupOrder : splittedStartupOrders) {
if (!splittedStartupOrder.trim().startsWith("cartridge.") && !splittedStartupOrder.trim().startsWith("group.")) {
// invalid startup order; should prefixed by either 'cartridge.' or 'group.'
- throw new InvalidServiceGroupException("Invalid Service Group: startup order [" + startupOrder + "] for group " + groupName +
+ throw new InvalidServiceGroupException("Invalid cartridge group: startup order [" + startupOrder +
+ "] for group " + groupName +
", should prefixed by either 'cartridge.' or 'group.'");
}
}
@@ -892,7 +893,8 @@ public class AutoscalerUtil {
for (String splittedDependent : splittedDependents) {
if (!splittedDependent.trim().startsWith("cartridge.") && !splittedDependent.trim().startsWith("group.")) {
// invalid startup order; should prefixed by either 'cartridge.' or 'group.'
- throw new InvalidServiceGroupException("Invalid Service Group: Scaling Dependency [" + scalingDependent + "] for group " + groupName +
+ throw new InvalidServiceGroupException("Invalid cartridge group: Scaling Dependency [" +
+ scalingDependent + "] for group " + groupName +
", should prefixed by either 'cartridge.' or 'group.'");
}
}