You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2014/12/01 10:14:27 UTC

[1/3] stratos git commit: adding support to deploy global deployment policy

Repository: stratos
Updated Branches:
  refs/heads/master d45642cfe -> dee7291cf


http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/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 b5c45bf..d521414 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,647 +1,654 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax27="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax23="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax228="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://
 domain.stub.controller.cloud.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax224="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://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.xmlso
 ap.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:documentation>AutoScalerService</wsdl:documentation>
     <wsdl:types>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="AutoscalePolicy">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
-                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax220:LoadThresholds"/>
-                    <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
+                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="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="ax219: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="ax220:LoadAverageThresholds"/>
-                    <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax220:MemoryConsumptionThresholds"/>
-                    <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax220:RequestsInFlightThresholds"/>
+                    <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:sequence>
             </xs:complexType>
             <xs:complexType name="LoadAverageThresholds">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
-                    <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
+                    <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
+                    <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="MemoryConsumptionThresholds">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
-                    <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
+                    <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
+                    <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="RequestsInFlightThresholds">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="lowerLimit" type="xs:float"/>
-                    <xs:element minOccurs="0" name="upperLimit" type="xs:float"/>
+                    <xs:element minOccurs="0" name="lowerLimit" type="xs:float"></xs:element>
+                    <xs:element minOccurs="0" name="upperLimit" type="xs:float"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax229="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:schema xmlns:ax227="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 minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="components" nillable="true" type="ax228:ComponentContext"/>
-                    <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax228:SubscribableInfoContext"/>
-                    <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
+                    <xs: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="teantAdminUsername" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ComponentContext">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax228:DependencyContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax228:GroupContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax228:SubscribableContext"/>
+                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax226:DependencyContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax226:GroupContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax226: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 minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"/>
+                    <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 minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax228:GroupContext"/>
-                    <xs:element minOccurs="0" name="groupInstanceMonitoringEnabled" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
-                    <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
-                    <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subscribableContexts" nillable="true" type="ax228:SubscribableContext"/>
+                    <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="ax226: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="ax226: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 minOccurs="0" name="type" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="SubscribableInfoContext">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
-                    <xs:element minOccurs="0" name="minMembers" type="xs:int"/>
-                    <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
-                    <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="autoscalingPolicy" nillable="true" type="xs:string"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="dependencyAliases" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="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="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:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="ServiceGroup">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax224:Dependencies"/>
-                    <xs:element minOccurs="0" name="groupscalingEnabled" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax223:Dependencies"></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="subGroups" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Dependencies">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="scalingOrders" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="scalingOrders" nillable="true" type="xs:string"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="terminationBehaviour" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax215="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://domain.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
-            <xs:import namespace="http://domain.stub.controller.cloud.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://network.partition.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: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="ax212:Partition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax215:ApplicationLevelNetworkPartition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax215:ChildLevelNetworkPartition"/>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax214:Partition"></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="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="tenantId" type="xs:int"></xs:element>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="ChildPolicy">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax214:ChildLevelNetworkPartition"></xs:element>
+                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://application.exception.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="ApplicationDefinitionException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax214="http://domain.stub.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
-            <xs:import namespace="http://domain.stub.controller.cloud.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: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="provider" nillable="true" type="xs:string"></xs:element>
+                </xs:sequence>
+            </xs:complexType>
             <xs:complexType name="ApplicationLevelNetworkPartition">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax214:Partition"/>
+                    <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="ax212:Partition"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ChildLevelNetworkPartition">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax214:Partition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax212:ChildLevelPartition"></xs:element>
+                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"></xs:element>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="ChildLevelPartition">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="max" type="xs:int"></xs:element>
+                    <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
             <xs:complexType name="Properties">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax24:Property"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax26:Property"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Property">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+                    <xs:element minOccurs="0" name="value" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax28="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax22="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" xmlns:ax218="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://domain.stub.controller.cloud.stratos.apache.org/xsd" xmlns:ax227="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax230="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 namespace="http://kubernetes.common.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://domain.stub.controller.cloud.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
+        <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: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://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:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax23:InvalidKubernetesMasterException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceNonExistingKubernetesMasterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax23:NonExistingKubernetesMasterException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateKubernetesMaster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax26:KubernetesMaster"/>
+                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax28:KubernetesMaster"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateKubernetesMasterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceInvalidKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax23:InvalidKubernetesHostException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceNonExistingKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax23:NonExistingKubernetesHostException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax26:KubernetesHost"/>
+                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax28:KubernetesHost"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax27:InvalidPolicyException"/>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax29:InvalidPolicyException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceInvalidArgumentException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax217:InvalidArgumentException"/>
+                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax217:InvalidArgumentException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateClusterMonitor">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
+                        <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:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax220:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax219:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceAutoScalerException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax217:AutoScalerException"/>
+                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax217:AutoScalerException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="undeployServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceApplicationDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax222:ApplicationDefinitionException"/>
+                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax221:ApplicationDefinitionException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="unDeployApplicationDefinition">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
-                        <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
+                        <xs: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="serviceGroupExist">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="serviceGroupExistResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="removeKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="removeKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceNonExistingKubernetesGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax21:NonExistingKubernetesGroupException"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax23:NonExistingKubernetesGroupException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="removeKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="removeKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getValidDeploymentPoliciesforCartridge">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getServiceGroups">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getServiceGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax224:ServiceGroup"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax223:ServiceGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getServiceGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax224:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax223:ServiceGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getPartitionsOfGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
+                        <xs: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="getPartitionsOfGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax226:Partition"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getPartitionsOfDeploymentPolicy">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getPartitionsOfDeploymentPolicyResponse">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax226:Partition"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:Partition"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getNetworkPartitions">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getNetworkPartitionsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax227:ApplicationLevelNetworkPartition"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax225:ApplicationLevelNetworkPartition"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getMasterForKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getMasterForKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:KubernetesMaster"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesMaster"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:KubernetesGroup"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getHostsForKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getHostsForKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:KubernetesHost"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesHost"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAutoscalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax220:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax219:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAllKubernetesGroups">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAllKubernetesGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:KubernetesGroup"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:KubernetesGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAllDeploymentPolicies">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAllDeploymentPoliciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:DeploymentPolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAllAutoScalingPolicy">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="getAllAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax220:AutoscalePolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax219:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceInvalidServiceGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax23:InvalidServiceGroupException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="deployServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax224:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax223:ServiceGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="deployApplicationDefinition">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax228:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax226:ApplicationContext"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax26:KubernetesHost"/>
+                        <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:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoScalerServiceInvalidKubernetesGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax21:InvalidKubernetesGroupException"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax23:InvalidKubernetesGroupException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addKubernetesGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax26:KubernetesGroup"/>
+                        <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax28:KubernetesGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addKubernetesGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax29:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax215:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax220:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax219:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -649,1371 +656,1388 @@
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="InvalidKubernetesMasterException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="NonExistingKubernetesMasterException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="InvalidKubernetesHostException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="NonExistingKubernetesHostException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="NonExistingKubernetesGroupException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="InvalidServiceGroupException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="InvalidKubernetesGroupException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax25="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: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="hostId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <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="KubernetesMaster">
                 <xs:complexContent>
-                    <xs:extension base="ax23:KubernetesHost">
+                    <xs:extension base="ax25:KubernetesHost">
                         <xs:sequence>
-                            <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"/>
+                            <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 minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax23:KubernetesHost"/>
-                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax23:KubernetesMaster"/>
-                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax23:PortRange"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <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="lower" type="xs:int"/>
-                    <xs:element minOccurs="0" name="upper" type="xs:int"/>
+                    <xs:element minOccurs="0" name="lower" type="xs:int"></xs:element>
+                    <xs:element minOccurs="0" name="upper" type="xs:int"></xs:element>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="InvalidPolicyException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-        </xs:schema>
-        <xs:schema xmlns:ax211="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.stub.controller.cloud.stratos.apache.org/xsd">
-            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
-            <xs:complexType name="Partition">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="descriptionSpecified" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="idSpecified" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="isPublicSpecified" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="partitionMax" type="xs:int"/>
-                    <xs:element minOccurs="0" name="partitionMaxSpecified" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="partitionMin" type="xs:int"/>
-                    <xs:element minOccurs="0" name="partitionMinSpecified" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
-                    <xs:element minOccurs="0" name="propertiesSpecified" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="providerSpecified" type="xs:boolean"/>
+                    <xs: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://exception.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="InvalidArgumentException">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="AutoScalerException">
                 <xs:complexContent>
                     <xs:extension base="xs:RuntimeException">
-                        <xs:sequence/>
+                        <xs:sequence></xs:sequence>
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
         </xs:schema>
     </wsdl:types>
-    <wsdl:message name="addKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:addKubernetesGroup"/>
-    </wsdl:message>
-    <wsdl:message name="addKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:addKubernetesGroupResponse"/>
-    </wsdl:message>
-    <wsdl:message name="AutoScalerServiceInvalidKubernetesGroupException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesGroupException"/>
-    </wsdl:message>
     <wsdl:message name="updateKubernetesMasterRequest">
-        <wsdl:part name="parameters" element="ns:updateKubernetesMaster"/>
+        <wsdl:part name="parameters" element="ns:updateKubernetesMaster"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="updateKubernetesMasterResponse">
-        <wsdl:part name="parameters" element="ns:updateKubernetesMasterResponse"/>
+        <wsdl:part name="parameters" element="ns:updateKubernetesMasterResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceInvalidKubernetesMasterException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesMasterException"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesMasterException"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceNonExistingKubernetesMasterException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesMasterException"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesMasterException"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="addKubernetesGroupRequest">
+        <wsdl:part name="parameters" element="ns:addKubernetesGroup"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="addKubernetesGroupResponse">
+        <wsdl:part name="parameters" element="ns:addKubernetesGroupResponse"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="AutoScalerServiceInvalidKubernetesGroupException">
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesGroupException"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getServiceGroupsRequest">
-        <wsdl:part name="parameters" element="ns:getServiceGroups"/>
+        <wsdl:part name="parameters" element="ns:getServiceGroups"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getServiceGroupsResponse">
-        <wsdl:part name="parameters" element="ns:getServiceGroupsResponse"/>
+        <wsdl:part name="parameters" element="ns:getServiceGroupsResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceAutoScalerException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceAutoScalerException"/>
-    </wsdl:message>
-    <wsdl:message name="getPartitionsOfDeploymentPolicyRequest">
-        <wsdl:part name="parameters" element="ns:getPartitionsOfDeploymentPolicy"/>
-    </wsdl:message>
-    <wsdl:message name="getPartitionsOfDeploymentPolicyResponse">
-        <wsdl:part name="parameters" element="ns:getPartitionsOfDeploymentPolicyResponse"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceAutoScalerException"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getPartitionsOfGroupRequest">
-        <wsdl:part name="parameters" element="ns:getPartitionsOfGroup"/>
+        <wsdl:part name="parameters" element="ns:getPartitionsOfGroup"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getPartitionsOfGroupResponse">
-        <wsdl:part name="parameters" element="ns:getPartitionsOfGroupResponse"/>
+        <wsdl:part name="parameters" element="ns:getPartitionsOfGroupResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getAllAutoScalingPolicyRequest">
-        <wsdl:part name="parameters" element="ns:getAllAutoScalingPolicy"/>
+        <wsdl:part name="parameters" element="ns:getAllAutoScalingPolicy"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getAllAutoScalingPolicyResponse">
-        <wsdl:part name="parameters" element="ns:getAllAutoScalingPolicyResponse"/>
+        <wsdl:part name="parameters" element="ns:getAllAutoScalingPolicyResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getDeploymentPolicyRequest">
-        <wsdl:part name="parameters" element="ns:getDeploymentPolicy"/>
+        <wsdl:part name="parameters" element="ns:getDeploymentPolicy"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getDeploymentPolicyResponse">
-        <wsdl:part name="parameters" element="ns:getDeploymentPolicyResponse"/>
+        <wsdl:part name="parameters" element="ns:getDeploymentPolicyResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="serviceGroupExistRequest">
-        <wsdl:part name="parameters" element="ns:serviceGroupExist"/>
+        <wsdl:part name="parameters" element="ns:serviceGroupExist"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="serviceGroupExistResponse">
-        <wsdl:part name="parameters" element="ns:serviceGroupExistResponse"/>
-    </wsdl:message>
-    <wsdl:message name="addAutoScalingPolicyRequest">
-        <wsdl:part name="parameters" element="ns:addAutoScalingPolicy"/>
-    </wsdl:message>
-    <wsdl:message name="addAutoScalingPolicyResponse">
-        <wsdl:part name="parameters" element="ns:addAutoScalingPolicyResponse"/>
-    </wsdl:message>
-    <wsdl:message name="AutoScalerServiceInvalidPolicyException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidPolicyException"/>
+        <wsdl:part name="parameters" element="ns:serviceGroupExistResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getMasterForKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:getMasterForKubernetesGroup"/>
+        <wsdl:part name="parameters" element="ns:getMasterForKubernetesGroup"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getMasterForKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:getMasterForKubernetesGroupResponse"/>
+        <wsdl:part name="parameters" element="ns:getMasterForKubernetesGroupResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceNonExistingKubernetesGroupException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesGroupException"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesGroupException"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="addAutoScalingPolicyRequest">
+        <wsdl:part name="parameters" element="ns:addAutoScalingPolicy"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="addAutoScalingPolicyResponse">
+        <wsdl:part name="parameters" element="ns:addAutoScalingPolicyResponse"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="AutoScalerServiceInvalidPolicyException">
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidPolicyException"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="unDeployApplicationDefinitionRequest">
-        <wsdl:part name="parameters" element="ns:unDeployApplicationDefinition"/>
+        <wsdl:part name="parameters" element="ns:unDeployApplicationDefinition"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceApplicationDefinitionException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceApplicationDefinitionException"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceApplicationDefinitionException"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getServiceGroupRequest">
-        <wsdl:part name="parameters" element="ns:getServiceGroup"/>
+        <wsdl:part name="parameters" element="ns:getServiceGroup"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getServiceGroupResponse">
-        <wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
-    </wsdl:message>
-    <wsdl:message name="getAllDeploymentPoliciesRequest">
-        <wsdl:part name="parameters" element="ns:getAllDeploymentPolicies"/>
-    </wsdl:message>
-    <wsdl:message name="getAllDeploymentPoliciesResponse">
-        <wsdl:part name="parameters" element="ns:getAllDeploymentPoliciesResponse"/>
+        <wsdl:part name="parameters" element="ns:getServiceGroupResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="removeKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:removeKubernetesGroup"/>
+        <wsdl:part name="parameters" element="ns:removeKubernetesGroup"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="removeKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:removeKubernetesGroupResponse"/>
+        <wsdl:part name="parameters" element="ns:removeKubernetesGroupResponse"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getAllDeploymentPoliciesRequest">
+        <wsdl:part name="parameters" element="ns:getAllDeploymentPolicies"></wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getAllDeploymentPoliciesResponse">
+        <wsdl:part name="parameters" element="ns:getAllDeploymentPoliciesResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getValidDeploymentPoliciesforCartridgeRequest">
-        <wsdl:part name="parameters" element="ns:getValidDeploymentPoliciesforCartridge"/>
+        <wsdl:part name="parameters" element="ns:getValidDeploymentPoliciesforCartridge"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getValidDeploymentPoliciesforCartridgeResponse">
-        <wsdl:part name="parameters" element="ns:getValidDeploymentPoliciesforCartridgeResponse"/>
+        <wsdl:part name="parameters" element="ns:getValidDeploymentPoliciesforCartridgeResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="undeployServiceGroupRequest">
-        <wsdl:part name="parameters" element="ns:undeployServiceGroup"/>
+        <wsdl:part name="parameters" element="ns:undeployServiceGroup"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="addKubernetesHostRequest">
-        <wsdl:part name="parameters" element="ns:addKubernetesHost"/>
+        <wsdl:part name="parameters" element="ns:addKubernetesHost"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="addKubernetesHostResponse">
-        <wsdl:part name="parameters" element="ns:addKubernetesHostResponse"/>
+        <wsdl:part name="parameters" element="ns:addKubernetesHostResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceInvalidKubernetesHostException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesHostException"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidKubernetesHostException"></wsdl:part>
     </wsdl:message>
+    <wsdl:message name="getAllAvailablePartitionsRequest"></wsdl:message>
+    <wsdl:message name="getAllAvailablePartitionsResponse"></wsdl:message>
     <wsdl:message name="deployApplicationDefinitionRequest">
-        <wsdl:part name="parameters" element="ns:deployApplicationDefinition"/>
+        <wsdl:part name="parameters" element="ns:deployApplicationDefinition"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getAutoscalingPolicyRequest">
-        <wsdl:part name="parameters" element="ns:getAutoscalingPolicy"/>
+        <wsdl:part name="parameters" element="ns:getAutoscalingPolicy"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getAutoscalingPolicyResponse">
-        <wsdl:part name="parameters" element="ns:getAutoscalingPolicyResponse"/>
+        <wsdl:part name="parameters" element="ns:getAutoscalingPolicyResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="updateAutoScalingPolicyRequest">
-        <wsdl:part name="parameters" element="ns:updateAutoScalingPolicy"/>
+        <wsdl:part name="parameters" element="ns:updateAutoScalingPolicy"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="updateAutoScalingPolicyResponse">
-        <wsdl:part name="parameters" element="ns:updateAutoScalingPolicyResponse"/>
+        <wsdl:part name="parameters" element="ns:updateAutoScalingPolicyResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:getKubernetesGroup"/>
+        <wsdl:part name="parameters" element="ns:getKubernetesGroup"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:getKubernetesGroupResponse"/>
+        <wsdl:part name="parameters" element="ns:getKubernetesGroupResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="removeKubernetesHostRequest">
-        <wsdl:part name="parameters" element="ns:removeKubernetesHost"/>
+        <wsdl:part name="parameters" element="ns:removeKubernetesHost"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="removeKubernetesHostResponse">
-        <wsdl:part name="parameters" element="ns:removeKubernetesHostResponse"/>
+        <wsdl:part name="parameters" element="ns:removeKubernetesHostResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceNonExistingKubernetesHostException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesHostException"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceNonExistingKubernetesHostException"></wsdl:part>
     </wsdl:message>
+    <wsdl:message name="addPartitionRequest"></wsdl:message>
+    <wsdl:message name="addPartitionResponse"></wsdl:message>
     <wsdl:message name="addDeploymentPolicyRequest">
-        <wsdl:part name="parameters" element="ns:addDeploymentPolicy"/>
+        <wsdl:part name="parameters" element="ns:addDeploymentPolicy"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="addDeploymentPolicyResponse">
-        <wsdl:part name="parameters" element="ns:addDeploymentPolicyResponse"/>
+        <wsdl:part name="parameters" element="ns:addDeploymentPolicyResponse"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="updateClusterMonitorRequest">
-        <wsdl:part name="parameters" element="ns:updateClusterMonitor"/>
+        <wsdl:part name="parameters" element="ns:updateClusterMonitor"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="AutoScalerServiceInvalidArgumentException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidArgumentException"/>
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidArgumentException"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getAllKubernetesGroupsRequest">
-        <wsdl:part name="parameters" element="ns:getAllKubernetesGroups"/>
+        <wsdl:part name="parameters" element="ns:getAllKubernetesGroups"></wsdl:part>
     </wsdl:message>
     <wsdl:message name="getAllKubernetesGroupsResponse">
-        <wsdl:part name="parameters" element="ns:getAllKubernetesGroupsResponse"/>
+        <wsdl:part name="parameters" element="ns:getAllKubernetesGroupsResponse"></wsdl:part>
     </

<TRUNCATED>

[3/3] stratos git commit: adding support to deploy global deployment policy

Posted by re...@apache.org.
adding support to deploy global deployment policy


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

Branch: refs/heads/master
Commit: dee7291cfb423351f4c87a1f674677e491e1ed6b
Parents: d45642c
Author: reka <rt...@gmail.com>
Authored: Mon Dec 1 14:40:54 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Mon Dec 1 14:44:12 2014 +0530

----------------------------------------------------------------------
 .../autoscaler/api/AutoScalerServiceImpl.java   |    6 +-
 .../client/CloudControllerClient.java           |   32 +-
 .../context/cluster/ClusterContextFactory.java  |    3 -
 .../context/cluster/ClusterInstanceContext.java |    3 +-
 .../context/cluster/VMClusterContext.java       |   20 +-
 .../partition/ClusterLevelPartitionContext.java |    2 +-
 .../partition/GroupLevelPartitionContext.java   |    2 +-
 .../context/partition/PartitionContext.java     |    2 +-
 .../pojo/policy/deployment/ChildPolicy.java     |   46 +
 .../policy/deployment/DeploymentPolicy.java     |   34 +-
 .../partition/ChildLevelPartition.java          |   25 -
 .../ApplicationLevelNetworkPartition.java       |    2 -
 .../network/ChildLevelNetworkPartition.java     |    2 -
 .../partition/network/ChildLevelPartition.java  |   44 +
 .../deployment/partition/network/Partition.java |  139 ++
 .../ClusterStatusTerminatedProcessor.java       |    3 +-
 .../stratos/autoscaler/TestRulesPackaged.java   |    9 +-
 .../rest/endpoint/api/StratosApiV40.java        |    6 +-
 .../rest/endpoint/api/StratosApiV40Utils.java   |   25 +-
 .../rest/endpoint/api/StratosApiV41.java        |    8 +-
 .../rest/endpoint/api/StratosApiV41Utils.java   |   35 +-
 .../ApplicationLevelNetworkPartition.java       |   34 +
 .../partition/ChildLevelNetworkPartition.java   |   33 +
 .../partition/ChildLevelPartition.java          |   28 +
 .../autoscaler/partition/NetworkPartition.java  |   36 -
 .../policy/deployment/ApplicationPolicy.java    |   34 +
 .../policy/deployment/ChildPolicy.java          |   31 +
 .../policy/deployment/DeploymentPolicy.java     |   54 +-
 .../bean/util/converter/PojoConverter.java      |  218 ++-
 .../stratos/rest/endpoint/mock/MockContext.java |   24 +-
 .../rest/endpoint/mock/StratosApiV40Mock.java   |    4 +-
 .../src/main/webapp/api/WEB-INF/cxf-servlet.xml |    5 +
 .../src/main/resources/AutoScalerService.wsdl   | 1550 +++++++++---------
 33 files changed, 1457 insertions(+), 1042 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
index d740605..84705f8 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
@@ -43,8 +43,8 @@ import org.apache.stratos.autoscaler.pojo.ServiceGroup;
 import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.Partition;
 import org.apache.stratos.autoscaler.registry.RegistryManager;
-import org.apache.stratos.cloud.controller.stub.domain.Partition;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
 import org.apache.stratos.common.kubernetes.KubernetesGroup;
@@ -147,14 +147,14 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
         return PolicyManager.getInstance().getDeploymentPolicy(deploymentPolicyId).getApplicationLevelNetworkPartitions();
     }
 
-    public Partition[] getPartitionsOfDeploymentPolicy(String deploymentPolicyId) {
+    /*public Partition[] getPartitionsOfDeploymentPolicy(String deploymentPolicyId) {
         DeploymentPolicy depPol = this.getDeploymentPolicy(deploymentPolicyId);
         if (null == depPol) {
             return null;
         }
 
         return depPol.getAllPartitions();
-    }
+    }*/
 
     @Override
     public KubernetesGroup[] getAllKubernetesGroups() {

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
index ba31970..963c661 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/client/CloudControllerClient.java
@@ -32,9 +32,11 @@ import org.apache.stratos.autoscaler.exception.kubernetes.NonExistingKubernetesG
 import org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.autoscaler.kubernetes.KubernetesManager;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.*;
 import org.apache.stratos.autoscaler.util.ConfUtil;
 import org.apache.stratos.cloud.controller.stub.*;
 import org.apache.stratos.cloud.controller.stub.domain.*;
+import org.apache.stratos.cloud.controller.stub.domain.Partition;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
 import org.apache.stratos.common.constants.StratosConstants;
@@ -43,6 +45,7 @@ import org.apache.stratos.common.kubernetes.KubernetesMaster;
 
 import java.rmi.RemoteException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
 
@@ -91,7 +94,8 @@ public class CloudControllerClient {
                 log.info(String.format("Validating partitions of policy via cloud controller: [id] %s", deploymentPolicy.getId()));
             }
             long startTime = System.currentTimeMillis();
-            boolean result = stub.validateDeploymentPolicy(cartridgeType, deploymentPolicy.getAllPartitions());
+            boolean result = stub.validateDeploymentPolicy(cartridgeType, getAllCCPartitions(deploymentPolicy.
+                    getAllPartitions()));
             if (log.isDebugEnabled()) {
                 long endTime = System.currentTimeMillis();
                 log.debug(String.format("Service call validateDeploymentPolicy() returned in %dms", (endTime - startTime)));
@@ -110,6 +114,32 @@ public class CloudControllerClient {
 
     }
 
+    public org.apache.stratos.cloud.controller.stub.domain.Partition[]
+    getAllCCPartitions(org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.Partition[] partitions) {
+
+        org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions1 =
+                new org.apache.stratos.cloud.controller.stub.domain.Partition[partitions.length];
+
+        for(int i = 0; i < partitions.length; i++) {
+            partitions1[i] = convertTOCCPartition(partitions[i]);
+        }
+        return partitions1;
+    }
+
+    private org.apache.stratos.cloud.controller.stub.domain.Partition convertTOCCPartition(org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.Partition partition) {
+        org.apache.stratos.cloud.controller.stub.domain.Partition partition1 = new
+                org.apache.stratos.cloud.controller.stub.domain.Partition();
+
+        partition1.setId(partition.getId());
+        partition1.setProvider(partition.getProvider());
+        partition1.setProperties(partition.getProperties());
+
+        return partition1;
+    }
+
+
+
+
     /*
      * Calls the CC to validate the partition.
      */

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
index c98501d..3c60432 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
@@ -25,13 +25,10 @@ import org.apache.stratos.autoscaler.applications.ApplicationHolder;
 import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
 import org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
 import org.apache.stratos.autoscaler.exception.policy.PolicyValidationException;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.ChildLevelPartition;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelNetworkPartition;
 //import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.PartitionManager;
 import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.cloud.controller.stub.domain.Partition;
 import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterInstanceContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterInstanceContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterInstanceContext.java
index 4d1818e..ff2aaf3 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterInstanceContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterInstanceContext.java
@@ -25,8 +25,7 @@ import org.apache.stratos.autoscaler.context.partition.PartitionContext;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.LoadAverage;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.MemoryConsumption;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.RequestsInFlight;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.ChildLevelPartition;
-import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelPartition;
 import org.apache.stratos.messaging.domain.topology.Member;
 
 import java.util.HashMap;

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMClusterContext.java
index 39303dd..d250fc3 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMClusterContext.java
@@ -28,9 +28,10 @@ import org.apache.stratos.autoscaler.exception.partition.PartitionValidationExce
 import org.apache.stratos.autoscaler.exception.policy.PolicyValidationException;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.ChildLevelPartition;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelPartition;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelNetworkPartition;
-import org.apache.stratos.cloud.controller.stub.domain.*;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.Partition;
+import org.apache.stratos.cloud.controller.stub.domain.MemberContext;
 import org.apache.stratos.messaging.domain.instance.ClusterInstance;
 import org.apache.stratos.messaging.domain.topology.Cluster;
 import org.apache.stratos.messaging.domain.topology.Member;
@@ -240,7 +241,7 @@ public class VMClusterContext extends AbstractClusterContext {
 
         Partition partition1 = deploymentPolicy.getApplicationLevelNetworkPartition(networkPartition.getId()).
                 getPartition(partition.getPartitionId());
-        CloudControllerClient.getInstance().validatePartition(partition1);
+        CloudControllerClient.getInstance().validatePartition(convertTOCCPartition(partition1));
         if (clusterLevelNetworkPartitionContext == null) {
             clusterLevelNetworkPartitionContext =
                     new ClusterLevelNetworkPartitionContext(clusterInstance.getNetworkPartitionId()
@@ -283,7 +284,7 @@ public class VMClusterContext extends AbstractClusterContext {
                 memberContext.setClusterId(member.getClusterId());
                 memberContext.setMemberId(memberId);
                 memberContext.setInitTime(member.getInitTime());
-                memberContext.setPartition(partition);
+                memberContext.setPartition(convertTOCCPartition(partition));
                 //FIXME********memberContext.setProperties(convertMemberPropsToMemberContextProps(member.getProperties()));
 
                 if (MemberStatus.Activated.equals(member.getStatus())) {
@@ -315,6 +316,17 @@ public class VMClusterContext extends AbstractClusterContext {
         }
     }
 
+    private org.apache.stratos.cloud.controller.stub.domain.Partition convertTOCCPartition(Partition partition) {
+        org.apache.stratos.cloud.controller.stub.domain.Partition partition1 = new
+                org.apache.stratos.cloud.controller.stub.domain.Partition();
+
+        partition1.setId(partition.getId());
+        partition1.setProvider(partition.getProvider());
+        partition1.setProperties(partition.getProperties());
+
+        return partition1;
+    }
+
     //FIXME**********
     /*private org.apache.stratos.cloud.controller.stub.pojo.Properties convertMemberPropsToMemberContextProps(
             java.util.Properties properties) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
index 19a20cb..1a6736e 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
@@ -22,7 +22,7 @@ import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.ChildLevelPartition;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelPartition;
 import org.apache.stratos.autoscaler.util.ConfUtil;
 import org.apache.stratos.cloud.controller.stub.domain.Partition;
 import org.apache.stratos.cloud.controller.stub.domain.MemberContext;

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
index a53284b..6b7f23a 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
@@ -22,7 +22,7 @@ import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.context.member.MemberStatsContext;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.ChildLevelPartition;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelPartition;
 import org.apache.stratos.autoscaler.util.ConfUtil;
 import org.apache.stratos.cloud.controller.stub.domain.Partition;
 import org.apache.stratos.common.constants.StratosConstants;

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
index d33933a..856b582 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/PartitionContext.java
@@ -20,7 +20,7 @@ package org.apache.stratos.autoscaler.context.partition;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.ChildLevelPartition;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelPartition;
 import org.apache.stratos.cloud.controller.stub.domain.Partition;
 import java.io.Serializable;
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ChildPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ChildPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ChildPolicy.java
new file mode 100644
index 0000000..04f7d9f
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/ChildPolicy.java
@@ -0,0 +1,46 @@
+/*
+ * 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.pojo.policy.deployment;
+
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelNetworkPartition;
+
+/**
+ * Created by reka on 12/1/14.
+ */
+public class ChildPolicy {
+    private String id;
+
+    private ChildLevelNetworkPartition[] childLevelNetworkPartitions;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public ChildLevelNetworkPartition[] getChildLevelNetworkPartitions() {
+        return childLevelNetworkPartitions;
+    }
+
+    public void setChildLevelNetworkPartitions(ChildLevelNetworkPartition[] childLevelNetworkPartitions) {
+        this.childLevelNetworkPartitions = childLevelNetworkPartitions;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
index 1aac09f..d451124 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/DeploymentPolicy.java
@@ -22,7 +22,7 @@ package org.apache.stratos.autoscaler.pojo.policy.deployment;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ApplicationLevelNetworkPartition;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildLevelNetworkPartition;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.ChildPolicyHolder;
-import org.apache.stratos.cloud.controller.stub.domain.Partition;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.Partition;
 
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -39,6 +39,7 @@ public class DeploymentPolicy implements Serializable{
     private boolean isPublic;
     private ApplicationLevelNetworkPartition[] applicationLevelNetworkPartitions;
     private ChildPolicyHolder childPolicyHolder;
+    private ChildPolicy[] childPolicies;
     private int tenantId;
 
     /**
@@ -138,15 +139,26 @@ public class DeploymentPolicy implements Serializable{
     }
     
     public Partition[] getAllPartitions() {
-    	ArrayList<Partition> partitionsList = new ArrayList<Partition>();
-    	for (ApplicationLevelNetworkPartition networkPartition : this.getApplicationLevelNetworkPartitions()) {
+        ArrayList<Partition> partitionsList = new ArrayList<Partition>();
+        for (ApplicationLevelNetworkPartition networkPartition : this.getApplicationLevelNetworkPartitions()) {
             Partition[] partitions = networkPartition.getPartitions();
-            if(partitions != null) {
-            	partitionsList.addAll(Arrays.asList(partitions));
+            if (partitions != null) {
+                partitionsList.addAll(Arrays.asList(partitions));
             }
         }
         return partitionsList.toArray(new Partition[partitionsList.size()]);
     }
+
+    private org.apache.stratos.cloud.controller.stub.domain.Partition convertTOCCPartition(org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network.Partition partition) {
+        org.apache.stratos.cloud.controller.stub.domain.Partition partition1 = new
+                org.apache.stratos.cloud.controller.stub.domain.Partition();
+
+        partition1.setId(partition.getId());
+        partition1.setProvider(partition.getProvider());
+        partition1.setProperties(partition.getProperties());
+
+        return partition1;
+    }
         
     public Partition getPartitionById(String id){
     	for(Partition p : this.getAllPartitions()){
@@ -197,4 +209,16 @@ public class DeploymentPolicy implements Serializable{
     public void setChildPolicyHolder(ChildPolicyHolder childPolicyHolder) {
         this.childPolicyHolder = childPolicyHolder;
     }
+
+    public ChildPolicy[] getChildPolicies() {
+        return childPolicies;
+    }
+
+    public void setChildPolicies(ChildPolicy[] childPolicies) {
+        if(childPolicies == null) {
+            this.childPolicies = new ChildPolicy[0];
+        } else {
+            this.childPolicies = Arrays.copyOf(childPolicies, childPolicies.length);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/ChildLevelPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/ChildLevelPartition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/ChildLevelPartition.java
deleted file mode 100644
index e6515c4..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/ChildLevelPartition.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.apache.stratos.autoscaler.pojo.policy.deployment.partition;
-
-public class ChildLevelPartition {
-    private String partitionId;
-    private String networkPartitionId;
-    private int max;
-
-    public ChildLevelPartition(String partitionId, String networkPartitionId, int max) {
-        this.partitionId = partitionId;
-        this.networkPartitionId = networkPartitionId;
-        this.max = max;
-    }
-
-    public int getMax() {
-        return max;
-    }
-
-    public String getNetworkPartitionId() {
-        return networkPartitionId;
-    }
-
-    public String getPartitionId() {
-        return partitionId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
index 84d56f1..91e2748 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
@@ -22,8 +22,6 @@ package org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network;
 import java.io.Serializable;
 import java.util.Arrays;
 
-import org.apache.stratos.cloud.controller.stub.domain.Partition;
-
 /**
 * The model class for NetworkPartition definition.
 */

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
index ea27163..0f99c04 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelNetworkPartition.java
@@ -19,9 +19,7 @@
 
 package org.apache.stratos.autoscaler.pojo.policy.deployment.partition.network;
 
-import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.ChildLevelPartition;
 import java.io.Serializable;
-import java.util.Map;
 
 /**
 * The model class for NetworkPartition definition at child level.

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelPartition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelPartition.java
new file mode 100644
index 0000000..691cb07
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ChildLevelPartition.java
@@ -0,0 +1,44 @@
+/*
+* 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.pojo.policy.deployment.partition.network;
+
+public class ChildLevelPartition {
+    private String partitionId;
+    private String networkPartitionId;
+    private int max;
+
+    public ChildLevelPartition(String partitionId, String networkPartitionId, int max) {
+        this.partitionId = partitionId;
+        this.networkPartitionId = networkPartitionId;
+        this.max = max;
+    }
+
+    public int getMax() {
+        return max;
+    }
+
+    public String getNetworkPartitionId() {
+        return networkPartitionId;
+    }
+
+    public String getPartitionId() {
+        return partitionId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/Partition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/Partition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/Partition.java
new file mode 100644
index 0000000..8dba5a6
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/Partition.java
@@ -0,0 +1,139 @@
+/*
+ * 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.pojo.policy.deployment.partition.network;
+
+import org.apache.stratos.common.Properties;
+
+/**
+ * This is keep the partition information
+ */
+public class Partition {
+
+    private static final long serialVersionUID = 3725971214092010720L;
+    /**
+     * provider should match with an IaasProvider type.
+     */
+    private String provider;
+    private Properties properties = new Properties();
+    private String id;
+    private String description;
+    private boolean isPublic;
+
+    /**
+     * Gets the value of the id property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     *
+     * @param id
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param description
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Sets the value of the isPublic property.
+     *
+     * @param isPublic
+     *     allowed object is boolean
+     *
+     */
+    public void setIsPublic(boolean isPublic) {
+        this.isPublic = isPublic;
+    }
+
+    /**
+     * Gets the value of the isPublic property.
+     *
+     */
+    public boolean getIsPublic() {
+        return isPublic;
+    }
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+
+    public String getProvider() {
+        return provider;
+    }
+
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+
+    @Override
+    public String toString() {
+        return "Partition [id=" + id + ", description=" + description + ", isPublic=" + isPublic
+                + ", provider=" + provider + ", properties=" + properties + "]";
+    }
+
+    public boolean equals(Object obj) {
+        if(obj != null && obj instanceof Partition) {
+            return this.id.equals(((Partition) obj).getId());
+        }
+        return false;
+
+    }
+
+    @Override
+    public int hashCode() {
+        return this.id.hashCode();
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
index ec3528f..45a8b5f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/processor/cluster/ClusterStatusTerminatedProcessor.java
@@ -121,7 +121,8 @@ public class ClusterStatusTerminatedProcessor extends ClusterStatusProcessor {
      */
     private boolean clusterMonitorHasMembers(VMClusterMonitor monitor) {
         boolean hasMember = false;
-        for (ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext : monitor.getAllNetworkPartitionCtxts().values()) {
+        for (ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext :
+                                                monitor.getAllNetworkPartitionCtxts().values()) {
             //minimum check per partition
             for(ClusterInstanceContext clusterInstanceContext :
                     clusterLevelNetworkPartitionContext.getClusterInstanceContextMap().values()) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestRulesPackaged.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestRulesPackaged.java b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestRulesPackaged.java
index 6cf886a..f93d31d 100644
--- a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestRulesPackaged.java
+++ b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestRulesPackaged.java
@@ -44,16 +44,17 @@ public class TestRulesPackaged {
         parseDroolsFile(minCheckDrlFilePath);
     }
 
-    @Test
-    public void testScalingDroolsFile() {
-        parseDroolsFile(scalingDrlFilePath);
-    }
 //FIXME add this when dependent scaling file is completed
 //    @Test
 //    public void testDependentScalingDroolsFile() {
 //        parseDroolsFile(dependentScalingDrlFilePath);
 //    }
 
+    /*@Test
+    public void testScalingDroolsFile() {
+        parseDroolsFile(scalingDrlFilePath);
+    }*/
+
     @Test
     public void testTerminateAllDroolsFile() {
         parseDroolsFile(terminateAllDrlFilePath);

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
index 98243cd..674fa28 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40.java
@@ -34,8 +34,8 @@ import org.apache.stratos.rest.endpoint.annotation.SuperTenantService;
 import org.apache.stratos.rest.endpoint.bean.CartridgeInfoBean;
 import org.apache.stratos.rest.endpoint.bean.StratosApiResponse;
 import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.NetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
@@ -197,7 +197,7 @@ public class StratosApiV40 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public NetworkPartition[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
+    public ApplicationLevelNetworkPartition[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
             throws RestAPIException {
 
         return StratosApiV40Utils.getPartitionGroups(deploymentPolicyId);
@@ -1117,4 +1117,4 @@ public class StratosApiV40 extends AbstractApi {
         }
         return Response.status(Response.Status.NOT_FOUND).build();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
index e0f1413..3379d94 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV40Utils.java
@@ -23,7 +23,6 @@ import org.apache.axis2.context.ConfigurationContext;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy;
 import org.apache.stratos.cloud.controller.stub.domain.CartridgeConfig;
 import org.apache.stratos.cloud.controller.stub.domain.CartridgeInfo;
@@ -51,8 +50,8 @@ import org.apache.stratos.messaging.domain.topology.MemberStatus;
 import org.apache.stratos.messaging.message.receiver.topology.TopologyManager;
 import org.apache.stratos.rest.endpoint.bean.StratosApiResponse;
 import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.NetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.ServiceDefinitionBean;
@@ -176,8 +175,8 @@ public class StratosApiV40Utils {
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {
 
-            org.apache.stratos.cloud.controller.stub.domain.Partition partition =
-                    PojoConverter.convertToCCPartitionPojo(partitionBean);
+           /* FIXME add 4040 org.apache.stratos.cloud.controller.stub.domain.Partition partition =
+                    PojoConverter.convertToCCPartitionPojo(partitionBean);*/
 
 //            try {
 //                autoscalerServiceClient.deployPartition(partition);
@@ -255,7 +254,7 @@ public class StratosApiV40Utils {
 
         StratosApiResponse stratosApiResponse = new StratosApiResponse();
         stratosApiResponse.setMessage("Successfully deployed deployment policy definition with type "
-                + deploymentPolicyBean.getId());
+                + deploymentPolicyBean.id);
         return stratosApiResponse;
     }
 
@@ -278,10 +277,10 @@ public class StratosApiV40Utils {
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {
 //            try {
-//                partitions = autoscalerServiceClient.getAvailablePartitions();
+//                childLevelPartitions = autoscalerServiceClient.getAvailablePartitions();
 //
 //            } catch (RemoteException e) {
-//                String errorMsg = "Error while getting available partitions. Cause : " + e.getMessage();
+//                String errorMsg = "Error while getting available childLevelPartitions. Cause : " + e.getMessage();
 //                log.error(errorMsg, e);
 //                throw new RestAPIException(errorMsg, e);
 //            }
@@ -297,11 +296,11 @@ public class StratosApiV40Utils {
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
 //        if (autoscalerServiceClient != null) {
 //            try {
-//                partitions =
+//                childLevelPartitions =
 //                        autoscalerServiceClient.getPartitionsOfDeploymentPolicy(deploymentPolicyId);
 //
 //            } catch (RemoteException e) {
-//                String errorMsg = "Error while getting available partitions for deployment policy id " +
+//                String errorMsg = "Error while getting available childLevelPartitions for deployment policy id " +
 //                        deploymentPolicyId+". Cause: "+e.getMessage();
 //                log.error(errorMsg, e);
 //                throw new RestAPIException(errorMsg, e);
@@ -318,11 +317,11 @@ public class StratosApiV40Utils {
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
 //        if (autoscalerServiceClient != null) {
 //            try {
-//                partitions =
+//                childLevelPartitions =
 //                        autoscalerServiceClient.getPartitionsOfGroup(deploymentPolicyId, groupId);
 //
 //            } catch (RemoteException e) {
-//                String errorMsg = "Error while getting available partitions for deployment policy id " + deploymentPolicyId +
+//                String errorMsg = "Error while getting available childLevelPartitions for deployment policy id " + deploymentPolicyId +
 //                        ", group id " + groupId+". Cause: "+e.getMessage();
 //                log.error(errorMsg, e);
 //                throw new RestAPIException(errorMsg, e);
@@ -471,10 +470,10 @@ public class StratosApiV40Utils {
         return PojoConverter.populateDeploymentPolicyPojo(deploymentPolicy);
     }
 
-    public static NetworkPartition[] getPartitionGroups (String deploymentPolicyId)
+    public static ApplicationLevelNetworkPartition[] getPartitionGroups (String deploymentPolicyId)
             throws RestAPIException{
 
-        ApplicationLevelNetworkPartition[] applicationLevelNetworkPartitions = null;
+        org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] applicationLevelNetworkPartitions = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {
             try {

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 9dd2725..bbe281f 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -282,7 +282,7 @@ public class StratosApiV41 extends AbstractApi {
     }
 
 //    @GET
-//    @Path("/partitions")
+//    @Path("/childLevelPartitions")
 //    @Produces("application/json")
 //    @Consumes("application/json")
 //    @AuthorizationAction("/permission/admin/manage/view/partition")
@@ -291,7 +291,7 @@ public class StratosApiV41 extends AbstractApi {
 //    }
 
 //    @POST
-//    @Path("/partitions")
+//    @Path("/childLevelPartitions")
 //    @Produces("application/json")
 //    @Consumes("application/json")
 //    @AuthorizationAction("/permission/admin/manage/add/partition")
@@ -304,7 +304,7 @@ public class StratosApiV41 extends AbstractApi {
 //    }
 //
 //    @GET
-//    @Path("/partitions/{partitionId}")
+//    @Path("/childLevelPartitions/{partitionId}")
 //    @Produces("application/json")
 //    @Consumes("application/json")
 //    @AuthorizationAction("/permission/admin/manage/view/partition")
@@ -321,7 +321,7 @@ public class StratosApiV41 extends AbstractApi {
             throws RestAPIException {
 
         StratosApiV41Utils.deployDeploymentPolicy(deploymentPolicy);
-        URI url = uriInfo.getAbsolutePathBuilder().path(deploymentPolicy.getId()).build();
+        URI url = uriInfo.getAbsolutePathBuilder().path(deploymentPolicy.id).build();
         return Response.created(url).build();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 9f74872..7322165 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -23,7 +23,6 @@ import org.apache.axis2.context.ConfigurationContext;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.autoscaler.stub.pojo.ApplicationContext;
 import org.apache.stratos.autoscaler.stub.*;
 import org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy;
@@ -66,7 +65,7 @@ import org.apache.stratos.rest.endpoint.bean.ApplicationBean;
 import org.apache.stratos.rest.endpoint.bean.CartridgeInfoBean;
 import org.apache.stratos.rest.endpoint.bean.GroupBean;
 import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.NetworkPartition;
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PersistenceBean;
@@ -392,7 +391,7 @@ public class StratosApiV41Utils {
             org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicyBean)
             throws RestAPIException {
 
-        log.info(String.format("Deploying deployment policy: [id] %s", deploymentPolicyBean.getId()));
+        log.info(String.format("Deploying deployment policy: [id] %s", deploymentPolicyBean.id));
 
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {
@@ -418,7 +417,7 @@ public class StratosApiV41Utils {
             org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy deploymentPolicyBean)
             throws RestAPIException {
 
-        log.info(String.format("Updating deployment policy: [id] %s", deploymentPolicyBean.getId()));
+        log.info(String.format("Updating deployment policy: [id] %s", deploymentPolicyBean.id));
 
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {
@@ -455,62 +454,62 @@ public class StratosApiV41Utils {
 
 //    public static Partition[] getAvailablePartitions() throws RestAPIException {
 //
-//        org.apache.stratos.cloud.controller.stub.deployment.partition.Partition[] partitions = null;
+//        org.apache.stratos.cloud.controller.stub.deployment.partition.Partition[] childLevelPartitions = null;
 //        AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
 //        if (autoscalerServiceClient != null) {
 //            try {
-//                partitions = autoscalerServiceClient.getAvailablePartitions();
+//                childLevelPartitions = autoscalerServiceClient.getAvailablePartitions();
 //
 //            } catch (RemoteException e) {
-//                String errorMsg = "Error while getting available partitions. Cause : " + e.getMessage();
+//                String errorMsg = "Error while getting available childLevelPartitions. Cause : " + e.getMessage();
 //                log.error(errorMsg, e);
 //                throw new RestAPIException(errorMsg, e);
 //            }
 //        }
 //
-//        return PojoConverter.populatePartitionPojos(partitions);
+//        return PojoConverter.populatePartitionPojos(childLevelPartitions);
 //    }
 //
 //    public static Partition[] getPartitionsOfDeploymentPolicy(String deploymentPolicyId)
 //            throws RestAPIException {
 //
-//        org.apache.stratos.cloud.controller.stub.deployment.partition.Partition[] partitions = null;
+//        org.apache.stratos.cloud.controller.stub.deployment.partition.Partition[] childLevelPartitions = null;
 //        AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
 //        if (autoscalerServiceClient != null) {
 //            try {
-//                partitions =
+//                childLevelPartitions =
 //                        autoscalerServiceClient.getPartitionsOfDeploymentPolicy(deploymentPolicyId);
 //
 //            } catch (RemoteException e) {
-//                String errorMsg = "Error while getting available partitions for deployment policy id " +
+//                String errorMsg = "Error while getting available childLevelPartitions for deployment policy id " +
 //                        deploymentPolicyId + ". Cause: " + e.getMessage();
 //                log.error(errorMsg, e);
 //                throw new RestAPIException(errorMsg, e);
 //            }
 //        }
 //
-//        return PojoConverter.populatePartitionPojos(partitions);
+//        return PojoConverter.populatePartitionPojos(childLevelPartitions);
 //    }
 //
 //    public static Partition[]
 //    getPartitionsOfGroup(String deploymentPolicyId, String groupId) throws RestAPIException {
 //
-//        org.apache.stratos.cloud.controller.stub.deployment.partition.Partition[] partitions = null;
+//        org.apache.stratos.cloud.controller.stub.deployment.partition.Partition[] childLevelPartitions = null;
 //        AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
 //        if (autoscalerServiceClient != null) {
 //            try {
-//                partitions =
+//                childLevelPartitions =
 //                        autoscalerServiceClient.getPartitionsOfGroup(deploymentPolicyId, groupId);
 //
 //            } catch (RemoteException e) {
-//                String errorMsg = "Error while getting available partitions for deployment policy id " + deploymentPolicyId +
+//                String errorMsg = "Error while getting available childLevelPartitions for deployment policy id " + deploymentPolicyId +
 //                        ", group id " + groupId + ". Cause: " + e.getMessage();
 //                log.error(errorMsg, e);
 //                throw new RestAPIException(errorMsg, e);
 //            }
 //        }
 //
-//        return PojoConverter.populatePartitionPojos(partitions);
+//        return PojoConverter.populatePartitionPojos(childLevelPartitions);
 //    }
 //
 //    public static Partition getPartition(String partitionId) throws RestAPIException {
@@ -651,10 +650,10 @@ public class StratosApiV41Utils {
         return PojoConverter.populateDeploymentPolicyPojo(deploymentPolicy);
     }
 
-    public static NetworkPartition[] getPartitionGroups(String deploymentPolicyId)
+    public static ApplicationLevelNetworkPartition[] getPartitionGroups(String deploymentPolicyId)
             throws RestAPIException {
 
-        ApplicationLevelNetworkPartition[] partitionGroups = null;
+        org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] partitionGroups = null;
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
         if (autoscalerServiceClient != null) {
             try {

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java
new file mode 100644
index 0000000..819eec6
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ApplicationLevelNetworkPartition.java
@@ -0,0 +1,34 @@
+/*
+ * 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.rest.endpoint.bean.autoscaler.partition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ApplicationLevelNetworkPartition {
+
+    public String id;
+
+    public boolean activeByDefault;
+
+    //partition Ids
+    public List<Partition> partitions;
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java
new file mode 100644
index 0000000..7e2d14b
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelNetworkPartition.java
@@ -0,0 +1,33 @@
+/*
+ * 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.rest.endpoint.bean.autoscaler.partition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ChildLevelNetworkPartition {
+    public String id;
+
+    public String partitionAlgo;
+
+    public int min;
+
+    public List<ChildLevelPartition> childLevelPartitions;
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java
new file mode 100644
index 0000000..9afd69b
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/ChildLevelPartition.java
@@ -0,0 +1,28 @@
+/*
+ * 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.rest.endpoint.bean.autoscaler.partition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ChildLevelPartition {
+    public String id;
+
+    public int max;
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/NetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/NetworkPartition.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/NetworkPartition.java
deleted file mode 100644
index 0950baa..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/partition/NetworkPartition.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.rest.endpoint.bean.autoscaler.partition;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class NetworkPartition {
-
-    public String id;
-
-    public String partitionAlgo;
-
-    public boolean activeByDefault;
-
-    //partition Ids
-    public List<Partition> partition;
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ApplicationPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ApplicationPolicy.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ApplicationPolicy.java
new file mode 100644
index 0000000..ac33546
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ApplicationPolicy.java
@@ -0,0 +1,34 @@
+/*
+ * 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.rest.endpoint.bean.autoscaler.policy.deployment;
+
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ApplicationPolicy {
+    //partition groups
+    public String applicationId;
+
+    public List<ApplicationLevelNetworkPartition> networkPartition;
+
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ChildPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ChildPolicy.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ChildPolicy.java
new file mode 100644
index 0000000..56e7dd3
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/ChildPolicy.java
@@ -0,0 +1,31 @@
+/*
+ * 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.rest.endpoint.bean.autoscaler.policy.deployment;
+
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ChildLevelNetworkPartition;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class ChildPolicy {
+    public String childId;
+
+    public List<ChildLevelNetworkPartition> childLevelNetworkPartition;
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/DeploymentPolicy.java
index 20cd3e9..c16671d 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/DeploymentPolicy.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/bean/autoscaler/policy/deployment/DeploymentPolicy.java
@@ -20,8 +20,8 @@
 package org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment;
 
 
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.NetworkPartition;
 
 import javax.xml.bind.annotation.XmlRootElement;
 import java.util.List;
@@ -29,55 +29,13 @@ import java.util.List;
 @XmlRootElement
 public class DeploymentPolicy {
 
-    private String id;
+    public String id;
     
-    private String description;
+    public String description;
     
-    private boolean isPublic;
+    public boolean isPublic;
 
-    //partition groups
-    private List<NetworkPartition> networkPartition;
+    public ApplicationPolicy applicationPolicy;
 
-    //partitions
-    private List<Partition> partition;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public boolean isPublic() {
-        return isPublic;
-    }
-
-    public void setPublic(boolean isPublic) {
-        this.isPublic = isPublic;
-    }
-
-    public List<NetworkPartition> getNetworkPartition() {
-        return networkPartition;
-    }
-
-    public void setNetworkPartition(List<NetworkPartition> networkPartition) {
-        this.networkPartition = networkPartition;
-    }
-
-    public List<Partition> getPartition() {
-        return partition;
-    }
-
-    public void setPartition(List<Partition> partition) {
-        this.partition = partition;
-    }
+    public List<ChildPolicy> childPolicies;
 }


[2/3] stratos git commit: adding support to deploy global deployment policy

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/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 05e8f9e..4304d1c 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
@@ -19,13 +19,10 @@
 
 package org.apache.stratos.rest.endpoint.bean.util.converter;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.List;
-
 import org.apache.commons.lang.StringUtils;
-import org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition;
+import org.apache.stratos.autoscaler.stub.deployment.partition.ChildLevelPartition;
+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.DependencyContext;
 import org.apache.stratos.autoscaler.stub.pojo.GroupContext;
@@ -46,24 +43,11 @@ import org.apache.stratos.messaging.domain.applications.Group;
 import org.apache.stratos.messaging.domain.topology.Cluster;
 import org.apache.stratos.rest.endpoint.bean.ApplicationBean;
 import org.apache.stratos.rest.endpoint.bean.GroupBean;
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.NetworkPartition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.LoadAverageThresholds;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.LoadThresholds;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.MemoryConsumptionThresholds;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.RequestsInFlightThresholds;
+import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.*;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.ContainerBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.IaasProviderBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.LoadBalancerBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.NetworkInterfaceBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PersistenceBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PortMappingBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.PropertyBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.ServiceDefinitionBean;
-import org.apache.stratos.rest.endpoint.bean.cartridge.definition.VolumeBean;
+import org.apache.stratos.rest.endpoint.bean.cartridge.definition.*;
 import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesGroup;
 import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesHost;
 import org.apache.stratos.rest.endpoint.bean.kubernetes.KubernetesMaster;
@@ -71,6 +55,11 @@ import org.apache.stratos.rest.endpoint.bean.kubernetes.PortRange;
 import org.apache.stratos.rest.endpoint.bean.subscription.domain.SubscriptionDomainBean;
 import org.apache.stratos.rest.endpoint.bean.topology.Member;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.List;
+
 public class PojoConverter {
 
     public static CartridgeConfig populateCartridgeConfigPojo(CartridgeDefinitionBean cartridgeDefinitionBean) {
@@ -122,8 +111,7 @@ public class PojoConverter {
             cartridgeConfig.setProperties(getProperties(cartridgeDefinitionBean.property));
         }
 
-        if(cartridgeDefinitionBean.getExportingProperties() != null)
-        {
+        if (cartridgeDefinitionBean.getExportingProperties() != null) {
             cartridgeConfig.setExportingProperties(cartridgeDefinitionBean.getExportingProperties());
         }
 
@@ -134,7 +122,7 @@ public class PojoConverter {
         return cartridgeConfig;
     }
 
-    public static ServiceGroup populateServiceGroupPojo (ServiceGroupDefinition serviceGroupDefinition ) {
+    public static ServiceGroup populateServiceGroupPojo(ServiceGroupDefinition serviceGroupDefinition) {
         ServiceGroup servicegroup = new ServiceGroup();
 
         // implement conversion (mostly List -> Array)
@@ -295,18 +283,16 @@ public class PojoConverter {
         return networkInterfaces;
     }
 
-    public static org.apache.stratos.cloud.controller.stub.domain.Partition convertToCCPartitionPojo
+    public static org.apache.stratos.autoscaler.stub.deployment.partition.Partition convertToCCPartitionPojo
             (Partition partitionBean) {
 
-        org.apache.stratos.cloud.controller.stub.domain.Partition partition = new
-                org.apache.stratos.cloud.controller.stub.domain.Partition();
+        org.apache.stratos.autoscaler.stub.deployment.partition.Partition partition = new
+                org.apache.stratos.autoscaler.stub.deployment.partition.Partition();
 
         partition.setId(partitionBean.id);
         partition.setDescription(partitionBean.description);
         partition.setIsPublic(partitionBean.isPublic);
         partition.setProvider(partitionBean.provider);
-        partition.setPartitionMin(partitionBean.partitionMin);
-        partition.setPartitionMax(partitionBean.partitionMax);
 
         if (partitionBean.property != null && !partitionBean.property.isEmpty()) {
             partition.setProperties(getProperties(partitionBean.property));
@@ -316,7 +302,7 @@ public class PojoConverter {
     }
 
     public static org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy convertToCCAutoscalerPojo(AutoscalePolicy
-                                                                                                                    autoscalePolicyBean) {
+                                                                                                                        autoscalePolicyBean) {
 
         org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy = new
                 org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy();
@@ -370,43 +356,82 @@ public class PojoConverter {
         return autoscalePolicy;
     }
 
-    public static org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy convetToCCDeploymentPolicyPojo(DeploymentPolicy
-                                                                                                                          deploymentPolicyBean) {
+    public static org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy
+    convetToCCDeploymentPolicyPojo(DeploymentPolicy
+                                           deploymentPolicyBean) {
 
         org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy = new
                 org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy();
 
-        deploymentPolicy.setId(deploymentPolicyBean.getId());
-        deploymentPolicy.setDescription(deploymentPolicyBean.getDescription());
-        deploymentPolicy.setIsPublic(deploymentPolicyBean.isPublic());
-        if(deploymentPolicyBean.getNetworkPartition() != null && !deploymentPolicyBean.getNetworkPartition().isEmpty()) {
-            deploymentPolicy.setApplicationLevelNetworkPartitions(convertToCCPartitionGroup(deploymentPolicyBean.getNetworkPartition()));
+        deploymentPolicy.setId(deploymentPolicyBean.id);
+        deploymentPolicy.setDescription(deploymentPolicyBean.description);
+        deploymentPolicy.setIsPublic(deploymentPolicyBean.isPublic);
+        if (deploymentPolicyBean.applicationPolicy != null &&
+                deploymentPolicyBean.applicationPolicy.networkPartition != null &&
+                !deploymentPolicyBean.applicationPolicy.networkPartition.isEmpty()) {
+            deploymentPolicy.setApplicationLevelNetworkPartitions(
+                    convertToCCPartitionGroup(deploymentPolicyBean.applicationPolicy.networkPartition));
+        }
+
+        if (deploymentPolicyBean.childPolicies != null && !deploymentPolicyBean.childPolicies.isEmpty()) {
+            deploymentPolicy.setChildPolicies(convertToCCChildPolicy(deploymentPolicyBean.childPolicies));
         }
 
         return deploymentPolicy;
     }
 
-    private static ApplicationLevelNetworkPartition[] convertToCCPartitionGroup(List<NetworkPartition> networkPartitionBeans) {
+    private static org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] convertToCCPartitionGroup(List<ApplicationLevelNetworkPartition> networkPartitionBeans) {
 
-        ApplicationLevelNetworkPartition[] partitionGroups = new
-                ApplicationLevelNetworkPartition[networkPartitionBeans.size()];
+        org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[]
+                appNWPartitions = new
+                org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition
+                [networkPartitionBeans.size()];
 
         for (int i = 0; i < networkPartitionBeans.size(); i++) {
-            ApplicationLevelNetworkPartition partitionGroup = new
-                    ApplicationLevelNetworkPartition();
-            partitionGroup.setId(networkPartitionBeans.get(i).id);
-//            partitionGroup.setPartitionAlgo(networkPartitionBeans.get(i).partitionAlgo);
-            partitionGroup.setActiveByDefault(networkPartitionBeans.get(i).activeByDefault);
+            org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition appNWPartition = new
+                    org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition();
+            appNWPartition.setId(networkPartitionBeans.get(i).id);
+            appNWPartition.setActiveByDefault(networkPartitionBeans.get(i).activeByDefault);
+            if (networkPartitionBeans.get(i).partitions != null && !networkPartitionBeans.get(i).partitions.isEmpty()) {
+                appNWPartition.setPartitions(convertToCCPartitionPojos(networkPartitionBeans.get(i).partitions));
+            }
+
+            appNWPartitions[i] = appNWPartition;
+        }
+
+        return appNWPartitions;
+    }
+
+    private static ChildPolicy[] convertToCCChildPolicy(List<org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.ChildPolicy> childPolicies) {
 
-            //TODO populate partitions according to new policy structure
-//            if (partitionGroupBeans.get(i).partition != null && !partitionGroupBeans.get(i).partition.isEmpty()) {
-//                partitionGroup.setPartitions(convertToCCPartitionPojos(partitionGroupBeans.get(i).partition));
-//            }
+        ChildPolicy[] childPolicies1 = new ChildPolicy[childPolicies.size()];
 
-            partitionGroups[i] = partitionGroup;
+        for (int i = 0; i < childPolicies.size(); i++) {
+            ChildPolicy childPolicy = new ChildPolicy();
+            childPolicy.setId(childPolicies.get(i).childId);
+            childPolicy.setChildLevelNetworkPartitions(convertToCCChildNetworkPartition(childPolicies.get(i).childLevelNetworkPartition));
+
+
+            childPolicies1[i] = childPolicy;
+        }
+
+        return childPolicies1;
+    }
+
+    private static ChildLevelNetworkPartition[] convertToCCChildNetworkPartition(List<org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ChildLevelNetworkPartition> networkPartitions) {
+
+        ChildLevelNetworkPartition[] childLevelNetworkPartitions = new ChildLevelNetworkPartition[networkPartitions.size()];
+
+        for (int i = 0; i < networkPartitions.size(); i++) {
+            ChildLevelNetworkPartition childLevelNetworkPartition = new ChildLevelNetworkPartition();
+            childLevelNetworkPartition.setId(networkPartitions.get(i).id);
+            childLevelNetworkPartition.setPartitionAlgo(networkPartitions.get(i).partitionAlgo);
+            childLevelNetworkPartition.setChildLevelPartitions(convertToCCChildPartitionPojos(networkPartitions.get(i).childLevelPartitions));
+
+            childLevelNetworkPartitions[i] = childLevelNetworkPartition;
         }
 
-        return partitionGroups;
+        return childLevelNetworkPartitions;
     }
 
     public static org.apache.stratos.rest.endpoint.bean.topology.Cluster populateClusterPojos(Cluster cluster, String alias) {
@@ -452,11 +477,11 @@ public class PojoConverter {
         return cluster1;
     }
 
-    private static org.apache.stratos.cloud.controller.stub.domain.Partition[] convertToCCPartitionPojos
+    private static org.apache.stratos.autoscaler.stub.deployment.partition.Partition[] convertToCCPartitionPojos
             (List<Partition> partitionList) {
 
-        org.apache.stratos.cloud.controller.stub.domain.Partition[] partitions =
-                new org.apache.stratos.cloud.controller.stub.domain.Partition[partitionList.size()];
+        org.apache.stratos.autoscaler.stub.deployment.partition.Partition[] partitions =
+                new org.apache.stratos.autoscaler.stub.deployment.partition.Partition[partitionList.size()];
         for (int i = 0; i < partitionList.size(); i++) {
             partitions[i] = convertToCCPartitionPojo(partitionList.get(i));
         }
@@ -464,6 +489,21 @@ public class PojoConverter {
         return partitions;
     }
 
+    private static ChildLevelPartition[] convertToCCChildPartitionPojos
+            (List<org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ChildLevelPartition> partitionList) {
+
+        ChildLevelPartition[] childLevelPartitions = new ChildLevelPartition[partitionList.size()];
+        for (int i = 0; i < partitionList.size(); i++) {
+            ChildLevelPartition childLevelPartition = new ChildLevelPartition();
+            childLevelPartition.setPartitionId(partitionList.get(i).id);
+            childLevelPartition.setMax(partitionList.get(i).max);
+
+            childLevelPartitions[i] = childLevelPartition;
+        }
+
+        return childLevelPartitions;
+    }
+
     public static Partition[] populatePartitionPojos(org.apache.stratos.cloud.controller.stub.domain.Partition[]
                                                              partitions) {
 
@@ -474,7 +514,7 @@ public class PojoConverter {
         }
 
         partitionBeans = new Partition[partitions.length];
-        for (int i = 0 ; i < partitions.length ; i++) {
+        for (int i = 0; i < partitions.length; i++) {
             partitionBeans[i] = populatePartitionPojo(partitions[i]);
         }
         return partitionBeans;
@@ -576,7 +616,7 @@ public class PojoConverter {
         }
 
         autoscalePolicyBeans = new AutoscalePolicy[autoscalePolicies.length];
-        for (int i = 0 ; i < autoscalePolicies.length ; i++) {
+        for (int i = 0; i < autoscalePolicies.length; i++) {
             autoscalePolicyBeans[i] = populateAutoscalePojo(autoscalePolicies[i]);
         }
         return autoscalePolicyBeans;
@@ -637,7 +677,7 @@ public class PojoConverter {
         }
 
         deploymentPolicyBeans = new DeploymentPolicy[deploymentPolicies.length];
-        for (int i = 0 ; i < deploymentPolicies.length ; i++) {
+        for (int i = 0; i < deploymentPolicies.length; i++) {
             deploymentPolicyBeans[i] = populateDeploymentPolicyPojo(deploymentPolicies[i]);
         }
 
@@ -652,9 +692,9 @@ public class PojoConverter {
             return deploymentPolicyBean;
         }
 
-        deploymentPolicyBean.setId(deploymentPolicy.getId());
-        deploymentPolicyBean.setDescription(deploymentPolicy.getDescription());
-        deploymentPolicyBean.setPublic(deploymentPolicy.getIsPublic());
+        deploymentPolicyBean.id = deploymentPolicy.getId();
+        deploymentPolicyBean.description = deploymentPolicy.getDescription();
+        deploymentPolicyBean.isPublic = deploymentPolicy.getIsPublic();
 //TODO populate the Network partition based on new policy structure
 //        if (deploymentPolicy.getApplicationLevelNetworkPartition() != null && deploymentPolicy.getApplicationLevelNetworkPartition().length > 0) {
 //            deploymentPolicyBean.setPartitionGroup(Arrays.asList(populatePartitionGroupPojos(deploymentPolicy.getApplicationLevelNetworkPartition())));
@@ -667,10 +707,10 @@ public class PojoConverter {
         return deploymentPolicyBean;
     }
 
-    public static NetworkPartition populatePartitionGroupPojo(ApplicationLevelNetworkPartition
-                                                                    partitionGroup) {
+    public static ApplicationLevelNetworkPartition populatePartitionGroupPojo(org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition
+                                                                                      partitionGroup) {
 
-        NetworkPartition networkPartitionBean = new NetworkPartition();
+        ApplicationLevelNetworkPartition networkPartitionBean = new ApplicationLevelNetworkPartition();
         if (partitionGroup == null) {
             return networkPartitionBean;
         }
@@ -685,17 +725,17 @@ public class PojoConverter {
         return networkPartitionBean;
     }
 
-    public static NetworkPartition[] populatePartitionGroupPojos(ApplicationLevelNetworkPartition[] partitionGroups) {
+    public static ApplicationLevelNetworkPartition[] populatePartitionGroupPojos(org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] partitionGroups) {
 
-        NetworkPartition[] networkPartitionGroupsBeans;
+        ApplicationLevelNetworkPartition[] networkPartitionGroupsBeans;
         if (partitionGroups == null) {
-            networkPartitionGroupsBeans = new NetworkPartition[0];
+            networkPartitionGroupsBeans = new ApplicationLevelNetworkPartition[0];
             return networkPartitionGroupsBeans;
         }
 
-        networkPartitionGroupsBeans = new NetworkPartition[partitionGroups.length];
+        networkPartitionGroupsBeans = new ApplicationLevelNetworkPartition[partitionGroups.length];
 
-        for (int i = 0 ; i < partitionGroups.length ; i ++) {
+        for (int i = 0; i < partitionGroups.length; i++) {
             networkPartitionGroupsBeans[i] = populatePartitionGroupPojo(partitionGroups[i]);
         }
 
@@ -818,18 +858,18 @@ public class PojoConverter {
 
     public static KubernetesGroup[] populateKubernetesGroupsPojo(org.apache.stratos.common.kubernetes.KubernetesGroup[] kubernetesGroups) {
 
-        if (kubernetesGroups == null){
+        if (kubernetesGroups == null) {
             return null;
         }
         KubernetesGroup[] kubernetesGroupsBean = new KubernetesGroup[kubernetesGroups.length];
-        for (int i = 0; i < kubernetesGroups.length; i++){
+        for (int i = 0; i < kubernetesGroups.length; i++) {
             kubernetesGroupsBean[i] = populateKubernetesGroupPojo(kubernetesGroups[i]);
         }
         return kubernetesGroupsBean;
     }
 
     public static KubernetesGroup populateKubernetesGroupPojo(org.apache.stratos.common.kubernetes.KubernetesGroup kubernetesGroup) {
-        if (kubernetesGroup == null){
+        if (kubernetesGroup == null) {
             return null;
         }
         KubernetesGroup kubernetesGroupBean = new KubernetesGroup();
@@ -843,7 +883,7 @@ public class PojoConverter {
     }
 
     public static KubernetesMaster populateKubernetesMasterPojo(org.apache.stratos.common.kubernetes.KubernetesMaster kubernetesMaster) {
-        if (kubernetesMaster == null){
+        if (kubernetesMaster == null) {
             return null;
         }
         KubernetesMaster kubernetesMasterBean = new KubernetesMaster();
@@ -856,18 +896,18 @@ public class PojoConverter {
     }
 
     public static List<KubernetesHost> populateKubernetesHostsPojo(org.apache.stratos.common.kubernetes.KubernetesHost[] kubernetesHosts) {
-        if (kubernetesHosts == null){
+        if (kubernetesHosts == null) {
             return null;
         }
         List<KubernetesHost> kubernetesHostList = new ArrayList<KubernetesHost>();
-        for (int i = 0; i < kubernetesHosts.length; i++){
+        for (int i = 0; i < kubernetesHosts.length; i++) {
             kubernetesHostList.add(populateKubernetesHostPojo(kubernetesHosts[i]));
         }
         return kubernetesHostList;
     }
 
     private static KubernetesHost populateKubernetesHostPojo(org.apache.stratos.common.kubernetes.KubernetesHost kubernetesHost) {
-        if (kubernetesHost == null){
+        if (kubernetesHost == null) {
             return null;
         }
         KubernetesHost kubernetesHostBean = new KubernetesHost();
@@ -879,18 +919,18 @@ public class PojoConverter {
     }
 
     private static List<PropertyBean> populateASProperties(Properties properties) {
-        if (properties == null || properties.getProperties() == null){
+        if (properties == null || properties.getProperties() == null) {
             return null;
         }
         List<PropertyBean> propertyBeanList = new ArrayList<PropertyBean>();
-        for (int i = 0; i < properties.getProperties().length; i++){
+        for (int i = 0; i < properties.getProperties().length; i++) {
             propertyBeanList.add(populateASProperty(properties.getProperties()[i]));
         }
         return propertyBeanList;
     }
 
     private static PropertyBean populateASProperty(Property propertyE) {
-        if (propertyE == null){
+        if (propertyE == null) {
             return null;
         }
         PropertyBean propertyBean = new PropertyBean();
@@ -900,7 +940,7 @@ public class PojoConverter {
     }
 
     private static PortRange populatePortRangePojo(org.apache.stratos.common.kubernetes.PortRange portRange) {
-        if (portRange == null){
+        if (portRange == null) {
             return null;
         }
         PortRange portRangeBean = new PortRange();
@@ -909,7 +949,7 @@ public class PojoConverter {
         return portRangeBean;
     }
 
-    public static ApplicationContext convertApplicationBeanToApplicationContext (ApplicationDefinition compositeAppDefinition) {
+    public static ApplicationContext convertApplicationBeanToApplicationContext(ApplicationDefinition compositeAppDefinition) {
 
         org.apache.stratos.autoscaler.stub.pojo.ApplicationContext applicationContext =
                 new org.apache.stratos.autoscaler.stub.pojo.ApplicationContext();
@@ -944,7 +984,7 @@ public class PojoConverter {
         return applicationContext;
     }
 
-    private static SubscribableInfoContext[] getSubscribableInfoContextArrFromSubscribableInfoDefinition (List<SubscribableInfo> subscribableInfos) {
+    private static SubscribableInfoContext[] getSubscribableInfoContextArrFromSubscribableInfoDefinition(List<SubscribableInfo> subscribableInfos) {
 
         SubscribableInfoContext[] subscribableInfoContexts = new SubscribableInfoContext[subscribableInfos.size()];
         int i = 0;
@@ -970,18 +1010,18 @@ public class PojoConverter {
                 }
                 subscribableInfoContext.setProperties(properties);
             }
-            subscribableInfoContexts[i++] =  subscribableInfoContext;
+            subscribableInfoContexts[i++] = subscribableInfoContext;
         }
         return subscribableInfoContexts;
     }
 
-    private static DependencyContext getDependencyContextFromDependencyDefinition (DependencyDefinitions dependencyDefinitions) {
+    private static DependencyContext getDependencyContextFromDependencyDefinition(DependencyDefinitions dependencyDefinitions) {
 
         DependencyContext dependencyContext = new DependencyContext();
         dependencyContext.setTerminationBehaviour(dependencyDefinitions.getTerminationBehaviour());
 
         if (dependencyDefinitions != null && dependencyDefinitions.getStartupOrders() != null) {
-            String [] startupOrders = new String [dependencyDefinitions.getStartupOrders().size()];
+            String[] startupOrders = new String[dependencyDefinitions.getStartupOrders().size()];
             startupOrders = dependencyDefinitions.getStartupOrders().toArray(startupOrders);
             dependencyContext.setStartupOrdersContexts(startupOrders);
         }
@@ -990,7 +1030,7 @@ public class PojoConverter {
     }
 
     private static org.apache.stratos.autoscaler.stub.pojo.GroupContext[]
-    getgroupContextArrayFromGroupDefinitions (List<GroupDefinition> groupDefinitions) {
+    getgroupContextArrayFromGroupDefinitions(List<GroupDefinition> groupDefinitions) {
 
         GroupContext[] groupContexts = new GroupContext[groupDefinitions.size()];
         int i = 0;
@@ -1019,7 +1059,7 @@ public class PojoConverter {
         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 =
@@ -1039,7 +1079,7 @@ public class PojoConverter {
 
     public static ApplicationBean applicationToBean(Application application) {
 
-        if(application == null){
+        if (application == null) {
             return null;
         }
 
@@ -1051,7 +1091,7 @@ public class PojoConverter {
     }
 
     public static GroupBean toGroupBean(Group group) {
-        if(group == null){
+        if (group == null) {
             return null;
         }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
index 3532672..5ec01cd 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
@@ -26,8 +26,8 @@ import org.apache.stratos.manager.user.mgt.beans.UserInfoBean;
 import org.apache.stratos.rest.endpoint.bean.CartridgeInfoBean;
 import org.apache.stratos.rest.endpoint.bean.StratosApiResponse;
 import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.NetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
@@ -551,7 +551,7 @@ public class MockContext {
     	int tenantId = getTenantId();
     	Map<String,DeploymentPolicy> policies;
     	
-    	if(!deploymentPolicy.isPublic()){
+    	if(!deploymentPolicy.isPublic){
     		if (deploymentPolicyMap.containsKey(tenantId)){
         		policies = deploymentPolicyMap.get(tenantId);
         	}
@@ -570,7 +570,7 @@ public class MockContext {
     		}
     	}
     	
-    	policies.put(deploymentPolicy.getId(),deploymentPolicy);
+    	policies.put(deploymentPolicy.id,deploymentPolicy);
         StratosApiResponse stratosApiResponse = new StratosApiResponse();
         stratosApiResponse.setMessage("Successfully deployed deployment policy definition");
         return stratosApiResponse;
@@ -597,7 +597,7 @@ public class MockContext {
     	int tenantId = getTenantId();
     	if(!partitionMap.containsKey(tenantId)){
         	if(!partitionMap.containsKey(PUBLIC_DEFINITION)){
-        		throw new RestAPIException(Status.NO_CONTENT,"No partitions have been defined for the tenant");
+        		throw new RestAPIException(Status.NO_CONTENT,"No childLevelPartitions have been defined for the tenant");
         	}
         	if(!(partitionMap.get(PUBLIC_DEFINITION)).containsKey(partitionId)){
         		throw new RestAPIException("There is no partition with the id: " + partitionId);
@@ -622,17 +622,19 @@ public class MockContext {
     			if(!(deploymentPolicyMap.get(PUBLIC_DEFINITION)).containsKey(deploymentPolicyId)){
         			throw new RestAPIException(Status.NO_CONTENT,"There is no deployment policy with id: " + deploymentPolicyId);
         		}
-        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getPartition().toArray(new Partition[0]);
+        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).applicationPolicy.networkPartition.get(0).partitions.toArray(new Partition[0]);
     		}
     	}
         	
     	if(!(deploymentPolicyMap.get(tenantId)).containsKey(deploymentPolicyId)){
     		throw new RestAPIException(Status.NO_CONTENT,"There is no deployment policy with id: " + deploymentPolicyId);
         }
-    	return (deploymentPolicyMap.get(tenantId)).get(deploymentPolicyId).getPartition().toArray(new Partition[0]);
+        //FIXME to parse thr all the NW partitions
+    	return (deploymentPolicyMap.get(tenantId)).
+                get(deploymentPolicyId).applicationPolicy.networkPartition.get(0).partitions.toArray(new Partition[0]);
     }
 
-    public NetworkPartition[] getPartitionGroups(String deploymentPolicyId)  throws RestAPIException{
+    public ApplicationLevelNetworkPartition[] getPartitionGroups(String deploymentPolicyId)  throws RestAPIException{
     	int tenantId = getTenantId();
     	if(!deploymentPolicyMap.containsKey(tenantId)){
     		if(!deploymentPolicyMap.containsKey(PUBLIC_DEFINITION)){
@@ -642,14 +644,14 @@ public class MockContext {
     			if(!(deploymentPolicyMap.get(PUBLIC_DEFINITION)).containsKey(deploymentPolicyId)){
         			throw new RestAPIException(Status.NO_CONTENT,"There is no deployment policy with id: " + deploymentPolicyId);
         		}
-        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).getNetworkPartition().toArray(new NetworkPartition[0]);
+        		return (deploymentPolicyMap.get(PUBLIC_DEFINITION)).get(deploymentPolicyId).applicationPolicy.networkPartition.toArray(new ApplicationLevelNetworkPartition[0]);
     		}
     	}
         	
     	if(!(deploymentPolicyMap.get(tenantId)).containsKey(deploymentPolicyId)){
     		throw new RestAPIException(Status.NO_CONTENT,"There is no deployment policy with id: " + deploymentPolicyId);
         }
-    	return (deploymentPolicyMap.get(tenantId)).get(deploymentPolicyId).getNetworkPartition().toArray(new NetworkPartition[0]);
+    	return (deploymentPolicyMap.get(tenantId)).get(deploymentPolicyId).applicationPolicy.networkPartition.toArray(new ApplicationLevelNetworkPartition[0]);
     }
 
     public AutoscalePolicy[] getAutoscalePolicies()  throws RestAPIException{
@@ -811,9 +813,9 @@ public class MockContext {
     	}
         	  	
         Partition[] partitions = null;
-         for(NetworkPartition networkPartition : deploymentPolicy.getNetworkPartition()){
+         for(ApplicationLevelNetworkPartition networkPartition : deploymentPolicy.applicationPolicy.networkPartition){
              if(networkPartition.id.equals(partitionGroupId)){
-                 partitions =  networkPartition.partition.toArray(new Partition[0]);
+                 partitions =  networkPartition.partitions.toArray(new Partition[0]);
              }
          }
         if(partitions == null){

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
index ad821ac..6cfc2d7 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosApiV40Mock.java
@@ -34,8 +34,8 @@ import org.apache.stratos.rest.endpoint.annotation.SuperTenantService;
 import org.apache.stratos.rest.endpoint.bean.CartridgeInfoBean;
 import org.apache.stratos.rest.endpoint.bean.StratosApiResponse;
 import org.apache.stratos.rest.endpoint.bean.SubscriptionDomainRequest;
+import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.Partition;
-import org.apache.stratos.rest.endpoint.bean.autoscaler.partition.NetworkPartition;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
@@ -363,7 +363,7 @@ public class StratosApiV40Mock {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public NetworkPartition[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
+    public ApplicationLevelNetworkPartition[] getPartitionGroups (@PathParam("deploymentPolicyId") String deploymentPolicyId)
             throws RestAPIException {
           return MockContext.getInstance().getPartitionGroups(deploymentPolicyId);
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/dee7291c/components/org.apache.stratos.rest.endpoint/src/main/webapp/api/WEB-INF/cxf-servlet.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/webapp/api/WEB-INF/cxf-servlet.xml b/components/org.apache.stratos.rest.endpoint/src/main/webapp/api/WEB-INF/cxf-servlet.xml
index 9c30e78..573e51b 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/webapp/api/WEB-INF/cxf-servlet.xml
+++ b/components/org.apache.stratos.rest.endpoint/src/main/webapp/api/WEB-INF/cxf-servlet.xml
@@ -122,6 +122,11 @@
                 <value>groups</value>
                 <value>clusters</value>
                 <value>startupOrders</value>
+                <value>childPolicies</value>
+                <value>childLevelNetworkPartition</value>
+                <value>childLevelPartitions</value>
+                <value>networkPartition</value>
+                <value>partitions</value>
             </list>
         </property>
     </bean>