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/01/29 10:57:48 UTC
[1/4] stratos git commit: Added method to remove Application SignUps
and used it when undeploying the application
Repository: stratos
Updated Branches:
refs/heads/master 059b2da3e -> 7a46e4af7
Added method to remove Application SignUps and used it when undeploying the application
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4ae51e3e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4ae51e3e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4ae51e3e
Branch: refs/heads/master
Commit: 4ae51e3e8f3ce8a2d034e5f5d339aeda0e3655e2
Parents: d7e0b4e
Author: Vishanth <vi...@gmail.com>
Authored: Thu Jan 29 12:13:58 2015 +0530
Committer: Vishanth <vi...@gmail.com>
Committed: Thu Jan 29 12:13:58 2015 +0530
----------------------------------------------------------------------
.../services/impl/AutoscalerServiceImpl.java | 25 ++++++++++++++++++++
1 file changed, 25 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/4ae51e3e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 1ce9072..84d0d6a 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -337,6 +337,28 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
}
+ 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());
+ }
+
+ }catch(Exception e){
+ String message = "Could not remove application signup(s)";
+ log.error(message, e);
+ throw new RuntimeException(message, e);
+ }
+ }
+
/**
* Encrypt artifact repository passwords.
* @param applicationSignUp
@@ -429,6 +451,9 @@ public class AutoscalerServiceImpl implements AutoscalerService {
throw new RuntimeException(message);
}
+ // Remove Application SignUp(s) in stratos manager
+ removeApplicationSignUp(application);
+
ApplicationBuilder.handleApplicationUndeployed(applicationId);
ApplicationContext applicationContext = AutoscalerContext.getInstance().getApplicationContext(applicationId);
[3/4] stratos git commit: Handled NPE for remove Application SignUps
Posted by im...@apache.org.
Handled NPE for remove Application SignUps
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/dddfc9b1
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dddfc9b1
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dddfc9b1
Branch: refs/heads/master
Commit: dddfc9b1b54bef5f348866f134afcd95f3772e5e
Parents: dd256fe
Author: Vishanth <vi...@gmail.com>
Authored: Thu Jan 29 13:59:48 2015 +0530
Committer: Vishanth <vi...@gmail.com>
Committed: Thu Jan 29 13:59:48 2015 +0530
----------------------------------------------------------------------
.../autoscaler/services/impl/AutoscalerServiceImpl.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/dddfc9b1/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 84d0d6a..98f4807 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -347,9 +347,13 @@ public class AutoscalerServiceImpl implements AutoscalerService {
StratosManagerServiceClient serviceClient = StratosManagerServiceClient.getInstance();
ApplicationSignUp applicationSignUp[] = serviceClient.getApplicationSignUps(applicationContext.getApplicationId());
- for(ApplicationSignUp appSignUp : applicationSignUp)
- {
- serviceClient.removeApplicationSignUp(appSignUp.getApplicationId(), appSignUp.getTenantId());
+ if ( applicationSignUp != null){
+ for(ApplicationSignUp appSignUp : applicationSignUp)
+ {
+ if ( appSignUp != null) {
+ serviceClient.removeApplicationSignUp(appSignUp.getApplicationId(), appSignUp.getTenantId());
+ }
+ }
}
}catch(Exception e){
[4/4] stratos git commit: This closes #194 on GitHub
Posted by im...@apache.org.
This closes #194 on GitHub
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/7a46e4af
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/7a46e4af
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/7a46e4af
Branch: refs/heads/master
Commit: 7a46e4af7a4e25f655a362bc54ef952112fea8c1
Parents: dddfc9b
Author: Imesh Gunaratne <im...@apache.org>
Authored: Thu Jan 29 14:28:35 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Thu Jan 29 14:28:35 2015 +0530
----------------------------------------------------------------------
----------------------------------------------------------------------
[2/4] stratos git commit: Merge branch 'master' of
github.com:apache/stratos
Posted by im...@apache.org.
Merge branch 'master' of 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/dd256fe7
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dd256fe7
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dd256fe7
Branch: refs/heads/master
Commit: dd256fe72cf4f8cbefccb6299822eccff9d2b6df
Parents: 4ae51e3 059b2da
Author: Vishanth <vi...@gmail.com>
Authored: Thu Jan 29 12:16:34 2015 +0530
Committer: Vishanth <vi...@gmail.com>
Committed: Thu Jan 29 12:16:34 2015 +0530
----------------------------------------------------------------------
.../applications/single-cartridge/artifacts/application.json | 4 ++--
.../iaases/ec2/artifacts/dep_single_group.json | 2 +-
.../iaases/kubernetes/artifacts/deployment-policy.json | 2 +-
.../single-cartridge/iaases/kubernetes/deploy.sh | 8 ++++----
.../single-cartridge/iaases/kubernetes/undeploy.sh | 2 +-
.../iaases/mock/artifacts/deployment-policy.json | 2 +-
.../iaases/openstack/artifacts/dep_single_group.json | 2 +-
.../applications/single-cartridge/iaases/openstack/deploy.sh | 2 +-
samples/cartridges/kubernetes/php.json | 2 +-
9 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------