You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/11/05 07:06:41 UTC

git commit: referring to AS stud in undeploying the Service Group definition

Repository: stratos
Updated Branches:
  refs/heads/docker-grouping-merge 2bdf647e3 -> 35aa53597


referring to AS stud in undeploying the Service Group definition


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

Branch: refs/heads/docker-grouping-merge
Commit: 35aa535970e9b6acbe7a893838afe8afec6b14bd
Parents: 2bdf647
Author: Isuru Haththotuwa <is...@apache.org>
Authored: Wed Nov 5 11:36:04 2014 +0530
Committer: Isuru Haththotuwa <is...@apache.org>
Committed: Wed Nov 5 11:36:13 2014 +0530

----------------------------------------------------------------------
 .../manager/client/AutoscalerServiceClient.java      |  5 +++++
 .../deployer/DefaultServiceGroupDeployer.java        | 15 ++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/35aa5359/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 e4dfeaf..1e4b1f1 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
@@ -87,6 +87,11 @@ public class AutoscalerServiceClient {
         return partitions;
     }
 
+    public void undeployServiceGroupDefinition (String serviceGroupName)
+            throws RemoteException, AutoScalerServiceAutoScalerExceptionException {
+        stub.undeployServiceGroup(serviceGroupName);
+    }
+
     public Partition getPartition(
             String partitionId) throws RemoteException {
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/35aa5359/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 fc6e742..2dedcd2 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
@@ -23,6 +23,7 @@ import org.apache.axis2.AxisFault;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.pojo.xsd.ServiceGroup;
+import org.apache.stratos.autoscaler.stub.AutoScalerServiceAutoScalerExceptionException;
 import org.apache.stratos.autoscaler.stub.AutoScalerServiceInvalidServiceGroupExceptionException;
 import org.apache.stratos.cloud.controller.stub.CloudControllerServiceInvalidServiceGroupExceptionException;
 import org.apache.stratos.cloud.controller.stub.CloudControllerServiceUnregisteredCartridgeExceptionException;
@@ -205,24 +206,24 @@ public class DefaultServiceGroupDeployer implements ServiceGroupDeployer {
 
     	//throw new ServiceGroupDefinitioException("method not supported");
     	
-    	CloudControllerServiceClient ccServiceClient = null;
+    	AutoscalerServiceClient autoscalerServiceClient = null;
     	
     	try {
-            ccServiceClient = CloudControllerServiceClient.getServiceClient();
+            autoscalerServiceClient = AutoscalerServiceClient.getServiceClient();
             
             if (log.isDebugEnabled()) {
             	log.debug("undeploying service group from cloud controller " + name);
             }
-            
-            ccServiceClient.undeployServiceGroup(name);
+
+            autoscalerServiceClient.undeployServiceGroupDefinition(name);
 
         } catch (AxisFault axisFault) {
             throw new ADCException(axisFault);
         } catch (RemoteException e) {
         	throw new ADCException(e);
-		} catch (CloudControllerServiceInvalidServiceGroupExceptionException e) {
-			throw new ADCException(e);
-		}
+		} catch (AutoScalerServiceAutoScalerExceptionException e) {
+            throw new ADCException(e);
+        }
     }