You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by sa...@apache.org on 2014/12/04 13:50:00 UTC

[1/5] stratos git commit: Supporting new group and application JSON formats STRATOS-1018

Repository: stratos
Updated Branches:
  refs/heads/master 707f11171 -> 86530242c


http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/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 4081a1d..a4d03f5 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,4 +1,4 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://network.partition.deployment.policy.pojo.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://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax216="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax227="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax212="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax224="http://exce
 ption.autoscaler.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/wsdl/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://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://common.stratos.apache.org/xsd" xmlns:ax23="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax219="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax227="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax221="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax224="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://autoscale.policy
 .pojo.autoscaler.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/wsdl/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 attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd">
@@ -9,15 +9,15 @@
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"></xs:element>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
-                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax212:LoadThresholds"></xs:element>
+                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax211:LoadThresholds"></xs:element>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="LoadThresholds">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax212:LoadAverageThresholds"></xs:element>
-                    <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax212:MemoryConsumptionThresholds"></xs:element>
-                    <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax212:RequestsInFlightThresholds"></xs:element>
+                    <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax211:LoadAverageThresholds"></xs:element>
+                    <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax211:MemoryConsumptionThresholds"></xs:element>
+                    <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax211:RequestsInFlightThresholds"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="LoadAverageThresholds">
@@ -39,16 +39,14 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax217="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax222="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
             <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="ax216:ComponentContext"></xs:element>
-                    <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax216:SubscribableInfoContext"></xs:element>
+                    <xs:element minOccurs="0" name="components" nillable="true" type="ax221:ComponentContext"></xs:element>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></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>
@@ -56,34 +54,16 @@
             </xs:complexType>
             <xs:complexType name="ComponentContext">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax216:DependencyContext"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax216:GroupContext"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax216:SubscribableContext"></xs:element>
-                </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="cartridgeContexts" nillable="true" type="ax221:CartridgeContext"></xs:element>
+                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax221:DependencyContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax221:GroupContext"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="GroupContext">
+            <xs:complexType name="CartridgeContext">
                 <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="ax216:GroupContext"></xs:element>
-                    <xs:element minOccurs="0" name="groupInstanceMonitoringEnabled" type="xs:boolean"></xs:element>
-                    <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"></xs:element>
-                    <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"></xs:element>
-                    <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"></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="ax216:SubscribableContext"></xs:element>
-                </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="cartridgeMax" type="xs:int"></xs:element>
+                    <xs:element minOccurs="0" name="cartridgeMin" type="xs:int"></xs:element>
+                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax221:SubscribableInfoContext"></xs:element>
                     <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
@@ -96,12 +76,29 @@
                     <xs:element minOccurs="0" name="maxMembers" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="minMembers" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"></xs:element>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"></xs:element>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25: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: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:sequence>
+            </xs:complexType>
+            <xs:complexType name="GroupContext">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax221:CartridgeContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax221:GroupContext"></xs:element>
+                    <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"></xs:element>
+                    <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"></xs:element>
+                    <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"></xs:element>
+                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+                </xs:sequence>
+            </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="ServiceGroup">
@@ -121,16 +118,16 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax222="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax27="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:complexType name="DeploymentPolicy">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax29:Partition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax27:Partition"></xs:element>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax29:ApplicationLevelNetworkPartition"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax221:ChildPolicy"></xs:element>
-                    <xs:element minOccurs="0" name="childPolicyHolder" nillable="true" type="ax29:ChildPolicyHolder"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax27:ApplicationLevelNetworkPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax27:ChildLevelNetworkPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax23:ChildPolicy"></xs:element>
+                    <xs:element minOccurs="0" name="childPolicyHolder" nillable="true" type="ax27:ChildPolicyHolder"></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>
@@ -139,7 +136,7 @@
             </xs:complexType>
             <xs:complexType name="ChildPolicy">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax27:ChildLevelNetworkPartition"></xs:element>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
@@ -151,14 +148,14 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax210="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax26="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
             <xs:complexType name="Partition">
                 <xs:sequence>
                     <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 minOccurs="0" name="properties" nillable="true" type="ax26:Properties"></xs:element>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></xs:element>
                     <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
@@ -166,12 +163,12 @@
                 <xs:sequence>
                     <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"></xs:element>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax29:Partition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax24:Partition"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ChildLevelNetworkPartition">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax29:ChildLevelPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax24:ChildLevelPartition"></xs:element>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="min" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"></xs:element>
@@ -194,7 +191,7 @@
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
             <xs:complexType name="Properties">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax26:Property"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Property">
@@ -204,420 +201,420 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax215="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax28="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax223="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" xmlns:ax24="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax228="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://pojo.applications.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
-            <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
+        <xs:schema xmlns:ax220="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax28="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" xmlns:ax216="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax228="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+            <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
+            <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
+            <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
+            <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"></xs:import>
+            <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
+            <xs:element name="getValidDeploymentPoliciesforCartridge">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax23:NonExistingKubernetesGroupException"></xs:element>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesGroup">
+            <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesGroupResponse">
+            <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax29:InvalidPolicyException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getPartitionsOfGroup">
+            <xs:element name="addDeploymentPolicy">
                 <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="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getPartitionsOfGroupResponse">
+            <xs:element name="addDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:Partition"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicy">
+            <xs:element name="updateDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicyResponse">
+            <xs:element name="updateDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceApplicationDefinitionException">
+            <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax214:ApplicationDefinitionException"></xs:element>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployApplicationDefinition">
+            <xs:element name="addAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax216:ApplicationContext"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="unDeployApplicationDefinition">
+            <xs:element name="updateAutoScalingPolicy">
                 <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="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
+            <xs:element name="updateAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax23:InvalidKubernetesMasterException"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
+            <xs:element name="getAutoscalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax23:NonExistingKubernetesMasterException"></xs:element>
+                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesMaster">
+            <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax28:KubernetesMaster"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesMasterResponse">
+            <xs:element name="getNetworkPartitions">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
+            <xs:element name="getNetworkPartitionsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax23:InvalidKubernetesHostException"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:ApplicationLevelNetworkPartition"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
+            <xs:element name="getAllKubernetesGroups">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax23:NonExistingKubernetesHostException"></xs:element>
-                    </xs:sequence>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesHost">
+            <xs:element name="getAllKubernetesGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax28:KubernetesHost"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax216:KubernetesGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesHostResponse">
+            <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="ax217:NonExistingKubernetesGroupException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidPolicyException">
+            <xs:element name="getMasterForKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax219:InvalidPolicyException"></xs:element>
+                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateDeploymentPolicy">
+            <xs:element name="getMasterForKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax221:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax216:KubernetesMaster"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateDeploymentPolicyResponse">
+            <xs:element name="getHostsForKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllDeploymentPolicies">
+            <xs:element name="getHostsForKubernetesGroupResponse">
                 <xs:complexType>
-                    <xs:sequence></xs:sequence>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax216:KubernetesHost"></xs:element>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllDeploymentPoliciesResponse">
+            <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax217:InvalidKubernetesGroupException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllAutoScalingPolicy">
+            <xs:element name="addKubernetesGroup">
                 <xs:complexType>
-                    <xs:sequence></xs:sequence>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax216:KubernetesGroup"></xs:element>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllAutoScalingPolicyResponse">
+            <xs:element name="addKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getValidDeploymentPoliciesforCartridge">
+            <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax217:InvalidKubernetesHostException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
+            <xs:element name="addKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax221:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax216:KubernetesHost"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addDeploymentPolicy">
+            <xs:element name="addKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax221:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addDeploymentPolicyResponse">
+            <xs:element name="removeKubernetesGroup">
                 <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>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicy">
+            <xs:element name="removeKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicyResponse">
+            <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax217:NonExistingKubernetesHostException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicy">
+            <xs:element name="removeKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
+                        <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicyResponse">
+            <xs:element name="removeKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitions">
+            <xs:element name="AutoScalerServiceApplicationDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax219:ApplicationDefinitionException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitionsResponse">
+            <xs:element name="deployApplicationDefinition">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ApplicationLevelNetworkPartition"></xs:element>
+                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax221:ApplicationContext"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllKubernetesGroups">
+            <xs:element name="unDeployApplicationDefinition">
                 <xs:complexType>
-                    <xs:sequence></xs:sequence>
+                    <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:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllKubernetesGroupsResponse">
+            <xs:element name="AutoScalerServiceInvalidArgumentException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax224:InvalidArgumentException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getMasterForKubernetesGroup">
+            <xs:element name="updateClusterMonitor">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getMasterForKubernetesGroupResponse">
+            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesMaster"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax217:InvalidServiceGroupException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getHostsForKubernetesGroup">
+            <xs:element name="deployServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax228:ServiceGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getHostsForKubernetesGroupResponse">
+            <xs:element name="serviceGroupExist">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesHost"></xs:element>
+                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
+            <xs:element name="serviceGroupExistResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax23:InvalidKubernetesGroupException"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesGroup">
+            <xs:element name="AutoScalerServiceAutoScalerException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax28:KubernetesGroup"></xs:element>
+                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax224:AutoScalerException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesGroupResponse">
+            <xs:element name="undeployServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesHost">
+            <xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
                 <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="ax28:KubernetesHost"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax217:InvalidKubernetesMasterException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesHostResponse">
+            <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax217:NonExistingKubernetesMasterException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesGroup">
+            <xs:element name="updateKubernetesMaster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax216:KubernetesMaster"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesGroupResponse">
+            <xs:element name="updateKubernetesMasterResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesHost">
+            <xs:element name="updateKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax216:KubernetesHost"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesHostResponse">
+            <xs:element name="updateKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidArgumentException">
+            <xs:element name="getKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax224:InvalidArgumentException"></xs:element>
+                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateClusterMonitor">
+            <xs:element name="getKubernetesGroupResponse">
                 <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="ax26:Properties"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax216:KubernetesGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
+            <xs:element name="getPartitionsOfGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax23:InvalidServiceGroupException"></xs:element>
+                        <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:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployServiceGroup">
+            <xs:element name="getPartitionsOfGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax228:ServiceGroup"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:Partition"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="serviceGroupExist">
+            <xs:element name="getAllDeploymentPolicies">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
-                    </xs:sequence>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="serviceGroupExistResponse">
+            <xs:element name="getAllDeploymentPoliciesResponse">
                 <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="ax28:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceAutoScalerException">
+            <xs:element name="getAllAutoScalingPolicy">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax224:AutoScalerException"></xs:element>
-                    </xs:sequence>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="undeployServiceGroup">
+            <xs:element name="getAllAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -631,7 +628,7 @@
             <xs:element name="getDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax221:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -662,76 +659,76 @@
                 </xs:complexType>
             </xs:element>
         </xs:schema>
-        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd">
-            <xs:complexType name="NonExistingKubernetesGroupException">
+        <xs:schema xmlns:ax215="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="KubernetesGroup">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+                    <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="ax214:KubernetesHost"></xs:element>
+                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax214:KubernetesMaster"></xs:element>
+                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax214:PortRange"></xs:element>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesMasterException">
+            <xs:complexType name="KubernetesHost">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+                    <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="ax25:Properties"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="NonExistingKubernetesMasterException">
+            <xs:complexType name="KubernetesMaster">
+                <xs:complexContent>
+                    <xs:extension base="ax214: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="PortRange">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+                    <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:complexType name="InvalidKubernetesHostException">
+        </xs:schema>
+        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd">
+            <xs:complexType name="NonExistingKubernetesGroupException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="NonExistingKubernetesHostException">
+            <xs:complexType name="InvalidKubernetesGroupException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesGroupException">
+            <xs:complexType name="InvalidKubernetesHostException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidServiceGroupException">
+            <xs:complexType name="NonExistingKubernetesHostException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-        </xs:schema>
-        <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:import>
-            <xs:complexType name="KubernetesGroup">
+            <xs:complexType name="InvalidServiceGroupException">
                 <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="ax25:KubernetesHost"></xs:element>
-                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax25:KubernetesMaster"></xs:element>
-                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax25:PortRange"></xs:element>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="KubernetesHost">
+            <xs:complexType name="InvalidKubernetesMasterException">
                 <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="ax27:Properties"></xs:element>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
-            <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:element>
-                        </xs:sequence>
-                    </xs:extension>
-                </xs:complexContent>
-            </xs:complexType>
-            <xs:complexType name="PortRange">
+            <xs:complexType name="NonExistingKubernetesMasterException">
                 <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:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
@@ -2031,22 +2028,22 @@
     </wsdl:binding>
     <wsdl:service name="AutoScalerService">
         <wsdl:port name="AutoScalerServiceHttpSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
-            <soap:address location="http://192.168.30.23:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
+            <soap:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpsSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
-            <soap:address location="https://192.168.30.23:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
+            <soap:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpsSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
-            <soap12:address location="https://192.168.30.23:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
+            <soap12:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
-            <soap12:address location="http://192.168.30.23:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
+            <soap12:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpEndpoint" binding="ns:AutoScalerServiceHttpBinding">
-            <http:address location="http://192.168.30.23:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
+            <http:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpsEndpoint" binding="ns:AutoScalerServiceHttpBinding">
-            <http:address location="https://192.168.30.23:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
+            <http:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
         </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>
\ No newline at end of file


[4/5] stratos git commit: Fixing merge conflicts and NPE s

Posted by sa...@apache.org.
Fixing merge conflicts and NPE s


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f58c5859
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f58c5859
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f58c5859

Branch: refs/heads/master
Commit: f58c585989a5b19df0e026d43bdd29660a56c118
Parents: 00a3e63 64e8747
Author: sajhak <sa...@gmail.com>
Authored: Thu Dec 4 18:09:36 2014 +0530
Committer: sajhak <sa...@gmail.com>
Committed: Thu Dec 4 18:09:36 2014 +0530

----------------------------------------------------------------------
 .../apache/stratos/autoscaler/Constants.java    |    4 +-
 .../autoscaler/api/AutoScalerServiceImpl.java   |   51 +-
 .../dependency/DependencyBuilder.java           |    8 +-
 .../parser/DefaultApplicationParser.java        |    5 +-
 .../applications/topic/ApplicationBuilder.java  |   65 +-
 .../topic/ApplicationsEventPublisher.java       |   12 +-
 .../client/CloudControllerClient.java           |    9 +-
 .../autoscaler/context/AutoscalerContext.java   |   29 +
 .../context/cluster/ClusterContextFactory.java  |    2 +-
 .../context/cluster/ClusterInstanceContext.java |    3 +-
 .../context/cluster/VMClusterContext.java       |   58 +-
 .../partition/ClusterLevelPartitionContext.java |    1 +
 .../ClusterLevelNetworkPartitionContext.java    |    7 +-
 .../InstanceNotificationPublisher.java          |    4 +-
 .../AutoscalerHealthStatEventReceiver.java      |   31 +-
 .../AutoscalerTopologyEventReceiver.java        |  215 ++-
 .../interfaces/AutoScalerServiceInterface.java  |    4 +-
 .../internal/AutoscalerServerComponent.java     |  139 +-
 .../stratos/autoscaler/monitor/Monitor.java     |   70 +
 .../autoscaler/monitor/MonitorFactory.java      |   27 +-
 .../monitor/cluster/AbstractClusterMonitor.java |   19 +-
 .../cluster/KubernetesClusterMonitor.java       |   31 +-
 .../KubernetesServiceClusterMonitor.java        |   17 +-
 .../monitor/cluster/VMClusterMonitor.java       |  281 +--
 .../monitor/cluster/VMLbClusterMonitor.java     |    2 +-
 .../monitor/component/ApplicationMonitor.java   |   60 +-
 .../monitor/component/GroupMonitor.java         |   77 +-
 .../component/ParentComponentMonitor.java       |   11 +-
 .../autoscaler/pojo/policy/PolicyManager.java   |   33 +-
 .../rule/AutoscalerRuleEvaluator.java           |  291 +--
 .../autoscaler/rule/RuleTasksDelegator.java     |    2 +-
 .../status/processor/StatusChecker.java         |  520 -----
 .../ClusterStatusTerminatedProcessor.java       |   19 +-
 .../group/GroupStatusTerminatedProcessor.java   |    2 +-
 .../group/GroupStatusTerminatingProcessor.java  |    4 +-
 .../stratos/autoscaler/util/AutoscalerUtil.java |   12 +-
 .../stratos/autoscaler/util/StatusChecker.java  |  519 +++++
 .../stratos/autoscaler/TestRulesPackaged.java   |    8 +-
 .../src/test/resources/autoscaler.xml           |    4 +-
 .../stratos/cartridge/agent/CartridgeAgent.java |   12 +-
 .../org.apache.stratos.cloud.controller/pom.xml |   19 +-
 .../context/CloudControllerContext.java         |  226 ++-
 .../controller/domain/FloatingNetwork.java      |   87 +
 .../controller/domain/FloatingNetworks.java     |   44 +
 .../controller/domain/NetworkInterface.java     |   15 +
 .../CloudControllerServiceComponent.java        |  136 +-
 .../internal/ServiceReferenceHolder.java        |   10 +
 .../application/ApplicationTopicReceiver.java   |   68 +-
 .../status/ClusterStatusTopicReceiver.java      |  172 +-
 .../status/InstanceStatusTopicReceiver.java     |  125 +-
 .../messaging/topology/TopologyBuilder.java     |   13 +-
 .../topology/TopologyEventPublisher.java        |    3 +-
 .../services/CloudControllerService.java        |    4 +-
 .../impl/CloudControllerServiceImpl.java        | 1655 ++++++++--------
 components/org.apache.stratos.common/pom.xml    |    5 +
 .../clustering/DistributedObjectProvider.java   |   44 +-
 .../impl/HazelcastDistributedListProvider.java  |  269 +++
 .../HazelcastDistributedObjectProvider.java     |  276 +--
 .../clustering/impl/ListEntryListener.java      |   37 +
 .../common/constants/StratosConstants.java      |    3 +
 .../internal/StratosCommonServiceComponent.java |   42 +-
 .../common/threading/StratosThreadPool.java     |   57 +
 .../apache/stratos/common/util/ConfUtil.java    |   73 +
 .../apache/stratos/common/test/CommonTest.java  |    1 +
 .../test/DistributedObjectProviderTest.java     |   88 +-
 .../extension/api/LoadBalancerExtension.java    |  267 +--
 .../load/balancer/context/AlgorithmContext.java |   22 +-
 .../context/map/AlgorithmContextMap.java        |   16 +-
 .../internal/LoadBalancerServiceComponent.java  |   50 +-
 .../LoadBalancerTenantEventReceiver.java        |   16 +-
 .../LoadBalancerTopologyEventReceiver.java      |   20 +-
 .../manager/client/AutoscalerServiceClient.java |    6 +-
 .../client/CloudControllerServiceClient.java    |    4 +
 .../internal/ADCManagementServerComponent.java  |   25 +-
 .../InstanceNotificationPublisher.java          |    2 +-
 .../StratosManagerTopologyEventReceiver.java    |   17 +-
 .../domain/applications/DependencyOrder.java    |   10 +-
 .../applications/ScalingDependentList.java      |   40 +
 .../domain/applications/ScalingOrder.java       |   40 -
 .../messaging/domain/topology/Cluster.java      |    7 +-
 .../ApplicationInactivatedEvent.java            |   46 -
 .../ApplicationInstanceInactivatedEvent.java    |   46 +
 .../ApplicationInstanceTerminatedEvent.java     |   48 +
 .../ApplicationInstanceTerminatingEvent.java    |   48 +
 .../ApplicationTerminatedEvent.java             |   48 -
 .../ApplicationTerminatingEvent.java            |   48 -
 .../notifier/InstanceCleanupClusterEvent.java   |    8 +-
 .../topology/ClusterInstanceCreatedEvent.java   |   21 +-
 .../ApplicationInactivatedMessageProcessor.java |   10 +-
 .../ApplicationTerminatedMessageProcessor.java  |   14 +-
 .../ApplicationTerminatingMessageProcessor.java |   10 +-
 .../ClusterInstanceCreatedMessageProcessor.java |    3 +-
 .../applications/ApplicationsEventReceiver.java |   34 +-
 .../status/ClusterStatusEventReceiver.java      |   34 +-
 .../health/stat/HealthStatEventReceiver.java    |   40 +-
 .../notifier/InstanceNotifierEventReceiver.java |    6 +-
 .../status/InstanceStatusEventReceiver.java     |   33 +-
 .../receiver/tenant/TenantEventReceiver.java    |   14 +-
 .../topology/TopologyEventMessageDelegator.java |   20 +-
 .../topology/TopologyEventReceiver.java         |   31 +-
 .../config/cartridgeagentconfiguration.py       |    3 +
 .../modules/healthstatspublisher/healthstats.py |    3 +
 .../modules/util/cartridgeagentconstants.py     |    1 +
 .../rest/endpoint/api/StratosApiV40Utils.java   |   11 +-
 .../rest/endpoint/api/StratosApiV41.java        |   19 +-
 .../rest/endpoint/api/StratosApiV41Utils.java   |   83 +-
 .../policy/deployment/DeploymentPolicy.java     |    2 -
 .../definition/FloatingNetworkBean.java         |   51 +
 .../definition/NetworkInterfaceBean.java        |   21 +
 .../bean/util/converter/PojoConverter.java      |   28 +-
 .../stratos/rest/endpoint/mock/MockContext.java |    2 +-
 dependencies/pom.xml                            |    9 +-
 .../AverageInFlightRequestsFinder.xml           |    2 +-
 .../cep/extension/CEPTopologyEventReceiver.java |   16 +-
 .../extension/FaultHandlingWindowProcessor.java |   98 +-
 .../apache/stratos/haproxy/extension/Main.java  |   54 +-
 .../pom.xml                                     |   23 +-
 .../main/resources/conf/cloud-controller.xml    |    1 +
 pom.xml                                         |    4 +-
 products/stratos/conf/stratos-config.xml        |   30 +
 .../modules/distribution/src/assembly/bin.xml   |    6 +
 .../distribution/src/main/conf/autoscaler.xml   |    4 +
 .../src/main/conf/drools/container-mincheck.drl |   16 +-
 .../conf/drools/container-obsoletecheck.drl     |   14 +-
 .../src/main/conf/drools/container-scaling.drl  |   64 +-
 .../src/main/conf/drools/dependent-scaling.drl  |  119 +-
 .../src/main/conf/drools/mincheck.drl           |    4 +-
 .../src/main/conf/drools/obsoletecheck.drl      |   36 +-
 .../src/main/conf/drools/scaling.drl            |   18 +-
 .../src/main/conf/drools/terminateall.drl       |   16 +-
 .../main/conf/drools/terminatedependency.drl    |   16 +-
 .../src/main/resources/AutoScalerService.wsdl   |  429 +++--
 .../main/resources/CloudControllerService.wsdl  | 1805 +++++++++---------
 tools/stratos-installer/conf/setup.conf         |    2 +
 .../all/repository/conf/cloud-controller.xml    |    1 +
 .../cc/repository/conf/cloud-controller.xml     |    1 +
 tools/stratos-installer/openstack.sh            |    1 +
 137 files changed, 5873 insertions(+), 4384 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/f58c5859/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
index 699aa29,7361b46..b95c765
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
@@@ -58,6 -56,6 +58,7 @@@ public class DefaultApplicationParser i
  
      private Set<ApplicationClusterContext> applicationClusterContexts;
      private Map<String, Properties> aliasToProperties;
++ 	private Map<String, SubscribableInfoContext> subscribableInformation = new HashMap<String, SubscribableInfoContext>();
  
      public DefaultApplicationParser () {
          this.applicationClusterContexts = new HashSet<ApplicationClusterContext>();
@@@ -174,40 -172,6 +175,40 @@@
          return definedGroups;
      }
  
 +	private Map<String, SubscribableInfoContext> getSubscribableInfo(GroupContext[] groupContexts) throws
 +    		ApplicationDefinitionException {
- 		// map [cartridge alias -> Subscribable Information]
- 		Map<String, SubscribableInfoContext> subscribableInformation = new HashMap<String, SubscribableInfoContext>();
++		if(groupContexts != null) {
 +		for (GroupContext groupContext : groupContexts) {
 +			if (groupContext.getGroupContexts() != null) {
 +				getSubscribableInfo(groupContext.getGroupContexts());
 +			} else {
 +				CartridgeContext[] cartridgeContexts = groupContext.getCartridgeContexts();
 +				for (CartridgeContext cartridgeContext : cartridgeContexts) {
 +					
 +					 if (StringUtils.isEmpty(cartridgeContext.getSubscribableInfoContext().getAlias()) ||
 +		                        !ApplicationUtils.isAliasValid(cartridgeContext.getSubscribableInfoContext().getAlias())) {
 +		                    handleError("Invalid alias specified for Subscribable Information Obj: [ " + 
 +		                        cartridgeContext.getSubscribableInfoContext().getAlias() + " ]");
 +		                }
 +	                
 +					// check if a group is already defined under the same alias
 +	                if(subscribableInformation.get(cartridgeContext.getSubscribableInfoContext().getAlias()) != null) {
 +	                    // a group with same alias already exists, can't continue
 +	                    handleError("A Subscribable Info obj with alias " + cartridgeContext.getSubscribableInfoContext().getAlias() + " already exists");
 +	                }
 +					subscribableInformation.put(cartridgeContext.getSubscribableInfoContext().getAlias(), 
 +							cartridgeContext.getSubscribableInfoContext());
 +					if (log.isDebugEnabled()) {
 +	                    log.debug("Added Subcribables Info obj [ " +
 +	                    		cartridgeContext.getSubscribableInfoContext().getAlias() + " ] to map [cartridge alias -> Subscribable Information]");
 +	                }
 +                }
 +			}
++		  }
 +		}
 +		return subscribableInformation;
 +	}
 +    
      /**
       * Extract Subscription Information from the Application Definition
       *

http://git-wip-us.apache.org/repos/asf/stratos/blob/f58c5859/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
index 8492f11,8492f11..2e345d4
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
@@@ -223,8 -223,8 +223,11 @@@ public class Cluster implements Seriali
      }
  
      public ClusterStatus getStatus(String applicationInstanceId) {
--        //return status;
--        return getInstanceIdToInstanceContextMap().get(applicationInstanceId).getStatus();
++    	ClusterInstance clusterInstance = getInstanceIdToInstanceContextMap().get(applicationInstanceId);
++    	if(clusterInstance != null) {
++    		return clusterInstance.getStatus();
++    	}
++    	return null;
      }
  
      public boolean setStatus(ClusterStatus newStatus, String applicationInstanceId) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/f58c5859/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
----------------------------------------------------------------------
diff --cc components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
index 1bdd69f,284f5da..128a33e
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
@@@ -463,7 -482,7 +484,7 @@@ public class PojoConverter 
          cluster1.property = getPropertyBeans(cluster.getProperties());
          cluster1.member = new ArrayList<Member>();
          cluster1.hostNames = new ArrayList<String>();
--        cluster1.status = cluster.getStatus(null).toString();
++        cluster1.status = cluster.getStatus(null).toString(); //TODO why null is passed?
  
          for (org.apache.stratos.messaging.domain.topology.Member tmp : cluster.getMembers()) {
              Member member = new Member();
@@@ -1199,7 -1169,7 +1219,7 @@@
          }
  
          GroupBean groupBean = new GroupBean();
--        groupBean.setStatus(group.getStatus(null).toString());
++        groupBean.setStatus(group.getStatus(null).toString()); // TODO -- why null is passed?
          groupBean.setAlias(group.getUniqueIdentifier());
          //TODO*******groupBean.setDeploymentPolicy(group.getDeploymentPolicy());
          groupBean.setAutoScalingPolicy(group.getAutoscalingPolicy());


[3/5] stratos git commit: Fixing merge conflicts and NPE s

Posted by sa...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/f58c5859/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
----------------------------------------------------------------------
diff --cc service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
index a4d03f5,c0fca11..36b0e1f
--- 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,4 -1,4 +1,4 @@@
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://common.stratos.apache.org/xsd" xmlns:ax23="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax219="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax227="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax221="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax224="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://autoscale.polic
 y.pojo.autoscaler.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/wsdl/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://policy.exception.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://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax219="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax221="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax211="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:http="http://schemas.xmls
 oap.org/wsdl/http/" xmlns:ax226="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/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:ax27="http://common.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax219="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax227="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax221="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://kubernetes.common.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax224="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://kubernetes.exc
 eption.autoscaler.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/wsdl/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 attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd">
@@@ -9,15 -9,15 +9,15 @@@
                      <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                      <xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"></xs:element>
                      <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
-                     <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax211:LoadThresholds"></xs:element>
 -                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax219:LoadThresholds"></xs:element>
++                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax217:LoadThresholds"></xs:element>
                      <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
                  </xs:sequence>
              </xs:complexType>
              <xs:complexType name="LoadThresholds">
                  <xs:sequence>
-                     <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax211:LoadAverageThresholds"></xs:element>
-                     <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax211:MemoryConsumptionThresholds"></xs:element>
-                     <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax211:RequestsInFlightThresholds"></xs:element>
 -                    <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax219:LoadAverageThresholds"></xs:element>
 -                    <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax219:MemoryConsumptionThresholds"></xs:element>
 -                    <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax219:RequestsInFlightThresholds"></xs:element>
++                    <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax217:LoadAverageThresholds"></xs:element>
++                    <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax217:MemoryConsumptionThresholds"></xs:element>
++                    <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax217:RequestsInFlightThresholds"></xs:element>
                  </xs:sequence>
              </xs:complexType>
              <xs:complexType name="LoadAverageThresholds">
@@@ -45,8 -45,10 +45,8 @@@
                  <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="ax226:ComponentContext"></xs:element>
 -                    <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
 -                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax226:SubscribableInfoContext"></xs:element>
 +                    <xs:element minOccurs="0" name="components" nillable="true" type="ax221:ComponentContext"></xs:element>
-                     <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></xs:element>
++                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></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>
@@@ -76,7 -96,7 +76,7 @@@
                      <xs:element minOccurs="0" name="maxMembers" type="xs:int"></xs:element>
                      <xs:element minOccurs="0" name="minMembers" type="xs:int"></xs:element>
                      <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"></xs:element>
-                     <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></xs:element>
 -                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"></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>
@@@ -118,16 -121,16 +118,16 @@@
                  </xs:sequence>
              </xs:complexType>
          </xs:schema>
-         <xs:schema xmlns:ax27="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
 -        <xs:schema xmlns:ax214="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
++        <xs:schema xmlns:ax29="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
              <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
              <xs:complexType name="DeploymentPolicy">
                  <xs:sequence>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax27:Partition"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax214:Partition"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax29:Partition"></xs:element>
                      <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax27:ApplicationLevelNetworkPartition"></xs:element>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax27:ChildLevelNetworkPartition"></xs:element>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax23:ChildPolicy"></xs:element>
-                     <xs:element minOccurs="0" name="childPolicyHolder" nillable="true" type="ax27:ChildPolicyHolder"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax214:ApplicationLevelNetworkPartition"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax214:ChildLevelNetworkPartition"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax211:ChildPolicy"></xs:element>
 -                    <xs:element minOccurs="0" name="childPolicyHolder" nillable="true" type="ax214:ChildPolicyHolder"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax29:ApplicationLevelNetworkPartition"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax25:ChildPolicy"></xs:element>
++                    <xs:element minOccurs="0" name="childPolicyHolder" nillable="true" type="ax29:ChildPolicyHolder"></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>
@@@ -136,7 -139,7 +136,7 @@@
              </xs:complexType>
              <xs:complexType name="ChildPolicy">
                  <xs:sequence>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax27:ChildLevelNetworkPartition"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax214:ChildLevelNetworkPartition"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"></xs:element>
                      <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
              </xs:complexType>
@@@ -148,14 -151,14 +148,14 @@@
                  </xs:sequence>
              </xs:complexType>
          </xs:schema>
-         <xs:schema xmlns:ax26="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
 -        <xs:schema xmlns:ax213="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
++        <xs:schema xmlns:ax28="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
              <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
              <xs:complexType name="Partition">
                  <xs:sequence>
                      <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 minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></xs:element>
 -                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"></xs:element>
++                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
                      <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
              </xs:complexType>
@@@ -163,12 -166,12 +163,12 @@@
                  <xs:sequence>
                      <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"></xs:element>
                      <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax24:Partition"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax212:Partition"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"></xs:element>
                  </xs:sequence>
              </xs:complexType>
              <xs:complexType name="ChildLevelNetworkPartition">
                  <xs:sequence>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax24:ChildLevelPartition"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax212:ChildLevelPartition"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax26:ChildLevelPartition"></xs:element>
                      <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                      <xs:element minOccurs="0" name="min" type="xs:int"></xs:element>
                      <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"></xs:element>
@@@ -191,7 -194,7 +191,7 @@@
          <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
              <xs:complexType name="Properties">
                  <xs:sequence>
-                     <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax25:Property"></xs:element>
 -                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax26:Property"></xs:element>
++                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax27:Property"></xs:element>
                  </xs:sequence>
              </xs:complexType>
              <xs:complexType name="Property">
@@@ -201,252 -204,269 +201,259 @@@
                  </xs:sequence>
              </xs:complexType>
          </xs:schema>
-         <xs:schema xmlns:ax220="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax28="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" xmlns:ax216="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax228="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
-             <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
 -        <xs:schema xmlns:ax215="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax28="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax222="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax224="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax228="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
 -            <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
 -            <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"></xs:import>
++        <xs:schema xmlns:ax215="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax220="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" xmlns:ax24="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax228="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
              <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
-             <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
-             <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
-             <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"></xs:import>
+             <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
 -            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"></xs:import>
 -            <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
 +            <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
++            <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"></xs:import>
++            <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
+             <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
              <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
 -            <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
 -            <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
              <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"></xs:import>
 -            <xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
 +            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"></xs:import>
 +            <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
 +            <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
-             <xs:element name="getValidDeploymentPoliciesforCartridge">
++            <xs:element name="AutoScalerServiceInvalidPolicyException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax23:InvalidKubernetesMasterException"></xs:element>
++                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax23:InvalidPolicyException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
 -            <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
++            <xs:element name="updateDeploymentPolicy">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax23:NonExistingKubernetesMasterException"></xs:element>
++                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceInvalidPolicyException">
 -            <xs:element name="updateKubernetesMaster">
++            <xs:element name="updateDeploymentPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax29:InvalidPolicyException"></xs:element>
 -                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax28:KubernetesMaster"></xs:element>
++                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addDeploymentPolicy">
 -            <xs:element name="updateKubernetesMasterResponse">
++            <xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
++                        <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax212:NonExistingKubernetesGroupException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addDeploymentPolicyResponse">
 -            <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
++            <xs:element name="getKubernetesGroup">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 -                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax23:InvalidKubernetesHostException"></xs:element>
++                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateDeploymentPolicy">
 -            <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
++            <xs:element name="getKubernetesGroupResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax23:NonExistingKubernetesHostException"></xs:element>
++                        <xs:element minOccurs="0" name="return" nillable="true" type="ax215:KubernetesGroup"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateDeploymentPolicyResponse">
 -            <xs:element name="updateKubernetesHost">
++            <xs:element name="getPartitionsOfGroup">
                  <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:element>
++                        <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:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addAutoScalingPolicy">
 -            <xs:element name="updateKubernetesHostResponse">
++            <xs:element name="getPartitionsOfGroupResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
++                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Partition"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addAutoScalingPolicyResponse">
 -            <xs:element name="AutoScalerServiceInvalidPolicyException">
++            <xs:element name="getAutoscalingPolicy">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 -                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax29:InvalidPolicyException"></xs:element>
++                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateAutoScalingPolicy">
 -            <xs:element name="updateDeploymentPolicy">
++            <xs:element name="getAutoscalingPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
++                        <xs:element minOccurs="0" name="return" nillable="true" type="ax217:AutoscalePolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateAutoScalingPolicyResponse">
 -            <xs:element name="updateDeploymentPolicyResponse">
++            <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="ax219:ApplicationDefinitionException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAutoscalingPolicy">
 -            <xs:element name="AutoScalerServiceInvalidArgumentException">
++            <xs:element name="deployApplicationDefinition">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax217:InvalidArgumentException"></xs:element>
++                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax221:ApplicationContext"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAutoscalingPolicyResponse">
 -            <xs:element name="updateClusterMonitor">
++            <xs:element name="unDeployApplicationDefinition">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax26:Properties"></xs:element>
++                        <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:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getNetworkPartitions">
 -            <xs:element name="updateAutoScalingPolicy">
++            <xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax219:AutoscalePolicy"></xs:element>
++                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax212:InvalidKubernetesMasterException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getNetworkPartitionsResponse">
 -            <xs:element name="updateAutoScalingPolicyResponse">
++            <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:ApplicationLevelNetworkPartition"></xs:element>
 -                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
++                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax212:NonExistingKubernetesMasterException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAllKubernetesGroups">
 -            <xs:element name="AutoScalerServiceAutoScalerException">
++            <xs:element name="updateKubernetesMaster">
                  <xs:complexType>
-                     <xs:sequence></xs:sequence>
+                     <xs:sequence>
 -                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax217:AutoScalerException"></xs:element>
++                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax215:KubernetesMaster"></xs:element>
+                     </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAllKubernetesGroupsResponse">
 -            <xs:element name="undeployServiceGroup">
++            <xs:element name="updateKubernetesMasterResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax216:KubernetesGroup"></xs:element>
 -                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
 -            <xs:element name="undeployDeploymentPolicy">
++            <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax217:NonExistingKubernetesGroupException"></xs:element>
 -                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax212:InvalidKubernetesHostException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getMasterForKubernetesGroup">
 -            <xs:element name="undeployDeploymentPolicyResponse">
++            <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
++                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax212:NonExistingKubernetesHostException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getMasterForKubernetesGroupResponse">
 -            <xs:element name="AutoScalerServiceApplicationDefinitionException">
++            <xs:element name="updateKubernetesHost">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" nillable="true" type="ax216:KubernetesMaster"></xs:element>
 -                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax221:ApplicationDefinitionException"></xs:element>
++                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax215:KubernetesHost"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getHostsForKubernetesGroup">
 -            <xs:element name="unDeployApplicationDefinition">
++            <xs:element name="updateKubernetesHostResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="kubernetesGroupId" 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="tenantId" type="xs:int"></xs:element>
 -                        <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getHostsForKubernetesGroupResponse">
 -            <xs:element name="serviceGroupExist">
++            <xs:element name="getAllDeploymentPolicies">
                  <xs:complexType>
--                    <xs:sequence>
-                         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax216:KubernetesHost"></xs:element>
-                     </xs:sequence>
 -                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
 -                    </xs:sequence>
++                    <xs:sequence></xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
 -            <xs:element name="serviceGroupExistResponse">
++            <xs:element name="getAllDeploymentPoliciesResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax217:InvalidKubernetesGroupException"></xs:element>
 -                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
++                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addKubernetesGroup">
 -            <xs:element name="removeKubernetesHost">
++            <xs:element name="getAllAutoScalingPolicy">
+                 <xs:complexType>
 -                    <xs:sequence>
 -                        <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
 -                    </xs:sequence>
++                    <xs:sequence></xs:sequence>
+                 </xs:complexType>
+             </xs:element>
 -            <xs:element name="removeKubernetesHostResponse">
++            <xs:element name="getAllAutoScalingPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax216:KubernetesGroup"></xs:element>
 -                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
++                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:AutoscalePolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addKubernetesGroupResponse">
 -            <xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
++            <xs:element name="getValidDeploymentPoliciesforCartridge">
                  <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:element>
++                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
 -            <xs:element name="removeKubernetesGroup">
++            <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax217:InvalidKubernetesHostException"></xs:element>
 -                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
++                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addKubernetesHost">
 -            <xs:element name="removeKubernetesGroupResponse">
++            <xs:element name="addDeploymentPolicy">
                  <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="ax216:KubernetesHost"></xs:element>
 -                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
++                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="addKubernetesHostResponse">
 -            <xs:element name="getValidDeploymentPoliciesforCartridge">
++            <xs:element name="addDeploymentPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 -                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="removeKubernetesGroup">
 -            <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
++            <xs:element name="undeployDeploymentPolicy">
                  <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="ax215:DeploymentPolicy"></xs:element>
++                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="removeKubernetesGroupResponse">
 -            <xs:element name="getServiceGroups">
 -                <xs:complexType>
 -                    <xs:sequence></xs:sequence>
 -                </xs:complexType>
 -            </xs:element>
 -            <xs:element name="getServiceGroupsResponse">
++            <xs:element name="undeployDeploymentPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
 -                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax223:ServiceGroup"></xs:element>
 +                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
 -            <xs:element name="getServiceGroup">
++            <xs:element name="addAutoScalingPolicy">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax217:NonExistingKubernetesHostException"></xs:element>
 -                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax217:AutoscalePolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="removeKubernetesHost">
 -            <xs:element name="getServiceGroupResponse">
++            <xs:element name="addAutoScalingPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="return" nillable="true" type="ax223:ServiceGroup"></xs:element>
++                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="removeKubernetesHostResponse">
 -            <xs:element name="getPartitionsOfGroup">
++            <xs:element name="updateAutoScalingPolicy">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 -                        <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="autoscalePolicy" nillable="true" type="ax217:AutoscalePolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceApplicationDefinitionException">
 -            <xs:element name="getPartitionsOfGroupResponse">
++            <xs:element name="updateAutoScalingPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax219:ApplicationDefinitionException"></xs:element>
 -                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:Partition"></xs:element>
++                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
@@@ -457,34 -477,38 +464,36 @@@
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="unDeployApplicationDefinition">
+             <xs:element name="getNetworkPartitionsResponse">
                  <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 maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:ApplicationLevelNetworkPartition"></xs:element>
++                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationLevelNetworkPartition"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceInvalidArgumentException">
 -            <xs:element name="getMasterForKubernetesGroup">
++            <xs:element name="getAllKubernetesGroups">
+                 <xs:complexType>
 -                    <xs:sequence>
 -                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
 -                    </xs:sequence>
++                    <xs:sequence></xs:sequence>
+                 </xs:complexType>
+             </xs:element>
 -            <xs:element name="getMasterForKubernetesGroupResponse">
++            <xs:element name="getAllKubernetesGroupsResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax224:InvalidArgumentException"></xs:element>
 -                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesMaster"></xs:element>
++                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:KubernetesGroup"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateClusterMonitor">
 -            <xs:element name="getKubernetesGroup">
++            <xs:element name="getMasterForKubernetesGroup">
                  <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="ax25:Properties"></xs:element>
+                         <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceInvalidServiceGroupException">
 -            <xs:element name="getKubernetesGroupResponse">
++            <xs:element name="getMasterForKubernetesGroupResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax217:InvalidServiceGroupException"></xs:element>
 -                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
++                        <xs:element minOccurs="0" name="return" nillable="true" type="ax215:KubernetesMaster"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
@@@ -495,126 -519,124 +504,131 @@@
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="serviceGroupExist">
+             <xs:element name="getHostsForKubernetesGroupResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesHost"></xs:element>
++                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:KubernetesHost"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="serviceGroupExistResponse">
 -            <xs:element name="getDeploymentPolicy">
++            <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 -                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax212:InvalidKubernetesGroupException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceAutoScalerException">
 -            <xs:element name="getDeploymentPolicyResponse">
++            <xs:element name="addKubernetesGroup">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax224:AutoScalerException"></xs:element>
 -                        <xs:element minOccurs="0" name="return" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
++                        <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax215:KubernetesGroup"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="undeployServiceGroup">
 -            <xs:element name="getAutoscalingPolicy">
++            <xs:element name="addKubernetesGroupResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceInvalidKubernetesMasterException">
 -            <xs:element name="getAutoscalingPolicyResponse">
++            <xs:element name="addKubernetesHost">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax217:InvalidKubernetesMasterException"></xs:element>
 -                        <xs:element minOccurs="0" name="return" nillable="true" type="ax219:AutoscalePolicy"></xs:element>
++                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
++                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax215:KubernetesHost"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
 -            <xs:element name="getAllKubernetesGroups">
++            <xs:element name="addKubernetesHostResponse">
                  <xs:complexType>
 -                    <xs:sequence></xs:sequence>
 +                    <xs:sequence>
-                         <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax217:NonExistingKubernetesMasterException"></xs:element>
++                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 +                    </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateKubernetesMaster">
 -            <xs:element name="getAllKubernetesGroupsResponse">
++            <xs:element name="removeKubernetesGroup">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax216:KubernetesMaster"></xs:element>
 -                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
++                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateKubernetesMasterResponse">
 -            <xs:element name="getAllDeploymentPolicies">
++            <xs:element name="removeKubernetesGroupResponse">
                  <xs:complexType>
 -                    <xs:sequence></xs:sequence>
 +                    <xs:sequence>
 +                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 +                    </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateKubernetesHost">
 -            <xs:element name="getAllDeploymentPoliciesResponse">
++            <xs:element name="removeKubernetesHost">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax216:KubernetesHost"></xs:element>
 -                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
++                        <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="updateKubernetesHostResponse">
 -            <xs:element name="getAllAutoScalingPolicy">
++            <xs:element name="removeKubernetesHostResponse">
                  <xs:complexType>
 -                    <xs:sequence></xs:sequence>
 +                    <xs:sequence>
 +                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
 +                    </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getKubernetesGroup">
 -            <xs:element name="getAllAutoScalingPolicyResponse">
++            <xs:element name="AutoScalerServiceInvalidArgumentException">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax219:AutoscalePolicy"></xs:element>
++                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax224:InvalidArgumentException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getKubernetesGroupResponse">
 -            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
++            <xs:element name="updateClusterMonitor">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" nillable="true" type="ax216:KubernetesGroup"></xs:element>
 -                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax23:InvalidServiceGroupException"></xs:element>
++                        <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:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getPartitionsOfGroup">
 -            <xs:element name="deployServiceGroup">
++            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
                  <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="servicegroup" nillable="true" type="ax223:ServiceGroup"></xs:element>
++                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax212:InvalidServiceGroupException"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getPartitionsOfGroupResponse">
 -            <xs:element name="deployApplicationDefinition">
++            <xs:element name="deployServiceGroup">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax24:Partition"></xs:element>
 -                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax226:ApplicationContext"></xs:element>
++                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax228:ServiceGroup"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAllDeploymentPolicies">
 -            <xs:element name="addKubernetesHost">
++            <xs:element name="serviceGroupExist">
                  <xs:complexType>
-                     <xs:sequence></xs:sequence>
+                     <xs:sequence>
 -                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
 -                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax28:KubernetesHost"></xs:element>
++                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
+                     </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAllDeploymentPoliciesResponse">
 -            <xs:element name="addKubernetesHostResponse">
++            <xs:element name="serviceGroupExistResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
+                         <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAllAutoScalingPolicy">
 -            <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
++            <xs:element name="AutoScalerServiceAutoScalerException">
                  <xs:complexType>
-                     <xs:sequence></xs:sequence>
+                     <xs:sequence>
 -                        <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax23:InvalidKubernetesGroupException"></xs:element>
++                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax224:AutoScalerException"></xs:element>
+                     </xs:sequence>
                  </xs:complexType>
              </xs:element>
-             <xs:element name="getAllAutoScalingPolicyResponse">
 -            <xs:element name="addKubernetesGroup">
++            <xs:element name="undeployServiceGroup">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax28:KubernetesGroup"></xs:element>
++                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
@@@ -625,10 -647,10 +639,10 @@@
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
 -            <xs:element name="addDeploymentPolicy">
 +            <xs:element name="getDeploymentPolicyResponse">
                  <xs:complexType>
                      <xs:sequence>
-                         <xs:element minOccurs="0" name="return" nillable="true" type="ax28:DeploymentPolicy"></xs:element>
 -                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
++                        <xs:element minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
@@@ -659,44 -676,18 +673,23 @@@
                  </xs:complexType>
              </xs:element>
          </xs:schema>
-         <xs:schema xmlns:ax215="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="KubernetesGroup">
+         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd">
++            <xs:complexType name="NonExistingKubernetesGroupException">
 +                <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="ax214:KubernetesHost"></xs:element>
-                     <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax214:KubernetesMaster"></xs:element>
-                     <xs:element minOccurs="0" name="portRange" nillable="true" type="ax214:PortRange"></xs:element>
-                     <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"></xs:element>
++                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
 +                </xs:sequence>
 +            </xs:complexType>
-             <xs:complexType name="KubernetesHost">
+             <xs:complexType name="InvalidKubernetesMasterException">
                  <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="ax25:Properties"></xs:element>
+                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
              </xs:complexType>
-             <xs:complexType name="KubernetesMaster">
-                 <xs:complexContent>
-                     <xs:extension base="ax214: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="PortRange">
+             <xs:complexType name="NonExistingKubernetesMasterException">
                  <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:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
              </xs:complexType>
-         </xs:schema>
-         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd">
-             <xs:complexType name="NonExistingKubernetesGroupException">
+             <xs:complexType name="InvalidKubernetesHostException">
                  <xs:sequence>
                      <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
@@@ -706,7 -697,7 +699,7 @@@
                      <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
              </xs:complexType>
-             <xs:complexType name="InvalidKubernetesHostException">
 -            <xs:complexType name="NonExistingKubernetesGroupException">
++            <xs:complexType name="InvalidKubernetesGroupException">
                  <xs:sequence>
                      <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
@@@ -716,19 -707,45 +709,40 @@@
                      <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                  </xs:sequence>
              </xs:complexType>
-             <xs:complexType name="InvalidServiceGroupException">
 -            <xs:complexType name="InvalidKubernetesGroupException">
++        </xs:schema>
++        <xs:schema xmlns:ax214="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="KubernetesGroup">
                  <xs:sequence>
--                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
++                    <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="ax213:KubernetesHost"></xs:element>
++                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax213:KubernetesMaster"></xs:element>
++                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax213:PortRange"></xs:element>
++                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
                  </xs:sequence>
              </xs:complexType>
-             <xs:complexType name="InvalidKubernetesMasterException">
 -        </xs:schema>
 -        <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:import>
+             <xs:complexType name="KubernetesHost">
                  <xs:sequence>
-                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+                     <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="ax27:Properties"></xs:element>
                  </xs:sequence>
              </xs:complexType>
-             <xs:complexType name="NonExistingKubernetesMasterException">
+             <xs:complexType name="KubernetesMaster">
+                 <xs:complexContent>
 -                    <xs:extension base="ax25:KubernetesHost">
++                    <xs:extension base="ax213: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="ax25:KubernetesHost"></xs:element>
 -                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax25:KubernetesMaster"></xs:element>
 -                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax25:PortRange"></xs:element>
 -                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
 -                </xs:sequence>
 -            </xs:complexType>
+             <xs:complexType name="PortRange">
                  <xs:sequence>
-                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
+                     <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>
@@@ -2028,22 -2082,22 +2079,22 @@@
      </wsdl:binding>
      <wsdl:service name="AutoScalerService">
          <wsdl:port name="AutoScalerServiceHttpSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
-             <soap:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
 -            <soap:address location="http://10.100.1.142:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
++            <soap:address location="http://192.168.30.23:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
          </wsdl:port>
          <wsdl:port name="AutoScalerServiceHttpsSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
-             <soap:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
 -            <soap:address location="https://10.100.1.142:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
++            <soap:address location="https://192.168.30.23:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
          </wsdl:port>
          <wsdl:port name="AutoScalerServiceHttpsSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
-             <soap12:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
 -            <soap12:address location="https://10.100.1.142:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
++            <soap12:address location="https://192.168.30.23:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
          </wsdl:port>
          <wsdl:port name="AutoScalerServiceHttpSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
-             <soap12:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
 -            <soap12:address location="http://10.100.1.142:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
++            <soap12:address location="http://192.168.30.23:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
          </wsdl:port>
          <wsdl:port name="AutoScalerServiceHttpEndpoint" binding="ns:AutoScalerServiceHttpBinding">
-             <http:address location="http://172.17.42.1:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
 -            <http:address location="http://10.100.1.142:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
++            <http:address location="http://192.168.30.23:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
          </wsdl:port>
          <wsdl:port name="AutoScalerServiceHttpsEndpoint" binding="ns:AutoScalerServiceHttpBinding">
-             <http:address location="https://172.17.42.1:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
 -            <http:address location="https://10.100.1.142:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
++            <http:address location="https://192.168.30.23:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
          </wsdl:port>
      </wsdl:service>
 -</wsdl:definitions>
 +</wsdl:definitions>


[2/5] stratos git commit: Supporting new group and application JSON formats STRATOS-1018

Posted by sa...@apache.org.
Supporting new group and application JSON formats STRATOS-1018


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/00a3e633
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/00a3e633
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/00a3e633

Branch: refs/heads/master
Commit: 00a3e63397840f1d21c768bd763d3e8ec795d3cb
Parents: db46192
Author: sajhak <sa...@gmail.com>
Authored: Thu Dec 4 16:22:40 2014 +0530
Committer: sajhak <sa...@gmail.com>
Committed: Thu Dec 4 16:22:40 2014 +0530

----------------------------------------------------------------------
 .../parser/DefaultApplicationParser.java        | 156 +++++--
 .../applications/parser/ParserUtils.java        |   5 +-
 .../applications/pojo/ApplicationContext.java   |  21 +-
 .../applications/pojo/CartridgeContext.java     |  69 +++
 .../applications/pojo/ComponentContext.java     |  21 +-
 .../applications/pojo/GroupContext.java         |  36 +-
 .../beans/ApplicationDefinition.java            |  44 +-
 .../application/beans/CartridgeDefinition.java  |  70 +++
 .../application/beans/ComponentDefinition.java  |  47 +-
 .../application/beans/GroupDefinition.java      |  77 ++--
 .../application/beans/PropertyBean.java         |   4 +-
 .../beans/SubscribableDefinition.java           |   4 +-
 .../application/beans/SubscribableInfo.java     |   4 +-
 .../bean/util/converter/PojoConverter.java      |  92 +++-
 .../src/main/resources/AutoScalerService.wsdl   | 443 +++++++++----------
 15 files changed, 657 insertions(+), 436 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
index 7361b46..699aa29 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/DefaultApplicationParser.java
@@ -41,9 +41,11 @@ import org.apache.stratos.messaging.domain.applications.Group;
 import org.apache.stratos.common.Properties;
 
 import java.util.*;
+
 import javax.crypto.Cipher;
 import javax.crypto.SecretKey;
 import javax.crypto.spec.SecretKeySpec;
+
 import org.apache.commons.codec.binary.Base64;
 
 /**
@@ -172,6 +174,40 @@ public class DefaultApplicationParser implements ApplicationParser {
         return definedGroups;
     }
 
+	private Map<String, SubscribableInfoContext> getSubscribableInfo(GroupContext[] groupContexts) throws
+    		ApplicationDefinitionException {
+		// map [cartridge alias -> Subscribable Information]
+		Map<String, SubscribableInfoContext> subscribableInformation = new HashMap<String, SubscribableInfoContext>();
+		for (GroupContext groupContext : groupContexts) {
+			if (groupContext.getGroupContexts() != null) {
+				getSubscribableInfo(groupContext.getGroupContexts());
+			} else {
+				CartridgeContext[] cartridgeContexts = groupContext.getCartridgeContexts();
+				for (CartridgeContext cartridgeContext : cartridgeContexts) {
+					
+					 if (StringUtils.isEmpty(cartridgeContext.getSubscribableInfoContext().getAlias()) ||
+		                        !ApplicationUtils.isAliasValid(cartridgeContext.getSubscribableInfoContext().getAlias())) {
+		                    handleError("Invalid alias specified for Subscribable Information Obj: [ " + 
+		                        cartridgeContext.getSubscribableInfoContext().getAlias() + " ]");
+		                }
+	                
+					// check if a group is already defined under the same alias
+	                if(subscribableInformation.get(cartridgeContext.getSubscribableInfoContext().getAlias()) != null) {
+	                    // a group with same alias already exists, can't continue
+	                    handleError("A Subscribable Info obj with alias " + cartridgeContext.getSubscribableInfoContext().getAlias() + " already exists");
+	                }
+					subscribableInformation.put(cartridgeContext.getSubscribableInfoContext().getAlias(), 
+							cartridgeContext.getSubscribableInfoContext());
+					if (log.isDebugEnabled()) {
+	                    log.debug("Added Subcribables Info obj [ " +
+	                    		cartridgeContext.getSubscribableInfoContext().getAlias() + " ] to map [cartridge alias -> Subscribable Information]");
+	                }
+                }
+			}
+		}
+		return subscribableInformation;
+	}
+    
     /**
      * Extract Subscription Information from the Application Definition
      *
@@ -183,33 +219,7 @@ public class DefaultApplicationParser implements ApplicationParser {
     private Map<String, SubscribableInfoContext> getSubscribableInformation (ApplicationContext appCtxt) throws
             ApplicationDefinitionException {
 
-        // map [cartridge alias -> Subscribable Information]
-        Map<String, SubscribableInfoContext> subscribableInformation = null;
-
-        if (appCtxt.getSubscribableInfoContext() != null) {
-            subscribableInformation = new HashMap<String, SubscribableInfoContext>();
-
-            for (SubscribableInfoContext subscribableInfoCtxt : appCtxt.getSubscribableInfoContext()) {
-
-                if (StringUtils.isEmpty(subscribableInfoCtxt.getAlias()) ||
-                        !ApplicationUtils.isAliasValid(subscribableInfoCtxt.getAlias())) {
-                    handleError("Invalid alias specified for Subscribable Information Obj: [ " + subscribableInfoCtxt.getAlias() + " ]");
-                }
-
-                // check if a group is already defined under the same alias
-                if(subscribableInformation.get(subscribableInfoCtxt.getAlias()) != null) {
-                    // a group with same alias already exists, can't continue
-                    handleError("A Subscribable Info obj with alias " + subscribableInfoCtxt.getAlias() + " already exists");
-                }
-
-                subscribableInformation.put(subscribableInfoCtxt.getAlias(), subscribableInfoCtxt);
-                if (log.isDebugEnabled()) {
-                    log.debug("Added Subcribables Info obj [ " + subscribableInfoCtxt.getAlias() + " ] to map [cartridge alias -> Subscribable Information]");
-                }
-            }
-        }
-
-        return subscribableInformation;
+        return getSubscribableInfo(appCtxt.getComponents().getGroupContexts());
     }
 
     /**
@@ -261,10 +271,9 @@ public class DefaultApplicationParser implements ApplicationParser {
 
         if (appCtxt.getComponents() != null) {
             // get top level Subscribables
-            if (appCtxt.getComponents().getSubscribableContexts() != null) {
+            if (appCtxt.getComponents().getCartridgeContexts() != null) {                
                 clusterDataMap = parseLeafLevelSubscriptions(appCtxt.getApplicationId(), appCtxt.getTenantId(),
-                        application.getKey(), null, Arrays.asList(appCtxt.getComponents().getSubscribableContexts()),
-                        subscribableInfoCtxts);
+                        application.getKey(), null, Arrays.asList(appCtxt.getComponents().getCartridgeContexts()));                
                 application.setClusterData(clusterDataMap);
                 //clusters.addAll(clusterDataHolder.getApplicationClusterContexts());
             }
@@ -345,7 +354,72 @@ public class DefaultApplicationParser implements ApplicationParser {
         return application;
     }
 
+    
     /**
+     * 
+     * Parse Subscription Information
+     * 
+     * @param appId Application id
+     * @param tenantId Tenant id of tenant which deployed the Application
+     * @param key Generated key for the Application
+     * @param groupName Group name (if relevant)
+     * @param cartridgeContextList cartridgeContextList
+     * @return Map [subscription alias -> ClusterDataHolder]
+     * 
+     * @throws ApplicationDefinitionException
+     */
+    private Map<String, ClusterDataHolder> parseLeafLevelSubscriptions(
+    		String appId, int tenantId, String key, String groupName,
+            List<CartridgeContext> cartridgeContextList) throws ApplicationDefinitionException {
+    	
+    	 Map<String, ClusterDataHolder> clusterDataMap = new HashMap<String, ClusterDataHolder>();
+
+    	 for (CartridgeContext cartridgeContext : cartridgeContextList) {
+	        
+    		 String cartridgeType = cartridgeContext.getType();
+    		 String subscriptionAlias = cartridgeContext.getSubscribableInfoContext().getAlias();
+    		 
+    		 // check if a cartridgeInfo with relevant type is already deployed. else, can't continue
+             CartridgeInfo cartridgeInfo =  getCartridge(cartridgeType);
+             if (cartridgeInfo == null) {
+                 handleError("No deployed Cartridge found with type [ " + cartridgeType +
+                         " ] for Composite Application");
+             }
+    		 
+    		// get hostname and cluster id
+             ClusterInformation clusterInfo;
+             assert cartridgeInfo != null;
+             if (cartridgeInfo.getMultiTenant()) {
+                 clusterInfo = new MTClusterInformation();
+             } else {
+                 clusterInfo = new STClusterInformation();
+             }
+
+             String hostname = clusterInfo.getHostName(subscriptionAlias, cartridgeInfo.getHostName());
+             String clusterId = clusterInfo.getClusterId(subscriptionAlias, cartridgeType);
+
+             // create and collect this cluster's information
+             //assert subscribableInfoCtxt != null;
+             ApplicationClusterContext appClusterCtxt = createApplicationClusterContext(appId, groupName, cartridgeInfo,
+                     key, tenantId, cartridgeContext.getSubscribableInfoContext().getRepoUrl(), subscriptionAlias,
+                     clusterId, hostname, cartridgeContext.getSubscribableInfoContext().getDeploymentPolicy(), false, 
+                     cartridgeContext.getSubscribableInfoContext().getDependencyAliases(), 
+                     cartridgeContext.getSubscribableInfoContext().getProperties());
+
+             appClusterCtxt.setAutoscalePolicyName(cartridgeContext.getSubscribableInfoContext().getAutoscalingPolicy());
+             appClusterCtxt.setProperties(cartridgeContext.getSubscribableInfoContext().getProperties());
+             this.applicationClusterContexts.add(appClusterCtxt);
+
+             // add relevant information to the map
+             clusterDataMap.put(subscriptionAlias, new ClusterDataHolder(cartridgeType, clusterId));
+    		 
+        }
+    	 
+
+         return clusterDataMap;
+    }
+
+	/**
      * Validates terminationBehavior. The terminationBehavior should be one of the following:
      *      1. terminate-none
      *      2. terminate-dependents
@@ -472,8 +546,8 @@ public class DefaultApplicationParser implements ApplicationParser {
         group.setGroupMinInstances(groupCtxt.getGroupMinInstances());
         group.setGroupMaxInstances(groupCtxt.getGroupMaxInstances());
         group.setGroupScalingEnabled(groupCtxt.isGroupScalingEnabled());
-        group.setGroupInstanceMonitoringEnabled(groupCtxt.isGroupInstanceMonitoringEnabled());
-        group.setAutoscalingPolicy(groupCtxt.getAutoscalingPolicy());
+        //group.setGroupInstanceMonitoringEnabled(groupCtxt.isGroupInstanceMonitoringEnabled());
+        //group.setAutoscalingPolicy(groupCtxt.getAutoscalingPolicy());
         DependencyOrder dependencyOrder = new DependencyOrder();
         // create the Dependency Ordering
         String []  startupOrders = getStartupOrderForGroup(groupCtxt);
@@ -485,10 +559,10 @@ public class DefaultApplicationParser implements ApplicationParser {
 
         Map<String, ClusterDataHolder> clusterDataMap;
 
-        // get group level Subscribables
-        if (groupCtxt.getSubscribableContexts() != null) {
+        // get group level CartridgeContexts
+        if (groupCtxt.getCartridgeContexts() != null) {
             clusterDataMap = parseLeafLevelSubscriptions(appId, tenantId, key, groupCtxt.getName(),
-                    Arrays.asList(groupCtxt.getSubscribableContexts()), subscribableInfoCtxts);
+                    Arrays.asList(groupCtxt.getCartridgeContexts()));
             group.setClusterData(clusterDataMap);
         }
 
@@ -499,10 +573,12 @@ public class DefaultApplicationParser implements ApplicationParser {
             for (GroupContext subGroupCtxt : groupCtxt.getGroupContexts()) {
                 // get the complete Group Definition
                 subGroupCtxt = definedGroupCtxts.get(subGroupCtxt.getAlias());
-                Group nestedGroup = parseGroup(appId, tenantId, key, subGroupCtxt,
-                        subscribableInfoCtxts,
-                        definedGroupCtxts);
-                nestedGroups.put(nestedGroup.getAlias(), nestedGroup);
+				if (subGroupCtxt != null) {
+					Group nestedGroup = parseGroup(appId, tenantId, key,
+					        subGroupCtxt, subscribableInfoCtxts,
+					        definedGroupCtxts);
+					nestedGroups.put(nestedGroup.getAlias(), nestedGroup);
+				}
             }
 
             group.setGroups(nestedGroups);
@@ -624,7 +700,7 @@ public class DefaultApplicationParser implements ApplicationParser {
      *
      * @throws ApplicationDefinitionException
      */
-    private Map<String, ClusterDataHolder> parseLeafLevelSubscriptions (String appId, int tenantId, String key, String groupName,
+    private Map<String, ClusterDataHolder> parseLeafLevelSubscriptions3 (String appId, int tenantId, String key, String groupName,
                                                                  List<SubscribableContext> subscribableCtxts,
                                                                  Map<String, SubscribableInfoContext> subscribableInfoCtxts)
             throws ApplicationDefinitionException {

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
index 2b947f0..4633872 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ParserUtils.java
@@ -19,6 +19,7 @@
 
 package org.apache.stratos.autoscaler.applications.parser;
 
+import org.apache.stratos.autoscaler.applications.pojo.CartridgeContext;
 import org.apache.stratos.autoscaler.applications.pojo.GroupContext;
 import org.apache.stratos.autoscaler.applications.pojo.SubscribableContext;
 import org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
@@ -131,9 +132,9 @@ public class ParserUtils {
 
     private static String getAliasForServiceType (String serviceType, GroupContext groupContext) {
 
-        for (SubscribableContext subCtxt : groupContext.getSubscribableContexts()) {
+        for (CartridgeContext subCtxt : groupContext.getCartridgeContexts()) {
             if (serviceType.equals(subCtxt.getType())) {
-                return subCtxt.getAlias();
+                return subCtxt.getSubscribableInfoContext().getAlias();
             }
         }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
index b6227b2..97fc537 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ApplicationContext.java
@@ -37,12 +37,8 @@ public class ApplicationContext implements Serializable {
 
     private String alias;
 
-    private String deploymentPolicy;
-
     private ComponentContext componentContext;
 
-    private SubscribableInfoContext[] subscribableInfoContexts;
-
     private Properties properties;
 
     public ApplicationContext() {
@@ -71,15 +67,7 @@ public class ApplicationContext implements Serializable {
     public void setComponents(ComponentContext componentContext) {
         this.componentContext = componentContext;
     }
-
-    public SubscribableInfoContext[] getSubscribableInfoContext() {
-        return subscribableInfoContexts;
-    }
-
-    public void setSubscribableInfoContext(SubscribableInfoContext[] subscribableInfoContexts) {
-        this.subscribableInfoContexts = subscribableInfoContexts;
-    }
-
+    
     public int getTenantId() {
         return tenantId;
     }
@@ -112,11 +100,4 @@ public class ApplicationContext implements Serializable {
         this.properties = properties;
     }
 
-    public String getDeploymentPolicy() {
-        return deploymentPolicy;
-    }
-
-    public void setDeploymentPolicy(String deploymentPolicy) {
-        this.deploymentPolicy = deploymentPolicy;
-    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/CartridgeContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/CartridgeContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/CartridgeContext.java
new file mode 100644
index 0000000..c9b3a5f
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/CartridgeContext.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.autoscaler.applications.pojo;
+
+import java.io.Serializable;
+
+
+public class CartridgeContext implements Serializable {
+
+    private static final long serialVersionUID = 7782017881026018352L;
+
+	private String type;
+	
+	private int cartridgeMin;
+	
+	private int cartridgeMax;
+	
+	private SubscribableInfoContext subscribableInfoContext;
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public int getCartridgeMin() {
+		return cartridgeMin;
+	}
+
+	public void setCartridgeMin(int cartridgeMin) {
+		this.cartridgeMin = cartridgeMin;
+	}
+
+	public int getCartridgeMax() {
+		return cartridgeMax;
+	}
+
+	public void setCartridgeMax(int cartridgeMax) {
+		this.cartridgeMax = cartridgeMax;
+	}
+
+	public SubscribableInfoContext getSubscribableInfoContext() {
+		return subscribableInfoContext;
+	}
+
+	public void setSubscribableInfoContext(
+	        SubscribableInfoContext subscribableInfoContext) {
+		this.subscribableInfoContext = subscribableInfoContext;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ComponentContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ComponentContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ComponentContext.java
index 2816f4e..ff4cce9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ComponentContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/ComponentContext.java
@@ -26,12 +26,11 @@ public class ComponentContext implements Serializable {
     private static final long serialVersionUID = -3841830873207967496L;
 
     private GroupContext[] groupContexts;
-
-    private SubscribableContext[] subscribableContexts;
+    
+    private CartridgeContext[] cartridgeContexts;
 
     private DependencyContext dependencyContext;
 
-
     public GroupContext[] getGroupContexts() {
         return groupContexts;
     }
@@ -39,16 +38,16 @@ public class ComponentContext implements Serializable {
     public void setGroupContexts(GroupContext[] groupContexts) {
         this.groupContexts = groupContexts;
     }
+        
+    public CartridgeContext[] getCartridgeContexts() {
+		return cartridgeContexts;
+	}
 
-    public SubscribableContext[] getSubscribableContexts() {
-        return subscribableContexts;
-    }
-
-    public void setSubscribableContexts(SubscribableContext[] subscribableContexts) {
-        this.subscribableContexts = subscribableContexts;
-    }
+	public void setCartridgeContexts(CartridgeContext[] cartridgeContexts) {
+		this.cartridgeContexts = cartridgeContexts;
+	}
 
-    public DependencyContext getDependencyContext() {
+	public DependencyContext getDependencyContext() {
         return dependencyContext;
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/GroupContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/GroupContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/GroupContext.java
index dae3b10..4f8686f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/GroupContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/pojo/GroupContext.java
@@ -33,15 +33,17 @@ public class GroupContext implements Serializable{
 
     private int groupMaxInstances;
 
-    private String deploymentPolicy;
+    //private String deploymentPolicy;
 
-    private boolean isGroupInstanceMonitoringEnabled;
+    //private boolean isGroupInstanceMonitoringEnabled;
 
     private boolean isGroupScalingEnabled;
 
-    private String autoscalingPolicy;
+    //private String autoscalingPolicy;
+    
+    private CartridgeContext[] cartridgeContexts;
 
-    private SubscribableContext[] subscribableContexts;
+    //private SubscribableContext[] subscribableContexts;
 
     private GroupContext[] groupContexts;
 
@@ -62,21 +64,21 @@ public class GroupContext implements Serializable{
         this.alias = alias;
     }
 
-    public String getAutoscalingPolicy() {
+    /*public String getAutoscalingPolicy() {
         return autoscalingPolicy;
     }
 
     public void setAutoscalingPolicy(String autoscalingPolicy) {
         this.autoscalingPolicy = autoscalingPolicy;
-    }
+    }*/
 
-    public SubscribableContext[] getSubscribableContexts() {
+    /*    public SubscribableContext[] getSubscribableContexts() {
         return subscribableContexts;
     }
 
     public void setSubscribableContexts(SubscribableContext[] subscribableContexts) {
         this.subscribableContexts = subscribableContexts;
-    }
+    }*/
 
     public GroupContext[] getGroupContexts() {
         return groupContexts;
@@ -102,13 +104,13 @@ public class GroupContext implements Serializable{
         this.groupMaxInstances = groupMaxInstances;
     }
 
-    public boolean isGroupInstanceMonitoringEnabled() {
+    /*public boolean isGroupInstanceMonitoringEnabled() {
         return isGroupInstanceMonitoringEnabled;
     }
 
     public void setGroupInstanceMonitoringEnabled(boolean isGroupInstanceMonitoringEnabled) {
         this.isGroupInstanceMonitoringEnabled = isGroupInstanceMonitoringEnabled;
-    }
+    }*/
 
     public boolean isGroupScalingEnabled() {
         return isGroupScalingEnabled;
@@ -118,11 +120,21 @@ public class GroupContext implements Serializable{
         this.isGroupScalingEnabled = isGroupScalingEnabled;
     }
 
-    public String getDeploymentPolicy() {
+	public CartridgeContext[] getCartridgeContexts() {
+		return cartridgeContexts;
+	}
+
+	public void setCartridgeContexts(CartridgeContext[] cartridgeContexts) {
+		this.cartridgeContexts = cartridgeContexts;
+	}
+
+   /* public String getDeploymentPolicy() {
         return deploymentPolicy;
     }
 
     public void setDeploymentPolicy(String deploymentPolicy) {
         this.deploymentPolicy = deploymentPolicy;
-    }
+    }*/
+    
+    
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ApplicationDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ApplicationDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ApplicationDefinition.java
index d58adb3..2a115e5 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ApplicationDefinition.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ApplicationDefinition.java
@@ -19,25 +19,24 @@
 
 package org.apache.stratos.manager.composite.application.beans;
 
-import javax.xml.bind.annotation.XmlRootElement;
 import java.io.Serializable;
 import java.util.List;
 
+import javax.xml.bind.annotation.XmlRootElement;
+
 @XmlRootElement
 public class ApplicationDefinition implements Serializable {
 
-    private String applicationId;
+    private static final long serialVersionUID = -2829206180707597651L;
+
+	private String applicationId;
 
     private String alias;
 
     private ComponentDefinition components;
-
-    private List<SubscribableInfo> subscribableInfo;
-
+    
     private List<PropertyBean> property;
-
-    private String deploymentPolicy;
-
+    
     public String getApplicationId() {
         return applicationId;
     }
@@ -62,27 +61,12 @@ public class ApplicationDefinition implements Serializable {
         this.components = components;
     }
 
-    public List<SubscribableInfo> getSubscribableInfo() {
-        return subscribableInfo;
-    }
-
-    public void setSubscribableInfo(List<SubscribableInfo> subscribableInfo) {
-        this.subscribableInfo = subscribableInfo;
-    }
+	public List<PropertyBean> getProperty() {
+		return property;
+	}
 
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public String getDeploymentPolicy() {
-        return deploymentPolicy;
-    }
-
-    public void setDeploymentPolicy(String deploymentPolicy) {
-        this.deploymentPolicy = deploymentPolicy;
-    }
+	public void setProperty(List<PropertyBean> property) {
+		this.property = property;
+	}   
+    
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/CartridgeDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/CartridgeDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/CartridgeDefinition.java
new file mode 100644
index 0000000..c79f7ed
--- /dev/null
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/CartridgeDefinition.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.manager.composite.application.beans;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class CartridgeDefinition implements Serializable {
+
+    private static final long serialVersionUID = 8968224678298479827L;
+
+	private String type;
+	
+	private int cartridgeMin;
+	
+	private int cartridgeMax;
+	
+	private SubscribableInfo subscribableInfo;
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public int getCartridgeMin() {
+		return cartridgeMin;
+	}
+
+	public void setCartridgeMin(int cartridgeMin) {
+		this.cartridgeMin = cartridgeMin;
+	}
+
+	public int getCartridgeMax() {
+		return cartridgeMax;
+	}
+
+	public void setCartridgeMax(int cartridgeMax) {
+		this.cartridgeMax = cartridgeMax;
+	}
+
+	public SubscribableInfo getSubscribableInfo() {
+		return subscribableInfo;
+	}
+
+	public void setSubscribableInfo(SubscribableInfo subscribableInfo) {
+		this.subscribableInfo = subscribableInfo;
+	}	
+	
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ComponentDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ComponentDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ComponentDefinition.java
index f487d1c..edf24d3 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ComponentDefinition.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/ComponentDefinition.java
@@ -1,28 +1,22 @@
 package org.apache.stratos.manager.composite.application.beans;
 
-import org.apache.stratos.manager.grouping.definitions.DependencyDefinitions;
-import org.apache.stratos.manager.grouping.definitions.StartupOrderDefinition;
-
-import javax.xml.bind.annotation.XmlRootElement;
 import java.io.Serializable;
 import java.util.List;
 
-@XmlRootElement(name = "components")
-public class ComponentDefinition implements Serializable {
-
-    private List<GroupDefinition> groups;
+import javax.xml.bind.annotation.XmlRootElement;
 
-    private List<SubscribableDefinition> subscribables;
+import org.apache.stratos.manager.grouping.definitions.DependencyDefinitions;
 
-    private DependencyDefinitions dependencies;
+@XmlRootElement(name = "components")
+public class ComponentDefinition implements Serializable {
 
-    public List<SubscribableDefinition> getSubscribables() {
-        return subscribables;
-    }
+    private static final long serialVersionUID = -5932265453191494386L;
 
-    public void setSubscribables(List<SubscribableDefinition> subscribables) {
-        this.subscribables = subscribables;
-    }
+	private List<GroupDefinition> groups;
+    
+	private DependencyDefinitions dependencies;
+	
+    private List<CartridgeDefinition> cartridges;
 
     public List<GroupDefinition> getGroups() {
         return groups;
@@ -32,11 +26,20 @@ public class ComponentDefinition implements Serializable {
         this.groups = groups;
     }
 
-    public DependencyDefinitions getDependencies() {
-        return dependencies;
-    }
+	public DependencyDefinitions getDependencies() {
+		return dependencies;
+	}
 
-    public void setDependencies(DependencyDefinitions dependencies) {
-        this.dependencies = dependencies;
-    }
+	public void setDependencies(DependencyDefinitions dependencies) {
+		this.dependencies = dependencies;
+	}
+
+	public List<CartridgeDefinition> getCartridges() {
+		return cartridges;
+	}
+
+	public void setCartridges(List<CartridgeDefinition> cartridges) {
+		this.cartridges = cartridges;
+	}    
+    
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/GroupDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/GroupDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/GroupDefinition.java
index 1f07d8b..0d77628 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/GroupDefinition.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/GroupDefinition.java
@@ -26,7 +26,9 @@ import java.util.List;
 @XmlRootElement(name = "groups")
 public class GroupDefinition implements Serializable {
 
-    private String name;
+    private static final long serialVersionUID = 7261380706841894892L;
+
+	private String name;
 
     private String alias;
 
@@ -35,16 +37,10 @@ public class GroupDefinition implements Serializable {
     private int groupMaxInstances;
 
     public boolean isGroupScalingEnabled;
+    
+    private List<CartridgeDefinition> cartridges;
 
-    public boolean isGroupInstanceMonitoringEnabled;
-
-    private String autoscalingPolicy;
-
-    private String deploymentPolicy;
-
-    private List<SubscribableDefinition> subscribables;
-
-    private List<GroupDefinition> subGroups;
+    private List<GroupDefinition> groups;
 
     public String getName() {
         return name;
@@ -62,30 +58,6 @@ public class GroupDefinition implements Serializable {
         this.alias = alias;
     }
 
-    public String getAutoscalingPolicy() {
-        return autoscalingPolicy;
-    }
-
-    public void setAutoscalingPolicy(String autoscalingPolicy) {
-        this.autoscalingPolicy = autoscalingPolicy;
-    }
-
-    public List<SubscribableDefinition> getSubscribables() {
-        return subscribables;
-    }
-
-    public void setSubscribables(List<SubscribableDefinition> subscribableDefinitions) {
-        this.subscribables = subscribableDefinitions;
-    }
-
-    public List<GroupDefinition> getSubGroups() {
-        return subGroups;
-    }
-
-    public void setSubGroups(List<GroupDefinition> subGroups) {
-        this.subGroups = subGroups;
-    }
-
     public int getGroupMinInstances() {
         return groupMinInstances;
     }
@@ -102,27 +74,28 @@ public class GroupDefinition implements Serializable {
         this.groupMaxInstances = groupMaxInstances;
     }
 
-    public String getDeploymentPolicy() {
-        return deploymentPolicy;
-    }
+	public boolean isGroupScalingEnabled() {
+		return isGroupScalingEnabled;
+	}
 
-    public void setDeploymentPolicy(String deploymentPolicy) {
-        this.deploymentPolicy = deploymentPolicy;
-    }
+	public void setGroupScalingEnabled(boolean isGroupScalingEnabled) {
+		this.isGroupScalingEnabled = isGroupScalingEnabled;
+	}
 
-    /*public boolean isGroupScalingEnabled() {
-        return isGroupScalingEnabled;
-    }
+	public List<CartridgeDefinition> getCartridges() {
+		return cartridges;
+	}
 
-    public void setIsGroupScalingEnabled(boolean isGroupScalingEnabled) {
-        this.isGroupScalingEnabled = isGroupScalingEnabled;
-    }
+	public void setCartridges(List<CartridgeDefinition> cartridges) {
+		this.cartridges = cartridges;
+	}
 
-    public boolean isGroupInstanceMonitoringEnabled() {
-        return isGroupInstanceMonitoringEnabled;
-    }
+	public List<GroupDefinition> getGroups() {
+		return groups;
+	}
 
-    public void setIsGroupInstanceMonitoringEnabled(boolean isGroupInstanceMonitoringEnabled) {
-        this.isGroupInstanceMonitoringEnabled = isGroupInstanceMonitoringEnabled;
-    }*/
+	public void setGroups(List<GroupDefinition> groups) {
+		this.groups = groups;
+	}
+	
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/PropertyBean.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/PropertyBean.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/PropertyBean.java
index 48303d4..08e71bc 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/PropertyBean.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/PropertyBean.java
@@ -25,7 +25,9 @@ import java.io.Serializable;
 @XmlRootElement(name = "property")
 public class PropertyBean implements Serializable {
 
-    private String name;
+    private static final long serialVersionUID = 5756598782384376873L;
+
+	private String name;
 
     private String value;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableDefinition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableDefinition.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableDefinition.java
index 4bdc3f8..497980b 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableDefinition.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableDefinition.java
@@ -25,7 +25,9 @@ import java.io.Serializable;
 @XmlRootElement (name = "subscribables")
 public class SubscribableDefinition implements Serializable {
 
-    private String type;
+    private static final long serialVersionUID = 963835780151323701L;
+
+	private String type;
 
     private String alias;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableInfo.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableInfo.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableInfo.java
index 630e1ed..6c784fe 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableInfo.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/composite/application/beans/SubscribableInfo.java
@@ -27,7 +27,9 @@ import javax.xml.bind.annotation.XmlRootElement;
 @XmlRootElement(name = "subscribableInfo")
 public class SubscribableInfo implements Serializable {
 
-    private String alias;
+    private static final long serialVersionUID = 8097432440778125606L;
+
+	private String alias;
 
     private String deploymentPolicy;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/00a3e633/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
index 29be626..1bdd69f 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/util/converter/PojoConverter.java
@@ -24,6 +24,7 @@ import org.apache.stratos.autoscaler.stub.deployment.partition.ChildLevelPartiti
 import org.apache.stratos.autoscaler.stub.deployment.partition.ChildLevelNetworkPartition;
 import org.apache.stratos.autoscaler.stub.deployment.policy.ChildPolicy;
 import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
+import org.apache.stratos.autoscaler.stub.pojo.CartridgeContext;
 import org.apache.stratos.autoscaler.stub.pojo.DependencyContext;
 import org.apache.stratos.autoscaler.stub.pojo.GroupContext;
 import org.apache.stratos.autoscaler.stub.pojo.SubscribableInfoContext;
@@ -31,6 +32,7 @@ import org.apache.stratos.cloud.controller.stub.domain.*;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
 import org.apache.stratos.manager.composite.application.beans.ApplicationDefinition;
+import org.apache.stratos.manager.composite.application.beans.CartridgeDefinition;
 import org.apache.stratos.manager.composite.application.beans.GroupDefinition;
 import org.apache.stratos.manager.composite.application.beans.SubscribableDefinition;
 import org.apache.stratos.manager.composite.application.beans.SubscribableInfo;
@@ -1008,17 +1010,13 @@ public class PojoConverter {
                 new org.apache.stratos.autoscaler.stub.pojo.ApplicationContext();
         applicationContext.setApplicationId(compositeAppDefinition.getApplicationId());
         applicationContext.setAlias(compositeAppDefinition.getAlias());
-        applicationContext.setDeploymentPolicy(compositeAppDefinition.getDeploymentPolicy());
+        //applicationContext.setDeploymentPolicy(compositeAppDefinition.getDeploymentPolicy());
 
         // convert and set components
         if (compositeAppDefinition.getComponents() != null) {
             org.apache.stratos.autoscaler.stub.pojo.ComponentContext componentContext =
                     new org.apache.stratos.autoscaler.stub.pojo.ComponentContext();
-            // top level subscribables
-            if (compositeAppDefinition.getComponents().getSubscribables() != null) {
-                componentContext.setSubscribableContexts(getSubscribableContextArrayFromSubscribableDefinitions(
-                        compositeAppDefinition.getComponents().getSubscribables()));
-            }
+                      
             // top level Groups
             if (compositeAppDefinition.getComponents().getGroups() != null) {
                 componentContext.setGroupContexts(getgroupContextArrayFromGroupDefinitions(compositeAppDefinition.getComponents().getGroups()));
@@ -1027,17 +1025,70 @@ public class PojoConverter {
             if (compositeAppDefinition.getComponents().getDependencies() != null) {
                 componentContext.setDependencyContext(getDependencyContextFromDependencyDefinition(compositeAppDefinition.getComponents().getDependencies()));
             }
+            // top level cartridge context information
+            if (compositeAppDefinition.getComponents().getCartridges() != null) {
+                componentContext.setCartridgeContexts(getCartridgeContextArrayFromCartridgeDefinition(compositeAppDefinition.getComponents().getCartridges()));
+            }
 
             applicationContext.setComponents(componentContext);
         }
 
         // subscribable information
-        applicationContext.setSubscribableInfoContext(getSubscribableInfoContextArrFromSubscribableInfoDefinition(compositeAppDefinition.getSubscribableInfo()));
+        // applicationContext.setSubscribableInfoContext(getSubscribableInfoContextArrFromSubscribableInfoDefinition(compositeAppDefinition.getSubscribableInfo()));
 
         return applicationContext;
     }
 
-    private static SubscribableInfoContext[] getSubscribableInfoContextArrFromSubscribableInfoDefinition(List<SubscribableInfo> subscribableInfos) {
+    private static CartridgeContext[] getCartridgeContextArrayFromCartridgeDefinition(
+            List<CartridgeDefinition> cartridges) {
+
+    	CartridgeContext[] cartridgeContextArray = new CartridgeContext[cartridges.size()];
+    	int i = 0;
+    	for (CartridgeDefinition cartridgeDefinition : cartridges) {
+    		CartridgeContext context = new CartridgeContext();
+    		context.setCartridgeMax(cartridgeDefinition.getCartridgeMax());
+    		context.setCartridgeMin(cartridgeDefinition.getCartridgeMin());
+    		context.setType(cartridgeDefinition.getType());
+    		context.setSubscribableInfoContext(convertSubscribableInfo(cartridgeDefinition.getSubscribableInfo()));  
+    		cartridgeContextArray[i++] = context;
+        }
+    	
+	    return cartridgeContextArray;
+    }
+
+	private static SubscribableInfoContext convertSubscribableInfo(
+            SubscribableInfo subscribableInfo) {
+		SubscribableInfoContext infoContext = new SubscribableInfoContext();
+		infoContext.setAlias(subscribableInfo.getAlias());
+		infoContext.setAutoscalingPolicy(subscribableInfo.getAutoscalingPolicy());
+		infoContext.setDependencyAliases(subscribableInfo.getDependencyAliases());
+		infoContext.setDeploymentPolicy(subscribableInfo.getDeploymentPolicy());
+		infoContext.setMaxMembers(subscribableInfo.getMaxMembers());
+		infoContext.setMinMembers(subscribableInfo.getMinMembers());
+		//infoContext.setPrivateRepo(subscribableInfo.getpr);
+		infoContext.setRepoPassword(subscribableInfo.getRepoPassword());
+		infoContext.setRepoUrl(subscribableInfo.getRepoUrl());
+		infoContext.setRepoUsername(subscribableInfo.getRepoUsername());
+		infoContext.setProperties(convertProperties(subscribableInfo.getProperty()));
+		
+	    return infoContext;
+    }
+
+	private static org.apache.stratos.autoscaler.stub.Properties convertProperties(
+            List<org.apache.stratos.manager.composite.application.beans.PropertyBean> property) {
+		org.apache.stratos.autoscaler.stub.Properties prop = new org.apache.stratos.autoscaler.stub.Properties();
+		if (property != null) {
+			for (org.apache.stratos.manager.composite.application.beans.PropertyBean propertyBean : property) {
+				org.apache.stratos.autoscaler.stub.Property p = new org.apache.stratos.autoscaler.stub.Property();
+				p.setName(propertyBean.getName());
+				p.setValue(propertyBean.getValue());
+				prop.addProperties(p);
+			}
+		}
+	    return prop;
+    }
+
+	private static SubscribableInfoContext[] getSubscribableInfoContextArrFromSubscribableInfoDefinition(List<SubscribableInfo> subscribableInfos) {
 
         SubscribableInfoContext[] subscribableInfoContexts = new SubscribableInfoContext[subscribableInfos.size()];
         int i = 0;
@@ -1091,28 +1142,27 @@ public class PojoConverter {
             GroupContext groupContext = new GroupContext();
             groupContext.setName(groupDefinition.getName());
             groupContext.setAlias(groupDefinition.getAlias());
-            groupContext.setDeploymentPolicy(groupDefinition.getDeploymentPolicy());
+            //groupContext.setDeploymentPolicy(groupDefinition.getDeploymentPolicy());
             groupContext.setGroupMaxInstances(groupDefinition.getGroupMaxInstances());
             groupContext.setGroupMinInstances(groupDefinition.getGroupMinInstances());
             groupContext.setGroupScalingEnabled(groupDefinition.isGroupScalingEnabled);
-            groupContext.setGroupInstanceMonitoringEnabled(groupDefinition.isGroupInstanceMonitoringEnabled);
-            groupContext.setAutoscalingPolicy(groupDefinition.getAutoscalingPolicy());
-            // nested Subscribables
-            if (groupDefinition.getSubscribables() != null) {
-                groupContext.setSubscribableContexts(
-                        getSubscribableContextArrayFromSubscribableDefinitions(groupDefinition.getSubscribables()));
-            }
-            // nested Groups
-            if (groupDefinition.getSubGroups() != null) {
-                groupContext.setGroupContexts(getgroupContextArrayFromGroupDefinitions(groupDefinition.getSubGroups()));
+            //groupContext.setGroupInstanceMonitoringEnabled(groupDefinition.isGroupInstanceMonitoringEnabled);
+            //groupContext.setAutoscalingPolicy(groupDefinition.getAutoscalingPolicy());
+            
+            // Groups
+            if (groupDefinition.getGroups() != null) {
+                groupContext.setGroupContexts(getgroupContextArrayFromGroupDefinitions(groupDefinition.getGroups()));
             }
+            
+            // new getCartridgeContextArrayFromCartridgeDefinition
+            groupContext.setCartridgeContexts(getCartridgeContextArrayFromCartridgeDefinition(groupDefinition.getCartridges()));
             groupContexts[i++] = groupContext;
         }
 
         return groupContexts;
     }
 
-    private static org.apache.stratos.autoscaler.stub.pojo.SubscribableContext[]
+	/*private static org.apache.stratos.autoscaler.stub.pojo.SubscribableContext[]
     getSubscribableContextArrayFromSubscribableDefinitions(List<SubscribableDefinition> subscribableDefinitions) {
 
         org.apache.stratos.autoscaler.stub.pojo.SubscribableContext[] subscribableContexts =
@@ -1127,7 +1177,7 @@ public class PojoConverter {
         }
 
         return subscribableContexts;
-    }
+    }*/
 
 
     public static ApplicationBean applicationToBean(Application application) {


[5/5] stratos git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/stratos

Posted by sa...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/stratos


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/86530242
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/86530242
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/86530242

Branch: refs/heads/master
Commit: 86530242c29990d650b66387f6811781b7ea1b19
Parents: f58c585 707f111
Author: sajhak <sa...@gmail.com>
Authored: Thu Dec 4 18:09:54 2014 +0530
Committer: sajhak <sa...@gmail.com>
Committed: Thu Dec 4 18:09:54 2014 +0530

----------------------------------------------------------------------
 .../applications/topic/ApplicationBuilder.java  |  15 +-
 .../client/CloudControllerClient.java           |   3 +-
 .../context/cluster/ClusterContextFactory.java  |   8 +-
 .../context/cluster/ClusterInstanceContext.java |  43 +---
 .../context/cluster/VMClusterContext.java       | 181 ++++++++---------
 .../partition/ClusterLevelPartitionContext.java | 203 +++++++++----------
 .../partition/GroupLevelPartitionContext.java   |   4 +-
 .../context/partition/PartitionContext.java     |  20 +-
 .../AutoscalerTopologyEventReceiver.java        |   2 +
 .../autoscaler/monitor/MonitorFactory.java      |  84 ++++----
 .../monitor/cluster/VMClusterMonitor.java       | 169 ++++++++-------
 .../monitor/component/ApplicationMonitor.java   | 129 +++++++-----
 .../autoscaler/rule/RuleTasksDelegator.java     |   2 +-
 .../domain/applications/Application.java        |  33 ++-
 .../src/main/conf/drools/scaling.drl            |   4 +-
 15 files changed, 437 insertions(+), 463 deletions(-)
----------------------------------------------------------------------