You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2014/11/12 17:43:42 UTC
[1/7] stratos git commit: getServiceGroups return 404 if not groups
found
Repository: stratos
Updated Branches:
refs/heads/master 43e23a761 -> c0e8d4f4c
getServiceGroups return 404 if not groups found
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/fa667ff1
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/fa667ff1
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/fa667ff1
Branch: refs/heads/master
Commit: fa667ff19e4055d5d2871b1f99aa0f47cf4222be
Parents: 3fee2a8
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Nov 12 21:34:55 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Nov 12 22:13:05 2014 +0530
----------------------------------------------------------------------
.../org/apache/stratos/rest/endpoint/api/StratosApiV41.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/fa667ff1/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 7ab86ce..2da40c7 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
@@ -216,7 +216,14 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
public Response getServiceGroups()
throws RestAPIException {
- Response.ResponseBuilder rb = Response.ok().entity(StratosApiV41Utils.getServiceGroupDefinitions());
+ ServiceGroupDefinition[] serviceGroups = StratosApiV41Utils.getServiceGroupDefinitions();
+ Response.ResponseBuilder rb;
+ if (serviceGroups != null) {
+ rb = Response.ok().entity(serviceGroups);
+ } else {
+ rb = Response.status(Response.Status.NOT_FOUND);
+ }
+
return rb.build();
}
[4/7] stratos git commit: fix for not removing groups when
undeploying STRATOS-954
Posted by ud...@apache.org.
fix for not removing groups when undeploying STRATOS-954
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3fee2a8e
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3fee2a8e
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3fee2a8e
Branch: refs/heads/master
Commit: 3fee2a8e9a39bce37faa5c868421dc2f22f21d09
Parents: f7f23be
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Nov 12 21:34:14 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Nov 12 22:13:05 2014 +0530
----------------------------------------------------------------------
.../autoscaler/registry/RegistryManager.java | 24 ++++++++------------
1 file changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/3fee2a8e/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 8949c27..b544339 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
@@ -479,27 +479,21 @@ public class RegistryManager {
return groupArr;
}
- public ServiceGroup removeServiceGroup(String name) throws Exception {
+ public void removeServiceGroup(String name) throws Exception {
+ if (StringUtils.isEmpty(name)) {
+ throw new IllegalArgumentException("Name of the service group can not be empty");
+ }
+
String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE +
AutoScalerConstants.SERVICE_GROUP + "/" + name;
- Object serializedObj = registryManager.retrieve(resourcePath);
- ServiceGroup group = null;
- if (serializedObj != null) {
- Object dataObj = Deserializer.deserializeFromByteArray((byte[]) serializedObj);
- if (dataObj instanceof ServiceGroup) {
- group = (ServiceGroup) dataObj;
- if (log.isDebugEnabled()) {
- log.debug(group.toString());
- }
- } else {
- return null;
+ if (registryService.resourceExists(resourcePath)) {
+ registryService.delete(resourcePath);
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Service group %s is removed from registry", name));
}
}
-
- return group;
}
-
public void removeAutoscalerPolicy(AutoscalePolicy autoscalePolicy) {
String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE + AutoScalerConstants.AS_POLICY_RESOURCE + "/" + autoscalePolicy.getId();
this.delete(resourcePath);
[2/7] stratos git commit: getServiceGroups rest endpoint is added
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/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 2da9834..346dd23 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,2444 +1,2493 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax27="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax23="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax214="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax221="http://common.stratos.apache.org/xsd" xmlns:ax210="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsd
l/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax26="http://common.stratos.apache.org/xsd" xmlns:ax23="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax219="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax223="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsd
l/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
<wsdl:documentation>AutoScalerService</wsdl:documentation>
<wsdl:types>
- <xs:schema xmlns:ax218="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax224="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"/>
<xs:complexType name="ApplicationContext">
<xs:sequence>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="components" nillable="true" type="ax217:ComponentContext"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax217:SubscribableInfoContext"></xs:element>
- <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
+ <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="ax223:ComponentContext"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax211:Properties"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax223:SubscribableInfoContext"/>
+ <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ComponentContext">
<xs:sequence>
- <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax217:DependencyContext"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax217:GroupContext"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax217:SubscribableContext"></xs:element>
+ <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax223:DependencyContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax223:GroupContext"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax223:SubscribableContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DependencyContext">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrdersContexts" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrdersContexts" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GroupContext">
<xs:sequence>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax217:GroupContext"></xs:element>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax217:SubscribableContext"></xs:element>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax223:GroupContext"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax223:SubscribableContext"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SubscribableContext">
<xs:sequence>
- <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <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>
- <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
- <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+ <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="privateRepo" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax211:Properties"/>
+ <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.autoscaler.stratos.apache.org/xsd">
<xs:complexType name="ServiceGroup">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax23:Dependencies"></xs:element>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax219:Dependencies"/>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Dependencies">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="scalingOrders" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="scalingOrders" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax29="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax212="http://partition.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://model.policy.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax216="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://model.policy.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"/>
<xs:complexType name="DeploymentPolicy">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax29:Partition"></xs:element>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitionGroups" nillable="true" type="ax212:PartitionGroup"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax213:Partition"/>
+ <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 maxOccurs="unbounded" minOccurs="0" name="partitionGroups" nillable="true" type="ax216:PartitionGroup"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AutoscalePolicy">
<xs:sequence>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax25:LoadThresholds"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="displayName" 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="loadThresholds" nillable="true" type="ax29:LoadThresholds"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LoadThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax25:LoadAverageThresholds"></xs:element>
- <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax25:MemoryConsumptionThresholds"></xs:element>
- <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax25:RequestsInFlightThresholds"></xs:element>
+ <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax29:LoadAverageThresholds"/>
+ <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax29:MemoryConsumptionThresholds"/>
+ <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax29:RequestsInFlightThresholds"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LoadAverageThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MemoryConsumptionThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RequestsInFlightThresholds">
<xs:sequence>
- <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
- <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
+ <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
+ <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax211="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.autoscaler.stratos.apache.org/xsd">
- <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax215="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.autoscaler.stratos.apache.org/xsd">
+ <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"/>
<xs:complexType name="PartitionGroup">
<xs:sequence>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"></xs:element>
+ <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="ax215:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax28="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd">
- <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
+ <xs:schema xmlns:ax212="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd">
+ <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"/>
<xs:complexType name="Partition">
<xs:sequence>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="descriptionSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="idSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="isPublicSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="partitionMax" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="partitionMaxSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="partitionMin" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="partitionMinSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
- <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="providerSpecified" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="descriptionSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="idSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="isPublicSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="partitionMax" type="xs:int"/>
+ <xs:element minOccurs="0" name="partitionMaxSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="partitionMin" type="xs:int"/>
+ <xs:element minOccurs="0" name="partitionMinSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax212:Properties"/>
+ <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="providerSpecified" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<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="ax221:Property"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax26:Property"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Property">
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema xmlns:ax222="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.common.stratos.apache.org/xsd">
- <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
- <xs:complexType name="KubernetesHost">
- <xs:sequence>
- <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax221:Properties"></xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="KubernetesMaster">
- <xs:complexContent>
- <xs:extension base="ax220:KubernetesHost">
- <xs:sequence>
- <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="KubernetesGroup">
- <xs:sequence>
- <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax220:KubernetesHost"></xs:element>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax220:KubernetesMaster"></xs:element>
- <xs:element minOccurs="0" name="portRange" nillable="true" type="ax220:PortRange"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax221:Properties"></xs:element>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="PortRange">
- <xs:sequence>
- <xs:element minOccurs="0" name="lower" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="upper" type="xs:int"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- <xs:schema xmlns:ax215="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax219="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax224="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
- <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://model.policy.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"></xs:import>
- <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"></xs:import>
- <xs:element name="getServiceGroup">
+ <xs:schema xmlns:ax220="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax28="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax222="http://partition.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://model.policy.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://pojo.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+ <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://model.policy.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://partition.deployment.stub.controller.cloud.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://partition.autoscaler.stratos.apache.org/xsd"/>
+ <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
+ <xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax23:InvalidKubernetesMasterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceGroupResponse">
+ <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax23:ServiceGroup"></xs:element>
+ <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax23:NonExistingKubernetesMasterException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPolicy">
+ <xs:element name="updateKubernetesMaster">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax28:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDeploymentPolicyResponse">
+ <xs:element name="updateKubernetesMasterResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceInvalidPartitionException">
+ <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax214:InvalidPartitionException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax23:InvalidKubernetesHostException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addPartition">
+ <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"></xs:element>
+ <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax23:NonExistingKubernetesHostException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addPartitionResponse">
+ <xs:element name="updateKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax28:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceApplicationDefinitionException">
+ <xs:element name="updateKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax214:ApplicationDefinitionException"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deployApplicationDefinition">
+ <xs:element name="AutoScalerServiceInvalidPolicyException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax217:ApplicationContext"></xs:element>
+ <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax23:InvalidPolicyException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="unDeployApplicationDefinition">
+ <xs:element name="updateDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
- <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
+ <xs:element name="updateDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax214:InvalidKubernetesMasterException"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
+ <xs:element name="AutoScalerServiceInvalidArgumentException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax214:NonExistingKubernetesMasterException"></xs:element>
+ <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax23:InvalidArgumentException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesMaster">
+ <xs:element name="updateClusterMonitor">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax220:KubernetesMaster"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax218:Properties"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesMasterResponse">
+ <xs:element name="updateAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
+ <xs:element name="updateAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax214:InvalidKubernetesHostException"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
+ <xs:element name="AutoScalerServiceAutoScalerException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax214:NonExistingKubernetesHostException"></xs:element>
+ <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax23:AutoScalerException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesHost">
+ <xs:element name="undeployServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax220:KubernetesHost"></xs:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateKubernetesHostResponse">
+ <xs:element name="AutoScalerServiceApplicationDefinitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax23:ApplicationDefinitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
+ <xs:element name="unDeployApplicationDefinition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax214:NonExistingKubernetesGroupException"></xs:element>
+ <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
+ <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesGroup">
+ <xs:element name="serviceGroupExist">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getKubernetesGroupResponse">
+ <xs:element name="serviceGroupExistResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax220:KubernetesGroup"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceInvalidPolicyException">
+ <xs:element name="removeKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax214:InvalidPolicyException"></xs:element>
+ <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateDeploymentPolicy">
+ <xs:element name="removeKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateDeploymentPolicyResponse">
+ <xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax23:NonExistingKubernetesGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartition">
+ <xs:element name="removeKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionResponse">
+ <xs:element name="removeKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Partition"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionGroups">
+ <xs:element name="getValidDeploymentPoliciesforCartridge">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionGroupsResponse">
+ <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax210:PartitionGroup"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionsOfGroup">
+ <xs:element name="getServiceLBClusterId">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionsOfGroupResponse">
+ <xs:element name="getServiceLBClusterIdResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Partition"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionsOfDeploymentPolicy">
+ <xs:element name="getServiceGroups">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="getPartitionsOfDeploymentPolicyResponse">
+ <xs:element name="getServiceGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Partition"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax219:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllAvailablePartitions">
+ <xs:element name="getServiceGroup">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllAvailablePartitionsResponse">
+ <xs:element name="getServiceGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Partition"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax219:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllDeploymentPolicies">
+ <xs:element name="getPartitionsOfGroup">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllDeploymentPoliciesResponse">
+ <xs:element name="getPartitionsOfGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllAutoScalingPolicy">
+ <xs:element name="getPartitionsOfDeploymentPolicy">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllAutoScalingPolicyResponse">
+ <xs:element name="getPartitionsOfDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax25:AutoscalePolicy"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getValidDeploymentPoliciesforCartridge">
+ <xs:element name="getPartitionGroups">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
+ <xs:element name="getPartitionGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax214:PartitionGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addDeploymentPolicy">
+ <xs:element name="getPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
+ <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addDeploymentPolicyResponse">
+ <xs:element name="getPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax221:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicy">
+ <xs:element name="getMasterForKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax25:AutoscalePolicy"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addAutoScalingPolicyResponse">
+ <xs:element name="getMasterForKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesMaster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicy">
+ <xs:element name="getKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax25:AutoscalePolicy"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateAutoScalingPolicyResponse">
+ <xs:element name="getKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicy">
+ <xs:element name="getHostsForKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAutoscalingPolicyResponse">
+ <xs:element name="getHostsForKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax25:AutoscalePolicy"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllKubernetesGroups">
+ <xs:element name="getDeploymentPolicy">
<xs:complexType>
- <xs:sequence></xs:sequence>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getAllKubernetesGroupsResponse">
+ <xs:element name="getDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax220:KubernetesGroup"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getMasterForKubernetesGroup">
+ <xs:element name="getDefaultLBClusterId">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getMasterForKubernetesGroupResponse">
+ <xs:element name="getDefaultLBClusterIdResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="ax220:KubernetesMaster"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getHostsForKubernetesGroup">
+ <xs:element name="getAutoscalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getHostsForKubernetesGroupResponse">
+ <xs:element name="getAutoscalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax220:KubernetesHost"></xs:element>
+ <xs:element minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
+ <xs:element name="getAllKubernetesGroups">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax214:InvalidKubernetesGroupException"></xs:element>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesGroup">
+ <xs:element name="getAllKubernetesGroupsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax220:KubernetesGroup"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesGroupResponse">
+ <xs:element name="getAllDeploymentPolicies">
<xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
- </xs:sequence>
+ <xs:sequence/>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesHost">
+ <xs:element name="getAllDeploymentPoliciesResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax220:KubernetesHost"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="addKubernetesHostResponse">
+ <xs:element name="getAllAvailablePartitions">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAllAvailablePartitionsResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesGroup">
+ <xs:element name="getAllAutoScalingPolicy">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getAllAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesGroupResponse">
+ <xs:element name="AutoScalerServiceInvalidServiceGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax23:InvalidServiceGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesHost">
+ <xs:element name="deployServiceGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax219:ServiceGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="removeKubernetesHostResponse">
+ <xs:element name="deployApplicationDefinition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax223:ApplicationContext"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceNonExistingLBException">
+ <xs:element name="checkServiceLBExistenceAgainstPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="NonExistingLBException" nillable="true" type="ax214:NonExistingLBException"></xs:element>
+ <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="checkLBExistenceAgainstPolicy">
+ <xs:element name="checkServiceLBExistenceAgainstPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="checkDefaultLBExistenceAgainstPolicy">
+ <xs:element name="AutoScalerServiceNonExistingLBException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="NonExistingLBException" nillable="true" type="ax23:NonExistingLBException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="checkDefaultLBExistenceAgainstPolicyResponse">
+ <xs:element name="checkLBExistenceAgainstPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="lbClusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDefaultLBClusterId">
+ <xs:element name="checkDefaultLBExistenceAgainstPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getDefaultLBClusterIdResponse">
+ <xs:element name="checkDefaultLBExistenceAgainstPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="checkServiceLBExistenceAgainstPolicy">
+ <xs:element name="checkClusterLBExistenceAgainstPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="checkServiceLBExistenceAgainstPolicyResponse">
+ <xs:element name="checkClusterLBExistenceAgainstPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceLBClusterId">
+ <xs:element name="AutoScalerServiceInvalidPartitionException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax23:InvalidPartitionException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="getServiceLBClusterIdResponse">
+ <xs:element name="addPartition">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="partition" nillable="true" type="ax221:Partition"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="checkClusterLBExistenceAgainstPolicy">
+ <xs:element name="addPartitionResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="checkClusterLBExistenceAgainstPolicyResponse">
+ <xs:element name="addKubernetesHost">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax28:KubernetesHost"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceInvalidArgumentException">
+ <xs:element name="addKubernetesHostResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax214:InvalidArgumentException"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="updateClusterMonitor">
+ <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
+ <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax23:InvalidKubernetesGroupException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceInvalidServiceGroupException">
+ <xs:element name="addKubernetesGroup">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax214:InvalidServiceGroupException"></xs:element>
+ <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax28:KubernetesGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="deployServiceGroup">
+ <xs:element name="addKubernetesGroupResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax23:ServiceGroup"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="serviceGroupExist">
+ <xs:element name="addDeploymentPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="serviceGroupExistResponse">
+ <xs:element name="addDeploymentPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="AutoScalerServiceAutoScalerException">
+ <xs:element name="addAutoScalingPolicy">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax214:AutoScalerException"></xs:element>
+ <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="undeployServiceGroup">
+ <xs:element name="addAutoScalingPolicyResponse">
<xs:complexType>
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd">
- <xs:complexType name="Properties">
+ <xs:schema xmlns:ax27="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.common.stratos.apache.org/xsd">
+ <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+ <xs:complexType name="KubernetesHost">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax27:Property"></xs:element>
- <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="Property">
+ <xs:complexType name="KubernetesMaster">
+ <xs:complexContent>
+ <xs:extension base="ax25:KubernetesHost">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="KubernetesGroup">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax25:KubernetesHost"/>
+ <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax25:KubernetesMaster"/>
+ <xs:element minOccurs="0" name="portRange" nillable="true" type="ax25:PortRange"/>
+ <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="PortRange">
<xs:sequence>
- <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="nameSpecified" type="xs:boolean"></xs:element>
- <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
- <xs:element minOccurs="0" name="valueSpecified" type="xs:boolean"></xs:element>
+ <xs:element minOccurs="0" name="lower" type="xs:int"/>
+ <xs:element minOccurs="0" name="upper" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
- <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.autoscaler.stratos.apache.org/xsd">
- <xs:complexType name="InvalidPartitionException">
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.stub.controller.cloud.stratos.apache.org/xsd">
+ <xs:complexType name="Properties">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax211:Property"/>
+ <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="ApplicationDefinitionException">
+ <xs:complexType name="Property">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="nameSpecified" type="xs:boolean"/>
+ <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"/>
+ <xs:element minOccurs="0" name="valueSpecified" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.autoscaler.stratos.apache.org/xsd">
<xs:complexType name="InvalidKubernetesMasterException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NonExistingKubernetesMasterException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InvalidKubernetesHostException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="NonExistingKubernetesHostException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingKubernetesGroupException">
+ <xs:complexType name="InvalidPolicyException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidPolicyException">
+ <xs:complexType name="InvalidArgumentException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidKubernetesGroupException">
+ <xs:complexType name="AutoScalerException">
+ <xs:complexContent>
+ <xs:extension base="xs:RuntimeException">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ApplicationDefinitionException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="NonExistingLBException">
+ <xs:complexType name="NonExistingKubernetesGroupException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidArgumentException">
+ <xs:complexType name="InvalidServiceGroupException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="InvalidServiceGroupException">
+ <xs:complexType name="NonExistingLBException">
<xs:sequence>
- <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="AutoScalerException">
- <xs:complexContent>
- <xs:extension base="xs:RuntimeException">
- <xs:sequence></xs:sequence>
- </xs:extension>
- </xs:complexContent>
+ <xs:complexType name="InvalidPartitionException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="InvalidKubernetesGroupException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+ </xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="updateKubernetesMasterRequest">
- <wsdl:part name="parameters" element="ns:updateKubernetesMaster"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:updateKubernetesMaster"/>
</wsdl:message>
<wsdl:message name="updateKubernetesMasterResponse">
- <wsdl:part name="parameters" element="ns:updateKubernetesMasterResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:updateKubernetesMasterResponse"/>
</wsdl:message>
<wsdl:message name="AutoScalerServiceInvalidKubernetesMasterException">
- <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesMasterException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesMasterException"/>
</wsdl:message>
<wsdl:message name="AutoScalerServiceNonExistingKubernetesMasterException">
- <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesMasterException"></wsdl:part>
+ <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesMasterException"/>
</wsdl:message>
<wsdl:message name="
<TRUNCATED>
[3/7] stratos git commit: getServiceGroups rest endpoint is added
Posted by ud...@apache.org.
getServiceGroups rest endpoint is added
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f7f23be3
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f7f23be3
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f7f23be3
Branch: refs/heads/master
Commit: f7f23be3e6fb4197099234ffe6b0252eb42aaaf6
Parents: 43e23a7
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Nov 12 21:01:56 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Nov 12 22:13:05 2014 +0530
----------------------------------------------------------------------
.../autoscaler/api/AutoScalerServiceImpl.java | 64 +-
.../autoscaler/registry/RegistryManager.java | 43 +-
.../manager/client/AutoscalerServiceClient.java | 19 +-
.../deployer/DefaultServiceGroupDeployer.java | 297 +--
.../grouping/deployer/ServiceGroupDeployer.java | 8 +-
.../manager/ServiceGroupingManager.java | 15 +-
.../rest/endpoint/api/StratosApiV41.java | 68 +-
.../rest/endpoint/api/StratosApiV41Utils.java | 12 +-
.../src/main/resources/AutoScalerService.wsdl | 1957 +++++++++---------
9 files changed, 1318 insertions(+), 1165 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
index 8e92f21..24cca7c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
@@ -28,7 +28,6 @@ import org.apache.stratos.autoscaler.applications.parser.DefaultApplicationParse
import org.apache.stratos.autoscaler.applications.pojo.ApplicationContext;
import org.apache.stratos.autoscaler.applications.topic.ApplicationBuilder;
import org.apache.stratos.autoscaler.client.CloudControllerClient;
-import org.apache.stratos.autoscaler.policy.model.DeploymentPolicy;
import org.apache.stratos.autoscaler.exception.*;
import org.apache.stratos.autoscaler.interfaces.AutoScalerServiceInterface;
import org.apache.stratos.autoscaler.kubernetes.KubernetesManager;
@@ -39,6 +38,7 @@ import org.apache.stratos.autoscaler.pojo.Dependencies;
import org.apache.stratos.autoscaler.pojo.ServiceGroup;
import org.apache.stratos.autoscaler.policy.PolicyManager;
import org.apache.stratos.autoscaler.policy.model.AutoscalePolicy;
+import org.apache.stratos.autoscaler.policy.model.DeploymentPolicy;
import org.apache.stratos.autoscaler.registry.RegistryManager;
import org.apache.stratos.cloud.controller.stub.deployment.partition.Partition;
import org.apache.stratos.cloud.controller.stub.pojo.Properties;
@@ -53,7 +53,6 @@ import org.apache.stratos.metadata.client.exception.MetaDataServiceClientExcepti
import java.text.MessageFormat;
import java.util.ArrayList;
-import java.util.Enumeration;
import java.util.Map;
/**
@@ -287,7 +286,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
return null;
}
-
+
@Override
public void deployApplicationDefinition(ApplicationContext applicationContext)
throws ApplicationDefinitionException {
@@ -305,7 +304,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
ApplicationBuilder.handleApplicationUndeployed(applicationId);
}
-
+
public boolean checkServiceLBExistenceAgainstPolicy(String serviceName, String deploymentPolicyId) {
for (PartitionGroup partitionGroup : PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyId).getPartitionGroups()) {
@@ -353,22 +352,22 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
for (PartitionGroup partitionGroup : PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyId).getPartitionGroups()) {
- NetworkPartitionLbHolder nwPartitionLbHolder = partitionManager.getNetworkPartitionLbHolder(partitionGroup.getId());
+ NetworkPartitionLbHolder nwPartitionLbHolder = partitionManager.getNetworkPartitionLbHolder(partitionGroup.getId());
- if (!nwPartitionLbHolder.isClusterLBExist(clusterId)) {
- if (log.isDebugEnabled()) {
- log.debug("Cluster LB [cluster id] "+clusterId+" does not exist in [network partition] " +
- nwPartitionLbHolder.getNetworkPartitionId() + " of [Deployment Policy] " +
- deploymentPolicyId);
+ if (!nwPartitionLbHolder.isClusterLBExist(clusterId)) {
+ if (log.isDebugEnabled()) {
+ log.debug("Cluster LB [cluster id] " + clusterId + " does not exist in [network partition] " +
+ nwPartitionLbHolder.getNetworkPartitionId() + " of [Deployment Policy] " +
+ deploymentPolicyId);
- }
- return false;
}
+ return false;
+ }
}
-
+
return true;
-
+
}
public void updateClusterMonitor(String clusterId, Properties properties) throws InvalidArgumentException {
@@ -377,15 +376,15 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
}
AutoscalerContext asCtx = AutoscalerContext.getInstance();
AbstractClusterMonitor monitor = asCtx.getClusterMonitor(clusterId);
-
+
if (monitor != null) {
monitor.handleDynamicUpdates(properties);
} else {
- log.debug(String.format("Updating Cluster monitor failed: Cluster monitor [Cluster id] %s not found.",
+ log.debug(String.format("Updating Cluster monitor failed: Cluster monitor [Cluster id] %s not found.",
clusterId));
}
}
-
+
public void deployServiceGroup(ServiceGroup servicegroup) throws InvalidServiceGroupException {
if (servicegroup == null || StringUtils.isEmpty(servicegroup.getName())) {
@@ -396,17 +395,17 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
}
String name = servicegroup.getName();
- if(RegistryManager.getInstance().serviceGroupExist(name)){
+ if (RegistryManager.getInstance().serviceGroupExist(name)) {
throw new InvalidServiceGroupException("Service group with the name " + name + " already exist.");
}
- if(log.isDebugEnabled()) {
+ if (log.isDebugEnabled()) {
log.debug(MessageFormat.format("Deploying service group {0}", servicegroup.getName()));
}
- String [] subGroups = servicegroup.getCartridges();
+ String[] subGroups = servicegroup.getCartridges();
- if(log.isDebugEnabled()) {
+ if (log.isDebugEnabled()) {
log.debug("SubGroups" + subGroups);
if (subGroups != null) {
log.debug("subGroups:size" + subGroups.length);
@@ -418,14 +417,14 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
Dependencies dependencies = servicegroup.getDependencies();
- if(log.isDebugEnabled()) {
+ if (log.isDebugEnabled()) {
log.debug("Dependencies" + dependencies);
}
if (dependencies != null) {
- String [] startupOrders = dependencies.getStartupOrders();
+ String[] startupOrders = dependencies.getStartupOrders();
- if(log.isDebugEnabled()) {
+ if (log.isDebugEnabled()) {
log.debug("StartupOrders " + startupOrders);
if (startupOrders != null) {
@@ -434,9 +433,9 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
log.debug("StartupOrder: is null");
}
}
- String [] scalingOrders = dependencies.getScalingOrders();
+ String[] scalingOrders = dependencies.getScalingOrders();
- if(log.isDebugEnabled()) {
+ if (log.isDebugEnabled()) {
log.debug("ScalingOrders " + scalingOrders);
if (startupOrders != null) {
@@ -451,16 +450,21 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
}
public ServiceGroup getServiceGroup(String name) {
- if(StringUtils.isEmpty(name)){
+ if (StringUtils.isEmpty(name)) {
return null;
}
try {
return RegistryManager.getInstance().getServiceGroup(name);
} catch (Exception e) {
- throw new AutoScalerException("Error occurred while retrieving service groups", e);
+ throw new AutoScalerException("Error occurred while retrieving service group", e);
}
}
- public boolean serviceGroupExist(String serviceName){
+
+ public ServiceGroup[] getServiceGroups() throws AutoScalerException {
+ return RegistryManager.getInstance().getServiceGroups();
+ }
+
+ public boolean serviceGroupExist(String serviceName) {
return false;
}
@@ -480,7 +484,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
for (Map.Entry<String, Properties> entry : applicationParser.getAliasToProperties().entrySet()) {
String alias = entry.getKey();
Properties properties = entry.getValue();
- if(properties != null) {
+ if (properties != null) {
for (Property property : properties.getProperties()) {
metaDataServiceClien.addPropertyToCluster(appId, alias, property.getName(), property.getValue());
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/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 e0a676b..8949c27 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
@@ -25,10 +25,10 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.NetworkPartitionLbHolder;
-import org.apache.stratos.autoscaler.policy.model.DeploymentPolicy;
import org.apache.stratos.autoscaler.exception.AutoScalerException;
import org.apache.stratos.autoscaler.pojo.ServiceGroup;
import org.apache.stratos.autoscaler.policy.model.AutoscalePolicy;
+import org.apache.stratos.autoscaler.policy.model.DeploymentPolicy;
import org.apache.stratos.autoscaler.util.AutoScalerConstants;
import org.apache.stratos.autoscaler.util.Deserializer;
import org.apache.stratos.autoscaler.util.Serializer;
@@ -43,6 +43,7 @@ import org.wso2.carbon.registry.core.exceptions.RegistryException;
import org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -274,7 +275,6 @@ public class RegistryManager {
private Object retrieve(String resourcePath) {
try {
Resource resource = registryService.get(resourcePath);
-
return resource.getContent();
} catch (ResourceNotFoundException ignore) {
@@ -440,6 +440,45 @@ public class RegistryManager {
return group;
}
+ public ServiceGroup[] getServiceGroups() {
+ Object serializedObj;
+ List<ServiceGroup> serviceGroupList = new ArrayList<ServiceGroup>();
+ String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE + AutoScalerConstants.SERVICE_GROUP;
+ if (registryManager.resourceExist(resourcePath)) {
+ serializedObj = registryManager.retrieve(resourcePath);
+ } else {
+ return null;
+ }
+
+ String[] groupPathList = (String[]) serializedObj;
+
+ if (groupPathList != null) {
+ ServiceGroup serviceGroup;
+ for (String groupPath : groupPathList) {
+ serializedObj = registryManager.retrieve(groupPath);
+ if (serializedObj != null) {
+ Object dataObj = null;
+ try {
+ dataObj = Deserializer.deserializeFromByteArray((byte[]) serializedObj);
+ if (dataObj instanceof ServiceGroup) {
+ serviceGroup = (ServiceGroup) dataObj;
+ serviceGroupList.add(serviceGroup);
+ }
+ } catch (IOException e) {
+ throw new AutoScalerException("Error occurred while retrieving service group from Registry");
+ } catch (ClassNotFoundException e) {
+ throw new AutoScalerException("Error occurred while retrieving service group from Registry");
+ }
+
+ }
+ }
+ }
+
+ ServiceGroup[] groupArr = new ServiceGroup[serviceGroupList.size()];
+ groupArr = serviceGroupList.toArray(groupArr);
+ return groupArr;
+ }
+
public ServiceGroup removeServiceGroup(String name) throws Exception {
String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE +
AutoScalerConstants.SERVICE_GROUP + "/" + name;
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
index 1e4b1f1..3d99fb1 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
@@ -22,17 +22,16 @@ package org.apache.stratos.manager.client;
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.transport.http.HTTPConstants;
-import org.apache.commons.lang.NotImplementedException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.autoscaler.applications.pojo.xsd.ApplicationContext;
+import org.apache.stratos.autoscaler.pojo.xsd.ServiceGroup;
import org.apache.stratos.autoscaler.stub.*;
-import org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy;
import org.apache.stratos.autoscaler.stub.kubernetes.KubernetesGroup;
import org.apache.stratos.autoscaler.stub.kubernetes.KubernetesHost;
import org.apache.stratos.autoscaler.stub.kubernetes.KubernetesMaster;
import org.apache.stratos.autoscaler.stub.policy.model.AutoscalePolicy;
-import org.apache.stratos.autoscaler.applications.pojo.xsd.ApplicationContext;
-import org.apache.stratos.autoscaler.pojo.xsd.ServiceGroup;
+import org.apache.stratos.autoscaler.stub.policy.model.DeploymentPolicy;
import org.apache.stratos.cloud.controller.stub.deployment.partition.Partition;
import org.apache.stratos.cloud.controller.stub.pojo.Properties;
import org.apache.stratos.manager.internal.DataHolder;
@@ -87,7 +86,7 @@ public class AutoscalerServiceClient {
return partitions;
}
- public void undeployServiceGroupDefinition (String serviceGroupName)
+ public void undeployServiceGroupDefinition(String serviceGroupName)
throws RemoteException, AutoScalerServiceAutoScalerExceptionException {
stub.undeployServiceGroup(serviceGroupName);
}
@@ -232,16 +231,20 @@ public class AutoscalerServiceClient {
return stub.getServiceGroup(serviceGroupDefinitionName);
}
+ public ServiceGroup[] getServiceGroups() throws RemoteException {
+ return stub.getServiceGroups();
+ }
+
public void deployServiceGroup(ServiceGroup serviceGroup) throws AutoScalerServiceInvalidServiceGroupExceptionException, RemoteException {
stub.deployServiceGroup(serviceGroup);
}
- public void deployApplication (ApplicationContext applicationContext) throws
+ public void deployApplication(ApplicationContext applicationContext) throws
AutoScalerServiceApplicationDefinitionExceptionException, RemoteException {
stub.deployApplicationDefinition(applicationContext);
}
- public void undeployApplication (String applicationId, int tenantId, String tenantDomain) throws
+ public void undeployApplication(String applicationId, int tenantId, String tenantDomain) throws
AutoScalerServiceApplicationDefinitionExceptionException, RemoteException {
stub.unDeployApplicationDefinition(applicationId, tenantId, tenantDomain);
}
@@ -303,7 +306,7 @@ public class AutoscalerServiceClient {
AutoScalerServiceNonExistingKubernetesHostExceptionException {
return stub.updateKubernetesHost(kubernetesHost);
}
-
+
public void updateClusterMonitor(String clusterId, Properties properties) throws RemoteException, AutoScalerServiceInvalidArgumentExceptionException {
stub.updateClusterMonitor(clusterId, properties);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
index 0a70f8c..036c22e 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
@@ -43,28 +43,28 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
private static Log log = LogFactory.getLog(DefaultServiceGroupDeployer.class);
- public DefaultServiceGroupDeployer () {
+ public DefaultServiceGroupDeployer() {
}
- public void deployServiceGroupDefinition (Object serviceGroupDefinitionObj) throws InvalidServiceGroupException, ServiceGroupDefinitioException, ADCException {
+ public void deployServiceGroupDefinition(Object serviceGroupDefinitionObj) throws InvalidServiceGroupException, ServiceGroupDefinitioException, ADCException {
- ServiceGroupDefinition serviceGroupDefinition = null;
+ ServiceGroupDefinition serviceGroupDefinition = null;
ServiceGroup serviceGroup = null;
-
+
if (serviceGroupDefinitionObj == null) {
- if (log.isDebugEnabled()) {
- log.debug("deploying service group is null ");
+ if (log.isDebugEnabled()) {
+ log.debug("deploying service group is null ");
}
throw new InvalidServiceGroupException("Service Group definition not found");
}
if (serviceGroupDefinitionObj instanceof ServiceGroupDefinition) {
serviceGroupDefinition = (ServiceGroupDefinition) serviceGroupDefinitionObj;
-
+
if (log.isDebugEnabled()) {
- log.debug("deploying service group with name " + serviceGroupDefinition.getName());
+ log.debug("deploying service group with name " + serviceGroupDefinition.getName());
}
-
+
// convert serviceGroupDefinition to serviceGroup
serviceGroup = this.populateServiceGroupPojo(serviceGroupDefinition);
} else {
@@ -74,25 +74,25 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
// if any cartridges are specified in the group, they should be already deployed
if (serviceGroupDefinition.getCartridges() != null) {
-
- if (log.isDebugEnabled()) {
- log.debug("checking cartridges in service group " + serviceGroupDefinition.getName());
+
+ if (log.isDebugEnabled()) {
+ log.debug("checking cartridges in service group " + serviceGroupDefinition.getName());
}
-
+
List<String> cartridgeTypes = serviceGroupDefinition.getCartridges();
-
+
Set<String> duplicates = this.findDuplicates(cartridgeTypes);
-
+
if (duplicates.size() > 0) {
-
- StringBuffer buf = new StringBuffer();
- for (String dup : duplicates) {
- buf. append(dup).append(" ");
- }
- if (log.isDebugEnabled()) {
- log.debug("duplicate cartridges defined: " + buf.toString());
+
+ StringBuffer buf = new StringBuffer();
+ for (String dup : duplicates) {
+ buf.append(dup).append(" ");
}
- throw new InvalidServiceGroupException("Invalid Service Group definition, duplicate cartridges defined:" + buf.toString());
+ if (log.isDebugEnabled()) {
+ log.debug("duplicate cartridges defined: " + buf.toString());
+ }
+ throw new InvalidServiceGroupException("Invalid Service Group definition, duplicate cartridges defined:" + buf.toString());
}
CloudControllerServiceClient ccServiceClient = null;
@@ -106,112 +106,141 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
for (String cartridgeType : cartridgeTypes) {
try {
- if(ccServiceClient.getCartridgeInfo(cartridgeType) == null) {
+ if (ccServiceClient.getCartridgeInfo(cartridgeType) == null) {
// cartridge is not deployed, can't continue
- log.error("invalid cartridge found in service group " + cartridgeType);
+ log.error("invalid cartridge found in service group " + cartridgeType);
throw new InvalidServiceGroupException("No Cartridge Definition found with type " + cartridgeType);
}
} catch (RemoteException e) {
throw new ADCException(e);
} catch (CloudControllerServiceUnregisteredCartridgeExceptionException e) {
- throw new ADCException(e);
+ throw new ADCException(e);
}
}
}
// if any sub groups are specified in the group, they should be already deployed
if (serviceGroupDefinition.getSubGroups() != null) {
-
- if (log.isDebugEnabled()) {
- log.debug("checking subGroups in service group " + serviceGroupDefinition.getName());
+
+ if (log.isDebugEnabled()) {
+ log.debug("checking subGroups in service group " + serviceGroupDefinition.getName());
}
-
+
List<String> subGroupNames = serviceGroupDefinition.getSubGroups();
-
- Set<String> duplicates = this.findDuplicates(subGroupNames);
-
+
+ Set<String> duplicates = this.findDuplicates(subGroupNames);
+
if (duplicates.size() > 0) {
-
- StringBuffer buf = new StringBuffer();
- for (String dup : duplicates) {
- buf. append(dup).append(" ");
- }
- if (log.isDebugEnabled()) {
- log.debug("duplicate subGroups defined: " + buf.toString());
+
+ StringBuffer buf = new StringBuffer();
+ for (String dup : duplicates) {
+ buf.append(dup).append(" ");
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("duplicate subGroups defined: " + buf.toString());
}
- throw new InvalidServiceGroupException("Invalid Service Group definition, duplicate subGroups defined:" + buf.toString());
+ throw new InvalidServiceGroupException("Invalid Service Group definition, duplicate subGroups defined:" + buf.toString());
}
for (String subGroupName : subGroupNames) {
if (getServiceGroupDefinition(subGroupName) == null) {
// sub group not deployed, can't continue
- if (log.isDebugEnabled()) {
- log.debug("invalid sub group found in service group " + subGroupName);
- }
+ if (log.isDebugEnabled()) {
+ log.debug("invalid sub group found in service group " + subGroupName);
+ }
throw new InvalidServiceGroupException("No Service Group Definition found with name " + subGroupName);
}
}
}
-
+
AutoscalerServiceClient asServiceClient = null;
try {
asServiceClient = AutoscalerServiceClient.getServiceClient();
-
+
if (log.isDebugEnabled()) {
- log.debug("deplying to cloud controller service group " + serviceGroupDefinition.getName());
+ log.debug("deplying to cloud controller service group " + serviceGroupDefinition.getName());
}
asServiceClient.deployServiceGroup(serviceGroup);
} catch (AxisFault axisFault) {
throw new ADCException(axisFault);
- }catch (RemoteException e) {
+ } catch (RemoteException e) {
throw new ADCException(e);
} catch (AutoScalerServiceInvalidServiceGroupExceptionException e) {
e.printStackTrace();
}
}
- public ServiceGroupDefinition getServiceGroupDefinition (String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException {
+ public ServiceGroupDefinition getServiceGroupDefinition(String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException {
- if (log.isDebugEnabled()) {
- log.debug("getting service group from cloud controller " + serviceGroupDefinitionName);
+ if (log.isDebugEnabled()) {
+ log.debug("getting service group from cloud controller " + serviceGroupDefinitionName);
}
-
- AutoscalerServiceClient asServiceClient = null;
+
+ AutoscalerServiceClient asServiceClient = null;
try {
asServiceClient = AutoscalerServiceClient.getServiceClient();
-
+
if (log.isDebugEnabled()) {
- log.debug("deploying to cloud controller service group " + serviceGroupDefinitionName);
+ log.debug("deploying to cloud controller service group " + serviceGroupDefinitionName);
}
-
+
ServiceGroup serviceGroup = asServiceClient.getServiceGroup(serviceGroupDefinitionName);
ServiceGroupDefinition serviceGroupDef = populateServiceGroupDefinitionPojo(serviceGroup);
-
+
return serviceGroupDef;
} catch (AxisFault axisFault) {
throw new ADCException(axisFault);
} catch (RemoteException e) {
- throw new ADCException(e);
- }
+ throw new ADCException(e);
+ }
}
+ public ServiceGroupDefinition[] getServiceGroupDefinitions() throws ADCException {
+
+ if (log.isDebugEnabled()) {
+ log.debug("getting service group from cloud controller ");
+ }
- public void undeployServiceGroupDefinition (String name) throws ADCException, ServiceGroupDefinitioException {
+ AutoscalerServiceClient asServiceClient;
- //throw new ServiceGroupDefinitioException("method not supported");
-
- AutoscalerServiceClient autoscalerServiceClient = null;
-
- try {
+ try {
+ asServiceClient = AutoscalerServiceClient.getServiceClient();
+
+ ServiceGroup[] serviceGroups = asServiceClient.getServiceGroups();
+ if (serviceGroups == null || serviceGroups.length == 0) {
+ return null;
+ }
+
+ ServiceGroupDefinition[] serviceGroupDefinitions = new ServiceGroupDefinition[serviceGroups.length];
+ for (int i = 0; i < serviceGroups.length; i++) {
+ serviceGroupDefinitions[i] = populateServiceGroupDefinitionPojo(serviceGroups[i]);
+ }
+ return serviceGroupDefinitions;
+
+ } catch (AxisFault axisFault) {
+ throw new ADCException(axisFault);
+ } catch (RemoteException e) {
+ throw new ADCException(e);
+ }
+ }
+
+
+ public void undeployServiceGroupDefinition(String name) throws ADCException, ServiceGroupDefinitioException {
+
+ //throw new ServiceGroupDefinitioException("method not supported");
+
+ AutoscalerServiceClient autoscalerServiceClient = null;
+
+ try {
autoscalerServiceClient = AutoscalerServiceClient.getServiceClient();
-
+
if (log.isDebugEnabled()) {
- log.debug("undeploying service group from cloud controller " + name);
+ log.debug("undeploying service group from cloud controller " + name);
}
autoscalerServiceClient.undeployServiceGroupDefinition(name);
@@ -219,47 +248,47 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
} catch (AxisFault axisFault) {
throw new ADCException(axisFault);
} catch (RemoteException e) {
- throw new ADCException(e);
- } catch (AutoScalerServiceAutoScalerExceptionException e) {
+ throw new ADCException(e);
+ } catch (AutoScalerServiceAutoScalerExceptionException e) {
throw new ADCException(e);
}
}
-
-
- private ServiceGroup populateServiceGroupPojo (ServiceGroupDefinition serviceGroupDefinition ) throws ServiceGroupDefinitioException {
- ServiceGroup servicegroup = new ServiceGroup();
-
- // implement conversion (mostly List -> Array)
- servicegroup.setName(serviceGroupDefinition.getName());
- List<String> subGroupsDef = serviceGroupDefinition.getSubGroups();
- List<String> cartridgesDef = serviceGroupDefinition.getCartridges();
-
-
- if (subGroupsDef == null) {
- subGroupsDef = new ArrayList<String>(0);
- }
-
- if (cartridgesDef == null) {
- cartridgesDef = new ArrayList<String>(0);
- }
-
- String [] subGroups = new String[subGroupsDef.size()];
- String [] cartridges = new String[cartridgesDef.size()];
-
- subGroups = subGroupsDef.toArray(subGroups);
- cartridges = cartridgesDef.toArray(cartridges);
-
- servicegroup.setSubGroups(subGroups);
- servicegroup.setCartridges(cartridges);
-
- DependencyDefinitions depDefs = serviceGroupDefinition.getDependencies();
-
+
+
+ private ServiceGroup populateServiceGroupPojo(ServiceGroupDefinition serviceGroupDefinition) throws ServiceGroupDefinitioException {
+ ServiceGroup servicegroup = new ServiceGroup();
+
+ // implement conversion (mostly List -> Array)
+ servicegroup.setName(serviceGroupDefinition.getName());
+ List<String> subGroupsDef = serviceGroupDefinition.getSubGroups();
+ List<String> cartridgesDef = serviceGroupDefinition.getCartridges();
+
+
+ if (subGroupsDef == null) {
+ subGroupsDef = new ArrayList<String>(0);
+ }
+
+ if (cartridgesDef == null) {
+ cartridgesDef = new ArrayList<String>(0);
+ }
+
+ String[] subGroups = new String[subGroupsDef.size()];
+ String[] cartridges = new String[cartridgesDef.size()];
+
+ subGroups = subGroupsDef.toArray(subGroups);
+ cartridges = cartridgesDef.toArray(cartridges);
+
+ servicegroup.setSubGroups(subGroups);
+ servicegroup.setCartridges(cartridges);
+
+ DependencyDefinitions depDefs = serviceGroupDefinition.getDependencies();
+
if (depDefs != null) {
Dependencies deps = new Dependencies();
List<String> startupOrdersDef = depDefs.getStartupOrders();
if (startupOrdersDef != null) {
- String [] startupOrders = new String [startupOrdersDef.size()];
- startupOrders = startupOrdersDef.toArray(startupOrders);
+ String[] startupOrders = new String[startupOrdersDef.size()];
+ startupOrders = startupOrdersDef.toArray(startupOrders);
deps.setStartupOrders(startupOrders);
}
// validate termination behavior
@@ -267,20 +296,20 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
deps.setTerminationBehaviour(depDefs.getTerminationBehaviour());
servicegroup.setDependencies(deps);
}
-
- return servicegroup;
+
+ return servicegroup;
}
-
- private ServiceGroupDefinition populateServiceGroupDefinitionPojo (ServiceGroup serviceGroup ) {
- ServiceGroupDefinition servicegroupDef = new ServiceGroupDefinition();
- servicegroupDef.setName(serviceGroup.getName());
- String [] cartridges = serviceGroup.getCartridges();
- String [] subGroups = serviceGroup.getSubGroups();
- org.apache.stratos.autoscaler.pojo.xsd.Dependencies deps = serviceGroup.getDependencies();
+
+ private ServiceGroupDefinition populateServiceGroupDefinitionPojo(ServiceGroup serviceGroup) {
+ ServiceGroupDefinition servicegroupDef = new ServiceGroupDefinition();
+ servicegroupDef.setName(serviceGroup.getName());
+ String[] cartridges = serviceGroup.getCartridges();
+ String[] subGroups = serviceGroup.getSubGroups();
+ org.apache.stratos.autoscaler.pojo.xsd.Dependencies deps = serviceGroup.getDependencies();
if (deps != null) {
DependencyDefinitions depsDef = new DependencyDefinitions();
- String [] startupOrders = deps.getStartupOrders();
+ String[] startupOrders = deps.getStartupOrders();
if (startupOrders != null && startupOrders[0] != null) {
List<String> startupOrdersDef = Arrays.asList(startupOrders);
depsDef.setStartupOrders(startupOrdersDef);
@@ -298,26 +327,26 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
List<String> cartridgesDef = new ArrayList<String>(Arrays.asList(cartridges));
List<String> subGroupsDef = new ArrayList<String>(Arrays.asList(subGroups));
- if(cartridges[0] != null){
+ if (cartridges[0] != null) {
servicegroupDef.setCartridges(cartridgesDef);
}
- if(subGroups[0] != null) {
+ if (subGroups[0] != null) {
servicegroupDef.setSubGroups(subGroupsDef);
}
-
- return servicegroupDef;
+
+ return servicegroupDef;
}
/**
* Validates terminationBehavior. The terminationBehavior should be one of the following:
- * 1. terminate-none
- * 2. terminate-dependents
- * 3. terminate-all
+ * 1. terminate-none
+ * 2. terminate-dependents
+ * 3. terminate-all
*
* @throws ServiceGroupDefinitioException if terminationBehavior is different to what is
- * listed above
+ * listed above
*/
- private static void validateTerminationBehavior (String terminationBehavior) throws ServiceGroupDefinitioException {
+ private static void validateTerminationBehavior(String terminationBehavior) throws ServiceGroupDefinitioException {
if (!(terminationBehavior == null || "terminate-none".equals(terminationBehavior) ||
"terminate-dependents".equals(terminationBehavior) || "terminate-all".equals(terminationBehavior))) {
@@ -329,21 +358,21 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
/**
* returns any duplicates in a List
+ *
* @param checkedList
* @return
*/
- private Set<String> findDuplicates(List<String> checkedList)
- {
- final Set<String> retVals = new HashSet<String>();
- final Set<String> set1 = new HashSet<String>();
-
- for (String val : checkedList) {
-
- if (!set1.add(val)) {
- retVals.add(val);
- }
- }
- return retVals;
+ private Set<String> findDuplicates(List<String> checkedList) {
+ final Set<String> retVals = new HashSet<String>();
+ final Set<String> set1 = new HashSet<String>();
+
+ for (String val : checkedList) {
+
+ if (!set1.add(val)) {
+ retVals.add(val);
+ }
+ }
+ return retVals;
}
-
- }
+
+}
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/ServiceGroupDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/ServiceGroupDeployer.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/ServiceGroupDeployer.java
index 1fc28e5..342d5cc 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/ServiceGroupDeployer.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/ServiceGroupDeployer.java
@@ -27,10 +27,12 @@ import org.apache.stratos.manager.grouping.definitions.ServiceGroupDefinition;
public interface ServiceGroupDeployer {
- public void deployServiceGroupDefinition (Object serviceGroupObj) throws InvalidServiceGroupException, ServiceGroupDefinitioException,
+ public void deployServiceGroupDefinition(Object serviceGroupObj) throws InvalidServiceGroupException, ServiceGroupDefinitioException,
ADCException, CloudControllerServiceUnregisteredCartridgeExceptionException;
- public ServiceGroupDefinition getServiceGroupDefinition (String serviceGroupDefinitionName) throws ServiceGroupDefinitioException, ADCException;
+ public ServiceGroupDefinition getServiceGroupDefinition(String serviceGroupDefinitionName) throws ServiceGroupDefinitioException, ADCException;
- public void undeployServiceGroupDefinition (String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException;
+ public void undeployServiceGroupDefinition(String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException;
+
+ ServiceGroupDefinition[] getServiceGroupDefinitions() throws ADCException;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/manager/ServiceGroupingManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/manager/ServiceGroupingManager.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/manager/ServiceGroupingManager.java
index 26096dd..91d47c1 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/manager/ServiceGroupingManager.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/manager/ServiceGroupingManager.java
@@ -19,8 +19,6 @@
package org.apache.stratos.manager.grouping.manager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
import org.apache.stratos.manager.exception.ADCException;
import org.apache.stratos.manager.exception.InvalidServiceGroupException;
@@ -35,22 +33,27 @@ public class ServiceGroupingManager {
//private static Log log = LogFactory.getLog(ServiceGroupingManager.class);
private ServiceGroupDeployer serviceGroupDeployer;
- public ServiceGroupingManager () {
+ public ServiceGroupingManager() {
serviceGroupDeployer = new DefaultServiceGroupDeployer();
}
- public void deployServiceGroupDefinition (ServiceGroupDefinition serviceGroupDefinition) throws InvalidServiceGroupException,
+ public void deployServiceGroupDefinition(ServiceGroupDefinition serviceGroupDefinition) throws InvalidServiceGroupException,
CloudControllerServiceUnregisteredCartridgeExceptionException, ServiceGroupDefinitioException, ADCException {
serviceGroupDeployer.deployServiceGroupDefinition(serviceGroupDefinition);
}
- public ServiceGroupDefinition getServiceGroupDefinition (String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException {
+ public ServiceGroupDefinition getServiceGroupDefinition(String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException {
return serviceGroupDeployer.getServiceGroupDefinition(serviceGroupDefinitionName);
}
- public void undeployServiceGroupDefinition (String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException {
+ public ServiceGroupDefinition[] getServiceGroupDefinitions() throws ADCException, ServiceGroupDefinitioException {
+
+ return serviceGroupDeployer.getServiceGroupDefinitions();
+ }
+
+ public void undeployServiceGroupDefinition(String serviceGroupDefinitionName) throws ADCException, ServiceGroupDefinitioException {
serviceGroupDeployer.undeployServiceGroupDefinition(serviceGroupDefinitionName);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/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 ff34051..7ab86ce 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
@@ -110,6 +110,7 @@ public class StratosApiV41 extends AbstractApi {
* This method gets called by the client who are interested in using session mechanism to authenticate
* themselves in subsequent calls. This method call get authenticated by the basic authenticator.
* Once the authenticated call received, the method creates a session and returns the session id.
+ *
* @return
*/
@GET
@@ -138,13 +139,13 @@ public class StratosApiV41 extends AbstractApi {
// Grouping
public Response deployApplicationDefinition(ApplicationDefinition applicationDefinitionBean)
throws RestAPIException {
- StratosApiV41Utils.deployApplicationDefinition(applicationDefinitionBean, getConfigContext(),
- getUsername(), getTenantDomain());
- URI url = uriInfo.getAbsolutePathBuilder().path(applicationDefinitionBean.getApplicationId()).build();
- return Response.created(url).build();
+ StratosApiV41Utils.deployApplicationDefinition(applicationDefinitionBean, getConfigContext(),
+ getUsername(), getTenantDomain());
+ URI url = uriInfo.getAbsolutePathBuilder().path(applicationDefinitionBean.getApplicationId()).build();
+ return Response.created(url).build();
}
-
+
@DELETE
@Path("/application/definition/{applicationId}")
@Produces("application/json")
@@ -158,7 +159,7 @@ public class StratosApiV41 extends AbstractApi {
getTenantDomain());
return Response.noContent().build();
}
-
+
@POST
@Path("/cartridge/definition/")
@@ -190,10 +191,10 @@ public class StratosApiV41 extends AbstractApi {
@Consumes("application/json")
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
@SuperTenantService(true)
- public Response deployServiceGroupDefinition (ServiceGroupDefinition serviceGroupDefinition)
+ public Response deployServiceGroupDefinition(ServiceGroupDefinition serviceGroupDefinition)
throws RestAPIException {
StratosApiV41Utils.deployServiceGroupDefinition(serviceGroupDefinition);
- URI url = uriInfo.getAbsolutePathBuilder().path(serviceGroupDefinition.getName()).build();
+ URI url = uriInfo.getAbsolutePathBuilder().path(serviceGroupDefinition.getName()).build();
return Response.created(url).build();
}
@@ -202,19 +203,30 @@ public class StratosApiV41 extends AbstractApi {
@Produces("application/json")
@Consumes("application/json")
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
- public Response getServiceGroupDefinition (@PathParam("groupDefinitionName") String groupDefinitionName)
+ public Response getServiceGroupDefinition(@PathParam("groupDefinitionName") String groupDefinitionName)
throws RestAPIException {
Response.ResponseBuilder rb = Response.ok().entity(StratosApiV41Utils.getServiceGroupDefinition(groupDefinitionName));
return rb.build();
}
+ @GET
+ @Path("/groups")
+ @Produces("application/json")
+ @Consumes("application/json")
+ @AuthorizationAction("/permission/protected/manage/monitor/tenants")
+ public Response getServiceGroups()
+ throws RestAPIException {
+ Response.ResponseBuilder rb = Response.ok().entity(StratosApiV41Utils.getServiceGroupDefinitions());
+ return rb.build();
+ }
+
@DELETE
@Path("/group/definition/{groupDefinitionName}")
@Produces("application/json")
@Consumes("application/json")
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
@SuperTenantService(true)
- public Response undeployServiceGroupDefinition (@PathParam("groupDefinitionName") String groupDefinitionName)
+ public Response undeployServiceGroupDefinition(@PathParam("groupDefinitionName") String groupDefinitionName)
throws RestAPIException {
StratosApiV41Utils.undeployServiceGroupDefinition(groupDefinitionName);
@@ -401,10 +413,10 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
public Response getSubscriptionsOfApplication(@PathParam("application_id") String applicationId) throws RestAPIException {
ApplicationSubscription subscriptions = StratosApiV41Utils.getApplicationSubscriptions(applicationId, getConfigContext());
- if(subscriptions == null){
+ if (subscriptions == null) {
return Response.status(Response.Status.NOT_FOUND).build();
}
- return Response.ok().entity(subscriptions).build();
+ return Response.ok().entity(subscriptions).build();
}
@GET
@@ -413,16 +425,17 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
public Response getApplications() throws RestAPIException {
ApplicationBean[] applications = StratosApiV41Utils.getApplications();
- if(applications == null) {
+ if (applications == null) {
return Response.status(Response.Status.NOT_FOUND).build();
- }else{
- return Response.ok().entity(applications).build();
+ } else {
+ return Response.ok().entity(applications).build();
}
}
/**
* This API resource provides information about the application denoted by the given appId. Details includes,
* Application details, top level cluster details, details of the group and sub groups.
+ *
* @param applicationId Id of the application.
* @return Json representing the application details with 200 as HTTP status. HTTP 404 is returned when there is
* no application with given Id.
@@ -435,10 +448,10 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
public Response getApplicationInfo(@PathParam("appId") String applicationId) throws RestAPIException {
ApplicationBean application = StratosApiV41Utils.getApplicationInfo(applicationId);
- if(application == null) {
+ if (application == null) {
return Response.status(Response.Status.NOT_FOUND).build();
- }else{
- return Response.ok().entity(application).build();
+ } else {
+ return Response.ok().entity(application).build();
}
}
@@ -620,7 +633,7 @@ public class StratosApiV41 extends AbstractApi {
}
return Response.ok().entity(cluster).build();
}
-
+
@PUT
@Path("/subscriptions/{subscriptionAlias}/properties")
@Consumes("application/json")
@@ -1093,13 +1106,13 @@ public class StratosApiV41 extends AbstractApi {
public Response deployService(ServiceDefinitionBean serviceDefinitionBean)
throws RestAPIException {
- log.info("Service definition request.. : " + serviceDefinitionBean.getServiceName());
- // super tenant Deploying service (MT)
- // here an alias is generated
- StratosApiV41Utils.deployService(serviceDefinitionBean.getCartridgeType(), UUID.randomUUID().toString(), serviceDefinitionBean.getAutoscalingPolicyName(),
- serviceDefinitionBean.getDeploymentPolicyName(), getTenantDomain(), getUsername(), getTenantId(),
- serviceDefinitionBean.getClusterDomain(), serviceDefinitionBean.getClusterSubDomain(),
- serviceDefinitionBean.getTenantRange(), serviceDefinitionBean.getIsPublic());
+ log.info("Service definition request.. : " + serviceDefinitionBean.getServiceName());
+ // super tenant Deploying service (MT)
+ // here an alias is generated
+ StratosApiV41Utils.deployService(serviceDefinitionBean.getCartridgeType(), UUID.randomUUID().toString(), serviceDefinitionBean.getAutoscalingPolicyName(),
+ serviceDefinitionBean.getDeploymentPolicyName(), getTenantDomain(), getUsername(), getTenantId(),
+ serviceDefinitionBean.getClusterDomain(), serviceDefinitionBean.getClusterSubDomain(),
+ serviceDefinitionBean.getTenantRange(), serviceDefinitionBean.getIsPublic());
URI url = uriInfo.getAbsolutePathBuilder().path(serviceDefinitionBean.getServiceName()).build();
return Response.created(url).build();
@@ -1298,6 +1311,7 @@ public class StratosApiV41 extends AbstractApi {
}
return Response.status(Response.Status.NOT_FOUND).build();
}
+
@POST
@Path("/user")
@Consumes("application/json")
@@ -1531,5 +1545,5 @@ public class StratosApiV41 extends AbstractApi {
}
return Response.noContent().build();
}
-
+
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/f7f23be3/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 c58c9b5..b148e1d 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
@@ -1478,6 +1478,16 @@ public class StratosApiV41Utils {
}
}
+ public static ServiceGroupDefinition[] getServiceGroupDefinitions() throws RestAPIException {
+ try {
+ return serviceGropingManager.getServiceGroupDefinitions();
+ } catch (ADCException e) {
+ throw new RestAPIException(e);
+ } catch (ServiceGroupDefinitioException e) {
+ throw new RestAPIException(e);
+ }
+ }
+
public static void undeployServiceGroupDefinition(String serviceGroupDefinitionName) throws RestAPIException {
try {
@@ -1497,7 +1507,7 @@ public class StratosApiV41Utils {
try {
ApplicationManager.acquireReadLockForApplications();
ApplicationBean applicationBean;
- for(Application application : ApplicationManager.getApplications().getApplications().values()) {
+ for (Application application : ApplicationManager.getApplications().getApplications().values()) {
applicationBean = PojoConverter.applicationToBean(application);
addClustersToApplicationBean(applicationBean, application);
addGroupsToApplicationBean(applicationBean, application);
[5/7] stratos git commit: fixing NPE when GET non existing group
Posted by ud...@apache.org.
fixing NPE when GET non existing group
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a249362d
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a249362d
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a249362d
Branch: refs/heads/master
Commit: a249362d8d1a09caf40f5278091ea1baecc38a6a
Parents: fa667ff
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Nov 12 21:55:37 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Nov 12 22:13:06 2014 +0530
----------------------------------------------------------------------
.../grouping/deployer/DefaultServiceGroupDeployer.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/a249362d/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
index 036c22e..b7d1572 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
@@ -185,12 +185,15 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
asServiceClient = AutoscalerServiceClient.getServiceClient();
if (log.isDebugEnabled()) {
- log.debug("deploying to cloud controller service group " + serviceGroupDefinitionName);
+ log.debug(String.format("Calling AS to get service group %s", serviceGroupDefinitionName));
}
ServiceGroup serviceGroup = asServiceClient.getServiceGroup(serviceGroupDefinitionName);
- ServiceGroupDefinition serviceGroupDef = populateServiceGroupDefinitionPojo(serviceGroup);
+ if (serviceGroup == null) {
+ return null;
+ }
+ ServiceGroupDefinition serviceGroupDef = populateServiceGroupDefinitionPojo(serviceGroup);
return serviceGroupDef;
} catch (AxisFault axisFault) {
[7/7] stratos git commit: return 404 if no service group found in GET
Posted by ud...@apache.org.
return 404 if no service group found in GET
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/c0e8d4f4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/c0e8d4f4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/c0e8d4f4
Branch: refs/heads/master
Commit: c0e8d4f4c6c8777eae8bddbde339041c1f912a76
Parents: 37bfda4
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Nov 12 22:12:55 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Nov 12 22:13:06 2014 +0530
----------------------------------------------------------------------
.../org/apache/stratos/rest/endpoint/api/StratosApiV41.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/c0e8d4f4/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 2da40c7..b383641 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
@@ -205,7 +205,14 @@ public class StratosApiV41 extends AbstractApi {
@AuthorizationAction("/permission/protected/manage/monitor/tenants")
public Response getServiceGroupDefinition(@PathParam("groupDefinitionName") String groupDefinitionName)
throws RestAPIException {
- Response.ResponseBuilder rb = Response.ok().entity(StratosApiV41Utils.getServiceGroupDefinition(groupDefinitionName));
+ ServiceGroupDefinition serviceGroupDefinition = StratosApiV41Utils.getServiceGroupDefinition(groupDefinitionName);
+ Response.ResponseBuilder rb;
+ if (serviceGroupDefinition != null) {
+ rb = Response.ok().entity(serviceGroupDefinition);
+ } else {
+ rb = Response.status(Response.Status.NOT_FOUND);
+ }
+
return rb.build();
}
[6/7] stratos git commit: fixing STRATOS-956 Stratos successfully
delete non existing groups
Posted by ud...@apache.org.
fixing STRATOS-956 Stratos successfully delete non existing groups
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/37bfda45
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/37bfda45
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/37bfda45
Branch: refs/heads/master
Commit: 37bfda451e73a746e167a17249a84d2a5f526b4d
Parents: a249362
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Nov 12 22:12:20 2014 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Nov 12 22:13:06 2014 +0530
----------------------------------------------------------------------
.../org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java | 3 ++-
.../org/apache/stratos/autoscaler/registry/RegistryManager.java | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/37bfda45/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
index 24cca7c..867a1aa 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
@@ -50,6 +50,7 @@ import org.apache.stratos.messaging.domain.applications.Application;
import org.apache.stratos.metadata.client.defaults.DefaultMetaDataServiceClient;
import org.apache.stratos.metadata.client.defaults.MetaDataServiceClient;
import org.apache.stratos.metadata.client.exception.MetaDataServiceClientException;
+import org.wso2.carbon.registry.api.RegistryException;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -471,7 +472,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
public void undeployServiceGroup(String name) throws AutoScalerException {
try {
RegistryManager.getInstance().removeServiceGroup(name);
- } catch (Exception e) {
+ } catch (RegistryException e) {
throw new AutoScalerException("Error occurred while removing the service groups", e);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/37bfda45/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 b544339..03ab3e3 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
@@ -479,7 +479,7 @@ public class RegistryManager {
return groupArr;
}
- public void removeServiceGroup(String name) throws Exception {
+ public void removeServiceGroup(String name) throws RegistryException {
if (StringUtils.isEmpty(name)) {
throw new IllegalArgumentException("Name of the service group can not be empty");
}
@@ -491,6 +491,8 @@ public class RegistryManager {
if (log.isDebugEnabled()) {
log.debug(String.format("Service group %s is removed from registry", name));
}
+ } else {
+ throw new AutoScalerException("No service group is found with name" + name);
}
}