You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2014/12/18 21:07:36 UTC

stratos git commit: Adding addServiceGroup() and removeServiceGroup() methods to autoscaler service, changing deploy term to add

Repository: stratos
Updated Branches:
  refs/heads/master 5912f4e00 -> 258bbc27f


Adding addServiceGroup() and removeServiceGroup() methods to autoscaler service, changing deploy term to add


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

Branch: refs/heads/master
Commit: 258bbc27fa780a1332aa29e234a39e4753cdfffe
Parents: 5912f4e
Author: Imesh Gunaratne <im...@apache.org>
Authored: Fri Dec 19 01:37:23 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Fri Dec 19 01:37:23 2014 +0530

----------------------------------------------------------------------
 .../autoscaler/api/AutoScalerServiceImpl.java   | 136 ++++++----
 .../interfaces/AutoScalerServiceInterface.java  |  16 +-
 .../autoscaler/pojo/policy/PolicyManager.java   |  35 +--
 .../impl/CloudControllerServiceImpl.java        |  12 +-
 .../manager/client/AutoscalerServiceClient.java |  10 +-
 .../client/CloudControllerServiceClient.java    |  14 --
 .../deployer/DefaultServiceGroupDeployer.java   |   2 +-
 .../util/converter/ObjectConverter.java         |  15 +-
 .../src/main/resources/AutoScalerService.wsdl   | 247 +++++++++++--------
 9 files changed, 264 insertions(+), 223 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/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 8e900c2..43e881d 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
@@ -138,7 +138,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
 
     @Override
     public boolean addAutoScalingPolicy(AutoscalePolicy autoscalePolicy) throws InvalidPolicyException {
-        return PolicyManager.getInstance().deployAutoscalePolicy(autoscalePolicy);
+        return PolicyManager.getInstance().addAutoscalePolicy(autoscalePolicy);
     }
 
     @Override
@@ -175,7 +175,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
         applicationContext.setStatus(ApplicationContext.STATUS_CREATED);
         AutoscalerContext.getInstance().addApplicationContext(applicationContext);
         if(log.isInfoEnabled()) {
-            log.info(String.format("Successfully added application: [application-id] %s",
+            log.info(String.format("Application added successfully: [application-id] %s",
                     applicationContext.getApplicationId()));
         }
     }
@@ -193,52 +193,64 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
 
     @Override
     public boolean deployApplication(String applicationId, DeploymentPolicy policy) throws ApplicationDefinitionException {
-        ApplicationContext applicationContext = RegistryManager.getInstance().getApplicationContext(applicationId);
-        if(applicationContext == null) {
-            throw new RuntimeException("Application not found: " + applicationId);
-        }
-
-        ApplicationParser applicationParser = new DefaultApplicationParser();
-        Application application = applicationParser.parse(applicationContext);
-        ApplicationBuilder.handleApplicationCreated(application, applicationParser.getApplicationClusterContexts());
-
         try {
-            PolicyManager.getInstance().addDeploymentPolicy(policy);
-        } catch (InvalidPolicyException e) {
-            String message = "Could not deploy application: [application-id] " + policy.getApplicationId();
-            log.error(message, e);
-            throw new RuntimeException(message, e);
-        }
+            ApplicationContext applicationContext = RegistryManager.getInstance().getApplicationContext(applicationId);
+            if (applicationContext == null) {
+                throw new RuntimeException("Application not found: " + applicationId);
+            }
 
-        //Need to start the application Monitor after validation of the deployment policies.
-        //FIXME add validation
-        validateDeploymentPolicy(policy);
-        //Check whether all the clusters are there
-        boolean allClusterInitialized = false;
-        try {
-            ApplicationHolder.acquireReadLock();
-            application = ApplicationHolder.getApplications().getApplication(policy.getApplicationId());
-            if (application != null) {
-                allClusterInitialized = AutoscalerUtil.allClustersInitialized(application);
+            ApplicationParser applicationParser = new DefaultApplicationParser();
+            Application application = applicationParser.parse(applicationContext);
+            ApplicationBuilder.handleApplicationCreated(application, applicationParser.getApplicationClusterContexts());
+
+            try {
+                PolicyManager.getInstance().addDeploymentPolicy(policy);
+                applicationContext.setStatus(ApplicationContext.STATUS_DEPLOYED);
+                AutoscalerContext.getInstance().updateApplicationContext(applicationContext);
+            } catch (InvalidPolicyException e) {
+                String message = "Deployment policy is not valid: [application-id] " + policy.getApplicationId();
+                log.error(message, e);
+                throw new RuntimeException(message, e);
+            }
+
+            //Need to start the application Monitor after validation of the deployment policies.
+            //FIXME add validation
+            validateDeploymentPolicy(policy);
+            //Check whether all the clusters are there
+            boolean allClusterInitialized = false;
+            try {
+                ApplicationHolder.acquireReadLock();
+                application = ApplicationHolder.getApplications().getApplication(policy.getApplicationId());
+                if (application != null) {
+                    allClusterInitialized = AutoscalerUtil.allClustersInitialized(application);
+                }
+            } finally {
+                ApplicationHolder.releaseReadLock();
             }
-        } finally {
-            ApplicationHolder.releaseReadLock();
-        }
 
-        if (!AutoscalerContext.getInstance().containsPendingMonitor(applicationId)
-                || !AutoscalerContext.getInstance().monitorExists(applicationId)) {
-            if(allClusterInitialized) {
-                AutoscalerUtil.getInstance().startApplicationMonitor(applicationId);
+            if (!AutoscalerContext.getInstance().containsPendingMonitor(applicationId)
+                    || !AutoscalerContext.getInstance().monitorExists(applicationId)) {
+                if (allClusterInitialized) {
+                    AutoscalerUtil.getInstance().startApplicationMonitor(applicationId);
+                } else {
+                    log.info("The application clusters are not yet created. " +
+                            "Waiting for them to be created");
+                }
             } else {
-                log.info("The application clusters are not yet created. " +
-                        "Waiting for them to be created");
+                log.info("The application monitor has already been created: [application-id] " + applicationId);
             }
-        } else {
-            log.info("The application monitor has already been created: [application-id] " + applicationId);
+            return true;
+        } catch (Exception e) {
+            ApplicationContext applicationContext = RegistryManager.getInstance().getApplicationContext(applicationId);
+            if(applicationContext != null) {
+                // Revert application status
+                applicationContext.setStatus(ApplicationContext.STATUS_CREATED);
+                AutoscalerContext.getInstance().updateApplicationContext(applicationContext);
+            }
+            String message = "Application deployment failed";
+            log.error(message, e);
+            throw new RuntimeException(message, e);
         }
-        applicationContext.setStatus(ApplicationContext.STATUS_DEPLOYED);
-        AutoscalerContext.getInstance().updateApplicationContext(applicationContext);
-        return true;
     }
 
     @Override
@@ -274,7 +286,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
         }
     }
 
-    public void deployServiceGroup(ServiceGroup servicegroup) throws InvalidServiceGroupException {
+    public void addServiceGroup(ServiceGroup servicegroup) throws InvalidServiceGroupException {
 
         if (servicegroup == null || StringUtils.isEmpty(servicegroup.getName())) {
             String msg = "Service group can not be null service name can not be empty.";
@@ -282,18 +294,20 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
             throw new IllegalArgumentException(msg);
 
         }
-        String name = servicegroup.getName();
 
-        if (RegistryManager.getInstance().serviceGroupExist(name)) {
-            throw new InvalidServiceGroupException("Service group with the name " + name + " already exist.");
+        if(log.isInfoEnabled()) {
+            log.info(String.format("Starting to add service group: [group-name] %s", servicegroup.getName()));
+        }
+        String groupName = servicegroup.getName();
+        if (RegistryManager.getInstance().serviceGroupExist(groupName)) {
+            throw new InvalidServiceGroupException("Service group with the name " + groupName + " already exist.");
         }
 
         if (log.isDebugEnabled()) {
-            log.debug(MessageFormat.format("Deploying service group {0}", servicegroup.getName()));
+            log.debug(MessageFormat.format("Adding service group {0}", servicegroup.getName()));
         }
 
         String[] subGroups = servicegroup.getCartridges();
-
         if (log.isDebugEnabled()) {
             log.debug("SubGroups" + subGroups);
             if (subGroups != null) {
@@ -303,9 +317,7 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
             }
         }
 
-
         Dependencies dependencies = servicegroup.getDependencies();
-
         if (log.isDebugEnabled()) {
             log.debug("Dependencies" + dependencies);
         }
@@ -336,6 +348,32 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
         }
 
         RegistryManager.getInstance().persistServiceGroup(servicegroup);
+        if(log.isInfoEnabled()) {
+            log.info(String.format("Service group successfully added: [group-name] %s", servicegroup.getName()));
+        }
+    }
+
+    @Override
+    public void removeServiceGroup(String groupName) {
+        try {
+            if(log.isInfoEnabled()) {
+                log.info(String.format("Starting to remove service group: [group-name] %s", groupName));
+            }
+            if(RegistryManager.getInstance().serviceGroupExist(groupName)) {
+                RegistryManager.getInstance().removeServiceGroup(groupName);
+                if(log.isInfoEnabled()) {
+                    log.info(String.format("Service group removed: [group-name] %s", groupName));
+                }
+            } else {
+                if(log.isWarnEnabled()) {
+                    log.warn(String.format("Service group not found: [group-name] %s", groupName));
+                }
+            }
+        } catch (org.wso2.carbon.registry.core.exceptions.RegistryException e) {
+            String message = "Could not remove service group: " + groupName;
+            log.error(message, e);
+            throw new RuntimeException(message, e);
+        }
     }
 
     public ServiceGroup getServiceGroup(String name) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
index 9b5ea6a..0112742 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java
@@ -22,6 +22,7 @@
 package org.apache.stratos.autoscaler.interfaces;
 
 import org.apache.stratos.autoscaler.applications.pojo.ApplicationContext;
+import org.apache.stratos.autoscaler.exception.kubernetes.InvalidServiceGroupException;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.autoscaler.exception.*;
 import org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException;
@@ -122,7 +123,20 @@ public interface AutoScalerServiceInterface {
     void updateClusterMonitor(String clusterId, Properties properties) throws InvalidArgumentException;
 
     /**
-     * Get service group by name
+     * Add a service group
+     * @param servicegroup
+     * @throws InvalidServiceGroupException
+     */
+    public void addServiceGroup(ServiceGroup servicegroup) throws InvalidServiceGroupException;
+
+    /**
+     * Remove a service group
+     * @param groupName
+     */
+    public void removeServiceGroup(String groupName);
+
+    /**
+     * Get service group
      * @param name
      * @return
      */

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/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 d4ab989..5126b8d 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
@@ -63,7 +63,10 @@ public class PolicyManager {
     }
 
     // Add the policy to information model and persist.
-    public boolean deployAutoscalePolicy(AutoscalePolicy policy) throws InvalidPolicyException {
+    public boolean addAutoscalePolicy(AutoscalePolicy policy) throws InvalidPolicyException {
+        if (log.isInfoEnabled()) {
+            log.info(String.format("Starting to add autoscaling policy: [id] %s", policy.getId()));
+        }
         if(StringUtils.isEmpty(policy.getId())){
             throw new AutoScalerException("Autoscaling policy id cannot be empty");
         }
@@ -98,36 +101,6 @@ public class PolicyManager {
         }
     }
 
-    private void fillPartitions(DeploymentPolicy deploymentPolicy) throws InvalidPartitionException {
-        //TODO fill partition by extracting the partitions from policy
-//        PartitionManager partitionMgr = PartitionManager.getInstance();
-//        for (Partition partition : deploymentPolicy.getAllPartitions()) {
-//            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.";
-//                throw new InvalidPartitionException(msg);
-//            }
-//
-//            fillPartition(partition, PartitionManager.getInstance().getPartitionById(partitionId));
-//        }
-    }
-
-    private static void fillPartition(Partition destPartition, Partition srcPartition) {
-        if(srcPartition.getProvider() == null)        	
-            throw new RuntimeException("Provider is not set in the deployed partition");
-
-        if (log.isDebugEnabled()) {
-            log.debug(String.format("Setting provider for partition: [id] %s [provider] %s", destPartition.getId(), srcPartition.getProvider()));
-        }
-        destPartition.setProvider(srcPartition.getProvider());
-
-        if (log.isDebugEnabled()) {
-            log.debug(String.format("Setting properties for partition: [id] %s [properties] %s", destPartition.getId(), srcPartition.getProperties()));
-        }
-        destPartition.setProperties(srcPartition.getProperties());
-    }
-
     public void addASPolicyToInformationModel(AutoscalePolicy asPolicy) throws InvalidPolicyException {
         if (!autoscalePolicyListMap.containsKey(asPolicy.getId())) {
             if (log.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
index 4cb8591..c1e7560 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -84,6 +84,9 @@ public class CloudControllerServiceImpl implements CloudControllerService {
 
         handleNullObject(cartridgeConfig, "Cartridge definition is null");
 
+        if(log.isInfoEnabled()) {
+            log.info("Starting to add cartridge: [type] " + cartridgeConfig.getType());
+        }
         if (log.isDebugEnabled()) {
             log.debug("Cartridge definition: " + cartridgeConfig.toString());
         }
@@ -92,8 +95,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
         try {
             cartridge = CloudControllerUtil.toCartridge(cartridgeConfig);
         } catch (Exception e) {
-            String msg = "Invalid cartridge definition: Cartridge type: " + cartridgeConfig.getType() +
-                    " Cause: Cannot instantiate a cartridge instance with the given configuration: " + e.getMessage();
+            String msg = "Invalid cartridge definition: [cartridge-type] " + cartridgeConfig.getType();
             log.error(msg, e);
             throw new InvalidCartridgeDefinitionException(msg, e);
         }
@@ -102,9 +104,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
 
         if (!StratosConstants.KUBERNETES_DEPLOYER_TYPE.equals(cartridge.getDeployerType())) {
             if (iaasProviders == null || iaasProviders.isEmpty()) {
-                String msg = "Invalid cartridge definition: Cartridge type: " +
-                        cartridgeConfig.getType() +
-                        " Cause: Iaases of this cartridge is null or empty";
+                String msg = "Invalid cartridge definition, iaas providers not found: [cartridge-type] " + cartridgeConfig.getType();
                 log.error(msg);
                 throw new InvalidCartridgeDefinitionException(msg);
             }
@@ -138,7 +138,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
         // transaction ends
 
         if(log.isInfoEnabled()) {
-            log.info("Successfully deployed the cartridge: [type] " + cartridgeType);
+            log.info("Successfully added cartridge: [type] " + cartridgeType);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
index 394fd1f..c14e7c4 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/AutoscalerServiceClient.java
@@ -78,7 +78,7 @@ public class AutoscalerServiceClient {
 
     public void undeployServiceGroupDefinition(String serviceGroupName)
             throws RemoteException, AutoScalerServiceAutoScalerExceptionException {
-        stub.undeployServiceGroup(serviceGroupName);
+        stub.removeServiceGroup(serviceGroupName);
     }
 
     public ApplicationLevelNetworkPartition[] getApplicationLevelNetworkPartition(
@@ -166,8 +166,12 @@ public class AutoscalerServiceClient {
         return stub.getServiceGroups();
     }
 
-    public void deployServiceGroup(ServiceGroup serviceGroup) throws AutoScalerServiceInvalidServiceGroupExceptionException, RemoteException {
-        stub.deployServiceGroup(serviceGroup);
+    public void addServiceGroup(ServiceGroup serviceGroup) throws AutoScalerServiceInvalidServiceGroupExceptionException, RemoteException {
+        stub.addServiceGroup(serviceGroup);
+    }
+
+    public void removeServiceGroup(String groupName) throws RemoteException {
+        stub.removeServiceGroup(groupName);
     }
 
     public void updateClusterMonitor(String clusterId, Properties properties) throws RemoteException, AutoScalerServiceInvalidArgumentExceptionException {

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
index 5482e56..c02ea8f 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/client/CloudControllerServiceClient.java
@@ -91,23 +91,9 @@ public class CloudControllerServiceClient {
 	}
 
     public void unDeployCartridgeDefinition (String cartridgeType) throws RemoteException, CloudControllerServiceInvalidCartridgeTypeExceptionException {
-
 		stub.undeployCartridgeDefinition(cartridgeType);
-
 	}
-    
-    public void deployServiceGroup (ServiceGroup serviceGroup) throws RemoteException, CloudControllerServiceInvalidServiceGroupExceptionException {
-    	stub.deployServiceGroup(serviceGroup);
-    }
 
-    public void undeployDeploymentPOlicy (String applicationId) throws RemoteException, CloudControllerServiceInvalidServiceGroupExceptionException {
-        //stub.deployServiceGroup(serviceGroup);
-    }
-    
-    public void undeployServiceGroup (String name)throws RemoteException, CloudControllerServiceInvalidServiceGroupExceptionException {
-    	stub.undeployServiceGroup(name);
-    }
-    
     public String [] getServiceGroupSubGroups(String name) throws RemoteException, CloudControllerServiceInvalidServiceGroupExceptionException {
     	return stub.getServiceGroupSubGroups(name);
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
index 275b179..125d226 100644
--- a/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
+++ b/components/org.apache.stratos.manager/src/main/java/org/apache/stratos/manager/grouping/deployer/DefaultServiceGroupDeployer.java
@@ -166,7 +166,7 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
                 log.debug("deplying to cloud controller service group " + serviceGroupDefinition.getName());
             }
 
-            asServiceClient.deployServiceGroup(serviceGroup);
+            asServiceClient.addServiceGroup(serviceGroup);
 
         } catch (AxisFault axisFault) {
             throw new ADCException(axisFault);

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
index baeec8e..1bf1398 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/util/converter/ObjectConverter.java
@@ -393,7 +393,7 @@ public class ObjectConverter {
         }
 
         if (deploymentPolicyBean.getChildPolicies() != null && !deploymentPolicyBean.getChildPolicies().isEmpty()) {
-            deploymentPolicy.setChildPolicies(convertToCCChildPolicy(deploymentPolicyBean.getChildPolicies()));
+            deploymentPolicy.setChildPolicies(convertChildPoliciesToStubChildPolicies(deploymentPolicyBean.getChildPolicies()));
         }
 
         return deploymentPolicy;
@@ -569,20 +569,15 @@ public class ObjectConverter {
         return appNWPartitions;
     }
 
-    private static ChildPolicy[] convertToCCChildPolicy(List<org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy> childPolicies) {
-
-        ChildPolicy[] childPolicies1 = new ChildPolicy[childPolicies.size()];
-
+    private static ChildPolicy[] convertChildPoliciesToStubChildPolicies(List<org.apache.stratos.common.beans.autoscaler.policy.deployment.ChildPolicy> childPolicies) {
+        ChildPolicy[] stubChildPolicyArray = new ChildPolicy[childPolicies.size()];
         for (int i = 0; i < childPolicies.size(); i++) {
             ChildPolicy childPolicy = new ChildPolicy();
             childPolicy.setAlias(childPolicies.get(i).getAlias());
             childPolicy.setChildLevelNetworkPartitions(convertToCCChildNetworkPartition(childPolicies.get(i).getNetworkPartition()));
-
-
-            childPolicies1[i] = childPolicy;
+            stubChildPolicyArray[i] = childPolicy;
         }
-
-        return childPolicies1;
+        return stubChildPolicyArray;
     }
 
     private static ChildLevelNetworkPartition[] convertToCCChildNetworkPartition(List<org.apache.stratos.common.beans.autoscaler.partition.ChildLevelNetworkPartition> networkPartitions) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/258bbc27/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 cbbfa52..5480d63 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 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax27="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax23="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax215="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/a
 ddressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://api.autoscaler.stratos.apache.org" xmlns:ax27="http://common.stratos.apache.org/xsd" 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://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax214="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax220="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/a
 ddressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://api.autoscaler.stratos.apache.org">
     <wsdl:types>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="AutoscalePolicy">
@@ -8,15 +8,15 @@
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax21:LoadThresholds"/>
+                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax23:LoadThresholds"/>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="LoadThresholds">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax21:LoadAverageThresholds"/>
-                    <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax21:MemoryConsumptionThresholds"/>
-                    <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax21:RequestsInFlightThresholds"/>
+                    <xs:element minOccurs="0" name="loadAverage" nillable="true" type="ax23:LoadAverageThresholds"/>
+                    <xs:element minOccurs="0" name="memoryConsumption" nillable="true" type="ax23:MemoryConsumptionThresholds"/>
+                    <xs:element minOccurs="0" name="requestsInFlight" nillable="true" type="ax23:RequestsInFlightThresholds"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="LoadAverageThresholds">
@@ -38,16 +38,16 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax210="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax215="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:complexType name="ApplicationContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="components" nillable="true" type="ax29:ComponentContext"/>
+                    <xs:element minOccurs="0" name="components" nillable="true" type="ax214:ComponentContext"/>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
                     <xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="teantAdminUsername" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="tenantDomain" nillable="true" type="xs:string"/>
@@ -56,16 +56,16 @@
             </xs:complexType>
             <xs:complexType name="ComponentContext">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax29:CartridgeContext"/>
-                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax29:DependencyContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax29:GroupContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax214:CartridgeContext"/>
+                    <xs:element minOccurs="0" name="dependencyContext" nillable="true" type="ax214:DependencyContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax214:GroupContext"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="CartridgeContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="cartridgeMax" type="xs:int"/>
                     <xs:element minOccurs="0" name="cartridgeMin" type="xs:int"/>
-                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax29:SubscribableInfoContext"/>
+                    <xs:element minOccurs="0" name="subscribableInfoContext" nillable="true" type="ax214:SubscribableInfoContext"/>
                     <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
@@ -78,7 +78,7 @@
                     <xs:element minOccurs="0" name="maxMembers" type="xs:int"/>
                     <xs:element minOccurs="0" name="minMembers" type="xs:int"/>
                     <xs:element minOccurs="0" name="privateRepo" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
                     <xs:element minOccurs="0" name="repoPassword" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="repoUrl" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="repoUsername" nillable="true" type="xs:string"/>
@@ -94,8 +94,8 @@
             <xs:complexType name="GroupContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax29:CartridgeContext"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax29:GroupContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridgeContexts" nillable="true" type="ax214:CartridgeContext"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="groupContexts" nillable="true" type="ax214:GroupContext"/>
                     <xs:element minOccurs="0" name="groupMaxInstances" type="xs:int"/>
                     <xs:element minOccurs="0" name="groupMinInstances" type="xs:int"/>
                     <xs:element minOccurs="0" name="groupScalingEnabled" type="xs:boolean"/>
@@ -121,15 +121,15 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax213="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:complexType name="DeploymentPolicy">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax23:Partition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="allPartitions" nillable="true" type="ax29:Partition"/>
                     <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax23:ApplicationLevelNetworkPartition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax23:ChildLevelNetworkPartition"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax212:ChildPolicy"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="applicationLevelNetworkPartitions" nillable="true" type="ax29:ApplicationLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childPolicies" nillable="true" type="ax25:ChildPolicy"/>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
@@ -138,7 +138,7 @@
             <xs:complexType name="ChildPolicy">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax23:ChildLevelNetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelNetworkPartitions" nillable="true" type="ax29:ChildLevelNetworkPartition"/>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
@@ -149,27 +149,27 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax25="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:complexType name="ApplicationLevelNetworkPartition">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax23:Partition"/>
-                </xs:sequence>
-            </xs:complexType>
             <xs:complexType name="Partition">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
                     <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
+            <xs:complexType name="ApplicationLevelNetworkPartition">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"/>
+                </xs:sequence>
+            </xs:complexType>
             <xs:complexType name="ChildLevelNetworkPartition">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax23:ChildLevelPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="childLevelPartitions" nillable="true" type="ax26:ChildLevelPartition"/>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="min" type="xs:int"/>
                     <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
@@ -193,7 +193,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="ax24:Property"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="ax27:Property"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Property">
@@ -203,158 +203,146 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax28="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" xmlns:ax218="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax214="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://pojo.applications.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+        <xs:schema xmlns:ax24="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax22="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax219="http://common.stratos.apache.org/xsd" xmlns:ax218="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax221="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax213="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax223="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax211="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://api.autoscaler.stratos.apache.org">
+            <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+            <xs:import namespace="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 namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:import namespace="http://kubernetes.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
-            <xs:element name="getAutoscalingPolicy">
+            <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax21:InvalidPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoscalingPolicyResponse">
+            <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax21:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitions">
+            <xs:element name="addAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getNetworkPartitionsResponse">
+            <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationLevelNetworkPartition"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceApplicationDefinitionException">
+            <xs:element name="updateAutoScalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax27:ApplicationDefinitionException"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addApplication">
+            <xs:element name="getDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax29:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplication">
+            <xs:element name="getDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax25:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplicationResponse">
+            <xs:element name="getAutoscalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="autoscalingPolicyId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplications">
-                <xs:complexType>
-                    <xs:sequence/>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getApplicationsResponse">
+            <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployApplication">
+            <xs:element name="getNetworkPartitions">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="policy" nillable="true" type="ax214:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployApplicationResponse">
+            <xs:element name="getNetworkPartitionsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:ApplicationLevelNetworkPartition"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getAutoScalingPolicies">
-                <xs:complexType>
-                    <xs:sequence/>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getAutoScalingPoliciesResponse">
+            <xs:element name="AutoScalerServiceApplicationDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax21:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax212:ApplicationDefinitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="AutoScalerServiceInvalidPolicyException">
+            <xs:element name="addApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax216:InvalidPolicyException"/>
+                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax216:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicy">
+            <xs:element name="getApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addAutoScalingPolicyResponse">
+            <xs:element name="getApplicationResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax216:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicy">
+            <xs:element name="getApplications">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateAutoScalingPolicyResponse">
+            <xs:element name="getApplicationsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax216:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicy">
+            <xs:element name="deployApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="policy" nillable="true" type="ax25:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getDeploymentPolicyResponse">
+            <xs:element name="deployApplicationResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax214:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -383,7 +371,7 @@
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax24:Properties"/>
+                        <xs:element minOccurs="0" name="properties" nillable="true" type="ax27:Properties"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -394,13 +382,20 @@
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deployServiceGroup">
+            <xs:element name="addServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax222:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
+            <xs:element name="removeServiceGroup">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
             <xs:element name="getServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
@@ -434,6 +429,18 @@
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
+            <xs:element name="getAutoScalingPolicies">
+                <xs:complexType>
+                    <xs:sequence/>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getAutoScalingPoliciesResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax23:AutoscalePolicy"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
             <xs:element name="serviceGroupExist">
                 <xs:complexType>
                     <xs:sequence>
@@ -529,6 +536,12 @@
     <wsdl:message name="AutoScalerServiceInvalidPolicyException">
         <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidPolicyException"/>
     </wsdl:message>
+    <wsdl:message name="addServiceGroupRequest">
+        <wsdl:part name="parameters" element="ns:addServiceGroup"/>
+    </wsdl:message>
+    <wsdl:message name="AutoScalerServiceInvalidServiceGroupException">
+        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidServiceGroupException"/>
+    </wsdl:message>
     <wsdl:message name="getServiceGroupRequest">
         <wsdl:part name="parameters" element="ns:getServiceGroup"/>
     </wsdl:message>
@@ -571,11 +584,8 @@
     <wsdl:message name="undeployApplicationRequest">
         <wsdl:part name="parameters" element="ns:undeployApplication"/>
     </wsdl:message>
-    <wsdl:message name="deployServiceGroupRequest">
-        <wsdl:part name="parameters" element="ns:deployServiceGroup"/>
-    </wsdl:message>
-    <wsdl:message name="AutoScalerServiceInvalidServiceGroupException">
-        <wsdl:part name="parameters" element="ns:AutoScalerServiceInvalidServiceGroupException"/>
+    <wsdl:message name="removeServiceGroupRequest">
+        <wsdl:part name="parameters" element="ns:removeServiceGroup"/>
     </wsdl:message>
     <wsdl:message name="getNetworkPartitionsRequest">
         <wsdl:part name="parameters" element="ns:getNetworkPartitions"/>
@@ -615,6 +625,10 @@
             <wsdl:output message="ns:addAutoScalingPolicyResponse" wsaw:Action="urn:addAutoScalingPolicyResponse"/>
             <wsdl:fault message="ns:AutoScalerServiceInvalidPolicyException" name="AutoScalerServiceInvalidPolicyException" wsaw:Action="urn:addAutoScalingPolicyAutoScalerServiceInvalidPolicyException"/>
         </wsdl:operation>
+        <wsdl:operation name="addServiceGroup">
+            <wsdl:input message="ns:addServiceGroupRequest" wsaw:Action="urn:addServiceGroup"/>
+            <wsdl:fault message="ns:AutoScalerServiceInvalidServiceGroupException" name="AutoScalerServiceInvalidServiceGroupException" wsaw:Action="urn:addServiceGroupAutoScalerServiceInvalidServiceGroupException"/>
+        </wsdl:operation>
         <wsdl:operation name="getServiceGroup">
             <wsdl:input message="ns:getServiceGroupRequest" wsaw:Action="urn:getServiceGroup"/>
             <wsdl:output message="ns:getServiceGroupResponse" wsaw:Action="urn:getServiceGroupResponse"/>
@@ -650,9 +664,8 @@
         <wsdl:operation name="undeployApplication">
             <wsdl:input message="ns:undeployApplicationRequest" wsaw:Action="urn:undeployApplication"/>
         </wsdl:operation>
-        <wsdl:operation name="deployServiceGroup">
-            <wsdl:input message="ns:deployServiceGroupRequest" wsaw:Action="urn:deployServiceGroup"/>
-            <wsdl:fault message="ns:AutoScalerServiceInvalidServiceGroupException" name="AutoScalerServiceInvalidServiceGroupException" wsaw:Action="urn:deployServiceGroupAutoScalerServiceInvalidServiceGroupException"/>
+        <wsdl:operation name="removeServiceGroup">
+            <wsdl:input message="ns:removeServiceGroupRequest" wsaw:Action="urn:removeServiceGroup"/>
         </wsdl:operation>
         <wsdl:operation name="getNetworkPartitions">
             <wsdl:input message="ns:getNetworkPartitionsRequest" wsaw:Action="urn:getNetworkPartitions"/>
@@ -733,6 +746,15 @@
                 <soap:fault use="literal" name="AutoScalerServiceInvalidPolicyException"/>
             </wsdl:fault>
         </wsdl:operation>
+        <wsdl:operation name="addServiceGroup">
+            <soap:operation soapAction="urn:addServiceGroup" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:fault name="AutoScalerServiceInvalidServiceGroupException">
+                <soap:fault use="literal" name="AutoScalerServiceInvalidServiceGroupException"/>
+            </wsdl:fault>
+        </wsdl:operation>
         <wsdl:operation name="deleteApplication">
             <soap:operation soapAction="urn:deleteApplication" style="document"/>
             <wsdl:input>
@@ -811,14 +833,11 @@
                 <soap:body use="literal"/>
             </wsdl:input>
         </wsdl:operation>
-        <wsdl:operation name="deployServiceGroup">
-            <soap:operation soapAction="urn:deployServiceGroup" style="document"/>
+        <wsdl:operation name="removeServiceGroup">
+            <soap:operation soapAction="urn:removeServiceGroup" style="document"/>
             <wsdl:input>
                 <soap:body use="literal"/>
             </wsdl:input>
-            <wsdl:fault name="AutoScalerServiceInvalidServiceGroupException">
-                <soap:fault use="literal" name="AutoScalerServiceInvalidServiceGroupException"/>
-            </wsdl:fault>
         </wsdl:operation>
         <wsdl:operation name="getNetworkPartitions">
             <soap:operation soapAction="urn:getNetworkPartitions" style="document"/>
@@ -904,6 +923,15 @@
                 <soap12:fault use="literal" name="AutoScalerServiceInvalidPolicyException"/>
             </wsdl:fault>
         </wsdl:operation>
+        <wsdl:operation name="addServiceGroup">
+            <soap12:operation soapAction="urn:addServiceGroup" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:fault name="AutoScalerServiceInvalidServiceGroupException">
+                <soap12:fault use="literal" name="AutoScalerServiceInvalidServiceGroupException"/>
+            </wsdl:fault>
+        </wsdl:operation>
         <wsdl:operation name="deleteApplication">
             <soap12:operation soapAction="urn:deleteApplication" style="document"/>
             <wsdl:input>
@@ -982,14 +1010,11 @@
                 <soap12:body use="literal"/>
             </wsdl:input>
         </wsdl:operation>
-        <wsdl:operation name="deployServiceGroup">
-            <soap12:operation soapAction="urn:deployServiceGroup" style="document"/>
+        <wsdl:operation name="removeServiceGroup">
+            <soap12:operation soapAction="urn:removeServiceGroup" style="document"/>
             <wsdl:input>
                 <soap12:body use="literal"/>
             </wsdl:input>
-            <wsdl:fault name="AutoScalerServiceInvalidServiceGroupException">
-                <soap12:fault use="literal" name="AutoScalerServiceInvalidServiceGroupException"/>
-            </wsdl:fault>
         </wsdl:operation>
         <wsdl:operation name="getNetworkPartitions">
             <soap12:operation soapAction="urn:getNetworkPartitions" style="document"/>
@@ -1066,6 +1091,12 @@
                 <mime:content type="text/xml" part="parameters"/>
             </wsdl:output>
         </wsdl:operation>
+        <wsdl:operation name="addServiceGroup">
+            <http:operation location="addServiceGroup"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="deleteApplication">
             <http:operation location="deleteApplication"/>
             <wsdl:input>
@@ -1132,8 +1163,8 @@
                 <mime:content type="text/xml" part="parameters"/>
             </wsdl:input>
         </wsdl:operation>
-        <wsdl:operation name="deployServiceGroup">
-            <http:operation location="deployServiceGroup"/>
+        <wsdl:operation name="removeServiceGroup">
+            <http:operation location="removeServiceGroup"/>
             <wsdl:input>
                 <mime:content type="text/xml" part="parameters"/>
             </wsdl:input>