You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2014/02/18 07:42:16 UTC
[1/3] git commit: check for empty id when deploying policies
Repository: incubator-stratos
Updated Branches:
refs/heads/master 0b2e73689 -> 33c00334b
check for empty id when deploying policies
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/7cc9b9fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/7cc9b9fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/7cc9b9fd
Branch: refs/heads/master
Commit: 7cc9b9fd032c6ac63afff6fc26cc8ad0d4f7e658
Parents: 237c0bb
Author: Udara Liyanage <ud...@wso2.com>
Authored: Mon Feb 17 11:32:39 2014 -0500
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Mon Feb 17 11:32:39 2014 -0500
----------------------------------------------------------------------
.../org/apache/stratos/autoscaler/policy/PolicyManager.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/7cc9b9fd/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/PolicyManager.java
index 3d21996..6f3a6c3 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/policy/PolicyManager.java
@@ -22,9 +22,11 @@ package org.apache.stratos.autoscaler.policy;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.deployment.policy.DeploymentPolicy;
+import org.apache.stratos.autoscaler.exception.AutoScalerException;
import org.apache.stratos.autoscaler.exception.InvalidPartitionException;
import org.apache.stratos.autoscaler.exception.InvalidPolicyException;
import org.apache.stratos.autoscaler.partition.PartitionManager;
@@ -61,6 +63,9 @@ public class PolicyManager {
// Add the policy to information model and persist.
public boolean deployAutoscalePolicy(AutoscalePolicy policy) throws InvalidPolicyException {
+ if(StringUtils.isEmpty(policy.getId())){
+ throw new AutoScalerException("AutoScaling policy id can not be empty");
+ }
this.addASPolicyToInformationModel(policy);
RegistryManager.getInstance().persistAutoscalerPolicy(policy);
if (log.isInfoEnabled()) {
@@ -71,6 +76,9 @@ public class PolicyManager {
// Add the deployment policy to information model and persist.
public boolean deployDeploymentPolicy(DeploymentPolicy policy) throws InvalidPolicyException {
+ if(StringUtils.isEmpty(policy.getId())){
+ throw new AutoScalerException("Deploying policy id can not be empty");
+ }
try {
if(log.isInfoEnabled()) {
log.info(String.format("Deploying deployment policy: [id] %s", policy.getId()));
[3/3] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ud...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/33c00334
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/33c00334
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/33c00334
Branch: refs/heads/master
Commit: 33c00334b8fe0a2ae2d902fe90c39d61f03c0b91
Parents: 4b9f3ec 0b2e736
Author: Udara Liyanage <ud...@wso2.com>
Authored: Tue Feb 18 01:41:59 2014 -0500
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Tue Feb 18 01:41:59 2014 -0500
----------------------------------------------------------------------
.../controller/iaases/OpenstackNovaIaas.java | 23 ++-
.../impl/CloudControllerServiceImpl.java | 169 +++++++++++++------
.../cloud/controller/pojo/ClusterContext.java | 53 ++----
.../stratos/cloud/controller/pojo/Volume.java | 45 ++++-
.../OpenstackNovaPartitionValidator.java | 8 +-
.../main/resources/CloudControllerService.wsdl | 2 +
6 files changed, 203 insertions(+), 97 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ud...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/4b9f3ecb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/4b9f3ecb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/4b9f3ecb
Branch: refs/heads/master
Commit: 4b9f3ecb403ce2642ae7f5964850b2bd89c38e31
Parents: 7cc9b9f 9ae4601
Author: Udara Liyanage <ud...@wso2.com>
Authored: Mon Feb 17 23:43:30 2014 -0500
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Mon Feb 17 23:43:30 2014 -0500
----------------------------------------------------------------------
.../src/main/java/org/apache/stratos/cli/StratosApplication.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------