You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by dinithis <gi...@git.apache.org> on 2015/05/20 15:56:01 UTC

[GitHub] stratos pull request: Fixed issues found when removing a non exist...

GitHub user dinithis opened a pull request:

    https://github.com/apache/stratos/pull/353

    Fixed issues found when removing a non existing cartridge

    Fixed issues found when removing a non existing cartridge

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dinithis/stratos master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/stratos/pull/353.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #353
    
----
commit e414299516c95094fe6e9e25a35ea2d54f39b28e
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T08:05:33Z

    Modified service group into cartridge group

commit fd23b6c37c52d08f78037fa365d7eec526908d6e
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T08:05:51Z

    Merge branch 'master' of https://github.com/apache/stratos

commit 8c395a8dc2cc2e3ebe719cadd509d6dd5c645c63
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T10:00:37Z

    Merge branch 'master' of https://github.com/apache/stratos

commit a9c641a0ee35f1b3317511b7940068890aa3ef94
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T10:02:46Z

    adding a proper response message when trying to deploy a non existing application

commit 858961317b15f6b89273acf871b2d3fd1ae6cc92
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T12:35:48Z

    Merge branch 'master' of https://github.com/apache/stratos

commit de1f661911a11508e03e06a5ecc617fdba65896b
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T12:37:14Z

    Fixed issues found when adding a user with a non existing user role

commit 5757f1e1eb338f760fee2f5337090cea1db75fa9
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T14:04:03Z

    Merge branch 'master' of https://github.com/apache/stratos

commit fd4a79869c5358ebd3b148b89368ba8e755be0c6
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T15:15:51Z

    Merge branch 'master' of https://github.com/apache/stratos

commit 9f6a5afacc6516b2cace0532b00f7aa16dad3432
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T15:19:08Z

    Display correct response message when removing a non existing user

commit f8e622d98ed12e201c77aabb7e36ab4bf694de5f
Author: Dinithi <di...@wso2.com>
Date:   2015-05-19T16:51:13Z

    Merge branch 'master' of https://github.com/apache/stratos

commit 924a8f62577d6e44789da88f5b6713c19beba6b7
Author: Dinithi <di...@wso2.com>
Date:   2015-05-20T03:58:55Z

    Merge branch 'master' of https://github.com/apache/stratos

commit 3e12693a76e1671a04ba85057e2a6b199f552b0d
Author: Dinithi <di...@wso2.com>
Date:   2015-05-20T04:41:49Z

    Fixed issues found when undeploying a non existing application

commit ad2afd0943288ecf65481f1380ce3af142ab77f4
Author: Dinithi <di...@wso2.com>
Date:   2015-05-20T05:35:50Z

    Fixed issues found when deploying a non existing application

commit f132227d5938489074769f4454cc0c65b9457d6d
Author: Dinithi <di...@wso2.com>
Date:   2015-05-20T13:13:43Z

    Merge branch 'master' of https://github.com/apache/stratos

commit 2ca933c68954783e0844e51dacd29ad664a68257
Author: Dinithi <di...@wso2.com>
Date:   2015-05-20T13:53:25Z

    Merge branch 'master' of https://github.com/apache/stratos

commit 04bf4cbb7ed750c5f252b1bc75ef93c23d158ede
Author: Dinithi <di...@wso2.com>
Date:   2015-05-20T13:54:53Z

    Fixed issues found when removing a non existing cartridge

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] stratos pull request: Fixed issues found when removing a non exist...

Posted by lahirus <gi...@git.apache.org>.
Github user lahirus commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/353#discussion_r30725808
  
    --- Diff: components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java ---
    @@ -426,10 +427,21 @@ public Response getCartridgeByFilter(
         @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 (RemoteException e) {
    --- End diff --
    
    Let's not send BAD_REQUEST for Remote exception. We can throw a RestAPIException for that, since it will be an internal server error.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] stratos pull request: Fixed issues found when removing a non exist...

Posted by lahirus <gi...@git.apache.org>.
Github user lahirus commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/353#discussion_r30707196
  
    --- Diff: components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java ---
    @@ -252,10 +251,12 @@ public static void removeCartridge(String cartridgeType) throws RestAPIException
                 if (log.isInfoEnabled()) {
                     log.info(String.format("Successfully removed cartridge: [cartridge-type] %s ", cartridgeType));
                 }
    -        } catch (Exception e) {
    -            String msg = "Could not remove cartridge " + e.getLocalizedMessage();
    -            log.error(msg, e);
    -            throw new RestAPIException(e.getMessage(), e);
    +        } catch (RemoteException e) {
    +            throw new RestAPIException(e.getMessage());
    +        } catch (CloudControllerServiceInvalidCartridgeTypeExceptionException e) {
    --- End diff --
    
    We should not catch the specific exception at Util class. Catch it in API class and send the response code accordingly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] stratos pull request: Fixed issues found when removing a non exist...

Posted by dinithis <gi...@git.apache.org>.
Github user dinithis commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/353#discussion_r30724308
  
    --- Diff: components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java ---
    @@ -252,10 +251,12 @@ public static void removeCartridge(String cartridgeType) throws RestAPIException
                 if (log.isInfoEnabled()) {
                     log.info(String.format("Successfully removed cartridge: [cartridge-type] %s ", cartridgeType));
                 }
    -        } catch (Exception e) {
    -            String msg = "Could not remove cartridge " + e.getLocalizedMessage();
    -            log.error(msg, e);
    -            throw new RestAPIException(e.getMessage(), e);
    +        } catch (RemoteException e) {
    +            throw new RestAPIException(e.getMessage());
    +        } catch (CloudControllerServiceInvalidCartridgeTypeExceptionException e) {
    --- End diff --
    
    I have corrected this with the commit "handling specific exceptions in API class"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] stratos pull request: Fixed issues found when removing a non exist...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/stratos/pull/353


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---