You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/05/13 19:46:14 UTC
[1/7] stratos git commit: Updating references with
NetworkPartitionRef and PartitionRef
Repository: stratos
Updated Branches:
refs/heads/master 940053f77 -> 977bf9404
Updating references with NetworkPartitionRef and PartitionRef
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/21c4c943
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/21c4c943
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/21c4c943
Branch: refs/heads/master
Commit: 21c4c943153e7a587f25e1430bee4cbeb679c2ad
Parents: 1f1237d
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 14:50:46 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 23:16:03 2015 +0530
----------------------------------------------------------------------
.../context/cluster/ClusterContext.java | 34 ++---
.../partition/ClusterLevelPartitionContext.java | 4 +-
.../context/partition/PartitionContext.java | 10 +-
.../autoscaler/monitor/MonitorFactory.java | 8 +-
.../monitor/component/GroupMonitor.java | 20 +--
.../policy/deployment/DeploymentPolicy.java | 32 ++---
.../services/impl/AutoscalerServiceImpl.java | 16 +--
.../util/AutoscalerObjectConverter.java | 128 ++-----------------
.../stratos/autoscaler/util/AutoscalerUtil.java | 4 +-
9 files changed, 74 insertions(+), 182 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
index 318075d..5d728f4 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
@@ -34,8 +34,8 @@ import org.apache.stratos.autoscaler.util.AutoscalerObjectConverter;
import org.apache.stratos.autoscaler.util.AutoscalerUtil;
import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.apache.stratos.common.client.CloudControllerServiceClient;
-import org.apache.stratos.common.partition.NetworkPartition;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.NetworkPartitionRef;
+import org.apache.stratos.common.partition.PartitionRef;
import org.apache.stratos.messaging.domain.application.Application;
import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
import org.apache.stratos.messaging.domain.instance.ClusterInstance;
@@ -129,10 +129,10 @@ public class ClusterContext extends AbstractClusterContext {
clusterInstance.getNetworkPartitionId());
} else {
- NetworkPartition[] networkPartitions = deploymentPolicy.getNetworkPartitions();
- NetworkPartition networkPartition = null;
+ NetworkPartitionRef[] networkPartitions = deploymentPolicy.getNetworkPartitionRefs();
+ NetworkPartitionRef networkPartition = null;
if (networkPartitions != null && networkPartitions.length != 0) {
- for (NetworkPartition i : networkPartitions) {
+ for (NetworkPartitionRef i : networkPartitions) {
if (i.getId().equals(clusterInstance.getNetworkPartitionId())) {
networkPartition = i;
}
@@ -184,11 +184,11 @@ public class ClusterContext extends AbstractClusterContext {
getDeploymentPolicy(deploymentPolicyName);
- NetworkPartition[] networkPartitions = deploymentPolicy
- .getNetworkPartitions();
- Partition[] partitions = null;
+ NetworkPartitionRef[] networkPartitions = deploymentPolicy
+ .getNetworkPartitionRefs();
+ PartitionRef[] partitions = null;
if (networkPartitions != null && networkPartitions.length != 0) {
- for (NetworkPartition networkPartition : networkPartitions) {
+ for (NetworkPartitionRef networkPartition : networkPartitions) {
if (networkPartition.getId().equals(
clusterLevelNetworkPartitionContext.getId())) {
partitions = networkPartition.getPartitions();
@@ -205,9 +205,9 @@ public class ClusterContext extends AbstractClusterContext {
}
// Retrieving the ChildLevelNetworkPartition and create NP Context
- NetworkPartition networkPartition = null;
+ NetworkPartitionRef networkPartition = null;
if (networkPartitions != null && networkPartitions.length != 0) {
- for (NetworkPartition networkPartition2 : networkPartitions) {
+ for (NetworkPartitionRef networkPartition2 : networkPartitions) {
if (networkPartition2.getId().equals(
clusterInstance.getNetworkPartitionId())) {
networkPartition = networkPartition2;
@@ -217,7 +217,7 @@ public class ClusterContext extends AbstractClusterContext {
// Fill cluster instance context with child level partitions
if (networkPartition != null) {
- for (Partition partition : networkPartition
+ for (PartitionRef partition : networkPartition
.getPartitions()) {
addPartition(clusterInstance, cluster,
clusterLevelNetworkPartitionContext, partition,
@@ -232,7 +232,7 @@ public class ClusterContext extends AbstractClusterContext {
ClusterInstance clusterInstance,
Cluster cluster,
ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext,
- Partition partition,
+ PartitionRef partition,
boolean hasScalingDependents, boolean groupScalingEnabledSubtree)
throws PolicyValidationException, PartitionValidationException {
@@ -290,7 +290,7 @@ public class ClusterContext extends AbstractClusterContext {
}
//Retrieving the actual partition from application
- Partition[] partitions;
+ PartitionRef[] partitions;
try {
partitions = AutoscalerObjectConverter.convertCCPartitionsToPartitions(
@@ -303,9 +303,9 @@ public class ClusterContext extends AbstractClusterContext {
throw new AutoScalerException(msg, e);
}
- Partition partition3 = null;
+ PartitionRef partition3 = null;
if (partitions != null && partitions.length != 0) {
- for (Partition partition2 : partitions) {
+ for (PartitionRef partition2 : partitions) {
if (partition2.getId().equals(partitionId)) {
partition3 = partition2;
}
@@ -345,7 +345,7 @@ public class ClusterContext extends AbstractClusterContext {
private void addMembersFromTopology(Cluster cluster,
- Partition partition,
+ PartitionRef partition,
ClusterLevelPartitionContext clusterLevelPartitionContext,
String ClusterInstanceId) {
for (Member member : cluster.getMembers()) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
index 5a9ddc1..b769163 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
@@ -26,7 +26,7 @@ import org.apache.stratos.autoscaler.util.ConfUtil;
import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
import org.apache.stratos.common.client.CloudControllerServiceClient;
import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.PartitionRef;
import java.io.Serializable;
import java.util.*;
@@ -128,7 +128,7 @@ public class ClusterLevelPartitionContext extends PartitionContext implements Se
}
}
- public ClusterLevelPartitionContext(Partition partition, String networkPartitionId, String deploymentPolicyId) {
+ public ClusterLevelPartitionContext(PartitionRef partition, String networkPartitionId, String deploymentPolicyId) {
super(partition, networkPartitionId, deploymentPolicyId);
this.pendingMembers = new ArrayList<MemberContext>();
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
index 8e3d6c7..93b4591 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.context.partition;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.PartitionRef;
import java.io.Serializable;
import java.util.Properties;
@@ -36,7 +36,7 @@ public abstract class PartitionContext implements Serializable {
private static final long serialVersionUID = -2920388667345980487L;
private static final Log log = LogFactory.getLog(ClusterLevelPartitionContext.class);
protected String partitionId;
- private Partition partition;
+ private PartitionRef partition;
private String deploymentPolicyId;
private String networkPartitionId;
private boolean isObsoletePartition = false;
@@ -48,7 +48,7 @@ public abstract class PartitionContext implements Serializable {
}
- public PartitionContext(Partition partition, String networkPartitionId, String deploymentPolicyId) {
+ public PartitionContext(PartitionRef partition, String networkPartitionId, String deploymentPolicyId) {
this.partition = partition;
this.deploymentPolicyId = deploymentPolicyId;
this.partitionId = partition.getId();
@@ -66,11 +66,11 @@ public abstract class PartitionContext implements Serializable {
this.networkPartitionId = networkPartitionId;
}
- public Partition getPartition() {
+ public PartitionRef getPartition() {
return partition;
}
- public void setPartition(Partition partition) {
+ public void setPartition(PartitionRef partition) {
this.partition = partition;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
index ed026ec..3afd61c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
@@ -37,8 +37,8 @@ import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.util.AutoscalerUtil;
import org.apache.stratos.common.client.CloudControllerServiceClient;
-import org.apache.stratos.common.partition.NetworkPartition;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.NetworkPartitionRef;
+import org.apache.stratos.common.partition.PartitionRef;
import org.apache.stratos.messaging.domain.application.Application;
import org.apache.stratos.messaging.domain.application.Group;
import org.apache.stratos.messaging.domain.application.ScalingDependentList;
@@ -241,8 +241,8 @@ public class MonitorFactory {
throw new RuntimeException(msg, e);
}
- List<Partition> partitionList = new ArrayList<Partition>();
- for (NetworkPartition networkPartition : deploymentPolicy.getNetworkPartitions()) {
+ List<PartitionRef> partitionList = new ArrayList<PartitionRef>();
+ for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
if (networkPartition != null) {
Collections.addAll(partitionList, networkPartition.getPartitions());
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
index 69222ea..2349809 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
@@ -41,8 +41,8 @@ import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
import org.apache.stratos.autoscaler.util.AutoscalerConstants;
import org.apache.stratos.autoscaler.util.AutoscalerUtil;
import org.apache.stratos.autoscaler.util.ServiceReferenceHolder;
-import org.apache.stratos.common.partition.NetworkPartition;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.NetworkPartitionRef;
+import org.apache.stratos.common.partition.PartitionRef;
import org.apache.stratos.common.threading.StratosThreadPool;
import org.apache.stratos.messaging.domain.application.Application;
import org.apache.stratos.messaging.domain.application.ApplicationStatus;
@@ -646,9 +646,9 @@ public class GroupMonitor extends ParentComponentMonitor {
get(networkPartitionId);
} else {
if (deploymentPolicy != null) {
- NetworkPartition[] networkPartitions = deploymentPolicy.getNetworkPartitions();
- NetworkPartition networkPartition = null;
- for (NetworkPartition networkPartition1 : networkPartitions) {
+ NetworkPartitionRef[] networkPartitions = deploymentPolicy.getNetworkPartitionRefs();
+ NetworkPartitionRef networkPartition = null;
+ for (NetworkPartitionRef networkPartition1 : networkPartitions) {
if (networkPartition1.getId().equals(networkPartitionId)) {
networkPartition = networkPartition1;
}
@@ -705,10 +705,10 @@ public class GroupMonitor extends ParentComponentMonitor {
} else {
- NetworkPartition[] networkPartitions = deploymentPolicy.getNetworkPartitions();
- NetworkPartition networkPartition = null;
+ NetworkPartitionRef[] networkPartitions = deploymentPolicy.getNetworkPartitionRefs();
+ NetworkPartitionRef networkPartition = null;
if (networkPartitions != null && networkPartitions.length != 0) {
- for (NetworkPartition i : networkPartitions) {
+ for (NetworkPartitionRef i : networkPartitions) {
if (i.getId().equals(networkPartitionId)) {
networkPartition = i;
}
@@ -717,9 +717,9 @@ public class GroupMonitor extends ParentComponentMonitor {
if (networkPartition != null) {
if (networkPartitionContext.getPartitionCtxts().isEmpty()) {
- Partition[] partitions = networkPartition.getPartitions();
+ PartitionRef[] partitions = networkPartition.getPartitions();
if (partitions != null && partitions.length != 0) {
- for (Partition partition : partitions) {
+ for (PartitionRef partition : partitions) {
if (networkPartitionContext.getPartitionCtxt(partition.getId()) == null) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
index ad539c5..8cc2b5e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
@@ -20,8 +20,8 @@
package org.apache.stratos.autoscaler.pojo.policy.deployment;
-import org.apache.stratos.common.partition.NetworkPartition;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.NetworkPartitionRef;
+import org.apache.stratos.common.partition.PartitionRef;
import java.io.Serializable;
import java.util.Arrays;
@@ -33,7 +33,7 @@ public class DeploymentPolicy implements Serializable {
private static final long serialVersionUID = 5675507196284400099L;
private String deploymentPolicyID;
- private NetworkPartition[] networkPartitions;
+ private NetworkPartitionRef[] networkPartitionRefs;
public String getDeploymentPolicyID() {
return deploymentPolicyID;
@@ -43,23 +43,23 @@ public class DeploymentPolicy implements Serializable {
this.deploymentPolicyID = deploymentPolicyID;
}
- public NetworkPartition[] getNetworkPartitions() {
- return networkPartitions;
+ public NetworkPartitionRef[] getNetworkPartitionRefs() {
+ return networkPartitionRefs;
}
- public void setNetworkPartitions(NetworkPartition[] networkPartitions) {
- this.networkPartitions = networkPartitions;
+ public void setNetworkPartitionRefs(NetworkPartitionRef[] networkPartitionRefs) {
+ this.networkPartitionRefs = networkPartitionRefs;
}
/**
* Get network partition reference object by network partition id.
*
* @param networkPartitionId
- * @return the {@link NetworkPartition}
+ * @return the {@link NetworkPartitionRef}
*/
- public NetworkPartition getNetworkPartitionByNetworkPartitionId(String networkPartitionId) {
- if (networkPartitions != null) {
- for (NetworkPartition networkPartition : networkPartitions) {
+ public NetworkPartitionRef getNetworkPartitionByNetworkPartitionId(String networkPartitionId) {
+ if (networkPartitionRefs != null) {
+ for (NetworkPartitionRef networkPartition : networkPartitionRefs) {
if (networkPartition.getId().equals(networkPartitionId)) {
return networkPartition;
}
@@ -72,11 +72,11 @@ public class DeploymentPolicy implements Serializable {
* Get partition references by network partition id.
*
* @param networkPartitionId
- * @return an array of {@link Partition}
+ * @return an array of {@link PartitionRef}
*/
- public Partition[] getPartitionsByNetworkPartitionId(String networkPartitionId) {
- if (networkPartitions != null) {
- for (NetworkPartition networkPartition : networkPartitions) {
+ public PartitionRef[] getPartitionsByNetworkPartitionId(String networkPartitionId) {
+ if (networkPartitionRefs != null) {
+ for (NetworkPartitionRef networkPartition : networkPartitionRefs) {
if (networkPartition.getId().equals(networkPartitionId)) {
return networkPartition.getPartitions();
}
@@ -87,7 +87,7 @@ public class DeploymentPolicy implements Serializable {
public String toString() {
return String.format("{ deployment-policy-id : %s, network-partitions : %s", deploymentPolicyID,
- Arrays.toString(networkPartitions));
+ Arrays.toString(networkPartitionRefs));
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/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 5ef8e90..9fa1613 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
@@ -55,8 +55,8 @@ import org.apache.stratos.common.Properties;
import org.apache.stratos.common.client.CloudControllerServiceClient;
import org.apache.stratos.common.client.StratosManagerServiceClient;
import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.common.partition.NetworkPartition;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.NetworkPartitionRef;
+import org.apache.stratos.common.partition.PartitionRef;
import org.apache.stratos.common.util.CommonUtil;
import org.apache.stratos.manager.service.stub.domain.application.signup.ApplicationSignUp;
import org.apache.stratos.manager.service.stub.domain.application.signup.ArtifactRepository;
@@ -897,7 +897,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
// deployment policy should contain at least one network partition reference
- if (null == deploymentPolicy.getNetworkPartitions() || deploymentPolicy.getNetworkPartitions().length == 0) {
+ if (null == deploymentPolicy.getNetworkPartitionRefs() || deploymentPolicy.getNetworkPartitionRefs().length == 0) {
String msg = String.format("Invalid deployment policy - [deployment-policy-id] %s. "
+ "Cause -> Deployment policy doesn't have at least one network partition reference",
deploymentPolicy.getDeploymentPolicyID());
@@ -906,7 +906,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
// validate each network partition references
- for (NetworkPartition networkPartition : deploymentPolicy.getNetworkPartitions()) {
+ for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
// network partition id can't be null or empty
if (null == networkPartition.getId() || networkPartition.getId().isEmpty()) {
@@ -998,7 +998,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
//Following if statement checks the relevant clusters for the updated deployment policy
if (deploymentPolicy.getDeploymentPolicyID().equals(clusterMonitor.getDeploymentPolicyId())) {
- for (NetworkPartition networkPartition : deploymentPolicy.getNetworkPartitions()) {
+ for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext
= clusterMonitor.getClusterContext().getNetworkPartitionCtxt(networkPartition.getId());
@@ -1034,7 +1034,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
private void removeOldPartitionsFromClusterMonitor(ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext,
- NetworkPartition networkPartition) {
+ NetworkPartitionRef networkPartition) {
for (InstanceContext instanceContext : clusterLevelNetworkPartitionContext.getInstanceIdToInstanceContextMap().values()) {
@@ -1065,13 +1065,13 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
private void addNewPartitionsToClusterMonitor(ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext,
- NetworkPartition networkPartition, String deploymentPolicyID,
+ NetworkPartitionRef networkPartition, String deploymentPolicyID,
String cartridgeType) throws RemoteException,
CloudControllerServiceInvalidPartitionExceptionException,
CloudControllerServiceInvalidCartridgeTypeExceptionException {
boolean validationOfNetworkPartitionRequired = false;
- for (Partition partition : networkPartition.getPartitions()) {
+ for (PartitionRef partition : networkPartition.getPartitions()) {
//Iterating through instances
for (InstanceContext instanceContext : clusterLevelNetworkPartitionContext.getInstanceIdToInstanceContextMap().values()) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerObjectConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerObjectConverter.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerObjectConverter.java
index 6ebefcf..609d36c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerObjectConverter.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerObjectConverter.java
@@ -21,7 +21,7 @@ package org.apache.stratos.autoscaler.util;
import org.apache.stratos.common.Properties;
import org.apache.stratos.common.Property;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.PartitionRef;
import java.util.ArrayList;
import java.util.List;
@@ -38,11 +38,11 @@ public class AutoscalerObjectConverter {
* @return
*/
public static org.apache.stratos.cloud.controller.stub.domain.Partition[]
- convertPartitionsToCCPartitions(Partition[] partitions) {
+ convertPartitionsToCCPartitions(PartitionRef[] partitions) {
List<org.apache.stratos.cloud.controller.stub.domain.Partition> cloudControllerPartitions
= new ArrayList<org.apache.stratos.cloud.controller.stub.domain.Partition>();
- for (Partition partition : partitions) {
+ for (PartitionRef partition : partitions) {
org.apache.stratos.cloud.controller.stub.domain.Partition cloudControllerPartition = convertPartitionToCCPartition(partition);
cloudControllerPartitions.add(cloudControllerPartition);
}
@@ -57,16 +57,14 @@ public class AutoscalerObjectConverter {
* @return
*/
public static org.apache.stratos.cloud.controller.stub.domain.Partition
- convertPartitionToCCPartition(Partition partition) {
+ convertPartitionToCCPartition(PartitionRef partition) {
org.apache.stratos.cloud.controller.stub.domain.Partition cloudControllerPartition = new
org.apache.stratos.cloud.controller.stub.domain.Partition();
cloudControllerPartition.setId(partition.getId());
- cloudControllerPartition.setProvider(partition.getProvider());
cloudControllerPartition.setDescription(partition.getDescription());
cloudControllerPartition.setKubernetesClusterId(partition.getKubernetesClusterId());
- cloudControllerPartition.setIsPublic(partition.getIsPublic());
cloudControllerPartition.setProperties(AutoscalerUtil.toStubProperties(partition.getProperties()));
return cloudControllerPartition;
@@ -108,132 +106,26 @@ public class AutoscalerObjectConverter {
return properties;
}
- public static Partition[] convertCCPartitionsToPartitions(org.apache.stratos.cloud.controller.stub.domain.Partition[] ccPartitions) {
+ public static PartitionRef[] convertCCPartitionsToPartitions(org.apache.stratos.cloud.controller.stub.domain.Partition[] ccPartitions) {
- List<Partition> partitions = new ArrayList<Partition>();
+ List<PartitionRef> partitions = new ArrayList<PartitionRef>();
for (org.apache.stratos.cloud.controller.stub.domain.Partition ccPartition : ccPartitions) {
- Partition partition = convertCCPartitionToPartition(ccPartition);
+ PartitionRef partition = convertCCPartitionToPartition(ccPartition);
partitions.add(partition);
}
- return partitions.toArray(new Partition[ccPartitions.length]);
+ return partitions.toArray(new PartitionRef[ccPartitions.length]);
}
- public static Partition convertCCPartitionToPartition(org.apache.stratos.cloud.controller.stub.domain.Partition ccPartition) {
+ public static PartitionRef convertCCPartitionToPartition(org.apache.stratos.cloud.controller.stub.domain.Partition ccPartition) {
- Partition partition = new Partition();
+ PartitionRef partition = new PartitionRef();
partition.setId(ccPartition.getId());
- partition.setProvider(ccPartition.getProvider());
partition.setDescription(ccPartition.getDescription());
- partition.setIsPublic(ccPartition.getIsPublic());
partition.setProperties(convertCCPropertiesToProperties(ccPartition.getProperties()));
return partition;
}
-//
-// public static org.apache.stratos.cloud.controller.stub.Properties toStubProperties(
-// org.apache.stratos.common.Properties properties) {
-// org.apache.stratos.cloud.controller.stub.Properties stubProps = new org.apache.stratos.cloud.controller.stub.Properties();
-//
-// if (properties != null && properties.getProperties() != null) {
-// for (org.apache.stratos.common.Property property : properties.getProperties()) {
-// if ((property != null) && (property.getValue() != null)) {
-// org.apache.stratos.cloud.controller.stub.Property newProperty = new org.apache.stratos.cloud.controller.stub.Property();
-// newProperty.setName(property.getName());
-// newProperty.setValue(property.getValue());
-// stubProps.addProperties(newProperty);
-// }
-// }
-//
-// }
-// return stubProps;
-// }
-//
-// public static org.apache.stratos.cloud.controller.stub.Properties toStubProperties(
-// java.util.Properties properties) {
-// org.apache.stratos.cloud.controller.stub.Properties stubProperties = new org.apache.stratos.cloud.controller.stub.Properties();
-// if(properties != null) {
-// for(Map.Entry<Object, Object> entry : properties.entrySet()) {
-// org.apache.stratos.cloud.controller.stub.Property newProperty = new org.apache.stratos.cloud.controller.stub.Property();
-// newProperty.setName(entry.getKey().toString());
-// newProperty.setValue(entry.getValue().toString());
-// stubProperties.addProperties(newProperty);
-// }
-// }
-// return stubProperties;
-// }
-//
-// public static org.apache.stratos.common.Properties toCommonProperties(
-// org.apache.stratos.cloud.controller.stub.Properties properties) {
-// org.apache.stratos.common.Properties commonProps = new org.apache.stratos.common.Properties();
-//
-// if (properties != null && properties.getProperties() != null) {
-//
-// for (org.apache.stratos.cloud.controller.stub.Property property : properties.getProperties()) {
-// if ((property != null) && (property.getValue() != null)) {
-// org.apache.stratos.common.Property newProperty = new org.apache.stratos.common.Property();
-// newProperty.setName(property.getName());
-// newProperty.setValue(property.getValue());
-// commonProps.addProperty(newProperty);
-// }
-// }
-//
-// }
-//
-// return commonProps;
-// }
-//
-// public static org.apache.stratos.common.Properties toCommonProperties(
-// org.apache.stratos.cloud.controller.stub.Property[] propertyArray) {
-//
-// org.apache.stratos.cloud.controller.stub.Properties properties = new org.apache.stratos.cloud.controller.stub.Properties();
-// properties.setProperties(propertyArray);
-// return toCommonProperties(properties);
-// }
-//
-
-// public static NetworkPartition convertNetworkParitionStubToPojo(org.apache.stratos.cloud.controller.stub.domain.NetworkPartition np) {
-//
-// NetworkPartition networkPartition = new NetworkPartition();
-// networkPartition.setId(np.getId());
-// networkPartition.setKubernetesClusterId(np.getKubernetesClusterId());
-// networkPartition.setPartitions(convertPartitionStubToPojo(np.getPartitions()));
-//
-// return networkPartition;
-// }
-
-// private static Partition[] convertPartitionStubToPojo(
-// Partition[] partitions) {
-//
-// List<Partition> partitionList =
-// new ArrayList<Partition>();
-//
-// for (Partition p : partitions) {
-// Partition partition =
-// new Partition();
-// partition.setDescription(p.getDescription());
-// partition.setId(p.getId());
-// partition.setIsPublic(p.getIsPublic());
-// partition.setKubernetesClusterId(p.getKubernetesClusterId());
-// partition.setProperties(convertProperties(p.getProperties()));
-// partition.setProvider(p.getProvider());
-// }
-//
-// return partitionList.toArray(
-// new Partition[partitions.length]);
-// }
-
-// private static Properties convertProperties(
-// org.apache.stratos.cloud.controller.stub.Properties properties) {
-//
-// Properties props = new Properties();
-// Property[] propArray = properties.getProperties();
-// for (Property property : propArray) {
-// props.addProperty(new Property(property.getName(),property.getValue()));
-// }
-//
-// return props;
-// }
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/21c4c943/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index 5968b1b..09a09f2 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -54,7 +54,7 @@ import org.apache.stratos.common.Properties;
import org.apache.stratos.common.Property;
import org.apache.stratos.common.client.CloudControllerServiceClient;
import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.common.partition.NetworkPartition;
+import org.apache.stratos.common.partition.NetworkPartitionRef;
import org.apache.stratos.messaging.domain.application.Application;
import org.apache.stratos.messaging.domain.application.Applications;
import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
@@ -399,7 +399,7 @@ public class AutoscalerUtil {
try {
DeploymentPolicy deploymentPolicy = PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyId);
if (deploymentPolicy != null) {
- for (NetworkPartition networkPartition : deploymentPolicy.getNetworkPartitions()) {
+ for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
if (networkPartition != null) {
if (!networkPartitionIds.contains(networkPartition.getId())) {
networkPartitionIds.add(networkPartition.getId());
[7/7] stratos git commit: Update ObjectConverter with reference
classes
Posted by la...@apache.org.
Update ObjectConverter with reference classes
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/dcab7da1
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/dcab7da1
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/dcab7da1
Branch: refs/heads/master
Commit: dcab7da1b1f61c87bf406952a2d0641520fe3c51
Parents: 21c4c94
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 14:51:56 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 23:16:04 2015 +0530
----------------------------------------------------------------------
.../util/converter/ObjectConverter.java | 44 ++++++++++----------
1 file changed, 23 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/dcab7da1/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
index e3d7b3f..29c4f92 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
@@ -22,6 +22,8 @@ package org.apache.stratos.rest.endpoint.util.converter;
import org.apache.commons.lang.StringUtils;
import org.apache.stratos.autoscaler.stub.deployment.policy.ApplicationPolicy;
import org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy;
+import org.apache.stratos.autoscaler.stub.partition.NetworkPartitionRef;
+import org.apache.stratos.autoscaler.stub.partition.PartitionRef;
import org.apache.stratos.autoscaler.stub.pojo.*;
import org.apache.stratos.autoscaler.stub.pojo.Dependencies;
import org.apache.stratos.autoscaler.stub.pojo.ServiceGroup;
@@ -492,10 +494,10 @@ public class ObjectConverter {
}
private static List<NetworkPartitionBean> convertASStubNetworkPartitionsToNetworkPartitions(
- org.apache.stratos.autoscaler.stub.partition.NetworkPartition[] networkPartitions) {
+ NetworkPartitionRef[] networkPartitions) {
List<NetworkPartitionBean> networkPartitionBeans = new ArrayList<NetworkPartitionBean>();
- for (org.apache.stratos.autoscaler.stub.partition.NetworkPartition networkPartition : networkPartitions) {
+ for (NetworkPartitionRef networkPartition : networkPartitions) {
NetworkPartitionBean networkPartitionBean = new NetworkPartitionBean();
networkPartitionBean.setId(networkPartition.getId());
networkPartitionBean.setPartitionAlgo(networkPartition.getPartitionAlgo());
@@ -659,10 +661,10 @@ public class ObjectConverter {
private static List<PartitionBean> convertASStubPartitionsToPartitions(
- org.apache.stratos.autoscaler.stub.partition.Partition[] partitions) {
+ PartitionRef[] partitions) {
List<PartitionBean> partitionBeans = new ArrayList<PartitionBean>();
- for (org.apache.stratos.autoscaler.stub.partition.Partition partition : partitions) {
+ for (PartitionRef partition : partitions) {
PartitionBean partitionBean = new PartitionBean();
partitionBean.setId(partition.getId());
partitionBean.setPartitionMax(partition.getPartitionMax());
@@ -1764,7 +1766,7 @@ public class ObjectConverter {
DeploymentPolicyBean deploymentPolicyBean = new DeploymentPolicyBean();
deploymentPolicyBean.setId(deploymentPolicy.getDeploymentPolicyID());
deploymentPolicyBean.setNetworkPartitions(convertASStubNetworkPartitionsToNetworkPartitions(
- deploymentPolicy.getNetworkPartitions()));
+ deploymentPolicy.getNetworkPartitionRefs()));
return deploymentPolicyBean;
}
@@ -1801,7 +1803,7 @@ public class ObjectConverter {
deploymentPolicy.setDeploymentPolicyID(deploymentPolicyBean.getId());
if (deploymentPolicyBean.getNetworkPartitions() != null) {
- deploymentPolicy.setNetworkPartitions(convertNetworkPartitionToASStubNetworkPartition(
+ deploymentPolicy.setNetworkPartitionRefs(convertNetworkPartitionToASStubNetworkPartition(
deploymentPolicyBean.getNetworkPartitions()));
}
@@ -1834,15 +1836,15 @@ public class ObjectConverter {
DeploymentPolicyBean deploymentPolicyBean = new DeploymentPolicyBean();
deploymentPolicyBean.setId(deploymentPolicy.getDeploymentPolicyID());
deploymentPolicyBean.setNetworkPartitions(convertASStubNetworkPartitionRefsToNetworkPartitions(
- deploymentPolicy.getNetworkPartitions()));
+ deploymentPolicy.getNetworkPartitionRefs()));
return deploymentPolicyBean;
}
private static List<NetworkPartitionBean> convertASStubNetworkPartitionRefsToNetworkPartitions(
- org.apache.stratos.autoscaler.stub.partition.NetworkPartition[] networkPartitions) {
+ NetworkPartitionRef[] networkPartitions) {
List<NetworkPartitionBean> networkPartitionBeans = new ArrayList<NetworkPartitionBean>();
- for (org.apache.stratos.autoscaler.stub.partition.NetworkPartition networkPartition : networkPartitions) {
+ for (NetworkPartitionRef networkPartition : networkPartitions) {
NetworkPartitionBean networkPartitionBean = new NetworkPartitionBean();
networkPartitionBean.setId(networkPartition.getId());
networkPartitionBean.setPartitionAlgo(networkPartition.getPartitionAlgo());
@@ -1855,10 +1857,10 @@ public class ObjectConverter {
private static List<PartitionBean> convertASStubPartitionRefsToPartitionRefs(
- org.apache.stratos.autoscaler.stub.partition.Partition[] partitions) {
+ PartitionRef[] partitions) {
List<PartitionBean> partitionRefBeans = new ArrayList<PartitionBean>();
- for (org.apache.stratos.autoscaler.stub.partition.Partition partition : partitions) {
+ for (PartitionRef partition : partitions) {
PartitionBean partitionRefBean = new PartitionBean();
partitionRefBean.setId(partition.getId());
partitionRefBean.setPartitionMax(partition.getPartitionMax());
@@ -1868,15 +1870,15 @@ public class ObjectConverter {
return partitionRefBeans;
}
- private static org.apache.stratos.autoscaler.stub.partition.Partition convertPartitionToASStubPartition(
+ private static PartitionRef convertPartitionToASStubPartition(
PartitionBean partition) {
if (partition == null) {
return null;
}
- org.apache.stratos.autoscaler.stub.partition.Partition stubPartition = new
- org.apache.stratos.autoscaler.stub.partition.Partition();
+ PartitionRef stubPartition = new
+ PartitionRef();
stubPartition.setId(partition.getId());
stubPartition.setPartitionMax(partition.getPartitionMax());
@@ -1885,11 +1887,11 @@ public class ObjectConverter {
}
- private static org.apache.stratos.autoscaler.stub.partition.Partition[] convertToASStubPartitions
+ private static PartitionRef[] convertToASStubPartitions
(List<PartitionBean> partitionList) {
- org.apache.stratos.autoscaler.stub.partition.Partition[] partitions
- = new org.apache.stratos.autoscaler.stub.partition.Partition[partitionList.size()];
+ PartitionRef[] partitions
+ = new PartitionRef[partitionList.size()];
for (int i = 0; i < partitionList.size(); i++) {
partitions[i] = convertPartitionToASStubPartition(partitionList.get(i));
}
@@ -1898,13 +1900,13 @@ public class ObjectConverter {
}
- private static org.apache.stratos.autoscaler.stub.partition.NetworkPartition[] convertNetworkPartitionToASStubNetworkPartition(
+ private static NetworkPartitionRef[] convertNetworkPartitionToASStubNetworkPartition(
List<NetworkPartitionBean> networkPartitionBean) {
- org.apache.stratos.autoscaler.stub.partition.NetworkPartition[] networkPartition =
- new org.apache.stratos.autoscaler.stub.partition.NetworkPartition[networkPartitionBean.size()];
+ NetworkPartitionRef[] networkPartition =
+ new NetworkPartitionRef[networkPartitionBean.size()];
for (int i = 0; i < networkPartitionBean.size(); i++) {
- networkPartition[i] = new org.apache.stratos.autoscaler.stub.partition.NetworkPartition();
+ networkPartition[i] = new NetworkPartitionRef();
networkPartition[i].setId(networkPartitionBean.get(i).getId());
networkPartition[i].setPartitionAlgo(networkPartitionBean.get(i).getPartitionAlgo());
networkPartition[i].setPartitions(convertToASStubPartitions(networkPartitionBean.get(i).getPartitions()));
[5/7] stratos git commit: Refactor and update some varibles
Posted by la...@apache.org.
Refactor and update some varibles
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d4d0059b
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d4d0059b
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d4d0059b
Branch: refs/heads/master
Commit: d4d0059b4ae880c1aff216f11ca75b2441b1992c
Parents: d09a909
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 17:13:01 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 23:16:04 2015 +0530
----------------------------------------------------------------------
.../context/cluster/ClusterContext.java | 18 ++++++-------
.../autoscaler/monitor/MonitorFactory.java | 12 ++++-----
.../monitor/component/GroupMonitor.java | 8 +++---
.../policy/deployment/DeploymentPolicy.java | 6 ++---
.../services/impl/AutoscalerServiceImpl.java | 28 ++++++++++----------
5 files changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d4d0059b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
index 5d728f4..100ae23 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
@@ -188,10 +188,10 @@ public class ClusterContext extends AbstractClusterContext {
.getNetworkPartitionRefs();
PartitionRef[] partitions = null;
if (networkPartitions != null && networkPartitions.length != 0) {
- for (NetworkPartitionRef networkPartition : networkPartitions) {
- if (networkPartition.getId().equals(
+ for (NetworkPartitionRef networkPartitionRef : networkPartitions) {
+ if (networkPartitionRef.getId().equals(
clusterLevelNetworkPartitionContext.getId())) {
- partitions = networkPartition.getPartitions();
+ partitions = networkPartitionRef.getPartitionRefs();
}
}
}
@@ -205,22 +205,22 @@ public class ClusterContext extends AbstractClusterContext {
}
// Retrieving the ChildLevelNetworkPartition and create NP Context
- NetworkPartitionRef networkPartition = null;
+ NetworkPartitionRef networkPartitionRef = null;
if (networkPartitions != null && networkPartitions.length != 0) {
for (NetworkPartitionRef networkPartition2 : networkPartitions) {
if (networkPartition2.getId().equals(
clusterInstance.getNetworkPartitionId())) {
- networkPartition = networkPartition2;
+ networkPartitionRef = networkPartition2;
}
}
}
// Fill cluster instance context with child level partitions
- if (networkPartition != null) {
- for (PartitionRef partition : networkPartition
- .getPartitions()) {
+ if (networkPartitionRef != null) {
+ for (PartitionRef partitionRef : networkPartitionRef
+ .getPartitionRefs()) {
addPartition(clusterInstance, cluster,
- clusterLevelNetworkPartitionContext, partition,
+ clusterLevelNetworkPartitionContext, partitionRef,
hasGroupScalingDependent, groupScalingEnabledSubtree);
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d4d0059b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
index 3afd61c..4713403 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
@@ -242,19 +242,19 @@ public class MonitorFactory {
}
List<PartitionRef> partitionList = new ArrayList<PartitionRef>();
- for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
+ for (NetworkPartitionRef networkPartitionRef : deploymentPolicy.getNetworkPartitionRefs()) {
- if (networkPartition != null) {
- Collections.addAll(partitionList, networkPartition.getPartitions());
+ if (networkPartitionRef != null) {
+ Collections.addAll(partitionList, networkPartitionRef.getPartitionRefs());
try {
CloudControllerServiceClient.getInstance().
validateNetworkPartitionOfDeploymentPolicy(serviceName,
- networkPartition.getId());
+ networkPartitionRef.getId());
} catch (Exception e) {
String msg = String.format("Error while validating deployment policy " +
- "from cloud controller [network-partition-id] %s",
- networkPartition.getId());
+ "from cloud controller [network-partition-id] %s",
+ networkPartitionRef.getId());
log.error(msg, e);
throw new RuntimeException(msg, e);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d4d0059b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
index 2349809..c2b88bd 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
@@ -706,18 +706,18 @@ public class GroupMonitor extends ParentComponentMonitor {
} else {
NetworkPartitionRef[] networkPartitions = deploymentPolicy.getNetworkPartitionRefs();
- NetworkPartitionRef networkPartition = null;
+ NetworkPartitionRef networkPartitionRef = null;
if (networkPartitions != null && networkPartitions.length != 0) {
for (NetworkPartitionRef i : networkPartitions) {
if (i.getId().equals(networkPartitionId)) {
- networkPartition = i;
+ networkPartitionRef = i;
}
}
}
- if (networkPartition != null) {
+ if (networkPartitionRef != null) {
if (networkPartitionContext.getPartitionCtxts().isEmpty()) {
- PartitionRef[] partitions = networkPartition.getPartitions();
+ PartitionRef[] partitions = networkPartitionRef.getPartitionRefs();
if (partitions != null && partitions.length != 0) {
for (PartitionRef partition : partitions) {
http://git-wip-us.apache.org/repos/asf/stratos/blob/d4d0059b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
index 8cc2b5e..56d1f15 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
@@ -76,9 +76,9 @@ public class DeploymentPolicy implements Serializable {
*/
public PartitionRef[] getPartitionsByNetworkPartitionId(String networkPartitionId) {
if (networkPartitionRefs != null) {
- for (NetworkPartitionRef networkPartition : networkPartitionRefs) {
- if (networkPartition.getId().equals(networkPartitionId)) {
- return networkPartition.getPartitions();
+ for (NetworkPartitionRef networkPartitionRef : networkPartitionRefs) {
+ if (networkPartitionRef.getId().equals(networkPartitionId)) {
+ return networkPartitionRef.getPartitionRefs();
}
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d4d0059b/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 9fa1613..43dfcb9 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
@@ -906,10 +906,10 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
// validate each network partition references
- for (NetworkPartitionRef networkPartition : deploymentPolicy.getNetworkPartitionRefs()) {
+ for (NetworkPartitionRef networkPartitionRef : deploymentPolicy.getNetworkPartitionRefs()) {
// network partition id can't be null or empty
- if (null == networkPartition.getId() || networkPartition.getId().isEmpty()) {
+ if (null == networkPartitionRef.getId() || networkPartitionRef.getId().isEmpty()) {
String msg = String.format("Invalid deployment policy - [deployment-policy-id] %s. "
+ "Cause -> Invalid network partition id in network partition references section",
deploymentPolicy.getDeploymentPolicyID());
@@ -918,38 +918,38 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
// network partitions should be already added
- if (null == CloudControllerServiceClient.getInstance().getNetworkPartition(networkPartition.getId())) {
+ if (null == CloudControllerServiceClient.getInstance().getNetworkPartition(networkPartitionRef.getId())) {
String msg = String.format("Invalid deployment policy - [deployment-policy-id] %s. "
+ "Cause -> Network partition is not added - [network-partition-id] %s",
- deploymentPolicy.getDeploymentPolicyID(), networkPartition.getId());
+ deploymentPolicy.getDeploymentPolicyID(), networkPartitionRef.getId());
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
// partition algorithm can't be null or empty
- if (null == networkPartition.getPartitionAlgo() || networkPartition.getPartitionAlgo().isEmpty()) {
+ if (null == networkPartitionRef.getPartitionAlgo() || networkPartitionRef.getPartitionAlgo().isEmpty()) {
String msg = String.format("Invalid deployment policy - [deployment-policy-id] %s. "
+ "Cause -> Invalid partition algorithm - [network-partition-id] %s [partition-algo] %s",
- deploymentPolicy.getDeploymentPolicyID(), networkPartition.getId(), networkPartition.getPartitionAlgo());
+ deploymentPolicy.getDeploymentPolicyID(), networkPartitionRef.getId(), networkPartitionRef.getPartitionAlgo());
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
// partition algorithm should be either one-after-another or round-robin
- if (!StratosConstants.PARTITION_ROUND_ROBIN_ALGORITHM_ID.equals(networkPartition.getPartitionAlgo())
- && !StratosConstants.PARTITION_ONE_AFTER_ANOTHER_ALGORITHM_ID.equals(networkPartition.getPartitionAlgo())) {
+ if (!StratosConstants.PARTITION_ROUND_ROBIN_ALGORITHM_ID.equals(networkPartitionRef.getPartitionAlgo())
+ && !StratosConstants.PARTITION_ONE_AFTER_ANOTHER_ALGORITHM_ID.equals(networkPartitionRef.getPartitionAlgo())) {
String msg = String.format("Invalid deployment policy - [deployment-policy-id] %s. "
+ "Cause -> Invalid partition algorithm - [network-partition-id] %s [partition-algo] %s",
- deploymentPolicy.getDeploymentPolicyID(), networkPartition.getId(), networkPartition.getPartitionAlgo());
+ deploymentPolicy.getDeploymentPolicyID(), networkPartitionRef.getId(), networkPartitionRef.getPartitionAlgo());
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
// a network partition reference should contain at least one partition reference
- if (null == networkPartition.getPartitions() || networkPartition.getPartitions().length == 0) {
+ if (null == networkPartitionRef.getPartitionRefs() || networkPartitionRef.getPartitionRefs().length == 0) {
String msg = String.format("Invalid deployment policy - [deployment-policy-id] %s. "
+ "Cause -> Network partition reference doesn't have at lease one partition reference - "
- + "[network-partition-id] %s", deploymentPolicy.getDeploymentPolicyID(), networkPartition.getId());
+ + "[network-partition-id] %s", deploymentPolicy.getDeploymentPolicyID(), networkPartitionRef.getId());
log.error(msg);
throw new InvalidDeploymentPolicyException(msg);
}
@@ -1065,13 +1065,13 @@ public class AutoscalerServiceImpl implements AutoscalerService {
}
private void addNewPartitionsToClusterMonitor(ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext,
- NetworkPartitionRef networkPartition, String deploymentPolicyID,
+ NetworkPartitionRef networkPartitionRef, String deploymentPolicyID,
String cartridgeType) throws RemoteException,
CloudControllerServiceInvalidPartitionExceptionException,
CloudControllerServiceInvalidCartridgeTypeExceptionException {
boolean validationOfNetworkPartitionRequired = false;
- for (PartitionRef partition : networkPartition.getPartitions()) {
+ for (PartitionRef partition : networkPartitionRef.getPartitionRefs()) {
//Iterating through instances
for (InstanceContext instanceContext : clusterLevelNetworkPartitionContext.getInstanceIdToInstanceContextMap().values()) {
@@ -1081,7 +1081,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
//It has found that this partition which is in deployment policy/network partition is new
ClusterLevelPartitionContext clusterLevelPartitionContext = new ClusterLevelPartitionContext(
- partition, networkPartition.getId(), deploymentPolicyID);
+ partition, networkPartitionRef.getId(), deploymentPolicyID);
validationOfNetworkPartitionRequired = true;
clusterInstanceContext.addPartitionCtxt(clusterLevelPartitionContext);
}
[6/7] stratos git commit: Fix the issue of setting real partition to
member context
Posted by la...@apache.org.
Fix the issue of setting real partition to member context
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/977bf940
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/977bf940
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/977bf940
Branch: refs/heads/master
Commit: 977bf9404ebd2107d13cb716fc758adbf9ad3f5a
Parents: d4d0059
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 23:03:57 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 23:16:04 2015 +0530
----------------------------------------------------------------------
.../controller/services/impl/CloudControllerServiceImpl.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/977bf940/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
index 565de47..f83e95f 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -517,7 +517,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
memberContext.setClusterInstanceId(instanceContext.getClusterInstanceId());
memberContext.setNetworkPartitionId(instanceContext.getNetworkPartitionId());
- memberContext.setPartition(instanceContext.getPartition());
+ memberContext.setPartition(cloudControllerContext.getNetworkPartition(instanceContext.getNetworkPartitionId()).
+ getPartition(instanceContext.getPartition().getId()));
memberContext.setInitTime(instanceContext.getInitTime());
memberContext.setProperties(instanceContext.getProperties());
memberContext.setLoadBalancingIPType(loadBalancingIPType);
[3/7] stratos git commit:
s/NetworkPartition.java/NetworkPartitionRef.java and
s/Partition.java/PartitionRef.java for Deployment policy references
Posted by la...@apache.org.
s/NetworkPartition.java/NetworkPartitionRef.java and s/Partition.java/PartitionRef.java for Deployment policy references
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/6457e891
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/6457e891
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/6457e891
Branch: refs/heads/master
Commit: 6457e891fcf1fc5886b33529acee55ac791ba7fd
Parents: 940053f
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 12:20:48 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 23:16:03 2015 +0530
----------------------------------------------------------------------
.../common/partition/NetworkPartition.java | 102 -------------
.../common/partition/NetworkPartitionRef.java | 93 ++++++++++++
.../stratos/common/partition/Partition.java | 151 -------------------
.../stratos/common/partition/PartitionRef.java | 124 +++++++++++++++
4 files changed, 217 insertions(+), 253 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/6457e891/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartition.java
deleted file mode 100644
index b42b4bb..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartition.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-package org.apache.stratos.common.partition;
-
-import java.io.Serializable;
-import java.util.Arrays;
-
-/**
- * The model class for NetworkPartition definition.
- */
-public class NetworkPartition implements Serializable {
-
- private static final long serialVersionUID = -8043298009352097370L;
-
- private String id;
- private String provider;
- private boolean activeByDefault;
- private Partition[] partitions;
- private String partitionAlgo;
-
- public void setPartitions(Partition[] partitions) {
- if (partitions == null) {
- this.partitions = partitions;
- } else {
- this.partitions = Arrays.copyOf(partitions, partitions.length);
- }
- }
-
- /**
- * Gets the value of the partitions.
- */
- public Partition[] getPartitions() {
- if (partitions == null) {
- partitions = new Partition[0];
- }
- return this.partitions;
- }
-
- /**
- * Gets the value of the id.
- */
- public String getId() {
- return id;
- }
-
- /**
- * sets the value of the id.
- */
- public void setId(String id) {
- this.id = id;
- }
-
- public boolean isActiveByDefault() {
- return activeByDefault;
- }
-
- public void setActiveByDefault(boolean activeByDefault) {
- this.activeByDefault = activeByDefault;
- }
-
- public Partition getPartition(String partitionId) {
- for (Partition partition : partitions) {
- if (partition.getId().equals(partitionId)) {
- return partition;
- }
- }
- return null;
- }
-
- public String getProvider() {
- return provider;
- }
-
- public void setProvider(String provider) {
- this.provider = provider;
- }
-
- public String getPartitionAlgo() {
- return partitionAlgo;
- }
-
- public void setPartitionAlgo(String partitionAlgo) {
- this.partitionAlgo = partitionAlgo;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/6457e891/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
new file mode 100644
index 0000000..c24e8bb
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
@@ -0,0 +1,93 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.stratos.common.partition;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+/**
+ * The model class for NetworkPartition information passed in deployment policy.
+ */
+public class NetworkPartitionRef implements Serializable {
+
+ private static final long serialVersionUID = -8043298009352097370L;
+
+ private String id;
+ private String provider;
+ private PartitionRef[] partitions;
+ private String partitionAlgo;
+
+ public void setPartitions(PartitionRef[] partitions) {
+ if (partitions == null) {
+ this.partitions = partitions;
+ } else {
+ this.partitions = Arrays.copyOf(partitions, partitions.length);
+ }
+ }
+
+ /**
+ * Gets the value of the partitions.
+ */
+ public PartitionRef[] getPartitions() {
+ if (partitions == null) {
+ partitions = new PartitionRef[0];
+ }
+ return this.partitions;
+ }
+
+ /**
+ * Gets the value of the id.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * sets the value of the id.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public PartitionRef getPartition(String partitionId) {
+ for (PartitionRef partition : partitions) {
+ if (partition.getId().equals(partitionId)) {
+ return partition;
+ }
+ }
+ return null;
+ }
+
+ public String getProvider() {
+ return provider;
+ }
+
+ public void setProvider(String provider) {
+ this.provider = provider;
+ }
+
+ public String getPartitionAlgo() {
+ return partitionAlgo;
+ }
+
+ public void setPartitionAlgo(String partitionAlgo) {
+ this.partitionAlgo = partitionAlgo;
+ }
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/6457e891/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/Partition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/Partition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/Partition.java
deleted file mode 100644
index 110fdad..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/Partition.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.common.partition;
-
-import org.apache.stratos.common.Properties;
-import org.apache.stratos.common.Property;
-
-import java.io.Serializable;
-
-/**
- * This is keep the partition information
- */
-public class Partition implements Serializable {
-
- private static final long serialVersionUID = 3725971287992010720L;
-
- private static final String KUBERNETES_CLUSTER = "cluster";
-
- /**
- * provider should match with an IaasProvider type.
- */
- private String provider;
- private String id;
- private String description;
- private boolean isPublic;
- private int partitionMax;
- private Properties properties = new Properties();
-
- /**
- * Gets the value of the id property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getId() {
- return id;
- }
-
- /**
- * Sets the value of the id property.
- *
- * @param id allowed object is
- * {@link String }
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * Gets the value of the description property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the value of the description property.
- *
- * @param description allowed object is
- * {@link String }
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * Sets the value of the isPublic property.
- *
- * @param isPublic allowed object is boolean
- */
- public void setIsPublic(boolean isPublic) {
- this.isPublic = isPublic;
- }
-
- /**
- * Gets the value of the isPublic property.
- */
- public boolean getIsPublic() {
- return isPublic;
- }
-
- public Properties getProperties() {
- return properties;
- }
-
- public void setProperties(Properties properties) {
- this.properties = properties;
- }
-
- public String getProvider() {
- return provider;
- }
-
- public void setProvider(String provider) {
- this.provider = provider;
- }
-
- public String getKubernetesClusterId() {
- Property property = properties.getProperty(KUBERNETES_CLUSTER);
- if (property != null) {
- return property.getValue();
- }
- return null;
- }
-
- @Override
- public String toString() {
- return "Partition [id=" + id + ", description=" + description + ", isPublic=" + isPublic
- + ", provider=" + provider + ", properties=" + properties + "]";
- }
-
- public boolean equals(Object obj) {
- if (obj != null && obj instanceof Partition) {
- return this.id.equals(((Partition) obj).getId());
- }
- return false;
-
- }
-
- @Override
- public int hashCode() {
- return this.id.hashCode();
- }
-
- public int getPartitionMax() {
- return partitionMax;
- }
-
- public void setPartitionMax(int partitionMax) {
- this.partitionMax = partitionMax;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/6457e891/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/PartitionRef.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/PartitionRef.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/PartitionRef.java
new file mode 100644
index 0000000..249cc2c
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/PartitionRef.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.common.partition;
+
+import org.apache.stratos.common.Properties;
+import org.apache.stratos.common.Property;
+
+import java.io.Serializable;
+
+/**
+ * This is keep the partition information passed in deployment policy
+ */
+public class PartitionRef implements Serializable {
+
+ private static final long serialVersionUID = 3725971287992010720L;
+
+ private static final String KUBERNETES_CLUSTER = "cluster";
+
+ /**
+ * provider should match with an IaasProvider type.
+ */
+ private String id;
+ private String description;
+ private int partitionMax;
+ private Properties properties = new Properties();
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return possible object is
+ * {@link String }
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ * @param id allowed object is
+ * {@link String }
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return possible object is
+ * {@link String }
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param description allowed object is
+ * {@link String }
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Properties getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Properties properties) {
+ this.properties = properties;
+ }
+
+ public String getKubernetesClusterId() {
+ Property property = properties.getProperty(KUBERNETES_CLUSTER);
+ if (property != null) {
+ return property.getValue();
+ }
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ return "Partition [id=" + id + ", description=" + description + ", properties=" + properties + "]";
+ }
+
+ public boolean equals(Object obj) {
+ if (obj != null && obj instanceof PartitionRef) {
+ return this.id.equals(((PartitionRef) obj).getId());
+ }
+ return false;
+
+ }
+
+ @Override
+ public int hashCode() {
+ return this.id.hashCode();
+ }
+
+ public int getPartitionMax() {
+ return partitionMax;
+ }
+
+ public void setPartitionMax(int partitionMax) {
+ this.partitionMax = partitionMax;
+ }
+}
[2/7] stratos git commit: Updating client and wsdl with
NetworkPartitionRef and PartitionRef
Posted by la...@apache.org.
Updating client and wsdl with NetworkPartitionRef and PartitionRef
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/1f1237d9
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/1f1237d9
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/1f1237d9
Branch: refs/heads/master
Commit: 1f1237d9c98a2afa32b0dd7b3b7aca7ab339488f
Parents: 6457e89
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 14:50:21 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 23:16:03 2015 +0530
----------------------------------------------------------------------
.../client/CloudControllerClient.java | 4 +-
.../src/main/resources/AutoscalerService.wsdl | 493 +++++++++----------
2 files changed, 247 insertions(+), 250 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f1237d9/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
index 0030b31..478f5ed 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
@@ -37,7 +37,7 @@ import org.apache.stratos.cloud.controller.stub.domain.Volume;
import org.apache.stratos.common.Properties;
import org.apache.stratos.common.Property;
import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.common.partition.Partition;
+import org.apache.stratos.common.partition.PartitionRef;
import java.rmi.RemoteException;
import java.util.ArrayList;
@@ -81,7 +81,7 @@ public class CloudControllerClient {
}
}
- public synchronized MemberContext startInstance(Partition partition,
+ public synchronized MemberContext startInstance(PartitionRef partition,
String clusterId, String clusterInstanceId,
String networkPartitionId, boolean isPrimary,
int minMemberCount) throws SpawningException {
http://git-wip-us.apache.org/repos/asf/stratos/blob/1f1237d9/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
index 870f7a7..6df34ae 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://rmi.java/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax25="http://common.stratos.apache.org/xsd" xmlns:ax23="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://partition.common.stratos.apache.org/xsd" xmlns:ax21="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax215="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax223="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://io.java/xsd" xmlns:http="http:/
/schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://rmi.java/xsd" xmlns:ax28="http://io.java/xsd" xmlns:ax23="http://common.stratos.apache.org/xsd" xmlns:ax21="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax22="http://partition.common.stratos.apache.org/xsd" xmlns:ax218="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax224="http://pojo.applications.au
toscaler.stratos.apache.org/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
<wsdl:types>
- <xs:schema xmlns:ax211="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
+ <xs:schema xmlns:ax29="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
<xs:import namespace="http://io.java/xsd"/>
<xs:complexType name="RemoteException">
<xs:complexContent>
- <xs:extension base="ax210:IOException">
+ <xs:extension base="ax29:IOException">
<xs:sequence>
<xs:element minOccurs="0" name="cause" nillable="true" type="xs:anyType"/>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -21,7 +21,7 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
<xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
- <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax21:LoadThresholds"/>
+ <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax218:LoadThresholds"/>
<xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
@@ -33,17 +33,17 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax221="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax225="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="ApplicationContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="components" nillable="true" type="ax220:ComponentContext"/>
+ <xs:element minOccurs="0" name="components" nillable="true" type="ax224:ComponentContext"/>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantAdminUsername" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
@@ -52,10 +52,10 @@
</xs:complexType>
<xs:complexType name="ComponentContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax220:ApplicationClusterContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax220:CartridgeContext"/>
- <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax220:DependencyContext"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax220:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax224:ApplicationClusterContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax224:CartridgeContext"/>
+ <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax224:DependencyContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax224:GroupContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationClusterContext">
@@ -66,8 +66,8 @@
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyClusterIds" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax220:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax224:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
<xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
</xs:sequence>
@@ -75,7 +75,7 @@
<xs:complexType name="PersistenceContext">
<xs:sequence>
<xs:element minOccurs="0" name="persistenceRequired" type="xs:boolean"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax220:VolumeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax224:VolumeContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VolumeContext">
@@ -94,21 +94,21 @@
<xs:sequence>
<xs:element minOccurs="0" name="cartridgeMax" type="xs:int"/>
<xs:element minOccurs="0" name="cartridgeMin" type="xs:int"/>
- <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax220:SubscribableInfoContext"/>
+ <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax224:SubscribableInfoContext"/>
<xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SubscribableInfoContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax220:ArtifactRepositoryContext"/>
+ <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax224:ArtifactRepositoryContext"/>
<xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
<xs:element minOccurs="0" name="minMembers" type="xs:int"/>
- <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax220:PersistenceContext"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax224:PersistenceContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArtifactRepositoryContext">
@@ -130,9 +130,9 @@
<xs:complexType name="GroupContext">
<xs:sequence>
<xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax220:CartridgeContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax224:CartridgeContext"/>
<xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax220:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax224:GroupContext"/>
<xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
<xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
@@ -143,8 +143,8 @@
<xs:complexType name="ServiceGroup">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax223:Dependencies"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax223:ServiceGroup"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax222:Dependencies"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax222:ServiceGroup"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
@@ -156,44 +156,16 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax28="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://rmi.java/xsd" xmlns:ax222="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax224="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
- <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:schema xmlns:ax26="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax212="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://rmi.java/xsd" xmlns:ax226="http://pojo.applications.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
<xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://rmi.java/xsd"/>
<xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
- <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:element name="getAutoscalingPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getAutoscalingPolicyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax21:AutoscalePolicy"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDeploymentPolicy">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getDeploymentPolicyResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
<xs:element name="getDeploymentPolicies">
<xs:complexType>
<xs:sequence/>
@@ -202,49 +174,49 @@
<xs:element name="getDeploymentPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceRemoteException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax29:RemoteException"/>
+ <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax27:RemoteException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceInvalidDeploymentPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax214:InvalidDeploymentPolicyException"/>
+ <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax212:InvalidDeploymentPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceDeploymentPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax214:DeploymentPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax212:DeploymentPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceInvalidPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax214:InvalidPolicyException"/>
+ <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax212:InvalidPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AutoscalerServiceCloudControllerConnectionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax216:CloudControllerConnectionException"/>
+ <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax214:CloudControllerConnectionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -258,14 +230,14 @@
<xs:element name="AutoscalerServiceInvalidApplicationPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax217:InvalidApplicationPolicyException"/>
+ <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax216:InvalidApplicationPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax28:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -293,14 +265,14 @@
<xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax214:ApplicatioinPolicyNotExistsException"/>
+ <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax212:ApplicatioinPolicyNotExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="updateApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax28:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -319,415 +291,443 @@
<xs:element name="getApplicationPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:ApplicationPolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplications">
+ <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax214:AutoScalingPolicyAlreadyExistException"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationsResponse">
+ <xs:element name="addAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax220:ApplicationContext"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax219:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplication">
+ <xs:element name="addAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationResponse">
+ <xs:element name="getAutoScalingPolicies">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAutoScalingPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax220:ApplicationContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax219:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="serviceGroupExist">
+ <xs:element name="updateAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax219:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="serviceGroupExistResponse">
+ <xs:element name="updateAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceAutoScalerException">
+ <xs:element name="AutoscalerServiceUnremovablePolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax216:AutoScalerException"/>
+ <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax212:UnremovablePolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroups">
+ <xs:element name="AutoscalerServicePolicyDoesNotExistException">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax212:PolicyDoesNotExistException"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupsResponse">
+ <xs:element name="removeAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax223:ServiceGroup"/>
+ <xs:element minOccurs="0" name="autoscalePolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceCartridgeGroupNotFoundException">
+ <xs:element name="removeAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax216:CartridgeGroupNotFoundException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroup">
+ <xs:element name="existApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeServiceGroupResponse">
+ <xs:element name="existApplicationResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicy">
+ <xs:element name="AutoscalerServiceApplicationDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax216:ApplicationDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationPolicyResponse">
+ <xs:element name="deployApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax28:ApplicationPolicy"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceApplicationDefinitionException">
+ <xs:element name="deployApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax217:ApplicationDefinitionException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplication">
+ <xs:element name="undeployApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax220:ApplicationContext"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="force" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addApplicationResponse">
+ <xs:element name="undeployApplicationResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroup">
+ <xs:element name="AutoscalerServiceInvalidArgumentException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax214:InvalidArgumentException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="updateClusterMonitor">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax223:ServiceGroup"/>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateApplication">
+ <xs:element name="updateClusterMonitorResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax220:ApplicationContext"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateApplicationResponse">
+ <xs:element name="AutoscalerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax216:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deleteApplication">
+ <xs:element name="addServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax222:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deleteApplicationResponse">
+ <xs:element name="addServiceGroupResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
+ <xs:element name="findClusterId">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax216:AutoScalingPolicyAlreadyExistException"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicy">
+ <xs:element name="findClusterIdResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicyResponse">
+ <xs:element name="AutoscalerServiceAutoScalerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax214:AutoScalerException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoScalingPolicies">
+ <xs:element name="getApplicationNetworkPartitions">
<xs:complexType>
- <xs:sequence/>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoScalingPoliciesResponse">
+ <xs:element name="getApplicationNetworkPartitionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:AutoscalePolicy"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicy">
+ <xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
+ <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax212:DeploymentPolicyAlreadyExistsException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicyResponse">
+ <xs:element name="addDeployementPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceUnremovablePolicyException">
+ <xs:element name="addDeployementPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax214:UnremovablePolicyException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServicePolicyDoesNotExistException">
+ <xs:element name="removeDeployementPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax214:PolicyDoesNotExistException"/>
+ <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeAutoScalingPolicy">
+ <xs:element name="removeDeployementPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeAutoScalingPolicyResponse">
+ <xs:element name="undeployServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="existApplication">
+ <xs:element name="undeployServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="existApplicationResponse">
+ <xs:element name="getApplications">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getApplicationsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax224:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deployApplication">
+ <xs:element name="addApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax224:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deployApplicationResponse">
+ <xs:element name="addApplicationResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployApplication">
+ <xs:element name="getApplication">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="force" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployApplicationResponse">
+ <xs:element name="getApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax224:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidArgumentException">
+ <xs:element name="updateApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax216:InvalidArgumentException"/>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax224:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterMonitor">
+ <xs:element name="updateApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterMonitorResponse">
+ <xs:element name="deleteApplication">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceInvalidServiceGroupException">
+ <xs:element name="deleteApplicationResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax217:InvalidServiceGroupException"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroup">
+ <xs:element name="serviceGroupExist">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax223:ServiceGroup"/>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addServiceGroupResponse">
+ <xs:element name="serviceGroupExistResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="findClusterId">
+ <xs:element name="getServiceGroups">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getServiceGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax222:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="findClusterIdResponse">
+ <xs:element name="AutoscalerServiceCartridgeGroupNotFoundException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax214:CartridgeGroupNotFoundException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationNetworkPartitions">
+ <xs:element name="removeServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getApplicationNetworkPartitionsResponse">
+ <xs:element name="removeServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException">
+ <xs:element name="getApplicationPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax214:DeploymentPolicyAlreadyExistsException"/>
+ <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addDeployementPolicy">
+ <xs:element name="getApplicationPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addDeployementPolicyResponse">
+ <xs:element name="getServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeDeployementPolicy">
+ <xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax222:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeDeployementPolicyResponse">
+ <xs:element name="getAutoscalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployServiceGroup">
+ <xs:element name="getAutoscalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax219:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployServiceGroupResponse">
+ <xs:element name="getDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getDeploymentPolicyResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax26:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema xmlns:ax27="http://partition.common.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax25="http://partition.common.stratos.apache.org/xsd" xmlns:ax217="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
<xs:complexType name="DeploymentPolicy">
<xs:sequence>
<xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="ax27:NetworkPartition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax25:NetworkPartitionRef"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ApplicationPolicy">
@@ -736,30 +736,27 @@
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax26="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax24="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
<xs:import namespace="http://common.stratos.apache.org/xsd"/>
- <xs:complexType name="NetworkPartition">
+ <xs:complexType name="NetworkPartitionRef">
<xs:sequence>
- <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax24:Partition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax22:PartitionRef"/>
<xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Partition">
+ <xs:complexType name="PartitionRef">
<xs:sequence>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
<xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="partitionMax" type="xs:int"/>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
- <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
@@ -783,7 +780,7 @@
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
<xs:complexType name="Properties">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax23:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
@@ -793,7 +790,7 @@
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax225="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
+ <xs:schema xmlns:ax220="http://exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
<xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
<xs:complexType name="InvalidDeploymentPolicyException">
<xs:sequence/>
@@ -813,14 +810,14 @@
</xs:complexType>
<xs:complexType name="UnremovablePolicyException">
<xs:complexContent>
- <xs:extension base="ax215:AutoScalerException">
+ <xs:extension base="ax220:AutoScalerException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="PolicyDoesNotExistException">
<xs:complexContent>
- <xs:extension base="ax215:AutoScalerException">
+ <xs:extension base="ax220:AutoScalerException">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
@@ -838,6 +835,9 @@
<xs:complexType name="CloudControllerConnectionException">
<xs:sequence/>
</xs:complexType>
+ <xs:complexType name="AutoScalingPolicyAlreadyExistException">
+ <xs:sequence/>
+ </xs:complexType>
<xs:complexType name="AutoScalerException">
<xs:complexContent>
<xs:extension base="xs:RuntimeException">
@@ -845,17 +845,14 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="CartridgeGroupNotFoundException">
- <xs:sequence/>
- </xs:complexType>
- <xs:complexType name="AutoScalingPolicyAlreadyExistException">
- <xs:sequence/>
- </xs:complexType>
<xs:complexType name="InvalidArgumentException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="CartridgeGroupNotFoundException">
+ <xs:sequence/>
+ </xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="removeAutoScalingPolicyRequest">
@@ -987,18 +984,18 @@
<wsdl:message name="existApplicationResponse">
<wsdl:part name="parameters" element="ns:existApplicationResponse"/>
</wsdl:message>
- <wsdl:message name="deleteApplicationRequest">
- <wsdl:part name="parameters" element="ns:deleteApplication"/>
- </wsdl:message>
- <wsdl:message name="deleteApplicationResponse">
- <wsdl:part name="parameters" element="ns:deleteApplicationResponse"/>
- </wsdl:message>
<wsdl:message name="getServiceGroupRequest">
<wsdl:part name="parameters" element="ns:getServiceGroup"/>
</wsdl:message>
<wsdl:message name="getServiceGroupResponse">
<wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
</wsdl:message>
+ <wsdl:message name="deleteApplicationRequest">
+ <wsdl:part name="parameters" element="ns:deleteApplication"/>
+ </wsdl:message>
+ <wsdl:message name="deleteApplicationResponse">
+ <wsdl:part name="parameters" element="ns:deleteApplicationResponse"/>
+ </wsdl:message>
<wsdl:message name="undeployServiceGroupRequest">
<wsdl:part name="parameters" element="ns:undeployServiceGroup"/>
</wsdl:message>
@@ -1086,18 +1083,18 @@
<wsdl:message name="AutoscalerServiceCartridgeGroupNotFoundException">
<wsdl:part name="parameters" element="ns:AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:message>
- <wsdl:message name="updateApplicationRequest">
- <wsdl:part name="parameters" element="ns:updateApplication"/>
- </wsdl:message>
- <wsdl:message name="updateApplicationResponse">
- <wsdl:part name="parameters" element="ns:updateApplicationResponse"/>
- </wsdl:message>
<wsdl:message name="getApplicationPolicyRequest">
<wsdl:part name="parameters" element="ns:getApplicationPolicy"/>
</wsdl:message>
<wsdl:message name="getApplicationPolicyResponse">
<wsdl:part name="parameters" element="ns:getApplicationPolicyResponse"/>
</wsdl:message>
+ <wsdl:message name="updateApplicationRequest">
+ <wsdl:part name="parameters" element="ns:updateApplication"/>
+ </wsdl:message>
+ <wsdl:message name="updateApplicationResponse">
+ <wsdl:part name="parameters" element="ns:updateApplicationResponse"/>
+ </wsdl:message>
<wsdl:portType name="AutoscalerServicePortType">
<wsdl:operation name="removeAutoScalingPolicy">
<wsdl:input message="ns:removeAutoScalingPolicyRequest" wsaw:Action="urn:removeAutoScalingPolicy"/>
@@ -1178,14 +1175,14 @@
<wsdl:input message="ns:existApplicationRequest" wsaw:Action="urn:existApplication"/>
<wsdl:output message="ns:existApplicationResponse" wsaw:Action="urn:existApplicationResponse"/>
</wsdl:operation>
- <wsdl:operation name="deleteApplication">
- <wsdl:input message="ns:deleteApplicationRequest" wsaw:Action="urn:deleteApplication"/>
- <wsdl:output message="ns:deleteApplicationResponse" wsaw:Action="urn:deleteApplicationResponse"/>
- </wsdl:operation>
<wsdl:operation name="getServiceGroup">
<wsdl:input message="ns:getServiceGroupRequest" wsaw:Action="urn:getServiceGroup"/>
<wsdl:output message="ns:getServiceGroupResponse" wsaw:Action="urn:getServiceGroupResponse"/>
</wsdl:operation>
+ <wsdl:operation name="deleteApplication">
+ <wsdl:input message="ns:deleteApplicationRequest" wsaw:Action="urn:deleteApplication"/>
+ <wsdl:output message="ns:deleteApplicationResponse" wsaw:Action="urn:deleteApplicationResponse"/>
+ </wsdl:operation>
<wsdl:operation name="undeployServiceGroup">
<wsdl:input message="ns:undeployServiceGroupRequest" wsaw:Action="urn:undeployServiceGroup"/>
<wsdl:output message="ns:undeployServiceGroupResponse" wsaw:Action="urn:undeployServiceGroupResponse"/>
@@ -1246,15 +1243,15 @@
<wsdl:output message="ns:removeServiceGroupResponse" wsaw:Action="urn:removeServiceGroupResponse"/>
<wsdl:fault message="ns:AutoscalerServiceCartridgeGroupNotFoundException" name="AutoscalerServiceCartridgeGroupNotFoundException" wsaw:Action="urn:removeServiceGroupAutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:operation>
+ <wsdl:operation name="getApplicationPolicy">
+ <wsdl:input message="ns:getApplicationPolicyRequest" wsaw:Action="urn:getApplicationPolicy"/>
+ <wsdl:output message="ns:getApplicationPolicyResponse" wsaw:Action="urn:getApplicationPolicyResponse"/>
+ </wsdl:operation>
<wsdl:operation name="updateApplication">
<wsdl:input message="ns:updateApplicationRequest" wsaw:Action="urn:updateApplication"/>
<wsdl:output message="ns:updateApplicationResponse" wsaw:Action="urn:updateApplicationResponse"/>
<wsdl:fault message="ns:AutoscalerServiceApplicationDefinitionException" name="AutoscalerServiceApplicationDefinitionException" wsaw:Action="urn:updateApplicationAutoscalerServiceApplicationDefinitionException"/>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <wsdl:input message="ns:getApplicationPolicyRequest" wsaw:Action="urn:getApplicationPolicy"/>
- <wsdl:output message="ns:getApplicationPolicyResponse" wsaw:Action="urn:getApplicationPolicyResponse"/>
- </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AutoscalerServiceSoap11Binding" type="ns:AutoscalerServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -1447,8 +1444,8 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getServiceGroup">
- <soap:operation soapAction="urn:getServiceGroup" style="document"/>
+ <wsdl:operation name="deleteApplication">
+ <soap:operation soapAction="urn:deleteApplication" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
@@ -1456,8 +1453,8 @@
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="deleteApplication">
- <soap:operation soapAction="urn:deleteApplication" style="document"/>
+ <wsdl:operation name="getServiceGroup">
+ <soap:operation soapAction="urn:getServiceGroup" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
@@ -1609,26 +1606,26 @@
<soap:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
+ <wsdl:operation name="updateApplication">
+ <soap:operation soapAction="urn:updateApplication" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
+ <wsdl:fault name="AutoscalerServiceApplicationDefinitionException">
+ <soap:fault use="literal" name="AutoscalerServiceApplicationDefinitionException"/>
+ </wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="updateApplication">
- <soap:operation soapAction="urn:updateApplication" style="document"/>
+ <wsdl:operation name="getApplicationPolicy">
+ <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
- <wsdl:fault name="AutoscalerServiceApplicationDefinitionException">
- <soap:fault use="literal" name="AutoscalerServiceApplicationDefinitionException"/>
- </wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="AutoscalerServiceSoap12Binding" type="ns:AutoscalerServicePortType">
@@ -1822,8 +1819,8 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getServiceGroup">
- <soap12:operation soapAction="urn:getServiceGroup" style="document"/>
+ <wsdl:operation name="deleteApplication">
+ <soap12:operation soapAction="urn:deleteApplication" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
@@ -1831,8 +1828,8 @@
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="deleteApplication">
- <soap12:operation soapAction="urn:deleteApplication" style="document"/>
+ <wsdl:operation name="getServiceGroup">
+ <soap12:operation soapAction="urn:getServiceGroup" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
@@ -1984,26 +1981,26 @@
<soap12:fault use="literal" name="AutoscalerServiceCartridgeGroupNotFoundException"/>
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
+ <wsdl:operation name="updateApplication">
+ <soap12:operation soapAction="urn:updateApplication" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
+ <wsdl:fault name="AutoscalerServiceApplicationDefinitionException">
+ <soap12:fault use="literal" name="AutoscalerServiceApplicationDefinitionException"/>
+ </wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="updateApplication">
- <soap12:operation soapAction="urn:updateApplication" style="document"/>
+ <wsdl:operation name="getApplicationPolicy">
+ <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
- <wsdl:fault name="AutoscalerServiceApplicationDefinitionException">
- <soap12:fault use="literal" name="AutoscalerServiceApplicationDefinitionException"/>
- </wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="AutoscalerServiceHttpBinding" type="ns:AutoscalerServicePortType">
@@ -2152,8 +2149,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getServiceGroup">
- <http:operation location="getServiceGroup"/>
+ <wsdl:operation name="deleteApplication">
+ <http:operation location="deleteApplication"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -2161,8 +2158,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="deleteApplication">
- <http:operation location="deleteApplication"/>
+ <wsdl:operation name="getServiceGroup">
+ <http:operation location="getServiceGroup"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -2278,8 +2275,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="getApplicationPolicy">
- <http:operation location="getApplicationPolicy"/>
+ <wsdl:operation name="updateApplication">
+ <http:operation location="updateApplication"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
@@ -2287,8 +2284,8 @@
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="updateApplication">
- <http:operation location="updateApplication"/>
+ <wsdl:operation name="getApplicationPolicy">
+ <http:operation location="getApplicationPolicy"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
[4/7] stratos git commit: Remove provider from NW partition reference
Posted by la...@apache.org.
Remove provider from NW partition reference
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/d09a9097
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/d09a9097
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/d09a9097
Branch: refs/heads/master
Commit: d09a90973782e0b81293dda9c25dbaf9599ffb99
Parents: dcab7da
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 15:35:19 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 23:16:04 2015 +0530
----------------------------------------------------------------------
.../common/partition/NetworkPartitionRef.java | 35 ++++++++------------
1 file changed, 13 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/d09a9097/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
index c24e8bb..999be1a 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/partition/NetworkPartitionRef.java
@@ -30,26 +30,25 @@ public class NetworkPartitionRef implements Serializable {
private static final long serialVersionUID = -8043298009352097370L;
private String id;
- private String provider;
- private PartitionRef[] partitions;
+ private PartitionRef[] partitionRefs;
private String partitionAlgo;
- public void setPartitions(PartitionRef[] partitions) {
- if (partitions == null) {
- this.partitions = partitions;
+ public void setPartitions(PartitionRef[] partitionRefs) {
+ if (partitionRefs == null) {
+ this.partitionRefs = partitionRefs;
} else {
- this.partitions = Arrays.copyOf(partitions, partitions.length);
+ this.partitionRefs = Arrays.copyOf(partitionRefs, partitionRefs.length);
}
}
/**
- * Gets the value of the partitions.
+ * Gets the value of the partitionRefs.
*/
- public PartitionRef[] getPartitions() {
- if (partitions == null) {
- partitions = new PartitionRef[0];
+ public PartitionRef[] getPartitionRefs() {
+ if (partitionRefs == null) {
+ partitionRefs = new PartitionRef[0];
}
- return this.partitions;
+ return this.partitionRefs;
}
/**
@@ -67,22 +66,14 @@ public class NetworkPartitionRef implements Serializable {
}
public PartitionRef getPartition(String partitionId) {
- for (PartitionRef partition : partitions) {
- if (partition.getId().equals(partitionId)) {
- return partition;
+ for (PartitionRef partitionRef : partitionRefs) {
+ if (partitionRef.getId().equals(partitionId)) {
+ return partitionRef;
}
}
return null;
}
- public String getProvider() {
- return provider;
- }
-
- public void setProvider(String provider) {
- this.provider = provider;
- }
-
public String getPartitionAlgo() {
return partitionAlgo;
}