You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2015/05/21 16:13:44 UTC
[17/23] stratos git commit: Merge branch 'master' of
https://github.com/apache/stratos
Merge branch 'master' of https://github.com/apache/stratos
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/2ac1499e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/2ac1499e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/2ac1499e
Branch: refs/heads/master
Commit: 2ac1499e79716a8f814ef5ebabb94df3733b2dfa
Parents: 04bf4cb 7ee7ecf
Author: Dinithi <di...@wso2.com>
Authored: Wed May 20 22:29:37 2015 +0530
Committer: Dinithi <di...@wso2.com>
Committed: Wed May 20 22:29:37 2015 +0530
----------------------------------------------------------------------
.../src/main/resources/META-INF/component.xml | 51 +--
.../stratos/cli/RestCommandLineService.java | 14 +-
.../src/main/resources/META-INF/component.xml | 73 ++--
.../forms/schema/configure/cartridges.json | 340 ++++---------------
.../console/controllers/menu/menu.json | 156 ++++++++-
.../theme0/partials/applications_form.hbs | 2 +-
.../themes/theme0/partials/configure_form.hbs | 10 +-
.../manager/utils/PermissionConstants.java | 82 ++---
.../stratos/manager/utils/UserRoleCreator.java | 2 +-
.../src/main/resources/META-INF/component.xml | 111 ++----
.../rest/endpoint/api/AuthenticationApi.java | 2 -
.../rest/endpoint/api/StratosApiV41.java | 306 ++++++++---------
.../src/main/webapp/api/WEB-INF/cxf-servlet.xml | 3 +-
.../distribution/src/main/conf/autoscaler.xml | 5 +
tools/stratos-installer/conf/setup.conf | 3 +
tools/stratos-installer/mock_iaas.sh | 62 ++++
tools/stratos-installer/setup.sh | 2 +
.../templates/cloud-controller.xml | 7 +
18 files changed, 578 insertions(+), 653 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/2ac1499e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index bb6585f,647d8d2..b4dbb45
--- 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
@@@ -423,17 -423,13 +423,17 @@@ public class StratosApiV41 extends Abst
@Path("/cartridges/{cartridgeType}")
@Produces("application/json")
@Consumes("application/json")
- @AuthorizationAction("/permission/protected/manage/removeCartridge")
+ @AuthorizationAction("/permission/stratos/cartridges/manage")
public Response removeCartridge(
@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
- StratosApiV41Utils.removeCartridge(cartridgeType);
- return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
- String.format("Cartridge deleted successfully: [cartridge-type] %s", cartridgeType))).build();
-
+ try {
+ StratosApiV41Utils.removeCartridge(cartridgeType);
+ return Response.ok().entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS,
+ String.format("Cartridge deleted successfully: [cartridge-type] %s", cartridgeType))).build();
+ } catch (Exception e) {
+ return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean(
+ ResponseMessageBean.ERROR, e.getMessage())).build();
+ }
}
// API methods for cartridge groups