You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Vishanth <gi...@git.apache.org> on 2015/01/29 07:45:57 UTC

[GitHub] stratos pull request: Added method to remove Application SignUps ....

GitHub user Vishanth opened a pull request:

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

    Added method to remove Application SignUps  ...

    Added method to remove Application SignUps and used it when undeploying the application

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

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

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

    https://github.com/apache/stratos/pull/194.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 #194
    
----
commit 4ae51e3e8f3ce8a2d034e5f5d339aeda0e3655e2
Author: Vishanth <vi...@gmail.com>
Date:   2015-01-29T06:43:58Z

    Added method to remove Application SignUps and used it when undeploying the application

----


---
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: Added method to remove Application SignUps ....

Posted by imesh <gi...@git.apache.org>.
Github user imesh commented on the pull request:

    https://github.com/apache/stratos/pull/194#issuecomment-71997669
  
    Thanks Vishanth! I have now merged this pull request to master branch.


---
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: Added method to remove Application SignUps ....

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

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


---
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: Added method to remove Application SignUps ....

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

    https://github.com/apache/stratos/pull/194#discussion_r23752039
  
    --- Diff: components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java ---
    @@ -337,6 +337,28 @@ private void addApplicationSignUp(ApplicationContext applicationContext, String
             }
         }
     
    +    private void removeApplicationSignUp(ApplicationContext applicationContext){
    +        try {
    +            if (log.isInfoEnabled()) {
    +                log.info(String.format("Removing application signup: [application-id] %s",
    +                        applicationContext.getApplicationId()));
    +            }
    +
    +            StratosManagerServiceClient serviceClient = StratosManagerServiceClient.getInstance();
    +
    +            ApplicationSignUp applicationSignUp[] = serviceClient.getApplicationSignUps(applicationContext.getApplicationId());
    +            for(ApplicationSignUp appSignUp : applicationSignUp)
    +            {
    +                serviceClient.removeApplicationSignUp(appSignUp.getApplicationId(), appSignUp.getTenantId());
    --- End diff --
    
    Since applicationSignUps is an array there could be null elements inside the array. Therefore better to check null for the element before invoking serviceClient.removeApplicationSignUp() method.
    Thanks


---
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: Added method to remove Application SignUps ....

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

    https://github.com/apache/stratos/pull/194#discussion_r23752001
  
    --- Diff: components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java ---
    @@ -337,6 +337,28 @@ private void addApplicationSignUp(ApplicationContext applicationContext, String
             }
         }
     
    +    private void removeApplicationSignUp(ApplicationContext applicationContext){
    +        try {
    +            if (log.isInfoEnabled()) {
    +                log.info(String.format("Removing application signup: [application-id] %s",
    +                        applicationContext.getApplicationId()));
    +            }
    +
    +            StratosManagerServiceClient serviceClient = StratosManagerServiceClient.getInstance();
    +
    +            ApplicationSignUp applicationSignUp[] = serviceClient.getApplicationSignUps(applicationContext.getApplicationId());
    --- End diff --
    
    We might need to check null before executing the for loop.
    Thanks


---
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: Added method to remove Application SignUps ....

Posted by Vishanth <gi...@git.apache.org>.
Github user Vishanth commented on the pull request:

    https://github.com/apache/stratos/pull/194#issuecomment-71985408
  
    @imesh kind reminder to close the PR.


---
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.
---