Tenant isolation - Application Policies
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a7756432 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a7756432 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a7756432 Branch: refs/heads/tenant-isolation Commit: a77564326bb97d2a6796c31d7bfac815e12aa353 Parents: dd7442d Author: Dinithi <[email protected]> Authored: Tue Jun 30 12:17:39 2015 +0530 Committer: Dinithi <[email protected]> Committed: Tue Jun 30 12:17:39 2015 +0530 ---------------------------------------------------------------------- .../OneAfterAnotherAlgorithm.java | 4 +- .../autoscaler/pojo/policy/PolicyManager.java | 17 +- .../policy/deployment/ApplicationPolicy.java | 18 ++ .../autoscaler/registry/RegistryManager.java | 4 +- .../services/impl/AutoscalerServiceImpl.java | 6 +- .../stratos/autoscaler/util/AutoscalerUtil.java | 4 +- .../deployment/ApplicationPolicyBean.java | 18 ++ .../default/configure/application-policies.json | 1 + .../schema/configure/application-policies.json | 12 +- .../rest/endpoint/api/StratosApiV41.java | 11 +- .../rest/endpoint/api/StratosApiV41Utils.java | 35 ++- .../util/converter/ObjectConverter.java | 4 + .../src/main/resources/AutoscalerService.wsdl | 238 ++++++++++--------- 13 files changed, 228 insertions(+), 144 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java index c9f6970..e6f71f1 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/algorithms/networkpartition/OneAfterAnotherAlgorithm.java @@ -68,7 +68,7 @@ public class OneAfterAnotherAlgorithm implements NetworkPartitionAlgorithm { return null; } - String applicationPolicyId = applicationPolicy.getId(); + String applicationPolicyId = applicationPolicy.getUuid(); String[] networkPartitionGroups = applicationPolicy.getNetworkPartitionGroups(); if (networkPartitionGroups != null && networkPartitionGroups.length != 0) { if (log.isDebugEnabled()) { @@ -223,7 +223,7 @@ public class OneAfterAnotherAlgorithm implements NetworkPartitionAlgorithm { return null; } - String applicationPolicyId = applicationPolicy.getId(); + String applicationPolicyId = applicationPolicy.getUuid(); String[] networkPartitionGroups = applicationPolicy.getNetworkPartitionGroups(); List<String> selectedNetworkPartitions = new ArrayList<String>(); http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java index bb161ed..129227e 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java @@ -349,7 +349,7 @@ public class PolicyManager { public void addApplicationPolicy(ApplicationPolicy applicationPolicy) throws InvalidApplicationPolicyException { - String applicationPolicyId = applicationPolicy.getId(); + String applicationPolicyId = applicationPolicy.getUuid(); if (log.isInfoEnabled()) { log.info(String.format("Adding application policy : [application-policy-id] %s", applicationPolicyId)); } @@ -357,8 +357,7 @@ public class PolicyManager { RegistryManager.getInstance().persistApplicationPolicy(applicationPolicy); if (log.isInfoEnabled()) { - log.info(String - .format("Application policy is added successfully: [application-policy-id] %s", + log.info(String.format("Application policy is added successfully: [application-policy-id] %s", applicationPolicyId)); } @@ -378,7 +377,7 @@ public class PolicyManager { public void addApplicationPolicyToInformationModel(ApplicationPolicy applicationPolicy) throws InvalidApplicationPolicyException { - String applicationPolicyId = applicationPolicy.getId(); + String applicationPolicyId = applicationPolicy.getUuid(); if (!applicationPolicyListMap.containsKey(applicationPolicyId)) { if (log.isDebugEnabled()) { log.debug("Adding application policy : " + applicationPolicyId); @@ -403,22 +402,22 @@ public class PolicyManager { } public void updateApplicationPolicyInInformationModel(ApplicationPolicy applicationPolicy) { - if (applicationPolicyListMap.containsKey(applicationPolicy.getId())) { + if (applicationPolicyListMap.containsKey(applicationPolicy.getUuid())) { if (log.isDebugEnabled()) { - log.debug("Updating application policy: " + applicationPolicy.getId()); + log.debug("Updating application policy: " + applicationPolicy.getUuid()); } - applicationPolicyListMap.put(applicationPolicy.getId(), applicationPolicy); + applicationPolicyListMap.put(applicationPolicy.getUuid(), applicationPolicy); } } public boolean updateApplicationPolicy(ApplicationPolicy applicationPolicy) { - if (StringUtils.isEmpty(applicationPolicy.getId())) { + if (StringUtils.isEmpty(applicationPolicy.getUuid())) { throw new AutoScalerException("Application policy id cannot be empty"); } this.updateApplicationPolicyInInformationModel(applicationPolicy); RegistryManager.getInstance().persistApplicationPolicy(applicationPolicy); if (log.isInfoEnabled()) { - log.info(String.format("Application policy is updated successfully: [id] %s", applicationPolicy.getId())); + log.info(String.format("Application policy is updated successfully: [id] %s", applicationPolicy.getUuid())); } return true; } http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java index 856f90f..9dc33f0 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ApplicationPolicy.java @@ -25,7 +25,9 @@ import java.io.Serializable; public class ApplicationPolicy implements Serializable { private static final long serialVersionUID = -2851334419121310395L; + private String uuid; private String id; + private int tenantId; private String algorithm; private String[] networkPartitions; private Properties properties; @@ -40,6 +42,22 @@ public class ApplicationPolicy implements Serializable { this.id = id; } + public int getTenantId() { + return tenantId; + } + + public void setTenantId(int tenantId) { + this.tenantId = tenantId; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + public String getAlgorithm() { return algorithm; } http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java index 5780864..15a8107 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java @@ -682,10 +682,10 @@ public class RegistryManager { try { startTenantFlow(); String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE + - AutoscalerConstants.APPLICATION_POLICY_RESOURCE + "/" + applicationPolicy.getId(); + AutoscalerConstants.APPLICATION_POLICY_RESOURCE + "/" + applicationPolicy.getUuid(); persist(applicationPolicy, resourcePath); if (log.isDebugEnabled()) { - log.debug(String.format("Application policy written to registry : %s", applicationPolicy.getId())); + log.debug(String.format("Application policy written to registry : %s", applicationPolicy.getUuid())); } } finally { endTenantFlow(); http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/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 d0da8d5..2b4cb12 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 @@ -888,13 +888,13 @@ public class AutoscalerServiceImpl implements AutoscalerService { AutoscalerUtil.validateApplicationPolicy(applicationPolicy); if (log.isInfoEnabled()) { - log.info("Adding application policy: [application-policy-id] " + applicationPolicy.getId()); + log.info("Adding application policy: [application-policy-id] " + applicationPolicy.getUuid()); } if (log.isDebugEnabled()) { log.debug("Application policy definition: " + applicationPolicy.toString()); } - String applicationPolicyID = applicationPolicy.getId(); + String applicationPolicyID = applicationPolicy.getUuid(); if (PolicyManager.getInstance().getApplicationPolicy(applicationPolicyID) != null) { String message = "Application policy already exists: [application-policy-id] " + applicationPolicyID; log.error(message); @@ -942,7 +942,7 @@ public class AutoscalerServiceImpl implements AutoscalerService { throw new InvalidApplicationPolicyException(msg); } - String applicationPolicyId = applicationPolicy.getId(); + String applicationPolicyId = applicationPolicy.getUuid(); ApplicationPolicy existingApplicationPolicy = PolicyManager.getInstance().getApplicationPolicy(applicationPolicyId); if (existingApplicationPolicy == null) { String msg = String.format("No such application policy found [application-policy-id] %s", applicationPolicyId); http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/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 2f78fe7..c126aad 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 @@ -610,7 +610,7 @@ public class AutoscalerUtil { } // application policy id can't be null - if (applicationPolicy.getId() == null || StringUtils.isBlank(applicationPolicy.getId())) { + if (applicationPolicy.getUuid() == null || StringUtils.isBlank(applicationPolicy.getUuid())) { String msg = "Invalid Application Policy: Application policy id null or empty"; log.error(msg); throw new InvalidApplicationPolicyException(msg); @@ -661,7 +661,7 @@ public class AutoscalerUtil { if (null == CloudControllerServiceClient.getInstance(). getNetworkPartition(networkPartitionId)) { String msg = String.format("Network partition not found: [network-partition-id] %s in " + - "[application-policy-id] %s", networkPartitionId, applicationPolicy.getId()); + "[application-policy-id] %s", networkPartitionId, applicationPolicy.getUuid()); log.error(msg); throw new InvalidApplicationPolicyException(msg); } http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java index 8c906aa..e912227 100644 --- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java +++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/policy/deployment/ApplicationPolicyBean.java @@ -28,10 +28,28 @@ import java.util.List; public class ApplicationPolicyBean { private String id; + private String uuid; + private int tenantId; private String algorithm; String[] networkPartitions; List<PropertyBean> properties; + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public int getTenantId() { + return tenantId; + } + + public void setTenantId(int tenantId) { + this.tenantId = tenantId; + } + public String getId() { return id; } http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json index 008e079..0f92e09 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/default/configure/application-policies.json @@ -1,4 +1,5 @@ { + "uuid": "", "id": "application-policy-1", "algorithm":"one-after-another", "networkPartitions":[ http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json index cf4675d..b7ade53 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/configure/application-policies.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "id": "root", + "uuid": "root", "type": "object", "title": "Application Policy Definition", "name": "Application Policy", @@ -9,18 +9,24 @@ "disable_collapse": true }, "properties": { + "uuid": { + "id": "root/uuid", + "type": "string", + "title": "Application Policy UUID ", + "name": "Application Policy UUID" + }, "id": { "id": "root/id", "type": "string", "title": "Application Policy Id ", - "name": "Application Policy Id", + "name": "Application Policy Id" }, "algorithm": { "id": "root/algorithm", "type": "string", "title": "Application Policy Algorithm ", "name": "Application Policy Algorithm", - "enum": ["one-after-another","all-at-once"], + "enum": ["one-after-another","all-at-once"] }, "networkPartitions": { "id": "root/networkPartitions", http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java index b5e5bc0..e07abaa 100644 --- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java +++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java @@ -905,12 +905,19 @@ public class StratosApiV41 extends AbstractApi { @AuthorizationAction("/permission/admin/stratos/applicationPolicies/manage") public Response addApplicationPolicy( ApplicationPolicyBean applicationPolicy) throws RestAPIException { + + String applicationPolicyId = applicationPolicy.getId(); + applicationPolicy.setUuid(UUID.randomUUID().toString()); + String applicationPolicyUuid = applicationPolicy.getUuid(); + + PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + applicationPolicy.setTenantId(carbonContext.getTenantId()); try { StratosApiV41Utils.addApplicationPolicy(applicationPolicy); URI url = uriInfo.getAbsolutePathBuilder().path(applicationPolicy.getId()).build(); return Response.created(url).entity(new ResponseMessageBean(ResponseMessageBean.SUCCESS, - String.format("Application policy added successfully: [application-policy] %s", - applicationPolicy.getId()))).build(); + String.format("Application policy added successfully: [application-policy-uuid] %s " + + "[application-policy-id] %s", applicationPolicyUuid, applicationPolicyId))).build(); } catch (AutoscalerServiceInvalidApplicationPolicyExceptionException e) { String backendErrorMessage = e.getFaultMessage().getInvalidApplicationPolicyException().getMessage(); return Response.status(Response.Status.BAD_REQUEST).entity(new ResponseMessageBean( http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java index 457ed65..12860b0 100644 --- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java +++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java @@ -704,7 +704,8 @@ public class StratosApiV41Utils { AutoscalerServiceInvalidApplicationPolicyExceptionException, AutoscalerServiceApplicatioinPolicyNotExistsExceptionException { - log.info(String.format("Updating application policy: [id] %s", applicationPolicyBean.getId())); + log.info(String.format("Updating application policy: [application-policy-uuid] %s [application-policy-id] " + + "%s", applicationPolicyBean.getUuid(), applicationPolicyBean.getId())); AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient(); if (autoscalerServiceClient != null) { @@ -736,16 +737,30 @@ public class StratosApiV41Utils { ApplicationPolicy[] applicationPolicies = null; AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient(); + ApplicationPolicy[] applicationPoliciesForTenantArray = new ApplicationPolicy[0]; if (autoscalerServiceClient != null) { try { applicationPolicies = autoscalerServiceClient.getApplicationPolicies(); + if (applicationPolicies != null) { + PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + List<ApplicationPolicy> applicationPoliciesForTenant = new ArrayList<ApplicationPolicy>(); + for (ApplicationPolicy applicationPolicy : applicationPolicies) { + if (carbonContext.getTenantId() == applicationPolicy.getTenantId()) { + applicationPoliciesForTenant.add(applicationPolicy); + } + } + if (applicationPoliciesForTenant.size() != 0) { + applicationPoliciesForTenantArray = applicationPoliciesForTenant.toArray(new + ApplicationPolicy[applicationPoliciesForTenant.size()]); + } + } } catch (RemoteException e) { String msg = "Could not get application policies" + e.getLocalizedMessage(); log.error(msg, e); throw new RestAPIException(msg); } } - return ObjectConverter.convertASStubApplicationPoliciesToApplicationPolicies(applicationPolicies); + return ObjectConverter.convertASStubApplicationPoliciesToApplicationPolicies(applicationPoliciesForTenantArray); } /** @@ -771,7 +786,21 @@ public class StratosApiV41Utils { try { AutoscalerServiceClient serviceClient = AutoscalerServiceClient.getInstance(); - ApplicationPolicy applicationPolicy = serviceClient.getApplicationPolicy(applicationPolicyId); + ApplicationPolicy[] applicationPolicies = serviceClient.getApplicationPolicies(); + ApplicationPolicy applicationPolicy = null; + + PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); + for (ApplicationPolicy applicationPolicy1 : applicationPolicies) { + if (carbonContext.getTenantId() == applicationPolicy1.getTenantId()) { + if (applicationPolicy1.getId().equals(applicationPolicyId)) { + applicationPolicy = applicationPolicy1; + } + } + } + if (applicationPolicy == null) { + return null; + } + return ObjectConverter.convertASStubApplicationPolicyToApplicationPolicy(applicationPolicy); } catch (RemoteException e) { String message = String.format("Could not get application policy [application-policy-id] %s", http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/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 693af46..139c5be 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 @@ -494,6 +494,8 @@ public class ObjectConverter { ApplicationPolicyBean applicationPolicyBean = new ApplicationPolicyBean(); applicationPolicyBean.setId(applicationPolicy.getId()); + applicationPolicyBean.setUuid(applicationPolicy.getUuid()); + applicationPolicyBean.setTenantId(applicationPolicy.getTenantId()); applicationPolicyBean.setAlgorithm(applicationPolicy.getAlgorithm()); applicationPolicyBean.setNetworkPartitions(applicationPolicy.getNetworkPartitions()); @@ -2001,6 +2003,8 @@ public class ObjectConverter { applicationPolicy.setId(applicationPolicyBean.getId()); applicationPolicy.setAlgorithm(applicationPolicyBean.getAlgorithm()); applicationPolicy.setNetworkPartitions(applicationPolicyBean.getNetworkPartitions()); + applicationPolicy.setUuid(applicationPolicyBean.getUuid()); + applicationPolicy.setTenantId(applicationPolicyBean.getTenantId()); if (applicationPolicyBean.getProperties() != null) { if (!applicationPolicyBean.getProperties().isEmpty()) { applicationPolicy.setProperties(getASPropertiesFromCommonProperties(applicationPolicyBean.getProperties())); http://git-wip-us.apache.org/repos/asf/stratos/blob/a7756432/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 fb40b3d..720b198 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:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax28="http://common.stratos.apache.org/xsd" xmlns:ax25="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://io.java/xsd" xmlns:ax222="http://partition.common.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://rmi.java/xsd" xmlns:ax225="http://autoscale.policy.pojo.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"> +<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/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:ax219="http://io.java/xsd" xmlns:ax218="http://rmi.java/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax215="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://policy.exception.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://application.exception.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:ax213="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd"> + <xs:schema xmlns:ax220="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="ax212:IOException"> + <xs:extension base="ax219: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="ax225:LoadThresholds"/> + <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax27:LoadThresholds"/> <xs:element minOccurs="0" name="tenantId" type="xs:int"/> <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/> </xs:sequence> @@ -34,17 +34,17 @@ </xs:sequence> </xs:complexType> </xs:schema> - <xs:schema xmlns:ax29="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"> + <xs:schema xmlns:ax216="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="ax27:ComponentContext"/> + <xs:element minOccurs="0" name="components" nillable="true" type="ax215: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="ax29: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"/> @@ -53,10 +53,10 @@ </xs:complexType> <xs:complexType name="ComponentContext"> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax27:ApplicationClusterContext"/> - <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax27:CartridgeContext"/> - <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax27:DependencyContext"/> - <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax27:GroupContext"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationClusterContexts" nillable="true" type="ax215:ApplicationClusterContext"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax215:CartridgeContext"/> + <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax215:DependencyContext"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax215:GroupContext"/> </xs:sequence> </xs:complexType> <xs:complexType name="ApplicationClusterContext"> @@ -67,8 +67,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="ax27:PersistenceContext"/> - <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/> + <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax215: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> @@ -76,7 +76,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="ax27:VolumeContext"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax215:VolumeContext"/> </xs:sequence> </xs:complexType> <xs:complexType name="VolumeContext"> @@ -95,21 +95,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="ax27:SubscribableInfoContext"/> + <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax215: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="ax27:ArtifactRepositoryContext"/> + <xs:element minOccurs="0" name="artifactRepositoryContext" nillable="true" type="ax215: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="ax27:PersistenceContext"/> - <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"/> + <xs:element minOccurs="0" name="persistenceContext" nillable="true" type="ax215:PersistenceContext"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/> </xs:sequence> </xs:complexType> <xs:complexType name="ArtifactRepositoryContext"> @@ -131,9 +131,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="ax27:CartridgeContext"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax215:CartridgeContext"/> <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/> - <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax27:GroupContext"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax215: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"/> @@ -144,8 +144,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="ax21:Dependencies"/> - <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax21:ServiceGroup"/> + <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax29:Dependencies"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax29:ServiceGroup"/> <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> @@ -157,37 +157,44 @@ </xs:sequence> </xs:complexType> </xs:schema> - <xs:schema xmlns:ax218="http://common.stratos.apache.org/xsd" xmlns:ax224="http://partition.common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"> - <xs:import namespace="http://common.stratos.apache.org/xsd"/> - <xs:import namespace="http://partition.common.stratos.apache.org/xsd"/> - <xs:complexType name="ApplicationPolicy"> - <xs:sequence> - <xs:element minOccurs="0" name="algorithm" nillable="true" type="xs:string"/> - <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="ax28:Properties"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="DeploymentPolicy"> - <xs:sequence> - <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/> - <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax222:NetworkPartitionRef"/> - <xs:element minOccurs="0" name="tenantId" type="xs:int"/> - <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:schema> - <xs:schema xmlns:ax26="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://rmi.java/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax210="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org"> + <xs:schema xmlns:ax28="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://rmi.java/xsd" xmlns:ax212="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="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://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/> + <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/> <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/> <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/> <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/> <xs:import namespace="http://pojo.applications.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://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/> <xs:import namespace="http://common.stratos.apache.org/xsd"/> - <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/> + <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="ax26:DeploymentPolicy"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <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="ax27:AutoscalePolicy"/> + </xs:sequence> + </xs:complexType> + </xs:element> <xs:element name="getServiceGroup"> <xs:complexType> <xs:sequence> @@ -198,35 +205,35 @@ <xs:element name="getServiceGroupResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/> + <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceApplicationDefinitionException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax23:ApplicationDefinitionException"/> + <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax212:ApplicationDefinitionException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceCartridgeGroupNotFoundException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax25:CartridgeGroupNotFoundException"/> + <xs:element minOccurs="0" name="CartridgeGroupNotFoundException" nillable="true" type="ax214:CartridgeGroupNotFoundException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceCartridgeNotFoundException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax25:CartridgeNotFoundException"/> + <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax214:CartridgeNotFoundException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="addApplication"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax27:ApplicationContext"/> + <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax217:ApplicationContext"/> </xs:sequence> </xs:complexType> </xs:element> @@ -240,7 +247,7 @@ <xs:element name="updateApplication"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax27:ApplicationContext"/> + <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax217:ApplicationContext"/> </xs:sequence> </xs:complexType> </xs:element> @@ -261,7 +268,7 @@ <xs:element name="getApplicationResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax27:ApplicationContext"/> + <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationContext"/> </xs:sequence> </xs:complexType> </xs:element> @@ -287,7 +294,7 @@ <xs:element name="getApplicationsResponse"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:ApplicationContext"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationContext"/> </xs:sequence> </xs:complexType> </xs:element> @@ -309,28 +316,28 @@ <xs:element name="AutoscalerServiceRemoteException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax214:RemoteException"/> + <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax218:RemoteException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceInvalidApplicationPolicyException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax23:InvalidApplicationPolicyException"/> + <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax212:InvalidApplicationPolicyException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceApplicationPolicyAlreadyExistsException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax216:ApplicationPolicyAlreadyExistsException"/> + <xs:element minOccurs="0" name="ApplicationPolicyAlreadyExistsException" nillable="true" type="ax222:ApplicationPolicyAlreadyExistsException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="addApplicationPolicy"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/> + <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -351,7 +358,7 @@ <xs:element name="getApplicationPolicyResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/> + <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -363,21 +370,21 @@ <xs:element name="getApplicationPoliciesResponse"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationPolicy"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax216:ApplicatioinPolicyNotExistsException"/> + <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax222:ApplicatioinPolicyNotExistsException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="updateApplicationPolicy"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/> + <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax26:ApplicationPolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -391,14 +398,14 @@ <xs:element name="AutoscalerServiceInvalidPolicyException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax216:InvalidPolicyException"/> + <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax222:InvalidPolicyException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceUnremovablePolicyException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax216:UnremovablePolicyException"/> + <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax222:UnremovablePolicyException"/> </xs:sequence> </xs:complexType> </xs:element> @@ -419,7 +426,7 @@ <xs:element name="AutoscalerServiceAutoScalerException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax25:AutoScalerException"/> + <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax214:AutoScalerException"/> </xs:sequence> </xs:complexType> </xs:element> @@ -474,21 +481,21 @@ <xs:element name="getServiceGroupsResponse"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:ServiceGroup"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ServiceGroup"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceInvalidServiceGroupException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax23:InvalidServiceGroupException"/> + <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax212:InvalidServiceGroupException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="addServiceGroup"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax21:ServiceGroup"/> + <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax29:ServiceGroup"/> </xs:sequence> </xs:complexType> </xs:element> @@ -502,7 +509,7 @@ <xs:element name="updateServiceGroup"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax21:ServiceGroup"/> + <xs:element minOccurs="0" name="cartridgeGroup" nillable="true" type="ax29:ServiceGroup"/> </xs:sequence> </xs:complexType> </xs:element> @@ -530,7 +537,7 @@ <xs:element name="AutoscalerServiceInvalidArgumentException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax25:InvalidArgumentException"/> + <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax214:InvalidArgumentException"/> </xs:sequence> </xs:complexType> </xs:element> @@ -538,7 +545,7 @@ <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/> - <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/> </xs:sequence> </xs:complexType> </xs:element> @@ -567,28 +574,28 @@ <xs:element name="AutoscalerServiceInvalidDeploymentPolicyException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax216:InvalidDeploymentPolicyException"/> + <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax222:InvalidDeploymentPolicyException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceDeploymentPolicyNotExistsException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax216:DeploymentPolicyNotExistsException"/> + <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax222:DeploymentPolicyNotExistsException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceCloudControllerConnectionException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax25: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="ax217:DeploymentPolicy"/> + <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -607,7 +614,7 @@ <xs:element name="getDeploymentPoliciesResponse"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:DeploymentPolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -619,21 +626,21 @@ <xs:element name="getAutoScalingPoliciesResponse"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:AutoscalePolicy"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:AutoscalePolicy"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax25:AutoScalingPolicyAlreadyExistException"/> + <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax214:AutoScalingPolicyAlreadyExistException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="addAutoScalingPolicy"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax225:AutoscalePolicy"/> + <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -647,7 +654,7 @@ <xs:element name="updateAutoScalingPolicy"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax225:AutoscalePolicy"/> + <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax27:AutoscalePolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -661,7 +668,7 @@ <xs:element name="AutoscalerServicePolicyDoesNotExistException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax216:PolicyDoesNotExistException"/> + <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax222:PolicyDoesNotExistException"/> </xs:sequence> </xs:complexType> </xs:element> @@ -682,14 +689,14 @@ <xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax216:DeploymentPolicyAlreadyExistsException"/> + <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax222:DeploymentPolicyAlreadyExistsException"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="addDeployementPolicy"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/> + <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax26:DeploymentPolicy"/> </xs:sequence> </xs:complexType> </xs:element> @@ -714,34 +721,6 @@ </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="ax217:DeploymentPolicy"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <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="ax225:AutoscalePolicy"/> - </xs:sequence> - </xs:complexType> - </xs:element> <xs:element name="serviceGroupExist"> <xs:complexType> <xs:sequence> @@ -771,13 +750,36 @@ </xs:complexType> </xs:element> </xs:schema> - <xs:schema xmlns:ax223="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd"> + <xs:schema xmlns:ax25="http://partition.common.stratos.apache.org/xsd" xmlns:ax224="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="id" nillable="true" type="xs:string"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionRefs" nillable="true" type="ax25:NetworkPartitionRef"/> + <xs:element minOccurs="0" name="tenantId" type="xs:int"/> + <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="ApplicationPolicy"> + <xs:sequence> + <xs:element minOccurs="0" name="algorithm" nillable="true" type="xs:string"/> + <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="ax23:Properties"/> + <xs:element minOccurs="0" name="tenantId" type="xs:int"/> + <xs:element minOccurs="0" name="uuid" nillable="true" type="xs:string"/> + </xs:sequence> + </xs:complexType> + </xs:schema> + <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="NetworkPartitionRef"> <xs:sequence> <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="partitionRefs" nillable="true" type="ax222:PartitionRef"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionRefs" nillable="true" type="ax22:PartitionRef"/> </xs:sequence> </xs:complexType> <xs:complexType name="PartitionRef"> @@ -786,7 +788,7 @@ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/> <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="ax28:Properties"/> + <xs:element minOccurs="0" name="properties" nillable="true" type="ax23:Properties"/> </xs:sequence> </xs:complexType> </xs:schema> @@ -810,7 +812,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="ax28:Property"/> + <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax23:Property"/> </xs:sequence> </xs:complexType> <xs:complexType name="Property"> @@ -820,7 +822,7 @@ </xs:sequence> </xs:complexType> </xs:schema> - <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:schema xmlns:ax225="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="ApplicationPolicyAlreadyExistsException"> <xs:sequence/> @@ -837,7 +839,7 @@ </xs:complexType> <xs:complexType name="UnremovablePolicyException"> <xs:complexContent> - <xs:extension base="ax25:AutoScalerException"> + <xs:extension base="ax213:AutoScalerException"> <xs:sequence/> </xs:extension> </xs:complexContent> @@ -852,7 +854,7 @@ </xs:complexType> <xs:complexType name="PolicyDoesNotExistException"> <xs:complexContent> - <xs:extension base="ax25:AutoScalerException"> + <xs:extension base="ax213:AutoScalerException"> <xs:sequence/> </xs:extension> </xs:complexContent>
