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/15 10:14:02 UTC

[1/3] stratos git commit: adding applicationid to deployment policy

Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test bbc838ac6 -> 641ad3ff3


http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/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 99a804d..d9bd27a 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoScalerService.wsdl
@@ -1,4 +1,4 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://common.stratos.apache.org/xsd" xmlns:ax27="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax28="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax25="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax216="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax224="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:http="http://sch
 emas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax27="http://common.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax25="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax216="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax218="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax221="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax211="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:http="http://sc
 hemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
     <wsdl:documentation>AutoScalerService</wsdl:documentation>
     <wsdl:types>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd">
@@ -39,14 +39,14 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax221="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax224="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
             <xs:complexType name="ApplicationContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
-                    <xs:element minOccurs="0" name="components" nillable="true" type="ax220:ComponentContext"></xs:element>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"></xs:element>
+                    <xs:element minOccurs="0" name="components" nillable="true" type="ax223:ComponentContext"></xs:element>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
                     <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
@@ -54,16 +54,16 @@
             </xs:complexType>
             <xs:complexType name="ComponentContext">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax220:CartridgeContext"></xs:element>
-                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax220:DependencyContext"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax220:GroupContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax223:CartridgeContext"></xs:element>
+                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax223:DependencyContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax223:GroupContext"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="CartridgeContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="cartridgeMax" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="cartridgeMin" type="xs:int"></xs:element>
-                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax220:SubscribableInfoContext"></xs:element>
+                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax223:SubscribableInfoContext"></xs:element>
                     <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
@@ -76,7 +76,7 @@
                     <xs:element minOccurs="0" name="maxMembers" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="minMembers" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"></xs:element>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"></xs:element>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
                     <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"></xs:element>
@@ -92,8 +92,8 @@
             <xs:complexType name="GroupContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax220:CartridgeContext"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax220:GroupContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax223:CartridgeContext"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax223:GroupContext"></xs:element>
                     <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"></xs:element>
@@ -105,8 +105,8 @@
             <xs:complexType name="ServiceGroup">
                 <xs:sequence>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"></xs:element>
-                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax23:Dependencies"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax23:ServiceGroup"></xs:element>
+                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax218:Dependencies"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groups" nillable="true" type="ax218:ServiceGroup"></xs:element>
                     <xs:element minOccurs="0" name="groupscalingEnabled" type="xs:boolean"></xs:element>
                     <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
@@ -119,24 +119,23 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax211="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax29="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:complexType name="DeploymentPolicy">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax28:Partition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax29:Partition"></xs:element>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax28:ApplicationLevelNetworkPartition"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax28:ChildLevelNetworkPartition"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax27:ChildPolicy"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax29:ApplicationLevelNetworkPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax25:ChildPolicy"></xs:element>
                     <xs:element minOccurs="0" name="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="ax28:ChildLevelNetworkPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"></xs:element>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
@@ -148,14 +147,14 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax210="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax28="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"></xs:import>
             <xs:complexType name="Partition">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"></xs:element>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"></xs:element>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
                     <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"></xs:element>
                 </xs:sequence>
             </xs:complexType>
@@ -163,12 +162,12 @@
                 <xs:sequence>
                     <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"></xs:element>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax28:Partition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ChildLevelNetworkPartition">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax28:ChildLevelPartition"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax26:ChildLevelPartition"></xs:element>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"></xs:element>
                     <xs:element minOccurs="0" name="min" type="xs:int"></xs:element>
                     <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"></xs:element>
@@ -192,7 +191,7 @@
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://common.stratos.apache.org/xsd">
             <xs:complexType name="Properties">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax29:Property"></xs:element>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax27:Property"></xs:element>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Property">
@@ -202,128 +201,122 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax215="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://common.stratos.apache.org/xsd" xmlns:ax26="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://application.exception.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
-            <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"></xs:import>
+        <xs:schema xmlns:ax215="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://common.stratos.apache.org/xsd" xmlns:ax222="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax225="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+            <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"></xs:import>
+            <xs:import namespace="http://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://policy.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
             <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:import namespace="http://common.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://kubernetes.exception.autoscaler.stratos.apache.org/xsd"></xs:import>
-            <xs:element name="getServiceGroup">
+            <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"></xs:import>
+            <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax23:InvalidPolicyException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupResponse">
+            <xs:element name="updateDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:ServiceGroup"></xs:element>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceAutoScalerException">
+            <xs:element name="updateDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax25:AutoScalerException"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroups">
-                <xs:complexType>
-                    <xs:sequence></xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getServiceGroupsResponse">
+            <xs:element name="AutoScalerServiceInvalidArgumentException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:ServiceGroup"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax212:InvalidArgumentException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicy">
+            <xs:element name="updateClusterMonitor">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicyResponse">
+            <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax27:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllDeploymentPolicies">
-                <xs:complexType>
-                    <xs:sequence></xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getAllDeploymentPoliciesResponse">
+            <xs:element name="updateAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployDeploymentPolicy">
+            <xs:element name="AutoScalerServiceAutoScalerException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="policy" nillable="true" type="ax27:DeploymentPolicy"></xs:element>
+                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax212:AutoScalerException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployDeploymentPolicyResponse">
+            <xs:element name="undeployServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getPartitionsOfGroup">
+            <xs:element name="undeployDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
-                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getPartitionsOfGroupResponse">
+            <xs:element name="undeployDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax28:Partition"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicy">
+            <xs:element name="AutoScalerServiceApplicationDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax217:ApplicationDefinitionException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicyResponse">
+            <xs:element name="unDeployApplicationDefinition">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
+                        <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllAutoScalingPolicy">
+            <xs:element name="serviceGroupExist">
                 <xs:complexType>
-                    <xs:sequence></xs:sequence>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAllAutoScalingPolicyResponse">
+            <xs:element name="serviceGroupExistResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -337,171 +330,177 @@
             <xs:element name="getValidDeploymentPoliciesforCartridgeResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:DeploymentPolicy"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidPolicyException">
+            <xs:element name="getServiceGroups">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax217:InvalidPolicyException"></xs:element>
-                    </xs:sequence>
+                    <xs:sequence></xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addDeploymentPolicy">
+            <xs:element name="getServiceGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax27:DeploymentPolicy"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax219:ServiceGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addDeploymentPolicyResponse">
+            <xs:element name="getServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="undeployDeploymentPolicy">
+            <xs:element name="getServiceGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax219:ServiceGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="undeployDeploymentPolicyResponse">
+            <xs:element name="getPartitionsOfGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateDeploymentPolicy">
+            <xs:element name="getPartitionsOfGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax27:DeploymentPolicy"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:Partition"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateDeploymentPolicyResponse">
+            <xs:element name="getNetworkPartitions">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicy">
+            <xs:element name="getNetworkPartitionsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationLevelNetworkPartition"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicyResponse">
+            <xs:element name="getDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicy">
+            <xs:element name="getDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicyResponse">
+            <xs:element name="getAutoscalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitions">
+            <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitionsResponse">
+            <xs:element name="getAllDeploymentPolicies">
+                <xs:complexType>
+                    <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="ax28:ApplicationLevelNetworkPartition"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceApplicationDefinitionException">
+            <xs:element name="getAllAutoScalingPolicy">
+                <xs:complexType>
+                    <xs:sequence></xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getAllAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax219:ApplicationDefinitionException"></xs:element>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployApplicationDefinition">
+            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax220:ApplicationContext"></xs:element>
+                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax221:InvalidServiceGroupException"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="unDeployApplicationDefinition">
+            <xs:element name="deployServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"></xs:element>
-                        <xs:element minOccurs="0" name="tenantId" type="xs:int"></xs:element>
-                        <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax219:ServiceGroup"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidArgumentException">
+            <xs:element name="deployDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax25:InvalidArgumentException"></xs:element>
+                        <xs:element minOccurs="0" name="policy" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateClusterMonitor">
+            <xs:element name="deployDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"></xs:element>
-                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax29:Properties"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidServiceGroupException">
+            <xs:element name="deployApplicationDefinition">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax224:InvalidServiceGroupException"></xs:element>
+                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax223:ApplicationContext"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployServiceGroup">
+            <xs:element name="addDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax23:ServiceGroup"></xs:element>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax25:DeploymentPolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="serviceGroupExist">
+            <xs:element name="addDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="serviceGroupExistResponse">
+            <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax214:AutoscalePolicy"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="undeployServiceGroup">
+            <xs:element name="addAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"></xs:element>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"></xs:element>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -514,6 +513,11 @@
             </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>
+                </xs:sequence>
+            </xs:complexType>
             <xs:complexType name="AutoScalerException">
                 <xs:complexContent>
                     <xs:extension base="xs:RuntimeException">
@@ -521,11 +525,6 @@
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
-            <xs:complexType name="InvalidArgumentException">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"></xs:element>
-                </xs:sequence>
-            </xs:complexType>
         </xs:schema>
     </wsdl:types>
     <wsdl:message name="updateKubernetesMasterRequest"></wsdl:message>
@@ -843,8 +842,8 @@
                 <soap:fault use="literal" name="AutoScalerServiceAutoScalerException"></soap:fault>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="getPartitionsOfGroup">
-            <soap:operation soapAction="urn:getPartitionsOfGroup" style="document"></soap:operation>
+        <wsdl:operation name="getAllAutoScalingPolicy">
+            <soap:operation soapAction="urn:getAllAutoScalingPolicy" style="document"></soap:operation>
             <wsdl:input>
                 <soap:body use="literal"></soap:body>
             </wsdl:input>
@@ -852,8 +851,8 @@
                 <soap:body use="literal"></soap:body>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="getAllAutoScalingPolicy">
-            <soap:operation soapAction="urn:getAllAutoScalingPolicy" style="document"></soap:operation>
+        <wsdl:operation name="getPartitionsOfGroup">
+            <soap:operation soapAction="urn:getPartitionsOfGroup" style="document"></soap:operation>
             <wsdl:input>
                 <soap:body use="literal"></soap:body>
             </wsdl:input>
@@ -945,15 +944,6 @@
                 <soap:body use="literal"></soap:body>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="undeployServiceGroup">
-            <soap:operation soapAction="urn:undeployServiceGroup" style="document"></soap:operation>
-            <wsdl:input>
-                <soap:body use="literal"></soap:body>
-            </wsdl:input>
-            <wsdl:fault name="AutoScalerServiceAutoScalerException">
-                <soap:fault use="literal" name="AutoScalerServiceAutoScalerException"></soap:fault>
-            </wsdl:fault>
-        </wsdl:operation>
         <wsdl:operation name="addKubernetesHost">
             <soap:operation soapAction="urn:addKubernetesHost" style="document"></soap:operation>
             <wsdl:input>
@@ -963,6 +953,15 @@
                 <soap:body use="literal"></soap:body>
             </wsdl:output>
         </wsdl:operation>
+        <wsdl:operation name="undeployServiceGroup">
+            <soap:operation soapAction="urn:undeployServiceGroup" style="document"></soap:operation>
+            <wsdl:input>
+                <soap:body use="literal"></soap:body>
+            </wsdl:input>
+            <wsdl:fault name="AutoScalerServiceAutoScalerException">
+                <soap:fault use="literal" name="AutoScalerServiceAutoScalerException"></soap:fault>
+            </wsdl:fault>
+        </wsdl:operation>
         <wsdl:operation name="getAllAvailablePartitions">
             <soap:operation soapAction="urn:getAllAvailablePartitions" style="document"></soap:operation>
             <wsdl:input>
@@ -990,26 +989,26 @@
                 <soap:body use="literal"></soap:body>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="deployDeploymentPolicy">
-            <soap:operation soapAction="urn:deployDeploymentPolicy" style="document"></soap:operation>
+        <wsdl:operation name="updateAutoScalingPolicy">
+            <soap:operation soapAction="urn:updateAutoScalingPolicy" style="document"></soap:operation>
             <wsdl:input>
                 <soap:body use="literal"></soap:body>
             </wsdl:input>
             <wsdl:output>
                 <soap:body use="literal"></soap:body>
             </wsdl:output>
+            <wsdl:fault name="AutoScalerServiceInvalidPolicyException">
+                <soap:fault use="literal" name="AutoScalerServiceInvalidPolicyException"></soap:fault>
+            </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="updateAutoScalingPolicy">
-            <soap:operation soapAction="urn:updateAutoScalingPolicy" style="document"></soap:operation>
+        <wsdl:operation name="deployDeploymentPolicy">
+            <soap:operation soapAction="urn:deployDeploymentPolicy" style="document"></soap:operation>
             <wsdl:input>
                 <soap:body use="literal"></soap:body>
             </wsdl:input>
             <wsdl:output>
                 <soap:body use="literal"></soap:body>
             </wsdl:output>
-            <wsdl:fault name="AutoScalerServiceInvalidPolicyException">
-                <soap:fault use="literal" name="AutoScalerServiceInvalidPolicyException"></soap:fault>
-            </wsdl:fault>
         </wsdl:operation>
         <wsdl:operation name="removeKubernetesHost">
             <soap:operation soapAction="urn:removeKubernetesHost" style="document"></soap:operation>
@@ -1149,8 +1148,8 @@
                 <soap12:fault use="literal" name="AutoScalerServiceAutoScalerException"></soap12:fault>
             </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="getPartitionsOfGroup">
-            <soap12:operation soapAction="urn:getPartitionsOfGroup" style="document"></soap12:operation>
+        <wsdl:operation name="getAllAutoScalingPolicy">
+            <soap12:operation soapAction="urn:getAllAutoScalingPolicy" style="document"></soap12:operation>
             <wsdl:input>
                 <soap12:body use="literal"></soap12:body>
             </wsdl:input>
@@ -1158,8 +1157,8 @@
                 <soap12:body use="literal"></soap12:body>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="getAllAutoScalingPolicy">
-            <soap12:operation soapAction="urn:getAllAutoScalingPolicy" style="document"></soap12:operation>
+        <wsdl:operation name="getPartitionsOfGroup">
+            <soap12:operation soapAction="urn:getPartitionsOfGroup" style="document"></soap12:operation>
             <wsdl:input>
                 <soap12:body use="literal"></soap12:body>
             </wsdl:input>
@@ -1251,15 +1250,6 @@
                 <soap12:body use="literal"></soap12:body>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="undeployServiceGroup">
-            <soap12:operation soapAction="urn:undeployServiceGroup" style="document"></soap12:operation>
-            <wsdl:input>
-                <soap12:body use="literal"></soap12:body>
-            </wsdl:input>
-            <wsdl:fault name="AutoScalerServiceAutoScalerException">
-                <soap12:fault use="literal" name="AutoScalerServiceAutoScalerException"></soap12:fault>
-            </wsdl:fault>
-        </wsdl:operation>
         <wsdl:operation name="addKubernetesHost">
             <soap12:operation soapAction="urn:addKubernetesHost" style="document"></soap12:operation>
             <wsdl:input>
@@ -1269,6 +1259,15 @@
                 <soap12:body use="literal"></soap12:body>
             </wsdl:output>
         </wsdl:operation>
+        <wsdl:operation name="undeployServiceGroup">
+            <soap12:operation soapAction="urn:undeployServiceGroup" style="document"></soap12:operation>
+            <wsdl:input>
+                <soap12:body use="literal"></soap12:body>
+            </wsdl:input>
+            <wsdl:fault name="AutoScalerServiceAutoScalerException">
+                <soap12:fault use="literal" name="AutoScalerServiceAutoScalerException"></soap12:fault>
+            </wsdl:fault>
+        </wsdl:operation>
         <wsdl:operation name="getAllAvailablePartitions">
             <soap12:operation soapAction="urn:getAllAvailablePartitions" style="document"></soap12:operation>
             <wsdl:input>
@@ -1296,26 +1295,26 @@
                 <soap12:body use="literal"></soap12:body>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="deployDeploymentPolicy">
-            <soap12:operation soapAction="urn:deployDeploymentPolicy" style="document"></soap12:operation>
+        <wsdl:operation name="updateAutoScalingPolicy">
+            <soap12:operation soapAction="urn:updateAutoScalingPolicy" style="document"></soap12:operation>
             <wsdl:input>
                 <soap12:body use="literal"></soap12:body>
             </wsdl:input>
             <wsdl:output>
                 <soap12:body use="literal"></soap12:body>
             </wsdl:output>
+            <wsdl:fault name="AutoScalerServiceInvalidPolicyException">
+                <soap12:fault use="literal" name="AutoScalerServiceInvalidPolicyException"></soap12:fault>
+            </wsdl:fault>
         </wsdl:operation>
-        <wsdl:operation name="updateAutoScalingPolicy">
-            <soap12:operation soapAction="urn:updateAutoScalingPolicy" style="document"></soap12:operation>
+        <wsdl:operation name="deployDeploymentPolicy">
+            <soap12:operation soapAction="urn:deployDeploymentPolicy" style="document"></soap12:operation>
             <wsdl:input>
                 <soap12:body use="literal"></soap12:body>
             </wsdl:input>
             <wsdl:output>
                 <soap12:body use="literal"></soap12:body>
             </wsdl:output>
-            <wsdl:fault name="AutoScalerServiceInvalidPolicyException">
-                <soap12:fault use="literal" name="AutoScalerServiceInvalidPolicyException"></soap12:fault>
-            </wsdl:fault>
         </wsdl:operation>
         <wsdl:operation name="removeKubernetesHost">
             <soap12:operation soapAction="urn:removeKubernetesHost" style="document"></soap12:operation>
@@ -1452,8 +1451,8 @@
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="getPartitionsOfGroup">
-            <http:operation location="getPartitionsOfGroup"></http:operation>
+        <wsdl:operation name="getAllAutoScalingPolicy">
+            <http:operation location="getAllAutoScalingPolicy"></http:operation>
             <wsdl:input>
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:input>
@@ -1461,8 +1460,8 @@
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="getAllAutoScalingPolicy">
-            <http:operation location="getAllAutoScalingPolicy"></http:operation>
+        <wsdl:operation name="getPartitionsOfGroup">
+            <http:operation location="getPartitionsOfGroup"></http:operation>
             <wsdl:input>
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:input>
@@ -1548,12 +1547,6 @@
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="undeployServiceGroup">
-            <http:operation location="undeployServiceGroup"></http:operation>
-            <wsdl:input>
-                <mime:content type="text/xml" part="parameters"></mime:content>
-            </wsdl:input>
-        </wsdl:operation>
         <wsdl:operation name="addKubernetesHost">
             <http:operation location="addKubernetesHost"></http:operation>
             <wsdl:input>
@@ -1563,6 +1556,12 @@
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:output>
         </wsdl:operation>
+        <wsdl:operation name="undeployServiceGroup">
+            <http:operation location="undeployServiceGroup"></http:operation>
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters"></mime:content>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="getAllAvailablePartitions">
             <http:operation location="getAllAvailablePartitions"></http:operation>
             <wsdl:input>
@@ -1587,8 +1586,8 @@
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="deployDeploymentPolicy">
-            <http:operation location="deployDeploymentPolicy"></http:operation>
+        <wsdl:operation name="updateAutoScalingPolicy">
+            <http:operation location="updateAutoScalingPolicy"></http:operation>
             <wsdl:input>
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:input>
@@ -1596,8 +1595,8 @@
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="updateAutoScalingPolicy">
-            <http:operation location="updateAutoScalingPolicy"></http:operation>
+        <wsdl:operation name="deployDeploymentPolicy">
+            <http:operation location="deployDeploymentPolicy"></http:operation>
             <wsdl:input>
                 <mime:content type="text/xml" part="parameters"></mime:content>
             </wsdl:input>
@@ -1701,22 +1700,22 @@
     </wsdl:binding>
     <wsdl:service name="AutoScalerService">
         <wsdl:port name="AutoScalerServiceHttpSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
-            <soap:address location="http://172.16.2.114:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
+            <soap:address location="http://10.100.1.142:9763/services/AutoScalerService.AutoScalerServiceHttpSoap11Endpoint/"></soap:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpsSoap11Endpoint" binding="ns:AutoScalerServiceSoap11Binding">
-            <soap:address location="https://172.16.2.114:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
+            <soap:address location="https://10.100.1.142:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap11Endpoint/"></soap:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpsSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
-            <soap12:address location="https://172.16.2.114:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
+            <soap12:address location="https://10.100.1.142:9443/services/AutoScalerService.AutoScalerServiceHttpsSoap12Endpoint/"></soap12:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpSoap12Endpoint" binding="ns:AutoScalerServiceSoap12Binding">
-            <soap12:address location="http://172.16.2.114:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
+            <soap12:address location="http://10.100.1.142:9763/services/AutoScalerService.AutoScalerServiceHttpSoap12Endpoint/"></soap12:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpEndpoint" binding="ns:AutoScalerServiceHttpBinding">
-            <http:address location="http://172.16.2.114:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
+            <http:address location="http://10.100.1.142:9763/services/AutoScalerService.AutoScalerServiceHttpEndpoint/"></http:address>
         </wsdl:port>
         <wsdl:port name="AutoScalerServiceHttpsEndpoint" binding="ns:AutoScalerServiceHttpBinding">
-            <http:address location="https://172.16.2.114:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
+            <http:address location="https://10.100.1.142:9443/services/AutoScalerService.AutoScalerServiceHttpsEndpoint/"></http:address>
         </wsdl:port>
     </wsdl:service>
 </wsdl:definitions>
\ No newline at end of file


[2/3] stratos git commit: adding applicationid to deployment policy

Posted by re...@apache.org.
adding applicationid to deployment policy


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

Branch: refs/heads/4.1.0-test
Commit: 641ad3ff3c78e844d3d285ef458a5e09b27e5477
Parents: 15cd21f
Author: reka <rt...@gmail.com>
Authored: Mon Dec 15 13:56:51 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Mon Dec 15 13:57:02 2014 +0530

----------------------------------------------------------------------
 .../autoscaler/api/AutoScalerServiceImpl.java   |   2 +-
 .../context/cluster/ClusterContextFactory.java  |   4 +-
 .../context/cluster/VMClusterContext.java       |   4 +-
 .../builder/MonitorStatusEventBuilder.java      |   4 +-
 .../autoscaler/pojo/policy/PolicyManager.java   |  29 +-
 .../policy/deployment/DeploymentPolicy.java     |  24 +-
 .../deployment/partition/PartitionManager.java  |  20 +-
 .../autoscaler/registry/RegistryManager.java    |   4 +-
 .../policy/deployment/ApplicationPolicy.java    |  12 +-
 .../policy/deployment/DeploymentPolicy.java     |  11 +-
 .../rest/endpoint/api/StratosApiV41Utils.java   |   4 +-
 .../stratos/rest/endpoint/mock/MockContext.java |   2 +-
 .../endpoint/util/converter/PojoConverter.java  |   3 +-
 .../src/main/resources/AutoScalerService.wsdl   | 379 +++++++++----------
 14 files changed, 240 insertions(+), 262 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/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 66f6be8..9f42599 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
@@ -92,7 +92,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
             } catch (PartitionValidationException ignoredException) {
                 // if this policy doesn't valid for the given cartridge, add a debug log.
                 if (log.isDebugEnabled()) {
-                    log.debug("Deployment policy [id] " + deploymentPolicy.getId()
+                    log.debug("Deployment policy [id] " + deploymentPolicy.getApplicationId()
                             + " is not valid for Cartridge [type] " + cartridgeType, ignoredException);
                 }
             }*/

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/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 0c68aa5..0a7cbf5 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
@@ -106,7 +106,7 @@ public class ClusterContextFactory {
          // partition group = network partition context
          for (ChildLevelNetworkPartition networkPartition : deploymentPolicy.getChildLevelNetworkPartitions()) {
 
-             String networkPartitionId = networkPartition.getId();
+             String networkPartitionId = networkPartition.getApplicationId();
  //            NetworkPartitionLbHolder networkPartitionLbHolder =
  //                    PartitionManager.getInstance()
  //                            .getNetworkPartitionLbHolder(networkPartitionId);
@@ -126,7 +126,7 @@ public class ClusterContextFactory {
                      networkPartition.getPartitions());
              for (Member member : cluster.getMembers()) {
                  String memberId = member.getMemberId();
-                 if (member.getNetworkPartitionId().equalsIgnoreCase(clusterLevelNetworkPartitionContext.getId())) {
+                 if (member.getNetworkPartitionId().equalsIgnoreCase(clusterLevelNetworkPartitionContext.getApplicationId())) {
                      MemberContext memberContext = new MemberContext();
                      memberContext.setClusterId(member.getClusterId());
                      memberContext.setMemberId(memberId);

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/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 9372237..47489a0 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
@@ -219,7 +219,7 @@ public class VMClusterContext extends AbstractClusterContext {
         if (clusterLevelNetworkPartitionContext == null) {
             String msg =
                     "Network Partition is null in deployment policy: [policy-name]: " +
-                            deploymentPolicy.getId();
+                            deploymentPolicy.getApplicationId();
             log.error(msg);
             throw new PolicyValidationException(msg);
         }
@@ -231,7 +231,7 @@ public class VMClusterContext extends AbstractClusterContext {
             String msg =
                     "[Partition] " + clusterInstance.getPartitionId() + " for [networkPartition] " +
                             clusterInstance.getNetworkPartitionId() + "is null " +
-                            "in deployment policy: [policy-name]: " + deploymentPolicy.getId();
+                            "in deployment policy: [policy-name]: " + deploymentPolicy.getApplicationId();
             log.error(msg);
             throw new PolicyValidationException(msg);
         }

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/events/builder/MonitorStatusEventBuilder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/events/builder/MonitorStatusEventBuilder.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/events/builder/MonitorStatusEventBuilder.java
index 9915ae4..a46114a 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/events/builder/MonitorStatusEventBuilder.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/events/builder/MonitorStatusEventBuilder.java
@@ -90,13 +90,13 @@ public class MonitorStatusEventBuilder {
     }
 
     /*public static void notifyChildCluster(Monitor child, ClusterStatus state, List<String> instanceId) {
-        MonitorStatusEvent statusEvent = new ClusterStatusEvent(state, instanceId, child.getId());
+        MonitorStatusEvent statusEvent = new ClusterStatusEvent(state, instanceId, child.getApplicationId());
         child.onParentStatusEvent(statusEvent);
     }
 
     public static void notifyChildGroup(Monitor child, GroupStatus state, List<String> instanceIds)
             throws ParentMonitorNotFoundException {
-        MonitorStatusEvent statusEvent = new GroupStatusEvent(state, child.getId(), instanceIds);
+        MonitorStatusEvent statusEvent = new GroupStatusEvent(state, child.getApplicationId(), instanceIds);
         child.onParentStatusEvent(statusEvent);
     }*/
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
index a3a9337..f4ad47f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
@@ -21,7 +21,6 @@ package org.apache.stratos.autoscaler.pojo.policy;
 
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Random;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
@@ -100,24 +99,24 @@ public class PolicyManager {
     }
 
     public boolean updateDeploymentPolicy(DeploymentPolicy policy) throws InvalidPolicyException {
-        if(StringUtils.isEmpty(policy.getId())){
+        if(StringUtils.isEmpty(policy.getApplicationId())){
             throw new AutoScalerException("Deploying policy id cannot be empty");
         }
         try {
             if(log.isInfoEnabled()) {
-                log.info(String.format("Updating deployment policy: [id] %s", policy.getId()));
+                log.info(String.format("Updating deployment policy: [id] %s", policy.getApplicationId()));
             }
             fillPartitions(policy);
         } catch (InvalidPartitionException e) {
             log.error(e);
-            throw new InvalidPolicyException(String.format("Deployment policy is invalid: [id] %s", policy.getId()), e);
+            throw new InvalidPolicyException(String.format("Deployment policy is invalid: [id] %s", policy.getApplicationId()), e);
         }
 
         updateDeploymentPolicyToInformationModel(policy);
         RegistryManager.getInstance().persistDeploymentPolicy(policy);
 
         if (log.isInfoEnabled()) {
-            log.info(String.format("Deployment policy is updated successfully: [id] %s", policy.getId()));
+            log.info(String.format("Deployment policy is updated successfully: [id] %s", policy.getApplicationId()));
         }
         return true;
     }
@@ -126,7 +125,7 @@ public class PolicyManager {
         //TODO fill partition by extracting the partitions from policy
 //        PartitionManager partitionMgr = PartitionManager.getInstance();
 //        for (Partition partition : deploymentPolicy.getAllPartitions()) {
-//            String partitionId = partition.getId();
+//            String partitionId = partition.getApplicationId();
 //            if ((partitionId == null) || (!partitionMgr.partitionExist(partitionId))) {
 //                String msg = "Could not find partition: [id] " + partitionId + ". " +
 //                        "Please deploy the partitions before deploying the deployment policies.";
@@ -213,30 +212,30 @@ public class PolicyManager {
 
     // Add the deployment policy to As in memmory information model. Does not persist.
     public String addDeploymentPolicyToInformationModel(DeploymentPolicy policy) throws InvalidPolicyException {
-        if (StringUtils.isEmpty(policy.getId())) {
+        if (StringUtils.isEmpty(policy.getApplicationId())) {
             // id = application id + random string
             String id = policy.getApplicationId() + UUID.randomUUID().getLeastSignificantBits();
-            policy.setId(id);
+            policy.setApplicationId(id);
         }
-        if (!deploymentPolicyListMap.containsKey(policy.getId())) {
+        if (!deploymentPolicyListMap.containsKey(policy.getApplicationId())) {
             if (log.isDebugEnabled()) {
-                log.debug("Adding deployment policy: " + policy.getId());
+                log.debug("Adding deployment policy: " + policy.getApplicationId());
             }
-            deploymentPolicyListMap.put(policy.getId(), policy);
+            deploymentPolicyListMap.put(policy.getApplicationId(), policy);
         } else {
-        	String errMsg = "Specified deployment policy [" + policy.getId()+ "] already exists";
+        	String errMsg = "Specified deployment policy [" + policy.getApplicationId()+ "] already exists";
         	log.error(errMsg);
             throw new InvalidPolicyException(errMsg);
         }
         
-        return policy.getId();
+        return policy.getApplicationId();
     }
 
     public void updateDeploymentPolicyToInformationModel(DeploymentPolicy policy) throws InvalidPolicyException {
         if (log.isDebugEnabled()) {
-            log.debug("Updating deployment policy: " + policy.getId());
+            log.debug("Updating deployment policy: " + policy.getApplicationId());
         }
-        deploymentPolicyListMap.put(policy.getId(), policy);
+        deploymentPolicyListMap.put(policy.getApplicationId(), policy);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/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 e2a6819..fb2f233 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
@@ -21,7 +21,6 @@ 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.autoscaler.pojo.policy.deployment.partition.network.Partition;
 import org.apache.stratos.autoscaler.util.AutoscalerUtil;
 
@@ -35,7 +34,6 @@ import java.util.Arrays;
 public class DeploymentPolicy implements Serializable{
 
     private static final long serialVersionUID = 5675507196284400099L;
-    private String id;
     private String applicationId;
     private String description;
     private boolean isPublic;
@@ -44,27 +42,27 @@ public class DeploymentPolicy implements Serializable{
     private int tenantId;
 
     /**
-     * Gets the value of the id property.
+     * Gets the value of the applicationId property.
      * 
      * @return
      *     possible object is
      *     {@link String }
      *     
      */
-    public String getId() {
-        return id;
+    public String getApplicationId() {
+        return applicationId;
     }
 
     /**
-     * Sets the value of the id property.
+     * Sets the value of the applicationId property.
      * 
      * @param value
      *     allowed object is
      *     {@link String }
      *     
      */
-    public void setId(String value) {
-        this.id = value;
+    public void setApplicationId(String value) {
+        this.applicationId = value;
     }
     
     /**
@@ -187,7 +185,7 @@ public class DeploymentPolicy implements Serializable{
     }
     
     public String toString() {
-        return "Deployment Policy [id]" + this.id + " Description " +  this.description 
+        return "Deployment Policy [applicationId]" + this.applicationId + " Description " +  this.description
         		+ " isPublic " +  this.isPublic 
         		+" [partitions] " + Arrays.toString(this.getAllPartitions());
     }
@@ -210,14 +208,6 @@ public class DeploymentPolicy implements Serializable{
         }
     }
 
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-
     public ChildPolicy getChildPolicy(String id) {
         for(ChildPolicy childPolicy : childPolicies) {
             if (childPolicy.getId().equals(id)) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
index da974b5..c81d09f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/PartitionManager.java
@@ -73,21 +73,21 @@
 //     * Deploy a new partition to Auto Scaler.
 //     */
 //    public boolean addNewPartition(Partition partition) throws InvalidPartitionException {
-//        if (StringUtils.isEmpty(partition.getId())) {
+//        if (StringUtils.isEmpty(partition.getApplicationId())) {
 //            throw new InvalidPartitionException("Partition id can not be empty");
 //        }
-//        if (this.partitionExist(partition.getId())) {
-//            throw new InvalidPartitionException(String.format("Partition already exist in partition manager: [id] %s", partition.getId()));
+//        if (this.partitionExist(partition.getApplicationId())) {
+//            throw new InvalidPartitionException(String.format("Partition already exist in partition manager: [id] %s", partition.getApplicationId()));
 //        }
 //        if (null == partition.getProvider()) {
-//            throw new InvalidPartitionException("Mandatory field provider has not be set for partition " + partition.getId());
+//            throw new InvalidPartitionException("Mandatory field provider has not be set for partition " + partition.getApplicationId());
 //        }
 //        try {
 //            validatePartitionViaCloudController(partition);
 //            RegistryManager.getInstance().persistPartition(partition);
 //            addPartitionToInformationModel(partition);
 //            if (log.isInfoEnabled()) {
-//                log.info(String.format("Partition is deployed successfully: [id] %s", partition.getId()));
+//                log.info(String.format("Partition is deployed successfully: [id] %s", partition.getApplicationId()));
 //            }
 //            return true;
 //        } catch (Exception e) {
@@ -97,7 +97,7 @@
 //
 //
 //    public void addPartitionToInformationModel(Partition partition) {
-//        partitions.put(partition.getId(), partition);
+//        partitions.put(partition.getApplicationId(), partition);
 //    }
 //
 ////    public NetworkPartitionLbHolder getNetworkPartitionLbHolder(String networkPartitionId) {
@@ -118,7 +118,7 @@
 //
 //    public boolean validatePartitionViaCloudController(Partition partition) throws PartitionValidationException {
 //        if (log.isDebugEnabled()) {
-//            log.debug(String.format("Validating partition via cloud controller: [id] %s", partition.getId()));
+//            log.debug(String.format("Validating partition via cloud controller: [id] %s", partition.getApplicationId()));
 //        }
 //        return CloudControllerClient.getInstance().validatePartition(partition);
 //    }
@@ -126,7 +126,7 @@
 ////    public List<NetworkPartitionLbHolder> getNetworkPartitionLbHolders(DeploymentPolicy depPolicy) {
 ////        List<NetworkPartitionLbHolder> lbHolders = new ArrayList<NetworkPartitionLbHolder>();
 ////        for (NetworkPartition networkPartition : depPolicy.getChildLevelNetworkPartitions()) {
-////            String id = networkPartition.getId();
+////            String id = networkPartition.getApplicationId();
 ////            NetworkPartitionLbHolder entry = networkPartitionLbHolders.get(id);
 ////            if (entry != null) {
 ////                lbHolders.add(entry);
@@ -137,7 +137,7 @@
 //
 ////    public void deployNewNetworkPartitions(DeploymentPolicy depPolicy) {
 ////        for (NetworkPartition networkPartition : depPolicy.getChildLevelNetworkPartitions()) {
-////            String id = networkPartition.getId();
+////            String id = networkPartition.getApplicationId();
 ////            if (!networkPartitionLbHolders.containsKey(id)) {
 ////                NetworkPartitionLbHolder networkPartitionLbHolder =
 ////                        new NetworkPartitionLbHolder(id);
@@ -150,7 +150,7 @@
 //
 ////    public void undeployNetworkPartitions(DeploymentPolicy depPolicy) {
 ////        for (NetworkPartition networkPartition : depPolicy.getChildLevelNetworkPartitions()) {
-////            String id = networkPartition.getId();
+////            String id = networkPartition.getApplicationId();
 ////            if (networkPartitionLbHolders.containsKey(id)) {
 ////                NetworkPartitionLbHolder netPartCtx = this.getNetworkPartitionLbHolder(id);
 ////                // remove from information model

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
index b8bbd22..90fa388 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
@@ -145,7 +145,7 @@ public class RegistryManager {
     }
 
     public void persistDeploymentPolicy(DeploymentPolicy deploymentPolicy) {
-        String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE + AutoScalerConstants.DEPLOYMENT_POLICY_RESOURCE + "/" + deploymentPolicy.getId();
+        String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE + AutoScalerConstants.DEPLOYMENT_POLICY_RESOURCE + "/" + deploymentPolicy.getApplicationId();
         persist(deploymentPolicy, resourcePath);
         if (log.isDebugEnabled()) {
             log.debug(deploymentPolicy.toString());
@@ -522,7 +522,7 @@ public class RegistryManager {
         this.delete(resourcePath);
         if (log.isDebugEnabled()) {
             log.debug(String.format("Deployment policy deleted from registry: [id] %s",
-                    depPolicy.getId()));
+                    depPolicy.getApplicationId()));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java
index 416b911..79b11e4 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/ApplicationPolicy.java
@@ -25,19 +25,9 @@ import java.util.List;
 
 @XmlRootElement
 public class ApplicationPolicy {
-    //partition groups
-    private String applicationId;
 
-    private List<ApplicationLevelNetworkPartition> networkPartition;
-
-
-    public String getApplicationId() {
-        return applicationId;
-    }
 
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
+    private List<ApplicationLevelNetworkPartition> networkPartition;
 
     public List<ApplicationLevelNetworkPartition> getNetworkPartition() {
         return networkPartition;

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java
index 9a87399..81bdae4 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/policy/deployment/DeploymentPolicy.java
@@ -26,7 +26,8 @@ import java.util.List;
 @XmlRootElement
 public class DeploymentPolicy {
 
-    private String id;
+    //partition groups
+    private String applicationId;
 
     private String description;
 
@@ -36,12 +37,12 @@ public class DeploymentPolicy {
 
     private List<ChildPolicy> childPolicies;
 
-    public String getId() {
-        return id;
+    public String getApplicationId() {
+        return applicationId;
     }
 
-    public void setId(String id) {
-        this.id = id;
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
     }
 
     public boolean getIsPublic() {

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/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 32ff63d..8a2f8a7 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
@@ -1000,7 +1000,7 @@ public class StratosApiV41Utils {
 
         if (log.isInfoEnabled()) {
             log.info(String.format("Starting to deploy application: [application-id] %s",
-                    deploymentPolicyBean.getApplicationPolicy().getApplicationId()));
+                    deploymentPolicyBean.getApplicationId()));
         }
 
         AutoscalerServiceClient autoscalerServiceClient = getAutoscalerServiceClient();
@@ -1013,7 +1013,7 @@ public class StratosApiV41Utils {
                 autoscalerServiceClient.deployDeploymentPolicy(deploymentPolicy);
                 if(log.isInfoEnabled()) {
                     log.info(String.format("Application deployed successfully: [application-id] %s [deployment-policy-id] %s",
-                            deploymentPolicy.getApplicationId(), deploymentPolicy.getId()));
+                            deploymentPolicy.getApplicationId(), deploymentPolicy.getApplicationId()));
                 }
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/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 4e4269f..cbf4bb7 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
@@ -570,7 +570,7 @@ public class MockContext {
     		}
     	}
     	
-    	policies.put(deploymentPolicy.getApplicationPolicy().getApplicationId() +UUID.randomUUID().getLeastSignificantBits(),deploymentPolicy);
+    	policies.put(deploymentPolicy.getApplicationId() +UUID.randomUUID().getLeastSignificantBits(),deploymentPolicy);
         StratosApiResponse stratosApiResponse = new StratosApiResponse();
         stratosApiResponse.setMessage("Successfully deployed deployment policy definition");
         return stratosApiResponse;

http://git-wip-us.apache.org/repos/asf/stratos/blob/641ad3ff/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/PojoConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/PojoConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/PojoConverter.java
index 6de5776..ec4ef53 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/PojoConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/PojoConverter.java
@@ -427,7 +427,7 @@ public class PojoConverter {
         org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy =
                 new org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy();
 
-        deploymentPolicy.setId(deploymentPolicyBean.getId());
+        deploymentPolicy.setApplicationId(deploymentPolicyBean.getApplicationId());
         deploymentPolicy.setDescription(deploymentPolicyBean.getDescription());
         deploymentPolicy.setIsPublic(deploymentPolicyBean.isPublic());
         if (deploymentPolicyBean.getApplicationPolicy() != null
@@ -435,7 +435,6 @@ public class PojoConverter {
                 && !deploymentPolicyBean.getApplicationPolicy().getNetworkPartition().isEmpty()) {
             deploymentPolicy
                     .setApplicationLevelNetworkPartitions(convertToCCPartitionGroup(deploymentPolicyBean.getApplicationPolicy().getNetworkPartition()));
-            deploymentPolicy.setApplicationId(deploymentPolicyBean.getApplicationPolicy().getApplicationId());
         }
 
         if (deploymentPolicyBean.getChildPolicies() != null && !deploymentPolicyBean.getChildPolicies().isEmpty()) {


[3/3] stratos git commit: speed up termination process and refactoring

Posted by re...@apache.org.
speed up termination process and refactoring


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

Branch: refs/heads/4.1.0-test
Commit: 15cd21fb4371ce2a951419c817172d9d0e9a9e13
Parents: bbc838a
Author: reka <rt...@gmail.com>
Authored: Mon Dec 15 11:58:39 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Mon Dec 15 13:57:02 2014 +0530

----------------------------------------------------------------------
 .../AutoscalerTopologyEventReceiver.java        |  1 +
 .../autoscaler/monitor/MonitorFactory.java      | 49 +++++-------------
 .../monitor/cluster/VMClusterMonitor.java       | 52 ++++++++------------
 .../monitor/component/GroupMonitor.java         |  3 +-
 4 files changed, 34 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/15cd21fb/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
index 87a9c91..08f5ca5 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -469,6 +469,7 @@ public class AutoscalerTopologyEventReceiver {
                                         log.info("Monitoring task for Cluster Monitor with cluster id "
                                                 + clusterInstanceCreatedEvent.getClusterId() + " started successfully");
                                     } else {
+                                        //monitor already started. Invoking it directly to speed up the process
                                         ((VMClusterMonitor)clusterMonitor).monitor();
                                     }
                                 } catch (PolicyValidationException e) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/15cd21fb/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
index 6c26ad8..d4414af 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/MonitorFactory.java
@@ -35,7 +35,6 @@ import org.apache.stratos.autoscaler.monitor.cluster.VMClusterMonitor;
 import org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor;
 import org.apache.stratos.autoscaler.monitor.component.GroupMonitor;
 import org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor;
-import org.apache.stratos.common.constants.StratosConstants;
 import org.apache.stratos.messaging.domain.applications.Application;
 import org.apache.stratos.messaging.domain.applications.Group;
 import org.apache.stratos.messaging.domain.applications.ScalingDependentList;
@@ -83,7 +82,6 @@ public class MonitorFactory {
     }
 
 
-
     /**
      * This will create the GroupMonitor based on given groupId by going thr Topology
      *
@@ -107,17 +105,15 @@ public class MonitorFactory {
             Group group = ApplicationHolder.getApplications().
                     getApplication(appId).getGroupRecursively(context.getId());
 
-
             boolean hasScalingDependents = false;
-            if(parentMonitor.getScalingDependencies() != null) {
-                for (ScalingDependentList scalingDependentList : parentMonitor.getScalingDependencies()){
-
-                    if(scalingDependentList.getScalingDependentListComponents().contains(context.getId())){
-
+            if (parentMonitor.getScalingDependencies() != null) {
+                for (ScalingDependentList scalingDependentList : parentMonitor.getScalingDependencies()) {
+                    if (scalingDependentList.getScalingDependentListComponents().contains(context.getId())) {
                         hasScalingDependents = true;
                     }
                 }
             }
+
             groupMonitor = new GroupMonitor(group, appId, instanceIds, hasScalingDependents);
             groupMonitor.setAppId(appId);
             if (parentMonitor != null) {
@@ -130,15 +126,6 @@ public class MonitorFactory {
                     groupMonitor.setHasStartupDependents(false);
                 }
             }
-            
-                       
-            if (group.isGroupScalingEnabled()) {
-                groupMonitor.setGroupScalingEnabled(true);
-            } else if (parentMonitor instanceof GroupMonitor) {
-                /*if (parentMonitor.hasScalingDependents() || parentMonitor.getList --> not empty) {
-                    groupMonitor.setHasScalingDependents(true);
-                }*/
-            }
         } finally {
             ApplicationHolder.releaseReadLock();
 
@@ -147,7 +134,7 @@ public class MonitorFactory {
         Group group = ApplicationHolder.getApplications().
                 getApplication(appId).getGroupRecursively(context.getId());
         //Starting the minimum dependencies
-        initialStartup = groupMonitor.createInstanceAndStartDependencyAtStartup(group, instanceIds);
+        groupMonitor.createInstanceAndStartDependencyAtStartup(group, instanceIds);
 
         /**
          * If not first app deployment, acquiring read lock to check current the status of the group,
@@ -200,7 +187,7 @@ public class MonitorFactory {
 
         }
 
-        initialStartup = applicationMonitor.startMinimumDependencies(application);
+        applicationMonitor.startMinimumDependencies(application);
 
         /*//If not first app deployment, then calculate the current status of the app instance.
         if (!initialStartup) {
@@ -257,16 +244,15 @@ public class MonitorFactory {
             }
 
             boolean hasScalingDependents = false;
-            for (ScalingDependentList scalingDependentList : parentMonitor.getScalingDependencies()){
-
-                if(scalingDependentList.getScalingDependentListComponents().contains("cartridge." + clusterId.substring(0, clusterId.indexOf('.')))){
-
+            for (ScalingDependentList scalingDependentList : parentMonitor.getScalingDependencies()) {
+                if (scalingDependentList.getScalingDependentListComponents().
+                        contains("cartridge." + clusterId.substring(0, clusterId.indexOf('.')))) {
                     hasScalingDependents = true;
                 }
             }
 
             boolean groupScalingEnabledSubtree = false;
-            if(parentMonitor instanceof GroupMonitor){
+            if (parentMonitor instanceof GroupMonitor) {
 
                 GroupMonitor groupMonitor = (GroupMonitor) parentMonitor;
                 groupScalingEnabledSubtree = findIfChildIsInGroupScalingEnabledSubTree(groupMonitor);
@@ -285,35 +271,24 @@ public class MonitorFactory {
                 clusterMonitor.setHasStartupDependents(false);
             }
 
-            //setting the scaling dependent behaviour of the cluster monitor
-//            if (parentMonitor.hasScalingDependents() || (context.isGroupScalingEnabled())) {
-//                clusterMonitor.setHasScalingDependents(true);
-//            } else {
-//                clusterMonitor.setHasScalingDependents(false);
-//            }
             //Creating the instance of the cluster
-            ((VMClusterMonitor)clusterMonitor).createClusterInstance(parentInstanceIds, cluster);
+            ((VMClusterMonitor) clusterMonitor).createClusterInstance(parentInstanceIds, cluster);
             //add it to autoscaler context
             AutoscalerContext.getInstance().addClusterMonitor(clusterMonitor);
 
-
             return clusterMonitor;
-
         } finally {
             TopologyManager.releaseReadLockForCluster(serviceName, clusterId);
         }
     }
 
     private static boolean findIfChildIsInGroupScalingEnabledSubTree(GroupMonitor groupMonitor) {
-
         boolean groupScalingEnabledSubtree = false;
         ParentComponentMonitor parentComponentMonitor = groupMonitor.getParent();
 
-        if(parentComponentMonitor != null && parentComponentMonitor instanceof GroupMonitor){
-
+        if (parentComponentMonitor != null && parentComponentMonitor instanceof GroupMonitor) {
             findIfChildIsInGroupScalingEnabledSubTree((GroupMonitor) parentComponentMonitor);
         } else {
-
             return groupMonitor.isGroupScalingEnabled();
         }
         return groupScalingEnabledSubtree;

http://git-wip-us.apache.org/repos/asf/stratos/blob/15cd21fb/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
index 653499f..7d8f2b4 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/VMClusterMonitor.java
@@ -34,8 +34,8 @@ import org.apache.stratos.autoscaler.exception.InvalidArgumentException;
 import org.apache.stratos.autoscaler.exception.cartridge.TerminationException;
 import org.apache.stratos.autoscaler.exception.partition.PartitionValidationException;
 import org.apache.stratos.autoscaler.exception.policy.PolicyValidationException;
-import org.apache.stratos.autoscaler.monitor.events.ScalingEvent;
 import org.apache.stratos.autoscaler.monitor.events.MonitorStatusEvent;
+import org.apache.stratos.autoscaler.monitor.events.ScalingEvent;
 import org.apache.stratos.autoscaler.monitor.events.ScalingOverMaxEvent;
 import org.apache.stratos.autoscaler.monitor.events.builder.MonitorStatusEventBuilder;
 import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
@@ -243,7 +243,7 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
 
                             if (log.isDebugEnabled()) {
                                 log.debug(String.format("Running minimum check for cluster instance %s ",
-                                        instanceContext.getId() +  " for the cluster: " + clusterId));
+                                        instanceContext.getId() + " for the cluster: " + clusterId));
                             }
 
                             minCheckFactHandle = AutoscalerRuleEvaluator.evaluate(getMinCheckKnowledgeSession(),
@@ -331,14 +331,6 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
         }
     }
 
-//    public String getLbReferenceType() {
-//        return lbReferenceType;
-//    }
-//
-//    public void setLbReferenceType(String lbReferenceType) {
-//        this.lbReferenceType = lbReferenceType;
-//    }
-
     @Override
     public void destroy() {
         getMinCheckKnowledgeSession().dispose();
@@ -354,7 +346,6 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
     @Override
     public String toString() {
         return "VMClusterMonitor [clusterId=" + getClusterId() +
-//                ", lbReferenceType=" + lbReferenceType +
                 ", hasPrimary=" + hasPrimary + " ]";
     }
 
@@ -915,20 +906,9 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
         String memberId = memberReadyToShutdownEvent.getMemberId();
         String partitionId = getPartitionOfMember(memberId);
         ClusterLevelPartitionContext partitionCtxt = nwPartitionCtxt.getPartitionCtxt(partitionId);
-        // terminate the shutdown ready member
-        //CloudControllerClient ccClient = CloudControllerClient.getInstance();
 
         try {
-            //NetworkPartitionContext nwPartitionCtxt;
-            //String networkPartitionId = memberReadyToShutdownEvent.getNetworkPartitionId();
-            //nwPartitionCtxt = getNetworkPartitionCtxt(networkPartitionId);
-
-            // start a new member in the same Partition
-            //String memberId = memberReadyToShutdownEvent.getMemberId();
             String clusterId = memberReadyToShutdownEvent.getClusterId();
-            //String partitionId = getPartitionOfMember(memberId);
-            //PartitionContext partitionCtxt = nwPartitionCtxt.getPartitionCtxt(partitionId);
-
             //move member to pending termination list
             if (partitionCtxt.getPendingTerminationMember(memberId) != null) {
                 partitionCtxt.movePendingTerminationMemberToObsoleteMembers(memberId);
@@ -937,14 +917,16 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
                             "and moved to obsolete list: [member] %s " +
                             "[partition] %s [cluster] %s ", memberId, partitionId, clusterId));
                 }
-            } else if(partitionCtxt.getObsoleteMember(memberId) != null) {
+            } else if (partitionCtxt.getObsoleteMember(memberId) != null) {
                 if (log.isDebugEnabled()) {
                     log.debug(String.format("Member is  in obsolete list: [member] %s " +
                             "[partition] %s [cluster] %s ", memberId, partitionId, clusterId));
                 }
             } //TODO else part
 
-            if(partitionCtxt.getTotalMemberCount() == 0) {
+            //when no more members are there to terminate Invoking it monitor directly
+            // to speed up the termination process
+            if (partitionCtxt.getTotalMemberCount() == 0) {
                 this.monitor();
             }
 
@@ -1051,13 +1033,13 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
 
     @Override
     public void terminateAllMembers(final String instanceId, final String networkPartitionId) {
-
+        final VMClusterMonitor monitor = this;
         Thread memberTerminator = new Thread(new Runnable() {
             public void run() {
 
                 ClusterInstanceContext instanceContext = getAllNetworkPartitionCtxts().get(networkPartitionId)
                         .getClusterInstanceContext(instanceId);
-
+                boolean allMovedToObsolete = true;
                 for (ClusterLevelPartitionContext partitionContext : instanceContext.getPartitionCtxts()) {
                     if (log.isInfoEnabled()) {
                         log.info("Starting to terminate all members in cluster [" + getClusterId() + "] " +
@@ -1092,14 +1074,20 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
                         MemberContext pendingMemberCtxt = pendingIterator.next();
                         // pending members
                         String memeberId = pendingMemberCtxt.getMemberId();
-                        if(log.isDebugEnabled()) {
+                        if (log.isDebugEnabled()) {
                             log.debug("Moving pending member [member id] " + memeberId + " to obsolete list");
                         }
                         partitionContext.movePendingMemberToObsoleteMembers(memeberId);
                     }
+                    if(partitionContext.getTotalMemberCount() == 0) {
+                        allMovedToObsolete = allMovedToObsolete && true;
+                    } else {
+                        allMovedToObsolete = false;
+                    }
+                }
 
-//                terminateAllFactHandle = AutoscalerRuleEvaluator.evaluateTerminateAll
-//                        (terminateAllKnowledgeSession, terminateAllFactHandle, partitionContext);
+                if(allMovedToObsolete) {
+                    monitor.monitor();
                 }
             }
         }, "Member Terminator - [cluster id] " + getClusterId());
@@ -1160,10 +1148,10 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
 
                 // Cluster instance is already there. No need to create one.
                 VMClusterContext clusterContext = (VMClusterContext) this.getClusterContext();
-                if(clusterContext == null) {
+                if (clusterContext == null) {
 
                     clusterContext = ClusterContextFactory.getVMClusterContext(clusterInstance.getInstanceId(), cluster,
-                                    hasScalingDependents());
+                            hasScalingDependents());
                     this.setClusterContext(clusterContext);
                 }
 
@@ -1233,7 +1221,7 @@ public class VMClusterMonitor extends AbstractClusterMonitor {
                     }
                     for (String memberId : members) {
                         // pending members
-                        if(log.isDebugEnabled()) {
+                        if (log.isDebugEnabled()) {
                             log.debug("Moving pending member [member id] " + memberId + " the obsolete list");
                         }
                         partitionContext.movePendingMemberToObsoleteMembers(memberId);

http://git-wip-us.apache.org/repos/asf/stratos/blob/15cd21fb/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
index 7c02da2..4e5bc76 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
@@ -176,8 +176,7 @@ public class GroupMonitor extends ParentComponentMonitor implements Runnable {
          String instanceId = statusEvent.getInstanceId();
          LifeCycleState status1 = statusEvent.getStatus();
          String id = this.id;
-
-        //Events coming from parent are In_Active(in faulty detection), Scaling events, termination
+         //Events coming from parent are In_Active(in faulty detection), Scaling events, termination
 
         if (status1 == ClusterStatus.Active || status1 == GroupStatus.Active) {
             onChildActivatedEvent(childId, instanceId);