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/22 04:18:50 UTC

[1/6] stratos git commit: Adding kubernetes cluster id to network partition

Repository: stratos
Updated Branches:
  refs/heads/master e68f194d4 -> 9fbb7b388


Adding kubernetes cluster id to network partition


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

Branch: refs/heads/master
Commit: 9fbb7b3886f9af960dd41f309a8d00f48637f5ba
Parents: 78e8011
Author: Imesh Gunaratne <im...@apache.org>
Authored: Mon Dec 22 03:17:03 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Mon Dec 22 08:48:37 2014 +0530

----------------------------------------------------------------------
 .../ApplicationLevelNetworkPartition.java       | 10 +++++
 .../util/converter/ObjectConverter.java         | 19 +++++---
 .../src/main/resources/AutoScalerService.wsdl   | 47 ++++++++++----------
 3 files changed, 47 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/9fbb7b38/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
index f1c05b7..774bf5f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/deployment/partition/network/ApplicationLevelNetworkPartition.java
@@ -28,7 +28,9 @@ import java.util.Arrays;
 public class ApplicationLevelNetworkPartition implements Serializable {
 
     private static final long serialVersionUID = -8043298009352097370L;
+
     private String id;
+    private String kubernetesClusterId;
     private boolean activeByDefault;
     private Partition[] partitions;
 
@@ -80,4 +82,12 @@ public class ApplicationLevelNetworkPartition implements Serializable {
         }
         return null;
     }
+
+    public String getKubernetesClusterId() {
+        return kubernetesClusterId;
+    }
+
+    public void setKubernetesClusterId(String kubernetesClusterId) {
+        this.kubernetesClusterId = kubernetesClusterId;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/9fbb7b38/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 0793ada..556b3c6 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
@@ -383,7 +383,7 @@ public class ObjectConverter {
                 && deploymentPolicyBean.getApplicationPolicy().getNetworkPartition() != null
                 && !deploymentPolicyBean.getApplicationPolicy().getNetworkPartition().isEmpty()) {
             deploymentPolicy
-                    .setApplicationLevelNetworkPartitions(convertToCCPartitionGroup(deploymentPolicyBean.getApplicationPolicy().getNetworkPartition()));
+                    .setApplicationLevelNetworkPartitions(convertApplicationLevelNetworkPartitionToStubApplicationLevelNetworkPartition(deploymentPolicyBean.getApplicationPolicy().getNetworkPartition()));
         }
 
         if (deploymentPolicyBean.getChildPolicies() != null && !deploymentPolicyBean.getChildPolicies().isEmpty()) {
@@ -541,7 +541,9 @@ public class ObjectConverter {
         return propertyBean;
     }
 
-    private static org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[] convertToCCPartitionGroup(List<ApplicationLevelNetworkPartition> networkPartitionBeans) {
+    private static org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[]
+        convertApplicationLevelNetworkPartitionToStubApplicationLevelNetworkPartition(
+            List<ApplicationLevelNetworkPartition> networkPartitionBeans) {
 
         org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition[]
                 appNWPartitions = new
@@ -551,10 +553,14 @@ public class ObjectConverter {
         for (int i = 0; i < networkPartitionBeans.size(); i++) {
             org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition appNWPartition = new
                     org.apache.stratos.autoscaler.stub.deployment.partition.ApplicationLevelNetworkPartition();
-            appNWPartition.setId(networkPartitionBeans.get(i).getId());
-            appNWPartition.setActiveByDefault(networkPartitionBeans.get(i).isActiveByDefault());
-            if (networkPartitionBeans.get(i).getPartitions() != null && !networkPartitionBeans.get(i).getPartitions().isEmpty()) {
-                appNWPartition.setPartitions(convertToCCPartitionPojos(networkPartitionBeans.get(i).getPartitions()));
+
+            ApplicationLevelNetworkPartition networkPartition = networkPartitionBeans.get(i);
+
+            appNWPartition.setId(networkPartition.getId());
+            appNWPartition.setKubernetesClusterId(networkPartition.getKubernetesClusterId());
+            appNWPartition.setActiveByDefault(networkPartition.isActiveByDefault());
+            if (networkPartition.getPartitions() != null && !networkPartition.getPartitions().isEmpty()) {
+                appNWPartition.setPartitions(convertToCCPartitionPojos(networkPartition.getPartitions()));
             }
 
             appNWPartitions[i] = appNWPartition;
@@ -880,6 +886,7 @@ public class ObjectConverter {
         }
 
         networkPartitionBean.setId(stubApplicationLevelNetworkPartition.getId());
+        networkPartitionBean.setKubernetesClusterId(stubApplicationLevelNetworkPartition.getKubernetesClusterId());
         networkPartitionBean.setActiveByDefault(stubApplicationLevelNetworkPartition.getActiveByDefault());
 
         //FIXME update with new deployment policy pattern

http://git-wip-us.apache.org/repos/asf/stratos/blob/9fbb7b38/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 7c069b4..b866ee8 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: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">
+<?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://policy.exception.autoscaler.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: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="ax23:LoadThresholds"/>
+                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax21: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="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: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:sequence>
             </xs:complexType>
             <xs:complexType name="LoadAverageThresholds">
@@ -161,6 +161,7 @@
                 <xs:sequence>
                     <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"/>
                 </xs:sequence>
             </xs:complexType>
@@ -200,9 +201,9 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <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:schema xmlns:ax24="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://pojo.applications.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: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://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+            <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://network.partition.deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
@@ -211,17 +212,29 @@
             <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="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="ax21:AutoscalePolicy"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
             <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax21:InvalidPolicyException"/>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax23:InvalidPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -235,7 +248,7 @@
             <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -270,7 +283,7 @@
             <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax21:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -447,18 +460,6 @@
                     </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:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="InvalidPolicyException">


[2/6] stratos git commit: Renaming kubernetes group to kubernetes cluster and moving kubernetes domain classes to cloud controller

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl b/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
index f4acbf7..632e545 100644
--- a/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
+++ b/service-stubs/org.apache.stratos.cloud.controller.service.stub/src/main/resources/CloudControllerService.wsdl
@@ -1,551 +1,515 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ns="http://impl.services.controller.cloud.stratos.apache.org" xmlns:ax27="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax23="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax21="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/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://impl.services.controller.cloud.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://impl.services.controller.cloud.stratos.apache.org" xmlns:ax27="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax23="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax24="http://common.stratos.apache.org/xsd" xmlns:ax21="http://exception.controller.cloud.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax210="http://topology.domain.messaging.stratos.apache.org/xsd" 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://impl.services.controller.cloud.stratos.apache.org">
     <wsdl:types>
-        <xs:schema xmlns:ax28="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax26="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax211="http://kubernetes.common.stratos.apache.org/xsd" xmlns:ax22="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
+        <xs:schema xmlns:ax29="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax26="http://domain.controller.cloud.stratos.apache.org/xsd" xmlns:ax211="http://topology.domain.messaging.stratos.apache.org/xsd" xmlns:ax22="http://exception.controller.cloud.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.controller.cloud.stratos.apache.org">
             <xs:import namespace="http://exception.controller.cloud.stratos.apache.org/xsd"/>
             <xs:import namespace="http://domain.controller.cloud.stratos.apache.org/xsd"/>
+            <xs:import namespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd"/>
             <xs:import namespace="http://topology.domain.messaging.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://kubernetes.common.stratos.apache.org/xsd"/>
-            <xs:element name="CloudControllerServiceCartridgeNotFoundException">
+            <xs:element name="getCartridges">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="registerService">
+            <xs:element name="getCartridgesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="registerServiceResponse">
+            <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidServiceGroupException">
+            <xs:element name="CloudControllerServiceInvalidIaasProviderException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
+                        <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupCartridges">
+            <xs:element name="addCartridge">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:CartridgeConfig"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupCartridgesResponse">
+            <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupDependencies">
+            <xs:element name="removeCartridge">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupDependenciesResponse">
+            <xs:element name="CloudControllerServiceInvalidServiceGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
+                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax21:InvalidServiceGroupException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidPartitionException">
+            <xs:element name="getServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validatePartition">
+            <xs:element name="getServiceGroupResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validatePartitionResponse">
+            <xs:element name="addServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidCartridgeTypeException">
+            <xs:element name="removeServiceGroup">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidCartridgeTypeException" nillable="true" type="ax21:InvalidCartridgeTypeException"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validateDeploymentPolicy">
+            <xs:element name="getClusterContext">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="validateDeploymentPolicyResponse">
+            <xs:element name="getClusterContextResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupSubGroups">
+            <xs:element name="CloudControllerServiceNonExistingKubernetesClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesClusterException" nillable="true" type="ax21:NonExistingKubernetesClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupSubGroupsResponse">
+            <xs:element name="removeKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidIaasProviderException">
+            <xs:element name="removeKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidIaasProviderException" nillable="true" type="ax21:InvalidIaasProviderException"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstances">
+            <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax26:InstanceContext"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstancesResponse">
+            <xs:element name="removeKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+                        <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidClusterException">
+            <xs:element name="removeKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="terminateInstances">
+            <xs:element name="CloudControllerServiceInvalidKubernetesClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesClusterException" nillable="true" type="ax21:InvalidKubernetesClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateClusterStatus">
+            <xs:element name="addKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="status" nillable="true" type="ax27:ClusterStatus"/>
+                        <xs:element minOccurs="0" name="kubernetesCluster" nillable="true" type="ax29:KubernetesCluster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceUnregisteredClusterException">
+            <xs:element name="addKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="unregisterService">
+            <xs:element name="getKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getCartridgeInfo">
+            <xs:element name="getKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getCartridgeInfoResponse">
+            <xs:element name="getKubernetesClusters">
                 <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:CartridgeInfo"/>
-                    </xs:sequence>
+                    <xs:sequence/>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
+            <xs:element name="getKubernetesClustersResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesCluster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="createApplicationClusters">
+            <xs:element name="getServiceGroupSubGroups">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax26:ApplicationClusterContext"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceClusterInstanceCreationException">
+            <xs:element name="getServiceGroupSubGroupsResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="createClusterInstance">
+            <xs:element name="CloudControllerServiceInvalidPartitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="InvalidPartitionException" nillable="true" type="ax21:InvalidPartitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceNonExistingKubernetesGroupException">
+            <xs:element name="validatePartition">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesGroupException" nillable="true" type="ax21:NonExistingKubernetesGroupException"/>
+                        <xs:element minOccurs="0" name="partition" nillable="true" type="ax26:Partition"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getMasterForKubernetesGroup">
+            <xs:element name="validatePartitionResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getMasterForKubernetesGroupResponse">
+            <xs:element name="getServiceGroupCartridges">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesMaster"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getHostsForKubernetesGroup">
+            <xs:element name="getServiceGroupCartridgesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getHostsForKubernetesGroupResponse">
+            <xs:element name="getServiceGroupDependencies">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesHost"/>
+                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
+            <xs:element name="getServiceGroupDependenciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:Dependencies"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesHost">
+            <xs:element name="validateDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
-                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax26:Partition"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesHostResponse">
+            <xs:element name="validateDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceNonExistingKubernetesHostException">
+            <xs:element name="CloudControllerServiceCartridgeNotFoundException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesHostException" nillable="true" type="ax21:NonExistingKubernetesHostException"/>
+                        <xs:element minOccurs="0" name="CartridgeNotFoundException" nillable="true" type="ax21:CartridgeNotFoundException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesHost">
+            <xs:element name="startInstances">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="instanceContexts" nillable="true" type="ax26:InstanceContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesHostResponse">
+            <xs:element name="startInstancesResponse">
                 <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:MemberContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidKubernetesMasterException">
+            <xs:element name="CloudControllerServiceInvalidClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
+                        <xs:element minOccurs="0" name="InvalidClusterException" nillable="true" type="ax21:InvalidClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
+            <xs:element name="terminateInstances">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesMaster">
+            <xs:element name="updateClusterStatus">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
+                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="status" nillable="true" type="ax210:ClusterStatus"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateKubernetesMasterResponse">
+            <xs:element name="CloudControllerServiceUnregisteredClusterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="UnregisteredClusterException" nillable="true" type="ax21:UnregisteredClusterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstance">
+            <xs:element name="unregisterService">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="startInstanceResponse">
+            <xs:element name="getCartridgeInfo">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
+                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidMemberException">
+            <xs:element name="getCartridgeInfoResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:CartridgeInfo"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="terminateInstance">
+            <xs:element name="CloudControllerServiceApplicationClusterRegistrationException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="ApplicationClusterRegistrationException" nillable="true" type="ax21:ApplicationClusterRegistrationException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getCartridges">
+            <xs:element name="createApplicationClusters">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="appId" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="appClustersContexts" nillable="true" type="ax26:ApplicationClusterContext"/>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getCartridgesResponse">
+            <xs:element name="CloudControllerServiceClusterInstanceCreationException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="ClusterInstanceCreationException" nillable="true" type="ax21:ClusterInstanceCreationException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidCartridgeDefinitionException">
+            <xs:element name="createClusterInstance">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidCartridgeDefinitionException" nillable="true" type="ax21:InvalidCartridgeDefinitionException"/>
+                        <xs:element minOccurs="0" name="serviceType" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="alias" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="instanceId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="partitionId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="networkPartitionId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addCartridge">
+            <xs:element name="getMasterForKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeConfig" nillable="true" type="ax26:CartridgeConfig"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeCartridge">
+            <xs:element name="getMasterForKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesMaster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroup">
+            <xs:element name="getHostsForKubernetesCluster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getServiceGroupResponse">
+            <xs:element name="getHostsForKubernetesClusterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ServiceGroup"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesHost"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addServiceGroup">
+            <xs:element name="CloudControllerServiceInvalidKubernetesHostException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="servicegroup" nillable="true" type="ax26:ServiceGroup"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesHostException" nillable="true" type="ax21:InvalidKubernetesHostException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeServiceGroup">
+            <xs:element name="addKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesClusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getClusterContext">
+            <xs:element name="addKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getClusterContextResponse">
+            <xs:element name="updateKubernetesHost">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:ClusterContext"/>
+                        <xs:element minOccurs="0" name="kubernetesHost" nillable="true" type="ax29:KubernetesHost"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesGroup">
+            <xs:element name="updateKubernetesHostResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesGroupResponse">
+            <xs:element name="CloudControllerServiceInvalidKubernetesMasterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="InvalidKubernetesMasterException" nillable="true" type="ax21:InvalidKubernetesMasterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesHost">
+            <xs:element name="CloudControllerServiceNonExistingKubernetesMasterException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesHostId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="NonExistingKubernetesMasterException" nillable="true" type="ax21:NonExistingKubernetesMasterException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="removeKubernetesHostResponse">
+            <xs:element name="updateKubernetesMaster">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="CloudControllerServiceInvalidKubernetesGroupException">
+            <xs:element name="updateKubernetesMasterResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidKubernetesGroupException" nillable="true" type="ax21:InvalidKubernetesGroupException"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesGroup">
+            <xs:element name="startInstance">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroup" nillable="true" type="ax29:KubernetesGroup"/>
+                        <xs:element minOccurs="0" name="instanceContext" nillable="true" type="ax26:InstanceContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="addKubernetesGroupResponse">
+            <xs:element name="startInstanceResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax26:MemberContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesGroup">
+            <xs:element name="CloudControllerServiceInvalidMemberException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="kubernetesGroupId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="InvalidMemberException" nillable="true" type="ax21:InvalidMemberException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesGroupResponse">
+            <xs:element name="terminateInstance">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:KubernetesGroup"/>
+                        <xs:element minOccurs="0" name="memberId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesGroups">
+            <xs:element name="registerService">
                 <xs:complexType>
-                    <xs:sequence/>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="registrant" nillable="true" type="ax26:Registrant"/>
+                    </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getKubernetesGroupsResponse">
+            <xs:element name="registerServiceResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:KubernetesGroup"/>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
         </xs:schema>
-        <xs:schema xmlns:ax210="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.common.stratos.apache.org/xsd">
-            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
-            <xs:complexType name="KubernetesHost">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax210:Properties"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="KubernetesMaster">
-                <xs:complexContent>
-                    <xs:extension base="ax29:KubernetesHost">
-                        <xs:sequence>
-                            <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"/>
-                        </xs:sequence>
-                    </xs:extension>
-                </xs:complexContent>
-            </xs:complexType>
-            <xs:complexType name="KubernetesGroup">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="groupId" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax29:KubernetesHost"/>
-                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax29:KubernetesMaster"/>
-                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax29:PortRange"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax210:Properties"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="PortRange">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="lower" type="xs:int"/>
-                    <xs:element minOccurs="0" name="upper" type="xs:int"/>
-                </xs:sequence>
-            </xs:complexType>
-        </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://topology.domain.messaging.stratos.apache.org/xsd">
             <xs:complexType abstract="true" name="ClusterStatus">
                 <xs:complexContent>
@@ -571,7 +535,17 @@
             </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.controller.cloud.stratos.apache.org/xsd">
-            <xs:complexType name="CartridgeNotFoundException">
+            <xs:complexType name="InvalidCartridgeDefinitionException">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="InvalidIaasProviderException">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="InvalidCartridgeTypeException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
@@ -581,52 +555,52 @@
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidPartitionException">
+            <xs:complexType name="NonExistingKubernetesClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidCartridgeTypeException">
+            <xs:complexType name="NonExistingKubernetesHostException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidIaasProviderException">
+            <xs:complexType name="InvalidKubernetesClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidClusterException">
+            <xs:complexType name="InvalidPartitionException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="UnregisteredClusterException">
+            <xs:complexType name="CartridgeNotFoundException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="ApplicationClusterRegistrationException">
+            <xs:complexType name="InvalidClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="ClusterInstanceCreationException">
+            <xs:complexType name="UnregisteredClusterException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="NonExistingKubernetesGroupException">
+            <xs:complexType name="ApplicationClusterRegistrationException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesHostException">
+            <xs:complexType name="ClusterInstanceCreationException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="NonExistingKubernetesHostException">
+            <xs:complexType name="InvalidKubernetesHostException">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
@@ -646,30 +620,122 @@
                     <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidCartridgeDefinitionException">
+        </xs:schema>
+        <xs:schema xmlns:ax28="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd">
+            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+            <xs:complexType name="KubernetesCluster">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="kubernetesHosts" nillable="true" type="ax27:KubernetesHost"/>
+                    <xs:element minOccurs="0" name="kubernetesMaster" nillable="true" type="ax27:KubernetesMaster"/>
+                    <xs:element minOccurs="0" name="portRange" nillable="true" type="ax27:PortRange"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="KubernetesHost">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="hostId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="hostIpAddress" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="hostname" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax28:Properties"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="KubernetesMaster">
+                <xs:complexContent>
+                    <xs:extension base="ax27:KubernetesHost">
+                        <xs:sequence>
+                            <xs:element minOccurs="0" name="endpoint" nillable="true" type="xs:string"/>
+                        </xs:sequence>
+                    </xs:extension>
+                </xs:complexContent>
+            </xs:complexType>
+            <xs:complexType name="PortRange">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="lower" type="xs:int"/>
+                    <xs:element minOccurs="0" name="upper" type="xs:int"/>
+                </xs:sequence>
+            </xs:complexType>
+        </xs:schema>
+        <xs:schema xmlns:ax25="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.controller.cloud.stratos.apache.org/xsd">
+            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
+            <xs:complexType name="CartridgeConfig">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="category" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="container" nillable="true" type="ax23:Container"/>
+                    <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="deployerType" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="exportingProperties" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="iaasConfigs" nillable="true" type="ax23:IaasConfig"/>
+                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax23:LoadbalancerConfig"/>
+                    <xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax23:PortMapping"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="Container">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="dockerFileRepo" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="imageName" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="IaasConfig">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="className" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="credential" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="identity" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="maxInstanceLimit" type="xs:int"/>
+                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="networkInterfaces" nillable="true" type="ax23:NetworkInterfaces"/>
+                    <xs:element minOccurs="0" name="payload" nillable="true" type="xs:base64Binary"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="NetworkInterfaces">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="networkInterfaces" nillable="true" type="ax23:NetworkInterface"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="NetworkInterface">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="fixedIp" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="floatingNetworks" nillable="true" type="ax23:FloatingNetworks"/>
+                    <xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="portUuid" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="FloatingNetworks">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="floatingNetworks" nillable="true" type="ax23:FloatingNetwork"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="InvalidKubernetesGroupException">
+            <xs:complexType name="FloatingNetwork">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="floatingIP" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-        </xs:schema>
-        <xs:schema xmlns:ax25="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://domain.controller.cloud.stratos.apache.org/xsd">
-            <xs:import namespace="http://common.stratos.apache.org/xsd"/>
-            <xs:complexType name="Registrant">
+            <xs:complexType name="LoadbalancerConfig">
                 <xs:sequence>
-                    <xs:element minOccurs="0" name="autoScalerPolicyName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/>
                     <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="Persistence">
@@ -690,12 +756,41 @@
                     <xs:element minOccurs="0" name="volumeId" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
+            <xs:complexType name="PortMapping">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="port" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="protocol" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="proxyPort" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="ServiceGroup">
+                <xs:sequence>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax23:Dependencies"/>
+                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
             <xs:complexType name="Dependencies">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="killBehaviour" nillable="true" type="xs:string"/>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="startupOrders" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
+            <xs:complexType name="ClusterContext">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="kubernetesServices" nillable="true" type="xs:anyType"/>
+                    <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
+                    <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
+                    <xs:element minOccurs="0" name="timeoutInMillis" type="xs:long"/>
+                    <xs:element minOccurs="0" name="volumeRequired" type="xs:boolean"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+                </xs:sequence>
+            </xs:complexType>
             <xs:complexType name="Partition">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
@@ -784,19 +879,6 @@
                     <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="LoadbalancerConfig">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="PortMapping">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="port" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="protocol" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="proxyPort" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
             <xs:complexType name="ApplicationClusterContext">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="autoscalePolicyName" nillable="true" type="xs:string"/>
@@ -810,99 +892,17 @@
                     <xs:element minOccurs="0" name="textPayload" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
-            <xs:complexType name="CartridgeConfig">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="baseDir" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="category" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="container" nillable="true" type="ax23:Container"/>
-                    <xs:element minOccurs="0" name="defaultAutoscalingPolicy" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="defaultDeploymentPolicy" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="deployerType" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="deploymentDirs" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="displayName" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="exportingProperties" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="iaasConfigs" nillable="true" type="ax23:IaasConfig"/>
-                    <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="lbConfig" nillable="true" type="ax23:LoadbalancerConfig"/>
-                    <xs:element minOccurs="0" name="multiTenant" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="portMappings" nillable="true" type="ax23:PortMapping"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="serviceGroup" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="version" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="Container">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="dockerFileRepo" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="imageName" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="properties" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="IaasConfig">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="className" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="credential" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="identity" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="imageId" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="maxInstanceLimit" type="xs:int"/>
-                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="networkInterfaces" nillable="true" type="ax23:NetworkInterfaces"/>
-                    <xs:element minOccurs="0" name="payload" nillable="true" type="xs:base64Binary"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="type" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="NetworkInterfaces">
-                <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="networkInterfaces" nillable="true" type="ax23:NetworkInterface"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="NetworkInterface">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="fixedIp" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="floatingNetworks" nillable="true" type="ax23:FloatingNetworks"/>
-                    <xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="portUuid" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="FloatingNetworks">
-                <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="floatingNetworks" nillable="true" type="ax23:FloatingNetwork"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="FloatingNetwork">
-                <xs:sequence>
-                    <xs:element minOccurs="0" name="floatingIP" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="networkUuid" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="ServiceGroup">
-                <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="cartridges" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="dependencies" nillable="true" type="ax23:Dependencies"/>
-                    <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="subGroups" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
-            <xs:complexType name="ClusterContext">
+            <xs:complexType name="Registrant">
                 <xs:sequence>
+                    <xs:element minOccurs="0" name="autoScalerPolicyName" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="cartridgeType" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="clusterId" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="deploymentPolicyName" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="hostName" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="kubernetesServices" nillable="true" type="xs:anyType"/>
-                    <xs:element minOccurs="0" name="lbCluster" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="payload" nillable="true" type="xs:string"/>
+                    <xs:element minOccurs="0" name="persistence" nillable="true" type="ax23:Persistence"/>
                     <xs:element minOccurs="0" name="properties" nillable="true" type="ax25:Properties"/>
-                    <xs:element minOccurs="0" name="timeoutInMillis" type="xs:long"/>
-                    <xs:element minOccurs="0" name="volumeRequired" type="xs:boolean"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="volumes" nillable="true" type="ax23:Volume"/>
+                    <xs:element minOccurs="0" name="tenantRange" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
@@ -913,15 +913,6 @@
     <wsdl:message name="getCartridgesResponse">
         <wsdl:part name="parameters" element="ns:getCartridgesResponse"/>
     </wsdl:message>
-    <wsdl:message name="addKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:addKubernetesGroup"/>
-    </wsdl:message>
-    <wsdl:message name="addKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:addKubernetesGroupResponse"/>
-    </wsdl:message>
-    <wsdl:message name="CloudControllerServiceInvalidKubernetesGroupException">
-        <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidKubernetesGroupException"/>
-    </wsdl:message>
     <wsdl:message name="updateKubernetesMasterRequest">
         <wsdl:part name="parameters" element="ns:updateKubernetesMaster"/>
     </wsdl:message>
@@ -949,6 +940,15 @@
     <wsdl:message name="CloudControllerServiceApplicationClusterRegistrationException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceApplicationClusterRegistrationException"/>
     </wsdl:message>
+    <wsdl:message name="removeKubernetesClusterRequest">
+        <wsdl:part name="parameters" element="ns:removeKubernetesCluster"/>
+    </wsdl:message>
+    <wsdl:message name="removeKubernetesClusterResponse">
+        <wsdl:part name="parameters" element="ns:removeKubernetesClusterResponse"/>
+    </wsdl:message>
+    <wsdl:message name="CloudControllerServiceNonExistingKubernetesClusterException">
+        <wsdl:part name="parameters" element="ns:CloudControllerServiceNonExistingKubernetesClusterException"/>
+    </wsdl:message>
     <wsdl:message name="validateDeploymentPolicyRequest">
         <wsdl:part name="parameters" element="ns:validateDeploymentPolicy"/>
     </wsdl:message>
@@ -967,17 +967,14 @@
     <wsdl:message name="CloudControllerServiceInvalidServiceGroupException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidServiceGroupException"/>
     </wsdl:message>
-    <wsdl:message name="getMasterForKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:getMasterForKubernetesGroup"/>
+    <wsdl:message name="addKubernetesClusterRequest">
+        <wsdl:part name="parameters" element="ns:addKubernetesCluster"/>
     </wsdl:message>
-    <wsdl:message name="getMasterForKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:getMasterForKubernetesGroupResponse"/>
+    <wsdl:message name="addKubernetesClusterResponse">
+        <wsdl:part name="parameters" element="ns:addKubernetesClusterResponse"/>
     </wsdl:message>
-    <wsdl:message name="CloudControllerServiceNonExistingKubernetesGroupException">
-        <wsdl:part name="parameters" element="ns:CloudControllerServiceNonExistingKubernetesGroupException"/>
-    </wsdl:message>
-    <wsdl:message name="addServiceGroupRequest">
-        <wsdl:part name="parameters" element="ns:addServiceGroup"/>
+    <wsdl:message name="CloudControllerServiceInvalidKubernetesClusterException">
+        <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidKubernetesClusterException"/>
     </wsdl:message>
     <wsdl:message name="registerServiceRequest">
         <wsdl:part name="parameters" element="ns:registerService"/>
@@ -988,6 +985,9 @@
     <wsdl:message name="CloudControllerServiceCartridgeNotFoundException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceCartridgeNotFoundException"/>
     </wsdl:message>
+    <wsdl:message name="addServiceGroupRequest">
+        <wsdl:part name="parameters" element="ns:addServiceGroup"/>
+    </wsdl:message>
     <wsdl:message name="terminateInstanceRequest">
         <wsdl:part name="parameters" element="ns:terminateInstance"/>
     </wsdl:message>
@@ -1000,23 +1000,17 @@
     <wsdl:message name="getServiceGroupDependenciesResponse">
         <wsdl:part name="parameters" element="ns:getServiceGroupDependenciesResponse"/>
     </wsdl:message>
-    <wsdl:message name="getServiceGroupSubGroupsRequest">
-        <wsdl:part name="parameters" element="ns:getServiceGroupSubGroups"/>
-    </wsdl:message>
-    <wsdl:message name="getServiceGroupSubGroupsResponse">
-        <wsdl:part name="parameters" element="ns:getServiceGroupSubGroupsResponse"/>
-    </wsdl:message>
     <wsdl:message name="getServiceGroupRequest">
         <wsdl:part name="parameters" element="ns:getServiceGroup"/>
     </wsdl:message>
     <wsdl:message name="getServiceGroupResponse">
         <wsdl:part name="parameters" element="ns:getServiceGroupResponse"/>
     </wsdl:message>
-    <wsdl:message name="removeKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:removeKubernetesGroup"/>
+    <wsdl:message name="getServiceGroupSubGroupsRequest">
+        <wsdl:part name="parameters" element="ns:getServiceGroupSubGroups"/>
     </wsdl:message>
-    <wsdl:message name="removeKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:removeKubernetesGroupResponse"/>
+    <wsdl:message name="getServiceGroupSubGroupsResponse">
+        <wsdl:part name="parameters" element="ns:getServiceGroupSubGroupsResponse"/>
     </wsdl:message>
     <wsdl:message name="getCartridgeInfoRequest">
         <wsdl:part name="parameters" element="ns:getCartridgeInfo"/>
@@ -1033,12 +1027,6 @@
     <wsdl:message name="CloudControllerServiceInvalidKubernetesHostException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidKubernetesHostException"/>
     </wsdl:message>
-    <wsdl:message name="getKubernetesGroupsRequest">
-        <wsdl:part name="parameters" element="ns:getKubernetesGroups"/>
-    </wsdl:message>
-    <wsdl:message name="getKubernetesGroupsResponse">
-        <wsdl:part name="parameters" element="ns:getKubernetesGroupsResponse"/>
-    </wsdl:message>
     <wsdl:message name="createClusterInstanceRequest">
         <wsdl:part name="parameters" element="ns:createClusterInstance"/>
     </wsdl:message>
@@ -1051,11 +1039,11 @@
     <wsdl:message name="CloudControllerServiceUnregisteredClusterException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceUnregisteredClusterException"/>
     </wsdl:message>
-    <wsdl:message name="getKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:getKubernetesGroup"/>
+    <wsdl:message name="getHostsForKubernetesClusterRequest">
+        <wsdl:part name="parameters" element="ns:getHostsForKubernetesCluster"/>
     </wsdl:message>
-    <wsdl:message name="getKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:getKubernetesGroupResponse"/>
+    <wsdl:message name="getHostsForKubernetesClusterResponse">
+        <wsdl:part name="parameters" element="ns:getHostsForKubernetesClusterResponse"/>
     </wsdl:message>
     <wsdl:message name="removeKubernetesHostRequest">
         <wsdl:part name="parameters" element="ns:removeKubernetesHost"/>
@@ -1066,6 +1054,18 @@
     <wsdl:message name="CloudControllerServiceNonExistingKubernetesHostException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceNonExistingKubernetesHostException"/>
     </wsdl:message>
+    <wsdl:message name="getKubernetesClustersRequest">
+        <wsdl:part name="parameters" element="ns:getKubernetesClusters"/>
+    </wsdl:message>
+    <wsdl:message name="getKubernetesClustersResponse">
+        <wsdl:part name="parameters" element="ns:getKubernetesClustersResponse"/>
+    </wsdl:message>
+    <wsdl:message name="getMasterForKubernetesClusterRequest">
+        <wsdl:part name="parameters" element="ns:getMasterForKubernetesCluster"/>
+    </wsdl:message>
+    <wsdl:message name="getMasterForKubernetesClusterResponse">
+        <wsdl:part name="parameters" element="ns:getMasterForKubernetesClusterResponse"/>
+    </wsdl:message>
     <wsdl:message name="startInstancesRequest">
         <wsdl:part name="parameters" element="ns:startInstances"/>
     </wsdl:message>
@@ -1087,15 +1087,15 @@
     <wsdl:message name="CloudControllerServiceInvalidClusterException">
         <wsdl:part name="parameters" element="ns:CloudControllerServiceInvalidClusterException"/>
     </wsdl:message>
+    <wsdl:message name="updateClusterStatusRequest">
+        <wsdl:part name="parameters" element="ns:updateClusterStatus"/>
+    </wsdl:message>
     <wsdl:message name="getClusterContextRequest">
         <wsdl:part name="parameters" element="ns:getClusterContext"/>
     </wsdl:message>
     <wsdl:message name="getClusterContextResponse">
         <wsdl:part name="parameters" element="ns:getClusterContextResponse"/>
     </wsdl:message>
-    <wsdl:message name="updateClusterStatusRequest">
-        <wsdl:part name="parameters" element="ns:updateClusterStatus"/>
-    </wsdl:message>
     <wsdl:message name="updateKubernetesHostRequest">
         <wsdl:part name="parameters" element="ns:updateKubernetesHost"/>
     </wsdl:message>
@@ -1105,14 +1105,14 @@
     <wsdl:message name="removeServiceGroupRequest">
         <wsdl:part name="parameters" element="ns:removeServiceGroup"/>
     </wsdl:message>
-    <wsdl:message name="removeCartridgeRequest">
-        <wsdl:part name="parameters" element="ns:removeCartridge"/>
+    <wsdl:message name="getKubernetesClusterRequest">
+        <wsdl:part name="parameters" element="ns:getKubernetesCluster"/>
     </wsdl:message>
-    <wsdl:message name="getHostsForKubernetesGroupRequest">
-        <wsdl:part name="parameters" element="ns:getHostsForKubernetesGroup"/>
+    <wsdl:message name="getKubernetesClusterResponse">
+        <wsdl:part name="parameters" element="ns:getKubernetesClusterResponse"/>
     </wsdl:message>
-    <wsdl:message name="getHostsForKubernetesGroupResponse">
-        <wsdl:part name="parameters" element="ns:getHostsForKubernetesGroupResponse"/>
+    <wsdl:message name="removeCartridgeRequest">
+        <wsdl:part name="parameters" element="ns:removeCartridge"/>
     </wsdl:message>
     <wsdl:message name="addCartridgeRequest">
         <wsdl:part name="parameters" element="ns:addCartridge"/>
@@ -1125,11 +1125,6 @@
             <wsdl:input message="ns:getCartridgesRequest" wsaw:Action="urn:getCartridges"/>
             <wsdl:output message="ns:getCartridgesResponse" wsaw:Action="urn:getCartridgesResponse"/>
         </wsdl:operation>
-        <wsdl:operation name="addKubernetesGroup">
-            <wsdl:input message="ns:addKubernetesGroupRequest" wsaw:Action="urn:addKubernetesGroup"/>
-            <wsdl:output message="ns:addKubernetesGroupResponse" wsaw:Action="urn:addKubernetesGroupResponse"/>
-            <wsdl:fault message="ns:CloudControllerServiceInvalidKubernetesGroupException" name="CloudControllerServiceInvalidKubernetesGroupException" wsaw:Action="urn:addKubernetesGroupCloudControllerServiceInvalidKubernetesGroupException"/>
-        </wsdl:operation>
         <wsdl:operation name="updateKubernetesMaster">
             <wsdl:input message="ns:updateKubernetesMasterRequest" wsaw:Action="urn:updateKubernetesMaster"/>
             <wsdl:output message="ns:updateKubernetesMasterResponse" wsaw:Action="urn:updateKubernetesMasterResponse"/>
@@ -1145,6 +1140,11 @@
             <wsdl:input message="ns:createApplicationClustersRequest" wsaw:Action="urn:createApplicationClusters"/>
             <wsdl:fault message="ns:CloudControllerServiceApplicationClusterRegistrationException" name="CloudControllerServiceApplicationClusterRegistrationException" wsaw:Action="urn:createApplicationClustersCloudControllerServiceApplicationClusterRegistrationException"/>
         </wsdl:operation>
+        <wsdl:operation name="removeKubernetesCluster">
+            <wsdl:input message="ns:removeKubernetesClusterRequest" wsaw:Action="urn:removeKubernetesCluster"/>
+            <wsdl:output message="ns:removeKubernetesClusterResponse" wsaw:Action="urn:removeKubernetesClusterResponse"/>
+            <wsdl:fault message="ns:CloudControllerServiceNonExistingKubernetesClusterException" name="CloudControllerServiceNonExistingKubernetesClusterException" wsaw:Action="urn:removeKubernetesClusterCloudControllerServiceNonExistingKubernetesClusterException"/>
+        </wsdl:operation>
         <wsdl:operation name="validateDeploymentPolicy">
             <wsdl:input message="ns:validateDeploymentPolicyRequest" wsaw:Action="urn:validateDeploymentPolicy"/>
             <wsdl:output message="ns:validateDeploymentPolicyResponse" wsaw:Action="urn:validateDeploymentPolicyResponse"/>
@@ -1156,20 +1156,20 @@
             <wsdl:output message="ns:getServiceGroupCartridgesResponse" wsaw:Action="urn:getServiceGroupCartridgesResponse"/>
             <wsdl:fault message="ns:CloudControllerServiceInvalidServiceGroupException" name="CloudControllerServiceInvalidServiceGroupException" wsaw:Action="urn:getServiceGroupCartridgesCloudControllerServiceInvalidServiceGroupException"/>
         </wsdl:operation>
-        <wsdl:operation name="getMasterForKubernetesGroup">
-            <wsdl:input message="ns:getMasterForKubernetesGroupRequest" wsaw:Action="urn:getMasterForKubernetesGroup"/>
-            <wsdl:output message="ns:getMasterForKubernetesGroupResponse" wsaw:Action="urn:getMasterForKubernetesGroupResponse"/>
-            <wsdl:fault message="ns:CloudControllerServiceNonExistingKubernetesGroupException" name="CloudControllerServiceNonExistingKubernetesGroupException" wsaw:Action="urn:getMasterForKubernetesGroupCloudControllerServiceNonExistingKubernetesGroupException"/>
-        </wsdl:operation>
-        <wsdl:operation name="addServiceGroup">
-            <wsdl:input message="ns:addServiceGroupRequest" wsaw:Action="urn:addServiceGroup"/>
-            <wsdl:fault message="ns:CloudControllerServiceInvalidServiceGroupException" name="CloudControllerServiceInvalidServiceGroupException" wsaw:Action="urn:addServiceGroupCloudControllerServiceInvalidServiceGroupException"/>
+        <wsdl:operation name="addKubernetesCluster">
+            <wsdl:input message="ns:addKubernetesClusterRequest" wsaw:Action="urn:addKubernetesCluster"/>
+            <wsdl:output message="ns:addKubernetesClusterResponse" wsaw:Action="urn:addKubernetesClusterResponse"/>
+            <wsdl:fault message="ns:CloudControllerServiceInvalidKubernetesClusterException" name="CloudControllerServiceInvalidKubernetesClusterException" wsaw:Action="urn:addKubernetesClusterCloudControllerServiceInvalidKubernetesClusterException"/>
         </wsdl:operation>
         <wsdl:operation name="registerService">
             <wsdl:input message="ns:registerServiceRequest" wsaw:Action="urn:registerService"/>
             <wsdl:output message="ns:registerServiceResponse" wsaw:Action="urn:registerServiceResponse"/>
             <wsdl:fault message="ns:CloudControllerServiceCartridgeNotFoundException" name="CloudControllerServiceCartridgeNotFoundException" wsaw:Action="urn:registerServiceCloudControllerServiceCartridgeNotFoundException"/>
         </wsdl:operation>
+        <wsdl:operation name="addServiceGroup">
+            <wsdl:input message="ns:addServiceGroupRequest" wsaw:Action="urn:addServiceGroup"/>
+            <wsdl:fault message="ns:CloudControllerServiceInvalidServiceGroupException" name="CloudControllerServiceInvalidServiceGroupException" wsaw:Action="urn:addServiceGroupCloudControllerServiceInvalidServiceGroupException"/>
+        </wsdl:operation>
         <wsdl:operation name="terminateInstance">
             <wsdl:input message="ns:terminateInstanceRequest" wsaw:Action="urn:terminateInstance"/>
             <wsdl:fault message="ns:CloudControllerServiceInvalidMemberException" name="CloudControllerServiceInvalidMemberException" wsaw:Action="urn:terminateInstanceCloudControllerServiceInvalidMemberException"/>
@@ -1180,20 +1180,15 @@
             <wsdl:output message="ns:getServiceGroupDependenciesRespon

<TRUNCATED>

[6/6] stratos git commit: Renaming kubernetes group to kubernetes cluster and moving kubernetes domain classes to cloud controller

Posted by im...@apache.org.
Renaming kubernetes group to kubernetes cluster and moving kubernetes domain classes to cloud controller


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

Branch: refs/heads/master
Commit: 78e8011e66c00c54f2de11b59901f86202a2f70f
Parents: e68f194
Author: Imesh Gunaratne <im...@apache.org>
Authored: Mon Dec 22 03:08:31 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Mon Dec 22 08:48:37 2014 +0530

----------------------------------------------------------------------
 .../autoscaler/NetworkPartitionLbHolder.java    |  198 ---
 .../InvalidKubernetesClusterException.java      |   49 +
 .../InvalidKubernetesGroupException.java        |   49 -
 .../NonExistingKubernetesClusterException.java  |   49 +
 .../NonExistingKubernetesGroupException.java    |   49 -
 .../internal/AutoscalerServerComponent.java     |   16 +-
 .../kubernetes/KubernetesManager.java           |  465 -------
 .../autoscaler/registry/RegistryManager.java    |   50 -
 .../src/main/resources/META-INF/services.xml    |   10 +-
 .../stratos/cli/RestCommandLineService.java     |   20 +-
 .../apache/stratos/cli/StratosApplication.java  |    6 +-
 .../commands/AddKubernetesClusterCommand.java   |  112 ++
 .../cli/commands/AddKubernetesGroupCommand.java |  112 --
 .../commands/ListKubernetesClustersCommand.java |   66 +
 .../commands/ListKubernetesGroupsCommand.java   |   66 -
 .../UnDeployKubernetesClusterCommand.java       |   76 ++
 .../UnDeployKubernetesGroupCommand.java         |   76 --
 .../commands/UpdateKubernetesHostCommand.java   |    2 +-
 .../commands/UpdateKubernetesMasterCommand.java |    2 +-
 .../context/CloudControllerContext.java         |  131 +-
 .../domain/KubernetesClusterContext.java        |  189 ---
 .../domain/kubernetes/KubernetesCluster.java    |  171 +++
 .../kubernetes/KubernetesClusterContext.java    |  188 +++
 .../domain/kubernetes/KubernetesHost.java       |  146 +++
 .../domain/kubernetes/KubernetesMaster.java     |   90 ++
 .../controller/domain/kubernetes/PortRange.java |   51 +
 .../InvalidKubernetesClusterException.java      |   49 +
 .../InvalidKubernetesGroupException.java        |   49 -
 .../NonExistingKubernetesClusterException.java  |   49 +
 .../NonExistingKubernetesGroupException.java    |   49 -
 .../cloud/controller/iaases/KubernetesIaas.java |   17 +-
 .../KubernetesPartitionValidator.java           |    6 +-
 .../services/CloudControllerService.java        |   44 +-
 .../impl/CloudControllerServiceImpl.java        |  112 +-
 .../controller/util/CloudControllerUtil.java    |   76 +-
 .../ApplicationLevelNetworkPartition.java       |    9 +
 .../beans/kubernetes/KubernetesCluster.java     |   84 ++
 .../beans/kubernetes/KubernetesGroup.java       |   84 --
 .../common/kubernetes/KubernetesGroup.java      |  170 ---
 .../common/kubernetes/KubernetesHost.java       |  146 ---
 .../common/kubernetes/KubernetesMaster.java     |   90 --
 .../stratos/common/kubernetes/PortRange.java    |   51 -
 .../console/configure_form.jag                  |    4 +-
 .../configure/configure_requests.jag            |    2 +-
 .../console/controllers/rest/rest_calls.jag     |    6 +-
 .../client/CloudControllerServiceClient.java    |   46 +-
 .../rest/endpoint/api/StratosApiV41.java        |   18 +-
 .../rest/endpoint/api/StratosApiV41Utils.java   |   76 +-
 .../KubernetesClusterAlreadyExistException.java |   65 +
 .../KubernetesClusterDoesNotExistException.java |   65 +
 .../KubernetesGroupAlreadyExistException.java   |   65 -
 .../KubernetesGroupDoesNotExistException.java   |   65 -
 .../util/converter/ObjectConverter.java         |   88 +-
 .../src/main/resources/AutoScalerService.wsdl   |   46 +-
 .../pom.xml                                     |    2 +-
 .../main/resources/CloudControllerService.wsdl  | 1226 +++++++++---------
 56 files changed, 2291 insertions(+), 3007 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java
deleted file mode 100644
index f773a5e..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java
+++ /dev/null
@@ -1,198 +0,0 @@
-///*
-// * Licensed to the Apache Software Foundation (ASF) under one
-// * or more contributor license agreements. See the NOTICE file
-// * distributed with this work for additional information
-// * regarding copyright ownership. The ASF licenses this file
-// * to you under the Apache License, Version 2.0 (the
-// * "License"); you may not use this file except in compliance
-// * with the License. You may obtain a copy of the License at
-// *
-// * http://www.apache.org/licenses/LICENSE-2.0
-// *
-// * Unless required by applicable law or agreed to in writing,
-// * software distributed under the License is distributed on an
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// * KIND, either express or implied. See the License for the
-// * specific language governing permissions and limitations
-// * under the License.
-// */
-//package org.apache.stratos.autoscaler;
-//
-//import java.io.Serializable;
-//import java.util.HashMap;
-//import java.util.Map;
-//
-///**
-// * Holds LB data of a network partition.
-// *
-// */
-//public class NetworkPartitionLbHolder implements Serializable{
-//
-//    private static final long serialVersionUID = -7181166769691018046L;
-//    private final String networkPartitionId;
-//
-//    private String defaultLbClusterId;
-//
-//    private Map<String, String> serviceNameToLBClusterIdMap;
-//
-//    private Map<String, String> clusterIdToLBClusterIdMap;
-//
-//    public NetworkPartitionLbHolder(String networkPartitionId) {
-//
-//        super();
-//        this.networkPartitionId = networkPartitionId;
-//        this.setServiceToLBClusterId(new HashMap<String, String>());
-//        this.setClusterIdToLBClusterIdMap(new HashMap<String, String>());
-//    }
-//
-//    public String getDefaultLbClusterId() {
-//
-//        return this.defaultLbClusterId;
-//
-//    }
-//
-//    public void setDefaultLbClusterId(final String defaultLbClusterId) {
-//
-//        this.defaultLbClusterId = defaultLbClusterId;
-//
-//    }
-//
-//    public String getLBClusterIdOfService(final String serviceName) {
-//
-//        return this.serviceNameToLBClusterIdMap.get(serviceName);
-//
-//    }
-//
-//    public Map<String, String> getServiceToLBClusterId() {
-//
-//        return this.serviceNameToLBClusterIdMap;
-//
-//    }
-//
-//    public void setServiceToLBClusterId(final Map<String, String> serviceToLBClusterId) {
-//
-//        this.serviceNameToLBClusterIdMap = serviceToLBClusterId;
-//
-//    }
-//
-//    public void addServiceLB(final String serviceName, final String lbClusterId) {
-//        this.serviceNameToLBClusterIdMap.put(serviceName, lbClusterId);
-//    }
-//
-//    public String getLBClusterIdOfCluster(final String clusterId) {
-//
-//        return this.clusterIdToLBClusterIdMap.get(clusterId);
-//
-//    }
-//
-//    public Map<String, String> getClusterIdToLBClusterIdMap() {
-//
-//        return this.clusterIdToLBClusterIdMap;
-//
-//    }
-//
-//    public void setClusterIdToLBClusterIdMap(final Map<String, String> clusterIdToLBClusterIdMap) {
-//
-//        this.clusterIdToLBClusterIdMap = clusterIdToLBClusterIdMap;
-//
-//    }
-//
-//    public boolean removeLbClusterId(String clusterId) {
-//    	if (isLBExist(clusterId)) {
-//    		if(isDefaultLBExist() && defaultLbClusterId.equals(clusterId)) {
-//    			defaultLbClusterId = null;
-//    			return true;
-//
-//    		} else if (serviceNameToLBClusterIdMap.containsValue(clusterId)){
-//    			for (String service : serviceNameToLBClusterIdMap.keySet()) {
-//					if(clusterId.equals(serviceNameToLBClusterIdMap.get(service))) {
-//						serviceNameToLBClusterIdMap.remove(service);
-//						return true;
-//					}
-//				}
-//    		} else if (clusterIdToLBClusterIdMap.containsValue(clusterId)){
-//    			for (String cluster : clusterIdToLBClusterIdMap.keySet()) {
-//					if(clusterId.equals(clusterIdToLBClusterIdMap.get(cluster))) {
-//						clusterIdToLBClusterIdMap.remove(cluster);
-//						return true;
-//					}
-//				}
-//    		}
-//    	}
-//    	return false;
-//    }
-//
-//    public boolean isLBExist(final String clusterId) {
-//
-//        return clusterId != null &&
-//               (clusterId.equals(this.defaultLbClusterId) ||
-//                this.serviceNameToLBClusterIdMap.containsValue(clusterId) || this.clusterIdToLBClusterIdMap.containsValue(clusterId));
-//
-//    }
-//
-//    public boolean isDefaultLBExist() {
-//
-//        return defaultLbClusterId != null;
-//
-//    }
-//
-//    public boolean isServiceLBExist(String serviceName) {
-//
-//        return this.serviceNameToLBClusterIdMap.containsKey(serviceName) &&
-//                this.serviceNameToLBClusterIdMap.get(serviceName) != null;
-//
-//    }
-//
-//    public boolean isClusterLBExist(String clusterId) {
-//
-//        return this.clusterIdToLBClusterIdMap.containsKey(clusterId) &&
-//                this.clusterIdToLBClusterIdMap.get(clusterId) != null;
-//
-//    }
-//
-//    public int hashCode() {
-//
-//        final int prime = 31;
-//        int result = 1;
-//        result = prime * result + ((this.networkPartitionId == null) ? 0 : this.networkPartitionId.hashCode());
-//        return result;
-//
-//    }
-//
-//    public boolean equals(final Object obj) {
-//
-//        if (this == obj) {
-//            return true;
-//        }
-//        if (obj == null) {
-//            return false;
-//        }
-//        if (!(obj instanceof NetworkPartitionLbHolder)) {
-//            return false;
-//        }
-//        final NetworkPartitionLbHolder other = (NetworkPartitionLbHolder) obj;
-//        if (this.networkPartitionId == null) {
-//            if (other.networkPartitionId != null) {
-//                return false;
-//            }
-//        }
-//        else if (!this.networkPartitionId.equals(other.networkPartitionId)) {
-//            return false;
-//        }
-//        return true;
-//    }
-//
-//    @Override
-//	public String toString() {
-//		return "NetworkPartitionLbHolder [networkPartitionId="
-//				+ networkPartitionId + ", defaultLbClusterId="
-//				+ defaultLbClusterId + ", serviceNameToLBClusterIdMap="
-//				+ serviceNameToLBClusterIdMap + ", clusterIdToLBClusterIdMap="
-//				+ clusterIdToLBClusterIdMap + "]";
-//	}
-//
-//	public String getNetworkPartitionId() {
-//        return networkPartitionId;
-//    }
-//
-//}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesClusterException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesClusterException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesClusterException.java
new file mode 100644
index 0000000..e4321b1
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesClusterException.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.stratos.autoscaler.exception.kubernetes;
+
+/**
+ * Exception class for handling invalid Kubernetes cluster
+ */
+public class InvalidKubernetesClusterException extends Exception {
+
+    private String message;
+
+    public InvalidKubernetesClusterException(String message, Exception exception){
+        super(message, exception);
+        this.message = message;
+    }
+
+    public InvalidKubernetesClusterException(Exception exception){
+        super(exception);
+    }
+
+    public InvalidKubernetesClusterException(String msg){
+        super(msg);
+        this.message = msg;
+    }
+
+    @Override
+    public String getMessage() {
+        return this.message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesGroupException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesGroupException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesGroupException.java
deleted file mode 100644
index 5edd926..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/InvalidKubernetesGroupException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.stratos.autoscaler.exception.kubernetes;
-
-/**
- * Exception class for handling invalid Kubernetes Group
- */
-public class InvalidKubernetesGroupException extends Exception {
-
-    private String message;
-
-    public InvalidKubernetesGroupException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public InvalidKubernetesGroupException(Exception exception){
-        super(exception);
-    }
-
-    public InvalidKubernetesGroupException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesClusterException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesClusterException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesClusterException.java
new file mode 100644
index 0000000..326494c
--- /dev/null
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesClusterException.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.stratos.autoscaler.exception.kubernetes;
+
+/**
+ * Exception class for handling non-existing Kubernetes cluster
+ */
+public class NonExistingKubernetesClusterException extends Exception {
+
+    private String message;
+
+    public NonExistingKubernetesClusterException(String message, Exception exception){
+        super(message, exception);
+        this.message = message;
+    }
+
+    public NonExistingKubernetesClusterException(Exception exception){
+        super(exception);
+    }
+
+    public NonExistingKubernetesClusterException(String msg){
+        super(msg);
+        this.message = msg;
+    }
+
+    @Override
+    public String getMessage() {
+        return this.message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesGroupException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesGroupException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesGroupException.java
deleted file mode 100644
index ec982d9..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/kubernetes/NonExistingKubernetesGroupException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.stratos.autoscaler.exception.kubernetes;
-
-/**
- * Exception class for handling non-existing Kubernetes Group
- */
-public class NonExistingKubernetesGroupException extends Exception {
-
-    private String message;
-
-    public NonExistingKubernetesGroupException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public NonExistingKubernetesGroupException(Exception exception){
-        super(exception);
-    }
-
-    public NonExistingKubernetesGroupException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
index 9de9587..a5b73e5 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServerComponent.java
@@ -21,23 +21,19 @@ package org.apache.stratos.autoscaler.internal;
 import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-//import org.apache.stratos.autoscaler.NetworkPartitionLbHolder;
 import org.apache.stratos.autoscaler.applications.ApplicationSynchronizerTaskScheduler;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.autoscaler.exception.AutoScalerException;
-import org.apache.stratos.autoscaler.kubernetes.KubernetesManager;
 import org.apache.stratos.autoscaler.event.receiver.health.AutoscalerHealthStatEventReceiver;
 import org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver;
-//import org.apache.stratos.autoscaler.pojo.policy.deployment.partition.PartitionManager;
+import org.apache.stratos.autoscaler.exception.AutoScalerException;
 import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
+import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.autoscaler.registry.RegistryManager;
 import org.apache.stratos.autoscaler.status.processor.cluster.ClusterStatusProcessorChain;
 import org.apache.stratos.autoscaler.status.processor.group.GroupStatusProcessorChain;
 import org.apache.stratos.autoscaler.util.ConfUtil;
 import org.apache.stratos.autoscaler.util.ServiceReferenceHolder;
 import org.apache.stratos.cloud.controller.stub.domain.Partition;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
 import org.apache.stratos.common.threading.StratosThreadPool;
 import org.osgi.service.component.ComponentContext;
 import org.wso2.carbon.ntask.core.service.TaskService;
@@ -129,14 +125,6 @@ public class AutoscalerServerComponent {
 				PolicyManager.getInstance().addDeploymentPolicyToInformationModel(depPolicy);
 			}
 
-			// Adding KubernetesGroups stored in registry to the information model
-			List<KubernetesGroup> kubernetesGroupList = RegistryManager.getInstance().retrieveKubernetesGroups();
-			Iterator<KubernetesGroup> kubernetesGroupIterator = kubernetesGroupList.iterator();
-			while (kubernetesGroupIterator.hasNext()) {
-				KubernetesGroup kubernetesGroup = kubernetesGroupIterator.next();
-				KubernetesManager.getInstance().addKubernetesGroup(kubernetesGroup);
-			}
-
 			//starting the processor chain
 			ClusterStatusProcessorChain clusterStatusProcessorChain = new ClusterStatusProcessorChain();
 			ServiceReferenceHolder.getInstance().setClusterStatusProcessorChain(clusterStatusProcessorChain);

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/kubernetes/KubernetesManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/kubernetes/KubernetesManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/kubernetes/KubernetesManager.java
deleted file mode 100644
index e67fd8d..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/kubernetes/KubernetesManager.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.autoscaler.kubernetes;
-
-import com.google.common.net.InetAddresses;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.exception.kubernetes.*;
-import org.apache.stratos.autoscaler.registry.RegistryManager;
-import org.apache.stratos.autoscaler.util.AutoScalerConstants;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
-import org.apache.stratos.common.kubernetes.KubernetesHost;
-import org.apache.stratos.common.kubernetes.KubernetesMaster;
-
-import java.util.*;
-
-/**
- * Controller class for managing Kubernetes clusters.
- */
-public class KubernetesManager {
-    private static final Log log = LogFactory.getLog(KubernetesManager.class);
-    private static KubernetesManager instance;
-
-    // KubernetesGroups against groupId's
-    private static Map<String, KubernetesGroup> kubernetesGroupsMap = new HashMap<String, KubernetesGroup>();
-
-    // Make the constructor private to create a singleton object
-    private KubernetesManager() {
-    }
-
-    public static KubernetesManager getInstance() {
-        if (instance == null) {
-            synchronized (KubernetesManager.class) {
-                instance = new KubernetesManager();
-            }
-        }
-        return instance;
-    }
-
-
-    private void validateKubernetesGroup(KubernetesGroup kubernetesGroup) throws InvalidKubernetesGroupException {
-        if (kubernetesGroup == null) {
-            throw new InvalidKubernetesGroupException("Kubernetes group can not be null");
-        }
-        if (StringUtils.isEmpty(kubernetesGroup.getGroupId())) {
-            throw new InvalidKubernetesGroupException("Kubernetes group groupId can not be empty");
-        }
-        if (kubernetesGroupExists(kubernetesGroup)) {
-            throw new InvalidKubernetesGroupException(String.format("Kubernetes group already exists " +
-                    "[id] %s", kubernetesGroup.getGroupId()));
-        }
-        if (kubernetesGroup.getKubernetesMaster() == null) {
-            throw new InvalidKubernetesGroupException("Mandatory field master has not been set " +
-                    "for the Kubernetes group [id] " + kubernetesGroup.getGroupId());
-        }
-        if (kubernetesGroup.getPortRange() == null) {
-            throw new InvalidKubernetesGroupException("Mandatory field portRange has not been set " +
-                    "for the Kubernetes group [id] " + kubernetesGroup.getGroupId());
-        }
-
-        // Port range validation
-        if (kubernetesGroup.getPortRange().getUpper() > AutoScalerConstants.PORT_RANGE_MAX ||
-                kubernetesGroup.getPortRange().getUpper() < AutoScalerConstants.PORT_RANGE_MIN ||
-                kubernetesGroup.getPortRange().getLower() > AutoScalerConstants.PORT_RANGE_MAX ||
-                kubernetesGroup.getPortRange().getLower() < AutoScalerConstants.PORT_RANGE_MIN ||
-                kubernetesGroup.getPortRange().getUpper() < kubernetesGroup.getPortRange().getLower()) {
-            throw new InvalidKubernetesGroupException("Port range is invalid " +
-                    "for the Kubernetes group [id]" + kubernetesGroup.getGroupId());
-        }
-        try {
-            validateKubernetesMaster(kubernetesGroup.getKubernetesMaster());
-            validateKubernetesHosts(kubernetesGroup.getKubernetesHosts());
-
-            // check whether master already exists
-            if (kubernetesHostExists(kubernetesGroup.getKubernetesMaster().getHostId())) {
-                throw new InvalidKubernetesGroupException("Kubernetes host already exists [id] " +
-                        kubernetesGroup.getKubernetesMaster().getHostId());
-            }
-
-            // Check for duplicate hostIds
-            if (kubernetesGroup.getKubernetesHosts() != null) {
-                List<String> hostIds = new ArrayList<String>();
-                hostIds.add(kubernetesGroup.getKubernetesMaster().getHostId());
-
-                for (KubernetesHost kubernetesHost : kubernetesGroup.getKubernetesHosts()) {
-                    if (hostIds.contains(kubernetesHost.getHostId())) {
-                        throw new InvalidKubernetesGroupException(
-                                String.format("Kubernetes host [id] %s already defined in the request", kubernetesHost.getHostId()));
-                    }
-
-                    // check whether host already exists
-                    if (kubernetesHostExists(kubernetesHost.getHostId())) {
-                        throw new InvalidKubernetesGroupException("Kubernetes host already exists [id] " +
-                                kubernetesHost.getHostId());
-                    }
-
-                    hostIds.add(kubernetesHost.getHostId());
-                }
-            }
-
-        } catch (InvalidKubernetesHostException e) {
-            throw new InvalidKubernetesGroupException(e.getMessage());
-        } catch (InvalidKubernetesMasterException e) {
-            throw new InvalidKubernetesGroupException(e.getMessage());
-        }
-    }
-
-    private void validateKubernetesHosts(KubernetesHost[] kubernetesHosts) throws InvalidKubernetesHostException {
-        if (kubernetesHosts == null || kubernetesHosts.length == 0) {
-            return;
-        }
-        for (KubernetesHost kubernetesHost : kubernetesHosts) {
-            validateKubernetesHost(kubernetesHost);
-        }
-    }
-
-    private void validateKubernetesHost(KubernetesHost kubernetesHost) throws InvalidKubernetesHostException {
-        if (kubernetesHost == null) {
-            throw new InvalidKubernetesHostException("Kubernetes host can not be null");
-        }
-        if (StringUtils.isEmpty(kubernetesHost.getHostId())) {
-            throw new InvalidKubernetesHostException("Kubernetes host id can not be empty");
-        }
-        if (kubernetesHost.getHostIpAddress() == null) {
-            throw new InvalidKubernetesHostException("Mandatory field Kubernetes host IP address has not been set " +
-                    "for [hostId] " + kubernetesHost.getHostId());
-        }
-        if (!InetAddresses.isInetAddress(kubernetesHost.getHostIpAddress())) {
-            throw new InvalidKubernetesHostException("Kubernetes host ip address is invalid: " + kubernetesHost.getHostIpAddress());
-        }
-    }
-
-    private void validateKubernetesMaster(KubernetesMaster kubernetesMaster) throws InvalidKubernetesMasterException {
-        try {
-            validateKubernetesHost(kubernetesMaster);
-        } catch (InvalidKubernetesHostException e) {
-            throw new InvalidKubernetesMasterException(e.getMessage());
-        }
-    }
-
-
-    /**
-     * Register a KubernetesGroup in AutoScaler.
-     */
-    public synchronized boolean addKubernetesGroup(KubernetesGroup kubernetesGroup)
-            throws InvalidKubernetesGroupException {
-
-        if (kubernetesGroup == null) {
-            throw new InvalidKubernetesGroupException("Kubernetes Group can not be null");
-        }
-        if (log.isInfoEnabled()) {
-            log.info("Deploying new Kubernetes group: " + kubernetesGroup);
-        }
-        validateKubernetesGroup(kubernetesGroup);
-        try {
-            validateKubernetesEndPointViaCloudController(kubernetesGroup.getKubernetesMaster());
-
-            // Add to information model
-            addKubernetesGroupToInformationModel(kubernetesGroup);
-
-            // Persist the KubernetesGroup object in registry space
-            RegistryManager.getInstance().persistKubernetesGroup(kubernetesGroup);
-
-            if (log.isInfoEnabled()) {
-                log.info(String.format("Kubernetes group deployed successfully: [id] %s, [description] %s",
-                        kubernetesGroup.getGroupId(), kubernetesGroup.getDescription()));
-            }
-            return true;
-        } catch (Exception e) {
-            throw new InvalidKubernetesGroupException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * Register a new KubernetesHost to an existing KubernetesGroup.
-     */
-    public synchronized boolean addNewKubernetesHost(String kubernetesGroupId, KubernetesHost kubernetesHost)
-            throws InvalidKubernetesHostException, NonExistingKubernetesGroupException {
-
-        if (kubernetesHost == null) {
-            throw new InvalidKubernetesHostException("Kubernetes host can not be null");
-        }
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Kubernetes group id can not be null");
-        }
-        if (log.isInfoEnabled()) {
-            log.info("Deploying new Kubernetes Host: " + kubernetesHost + " for Kubernetes group id: " + kubernetesGroupId);
-        }
-        validateKubernetesHost(kubernetesHost);
-        try {
-            KubernetesGroup kubernetesGroupStored = getKubernetesGroup(kubernetesGroupId);
-            ArrayList<KubernetesHost> kubernetesHostArrayList;
-
-            if (kubernetesGroupStored.getKubernetesHosts() == null) {
-                kubernetesHostArrayList = new ArrayList<KubernetesHost>();
-            } else {
-                if (kubernetesHostExists(kubernetesHost.getHostId())) {
-                    throw new InvalidKubernetesHostException("Kubernetes host already exists: [id] " + kubernetesHost.getHostId());
-                }
-                kubernetesHostArrayList = new
-                        ArrayList<KubernetesHost>(Arrays.asList(kubernetesGroupStored.getKubernetesHosts()));
-            }
-            kubernetesHostArrayList.add(kubernetesHost);
-
-            // Update information model
-            kubernetesGroupStored.setKubernetesHosts(kubernetesHostArrayList.toArray(new KubernetesHost[kubernetesHostArrayList.size()]));
-
-            // Persist the new KubernetesHost wrapped under KubernetesGroup object
-            RegistryManager.getInstance().persistKubernetesGroup(kubernetesGroupStored);
-
-            if (log.isInfoEnabled()) {
-                log.info(String.format("Kubernetes host deployed successfully: [id] %s", kubernetesGroupStored.getGroupId()));
-            }
-            return true;
-        } catch (Exception e) {
-            throw new InvalidKubernetesHostException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * Update an existing Kubernetes master
-     */
-    public synchronized boolean updateKubernetesMaster(KubernetesMaster kubernetesMaster)
-            throws InvalidKubernetesMasterException, NonExistingKubernetesMasterException {
-
-        validateKubernetesMaster(kubernetesMaster);
-        if (log.isInfoEnabled()) {
-            log.info("Updating Kubernetes master: " + kubernetesMaster);
-        }
-        try {
-            KubernetesGroup kubernetesGroupStored = getKubernetesGroupContainingHost(kubernetesMaster.getHostId());
-
-            // Update information model
-            kubernetesGroupStored.setKubernetesMaster(kubernetesMaster);
-
-            // Persist the new KubernetesHost wrapped under KubernetesGroup object
-            RegistryManager.getInstance().persistKubernetesGroup(kubernetesGroupStored);
-
-            if (log.isInfoEnabled()) {
-                log.info(String.format("Kubernetes master updated successfully: [id] %s", kubernetesMaster.getHostId()));
-            }
-        } catch (Exception e) {
-            throw new InvalidKubernetesMasterException(e.getMessage(), e);
-        }
-        return false;
-    }
-
-    /**
-     * Update an existing Kubernetes host
-     */
-    public synchronized boolean updateKubernetesHost(KubernetesHost kubernetesHost)
-            throws InvalidKubernetesHostException, NonExistingKubernetesHostException {
-
-        validateKubernetesHost(kubernetesHost);
-        if (log.isInfoEnabled()) {
-            log.info("Updating Kubernetes Host: " + kubernetesHost);
-        }
-
-        try {
-            KubernetesGroup kubernetesGroupStored = getKubernetesGroupContainingHost(kubernetesHost.getHostId());
-
-            for (int i = 0; i < kubernetesGroupStored.getKubernetesHosts().length; i++) {
-                if (kubernetesGroupStored.getKubernetesHosts()[i].getHostId().equals(kubernetesHost.getHostId())) {
-
-                    // Update the information model
-                    kubernetesGroupStored.getKubernetesHosts()[i] = kubernetesHost;
-
-                    // Persist the new KubernetesHost wrapped under KubernetesGroup object
-                    RegistryManager.getInstance().persistKubernetesGroup(kubernetesGroupStored);
-
-                    if (log.isInfoEnabled()) {
-                        log.info(String.format("Kubernetes host updated successfully: [id] %s", kubernetesHost.getHostId()));
-                    }
-
-                    return true;
-                }
-            }
-        } catch (Exception e) {
-            throw new InvalidKubernetesHostException(e.getMessage(), e);
-        }
-        throw new NonExistingKubernetesHostException("Kubernetes host not found [id] " + kubernetesHost.getHostId());
-    }
-
-    /**
-     * Remove a registered Kubernetes group from registry
-     */
-    public synchronized boolean removeKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Kubernetes group id can not be empty");
-        }
-        if (log.isInfoEnabled()) {
-            log.info("Removing Kubernetes group: " + kubernetesGroupId);
-        }
-        try {
-            KubernetesGroup kubernetesGroupStored = getKubernetesGroup(kubernetesGroupId);
-
-            // Remove entry from information model
-            kubernetesGroupsMap.remove(kubernetesGroupId);
-
-            // Persist the new KubernetesHost wrapped under KubernetesGroup object
-            RegistryManager.getInstance().removeKubernetesGroup(kubernetesGroupStored);
-
-            if (log.isInfoEnabled()) {
-                log.info(String.format("Kubernetes group removed successfully: [id] %s", kubernetesGroupId));
-            }
-            return true;
-        } catch (Exception e) {
-            throw new NonExistingKubernetesGroupException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * Remove a registered Kubernetes host from registry
-     */
-    public synchronized boolean removeKubernetesHost(String kubernetesHostId) throws NonExistingKubernetesHostException {
-        if (kubernetesHostId == null) {
-            throw new NonExistingKubernetesHostException("Kubernetes host id can not be null");
-        }
-        if (log.isInfoEnabled()) {
-            log.info("Removing Kubernetes Host: " + kubernetesHostId);
-        }
-        try {
-            KubernetesGroup kubernetesGroupStored = getKubernetesGroupContainingHost(kubernetesHostId);
-
-            // Kubernetes master can not be removed
-            if (kubernetesGroupStored.getKubernetesMaster().getHostId().equals(kubernetesHostId)) {
-                throw new NonExistingKubernetesHostException("Kubernetes master is not allowed to be removed [id] " + kubernetesHostId);
-            }
-
-            List<KubernetesHost> kubernetesHostList = new ArrayList<KubernetesHost>();
-            for (KubernetesHost kubernetesHost : kubernetesGroupStored.getKubernetesHosts()) {
-                if (!kubernetesHost.getHostId().equals(kubernetesHostId)) {
-                    kubernetesHostList.add(kubernetesHost);
-                }
-            }
-            // member count will be equal only when host object was not found
-            if (kubernetesHostList.size() == kubernetesGroupStored.getKubernetesHosts().length) {
-                throw new NonExistingKubernetesHostException("Kubernetes host not found for [id] " + kubernetesHostId);
-            }
-            KubernetesHost[] kubernetesHostsArray = new KubernetesHost[kubernetesHostList.size()];
-            kubernetesHostList.toArray(kubernetesHostsArray);
-
-            // Update information model
-            kubernetesGroupStored.setKubernetesHosts(kubernetesHostsArray);
-
-            // Persist the updated KubernetesGroup object
-            RegistryManager.getInstance().persistKubernetesGroup(kubernetesGroupStored);
-
-            if (log.isInfoEnabled()) {
-                log.info(String.format("Kubernetes host removed successfully: [id] %s", kubernetesHostId));
-            }
-
-            return true;
-        } catch (Exception e) {
-            throw new NonExistingKubernetesHostException(e.getMessage(), e);
-        }
-    }
-
-    private void addKubernetesGroupToInformationModel(KubernetesGroup kubernetesGroup) {
-        kubernetesGroupsMap.put(kubernetesGroup.getGroupId(), kubernetesGroup);
-    }
-
-    private void validateKubernetesEndPointViaCloudController(KubernetesMaster kubernetesMaster)
-            throws KubernetesEndpointValidationException {
-        // TODO
-    }
-
-    public boolean kubernetesGroupExists(KubernetesGroup kubernetesGroup) {
-        return kubernetesGroupsMap.containsKey(kubernetesGroup.getGroupId());
-    }
-
-    public boolean kubernetesHostExists(String hostId) {
-        if (StringUtils.isEmpty(hostId)) {
-            return false;
-        }
-        for (KubernetesGroup kubernetesGroup : kubernetesGroupsMap.values()) {
-            if (kubernetesGroup.getKubernetesHosts() != null) {
-                for (KubernetesHost kubernetesHost : kubernetesGroup.getKubernetesHosts()) {
-                    if (kubernetesHost.getHostId().equals(hostId)) {
-                        return true;
-                    }
-                }
-            }
-            if (hostId.equals(kubernetesGroup.getKubernetesMaster().getHostId())) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public KubernetesHost[] getKubernetesHostsInGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Cannot find for empty group id");
-        }
-
-        KubernetesGroup kubernetesGroup = kubernetesGroupsMap.get(kubernetesGroupId);
-        if (kubernetesGroup != null) {
-            return kubernetesGroup.getKubernetesHosts();
-        }
-        throw new NonExistingKubernetesGroupException("Kubernetes group not found for group id: " + kubernetesGroupId);
-    }
-
-    public KubernetesMaster getKubernetesMasterInGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Cannot find for empty group id");
-        }
-        KubernetesGroup kubernetesGroup = kubernetesGroupsMap.get(kubernetesGroupId);
-        if (kubernetesGroup != null) {
-            return kubernetesGroup.getKubernetesMaster();
-        }
-        throw new NonExistingKubernetesGroupException("Kubernetes master not found for group id: " + kubernetesGroupId);
-    }
-
-    public KubernetesGroup getKubernetesGroup(String groupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(groupId)) {
-            throw new NonExistingKubernetesGroupException("Cannot find for empty group id");
-        }
-        KubernetesGroup kubernetesGroup = kubernetesGroupsMap.get(groupId);
-        if (kubernetesGroup != null) {
-            return kubernetesGroup;
-        }
-        throw new NonExistingKubernetesGroupException("Kubernetes group not found for id: " + groupId);
-    }
-
-    public KubernetesGroup getKubernetesGroupContainingHost(String hostId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(hostId)) {
-            return null;
-        }
-        for (KubernetesGroup kubernetesGroup : kubernetesGroupsMap.values()) {
-            if (hostId.equals(kubernetesGroup.getKubernetesMaster().getHostId())) {
-                return kubernetesGroup;
-            }
-            if (kubernetesGroup.getKubernetesHosts() != null) {
-                for (KubernetesHost kubernetesHost : kubernetesGroup.getKubernetesHosts()) {
-                    if (kubernetesHost.getHostId().equals(hostId)) {
-                        return kubernetesGroup;
-                    }
-                }
-            }
-        }
-        throw new NonExistingKubernetesGroupException("Kubernetes group not found containing host id: " + hostId);
-    }
-
-    public KubernetesGroup[] getKubernetesGroups() {
-        return kubernetesGroupsMap.values().toArray(new KubernetesGroup[kubernetesGroupsMap.size()]);
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/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 5cb8bda..bdd8a7e 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
@@ -34,7 +34,6 @@ import org.apache.stratos.autoscaler.util.Deserializer;
 import org.apache.stratos.autoscaler.util.Serializer;
 import org.apache.stratos.autoscaler.util.ServiceReferenceHolder;
 import org.apache.stratos.cloud.controller.stub.domain.Partition;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
 import org.apache.stratos.messaging.domain.applications.Application;
 import org.wso2.carbon.context.PrivilegedCarbonContext;
 import org.wso2.carbon.registry.core.Registry;
@@ -572,53 +571,4 @@ public class RegistryManager {
         }
 
     }
-
-    public void persistKubernetesGroup(KubernetesGroup kubernetesGroup) {
-        String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE + AutoScalerConstants.KUBERNETES_RESOURCE
-                + "/" + kubernetesGroup.getGroupId();
-        persist(kubernetesGroup, resourcePath);
-        if (log.isDebugEnabled()) {
-            log.debug(String.format("KubernetesGroup written to registry: [id] %s ", kubernetesGroup.getGroupId()));
-        }
-    }
-
-    public List<KubernetesGroup> retrieveKubernetesGroups() {
-        List<KubernetesGroup> kubernetesGroupList = new ArrayList<KubernetesGroup>();
-        RegistryManager registryManager = RegistryManager.getInstance();
-        String[] kubernetesGroupResourceList = (String[]) registryManager.retrieve(AutoScalerConstants.AUTOSCALER_RESOURCE + AutoScalerConstants.KUBERNETES_RESOURCE);
-
-        if (kubernetesGroupResourceList != null) {
-            KubernetesGroup kubernetesGroup;
-            for (String resourcePath : kubernetesGroupResourceList) {
-                Object serializedObj = registryManager.retrieve(resourcePath);
-                if (serializedObj != null) {
-                    try {
-                        Object dataObj = Deserializer.deserializeFromByteArray((byte[]) serializedObj);
-                        if (dataObj instanceof KubernetesGroup) {
-                            kubernetesGroup = (KubernetesGroup) dataObj;
-                            if (log.isDebugEnabled()) {
-                                log.debug(kubernetesGroup.toString());
-                            }
-                            kubernetesGroupList.add(kubernetesGroup);
-                        } else {
-                            return null;
-                        }
-                    } catch (Exception e) {
-                        String msg = "Unable to retrieve data from Registry. Hence, any historical Kubernetes groups deployments will not get reflected.";
-                        log.warn(msg, e);
-                    }
-                }
-            }
-        }
-        return kubernetesGroupList;
-    }
-
-    public void removeKubernetesGroup(KubernetesGroup kubernetesGroup) {
-        String resourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE + AutoScalerConstants.KUBERNETES_RESOURCE + "/" + kubernetesGroup.getGroupId();
-        this.delete(resourcePath);
-        if (log.isDebugEnabled()) {
-            log.debug(String.format("Kubernetes group deleted from registry: [id] %s", kubernetesGroup.getGroupId()));
-        }
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.autoscaler/src/main/resources/META-INF/services.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/resources/META-INF/services.xml b/components/org.apache.stratos.autoscaler/src/main/resources/META-INF/services.xml
index 02d1b27..002e8a5 100644
--- a/components/org.apache.stratos.autoscaler/src/main/resources/META-INF/services.xml
+++ b/components/org.apache.stratos.autoscaler/src/main/resources/META-INF/services.xml
@@ -63,7 +63,7 @@
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/view/partition</parameter>
         </operation>
 
-        <operation name="addKubernetesGroup">
+        <operation name="addKubernetesCluster">
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/add/kubernetes</parameter>
         </operation>
 
@@ -79,7 +79,7 @@
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/add/kubernetes</parameter>
         </operation>
 
-        <operation name="removeKubernetesGroup">
+        <operation name="removeKubernetesCluster">
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/add/kubernetes</parameter>
         </operation>
 
@@ -87,15 +87,15 @@
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/add/kubernetes</parameter>
         </operation>
 
-        <operation name="getAllKubernetesGroups">
+        <operation name="getAllKubernetesClusters">
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/view/kubernetes</parameter>
         </operation>
 
-        <operation name="getHostsForKubernetesGroup">
+        <operation name="getHostsForKubernetesCluster">
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/view/kubernetes</parameter>
         </operation>
 
-        <operation name="getMasterForKubernetesGroup">
+        <operation name="getMasterForKubernetesCluster">
             <parameter name="AuthorizationAction" locked="true">/permission/admin/manage/view/kubernetes</parameter>
         </operation>
     </service>

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 517ac04..b91d505 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -41,7 +41,7 @@ import org.apache.stratos.common.beans.autoscaler.policy.autoscale.AutoscalePoli
 import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
 import org.apache.stratos.common.beans.cartridge.definition.IaasProviderBean;
-import org.apache.stratos.common.beans.kubernetes.KubernetesGroup;
+import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
 import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
 import org.apache.stratos.common.beans.topology.Cluster;
 import org.apache.stratos.manager.composite.application.beans.ApplicationDefinition;
@@ -765,28 +765,28 @@ public class RestCommandLineService {
         try {
             Type listType = new TypeToken<ArrayList<KubernetesHost>>() {
             }.getType();
-            List<KubernetesGroup> list = (List<KubernetesGroup>) restClient.
+            List<KubernetesCluster> list = (List<KubernetesCluster>) restClient.
                     listEntity(ENDPOINT_LIST_KUBERNETES_CLUSTERS, listType, "kubernetes cluster");
             if ((list != null) && (list.size() > 0)) {
-                RowMapper<KubernetesGroup> partitionMapper = new RowMapper<KubernetesGroup>() {
-                    public String[] getData(KubernetesGroup kubernetesGroup) {
+                RowMapper<KubernetesCluster> partitionMapper = new RowMapper<KubernetesCluster>() {
+                    public String[] getData(KubernetesCluster kubernetesCluster) {
                         String[] data = new String[2];
-                        data[0] = kubernetesGroup.getGroupId();
-                        data[1] = kubernetesGroup.getDescription();
+                        data[0] = kubernetesCluster.getClusterId();
+                        data[1] = kubernetesCluster.getDescription();
                         return data;
                     }
                 };
 
-                KubernetesGroup[] array = new KubernetesGroup[list.size()];
+                KubernetesCluster[] array = new KubernetesCluster[list.size()];
                 array = list.toArray(array);
-                System.out.println("Kubernetes groups found:");
+                System.out.println("Kubernetes clusters found:");
                 CliUtils.printTable(array, partitionMapper, "Group ID", "Description");
             } else {
-                System.out.println("No kubernetes groups found");
+                System.out.println("No kubernetes clusters found");
                 return;
             }
         } catch (Exception e) {
-            String message = "Could not list kubernetes groups";
+            String message = "Could not list kubernetes clusters";
             printError(message, e);
         }
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
index 5af9fc5..7ddf1bc 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
@@ -141,10 +141,10 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
 		command = new SyncCommand();
 		commands.put(command.getName(), command);
 
-        command = new AddKubernetesGroupCommand();
+        command = new AddKubernetesClusterCommand();
         commands.put(command.getName(), command);
 
-        command = new ListKubernetesGroupsCommand();
+        command = new ListKubernetesClustersCommand();
         commands.put(command.getName(), command);
 
         command = new ListKubernetesHostsCommand();
@@ -153,7 +153,7 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
         command = new AddKubernetesHostCommand();
         commands.put(command.getName(), command);
 
-        command = new UnDeployKubernetesGroupCommand();
+        command = new UnDeployKubernetesClusterCommand();
         commands.put(command.getName(), command);
 
         command = new UndeployKubernetesHostCommand();

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java
new file mode 100644
index 0000000..0ca4246
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java
@@ -0,0 +1,112 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+
+ *  http://www.apache.org/licenses/LICENSE-2.0
+
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.stratos.cli.commands;
+
+import org.apache.commons.cli.*;
+import org.apache.stratos.cli.Command;
+import org.apache.stratos.cli.RestCommandLineService;
+import org.apache.stratos.cli.StratosCommandContext;
+import org.apache.stratos.cli.exception.CommandException;
+import org.apache.stratos.cli.utils.CliConstants;
+import org.apache.stratos.cli.utils.CliUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+/**
+ * Deploy kubernetes cluster command.
+ */
+public class AddKubernetesClusterCommand implements Command<StratosCommandContext> {
+
+    private static final Logger logger = LoggerFactory.getLogger(AddKubernetesClusterCommand.class);
+
+    private Options options;
+
+    public AddKubernetesClusterCommand() {
+        options = new Options();
+        Option option = new Option(CliConstants.RESOURCE_PATH, CliConstants.RESOURCE_PATH_LONG_OPTION, true,
+                "Kubernetes cluster resource path");
+        option.setArgName("resource path");
+        options.addOption(option);
+    }
+
+    @Override
+    public String getName() {
+        return "add-kubernetes-cluster";
+    }
+
+    @Override
+    public String getDescription() {
+        return "Add kubernetes cluster";
+    }
+
+    @Override
+    public String getArgumentSyntax() {
+        return null;
+    }
+
+    @Override
+    public Options getOptions() {
+        return options;
+    }
+
+    @Override
+    public int execute(StratosCommandContext context, String[] args) throws CommandException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("Executing command: ", getName());
+        }
+
+        if ((args == null) || (args.length <= 0)) {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+
+        try {
+            CommandLineParser parser = new GnuParser();
+            CommandLine commandLine = parser.parse(options, args);
+            if (commandLine.hasOption(CliConstants.RESOURCE_PATH)) {
+                String resourcePath = commandLine.getOptionValue(CliConstants.RESOURCE_PATH);
+                if (resourcePath == null) {
+                    System.out.println("usage: " + getName() + " [-" + CliConstants.RESOURCE_PATH + " " + CliConstants.RESOURCE_PATH_LONG_OPTION + "]");
+                    return CliConstants.COMMAND_FAILED;
+                }
+                String resourceFileContent = CliUtils.readResource(resourcePath);
+                RestCommandLineService.getInstance().addKubernetesCluster(resourceFileContent);
+                return CliConstants.COMMAND_SUCCESSFULL;
+            } else {
+                System.out.println("usage: " + getName() + " [-" + CliConstants.RESOURCE_PATH + " " + CliConstants.RESOURCE_PATH_LONG_OPTION + "]");
+                return CliConstants.COMMAND_FAILED;
+            }
+        } catch (ParseException e) {
+            logger.error("Error parsing arguments", e);
+            System.out.println(e.getMessage());
+            return CliConstants.COMMAND_FAILED;
+        } catch (IOException e) {
+            System.out.println("Invalid resource path");
+            return CliConstants.COMMAND_FAILED;
+        } catch (Exception e) {
+            String message = "Unknown error occurred: " + e.getMessage();
+            System.out.println(message);
+            logger.error(message, e);
+            return CliConstants.COMMAND_FAILED;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesGroupCommand.java
deleted file mode 100644
index 41054ec..0000000
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesGroupCommand.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.stratos.cli.commands;
-
-import org.apache.commons.cli.*;
-import org.apache.stratos.cli.Command;
-import org.apache.stratos.cli.RestCommandLineService;
-import org.apache.stratos.cli.StratosCommandContext;
-import org.apache.stratos.cli.exception.CommandException;
-import org.apache.stratos.cli.utils.CliConstants;
-import org.apache.stratos.cli.utils.CliUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-
-/**
- * Deploy kubernetes group command.
- */
-public class AddKubernetesGroupCommand implements Command<StratosCommandContext> {
-
-    private static final Logger logger = LoggerFactory.getLogger(AddKubernetesGroupCommand.class);
-
-    private Options options;
-
-    public AddKubernetesGroupCommand() {
-        options = new Options();
-        Option option = new Option(CliConstants.RESOURCE_PATH, CliConstants.RESOURCE_PATH_LONG_OPTION, true,
-                "Kubernetes group resource path");
-        option.setArgName("resource path");
-        options.addOption(option);
-    }
-
-    @Override
-    public String getName() {
-        return "add-kubernetes-group";
-    }
-
-    @Override
-    public String getDescription() {
-        return "Add kubernetes group";
-    }
-
-    @Override
-    public String getArgumentSyntax() {
-        return null;
-    }
-
-    @Override
-    public Options getOptions() {
-        return options;
-    }
-
-    @Override
-    public int execute(StratosCommandContext context, String[] args) throws CommandException {
-        if (logger.isDebugEnabled()) {
-            logger.debug("Executing command: ", getName());
-        }
-
-        if ((args == null) || (args.length <= 0)) {
-            context.getStratosApplication().printUsage(getName());
-            return CliConstants.COMMAND_FAILED;
-        }
-
-        try {
-            CommandLineParser parser = new GnuParser();
-            CommandLine commandLine = parser.parse(options, args);
-            if (commandLine.hasOption(CliConstants.RESOURCE_PATH)) {
-                String resourcePath = commandLine.getOptionValue(CliConstants.RESOURCE_PATH);
-                if (resourcePath == null) {
-                    System.out.println("usage: " + getName() + " [-" + CliConstants.RESOURCE_PATH + " " + CliConstants.RESOURCE_PATH_LONG_OPTION + "]");
-                    return CliConstants.COMMAND_FAILED;
-                }
-                String resourceFileContent = CliUtils.readResource(resourcePath);
-                RestCommandLineService.getInstance().addKubernetesCluster(resourceFileContent);
-                return CliConstants.COMMAND_SUCCESSFULL;
-            } else {
-                System.out.println("usage: " + getName() + " [-" + CliConstants.RESOURCE_PATH + " " + CliConstants.RESOURCE_PATH_LONG_OPTION + "]");
-                return CliConstants.COMMAND_FAILED;
-            }
-        } catch (ParseException e) {
-            logger.error("Error parsing arguments", e);
-            System.out.println(e.getMessage());
-            return CliConstants.COMMAND_FAILED;
-        } catch (IOException e) {
-            System.out.println("Invalid resource path");
-            return CliConstants.COMMAND_FAILED;
-        } catch (Exception e) {
-            String message = "Unknown error occurred: " + e.getMessage();
-            System.out.println(message);
-            logger.error(message, e);
-            return CliConstants.COMMAND_FAILED;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java
new file mode 100644
index 0000000..9e926d1
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java
@@ -0,0 +1,66 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+
+ *  http://www.apache.org/licenses/LICENSE-2.0
+
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.stratos.cli.commands;
+
+import org.apache.commons.cli.Options;
+import org.apache.stratos.cli.Command;
+import org.apache.stratos.cli.RestCommandLineService;
+import org.apache.stratos.cli.StratosCommandContext;
+import org.apache.stratos.cli.exception.CommandException;
+import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ListKubernetesClustersCommand implements Command<StratosCommandContext> {
+
+	private static final Logger logger = LoggerFactory.getLogger(ListKubernetesClustersCommand.class);
+
+	public ListKubernetesClustersCommand() {
+	}
+
+	public String getName() {
+		return "list-kubernetes-clusters";
+	}
+
+	public String getDescription() {
+		return "List kubernetes clusters";
+	}
+
+	public String getArgumentSyntax() {
+		return null;
+	}
+
+	public int execute(StratosCommandContext context, String[] args) throws CommandException {
+		if (logger.isDebugEnabled()) {
+			logger.debug("Executing command: ", getName());
+		}
+		if ((args == null) || (args.length == 0)) {
+            RestCommandLineService.getInstance().listKubernetesClusters();
+			return CliConstants.COMMAND_SUCCESSFULL;
+		} else {
+			context.getStratosApplication().printUsage(getName());
+			return CliConstants.COMMAND_FAILED;
+		}
+	}
+
+	public Options getOptions() {
+		return null;
+	}
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesGroupsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesGroupsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesGroupsCommand.java
deleted file mode 100644
index 9e86d46..0000000
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesGroupsCommand.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.stratos.cli.commands;
-
-import org.apache.commons.cli.Options;
-import org.apache.stratos.cli.Command;
-import org.apache.stratos.cli.RestCommandLineService;
-import org.apache.stratos.cli.StratosCommandContext;
-import org.apache.stratos.cli.exception.CommandException;
-import org.apache.stratos.cli.utils.CliConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ListKubernetesGroupsCommand implements Command<StratosCommandContext> {
-
-	private static final Logger logger = LoggerFactory.getLogger(ListKubernetesGroupsCommand.class);
-
-	public ListKubernetesGroupsCommand() {
-	}
-
-	public String getName() {
-		return "list-kubernetes-groups";
-	}
-
-	public String getDescription() {
-		return "List kubernetes groups";
-	}
-
-	public String getArgumentSyntax() {
-		return null;
-	}
-
-	public int execute(StratosCommandContext context, String[] args) throws CommandException {
-		if (logger.isDebugEnabled()) {
-			logger.debug("Executing command: ", getName());
-		}
-		if ((args == null) || (args.length == 0)) {
-            RestCommandLineService.getInstance().listKubernetesClusters();
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
-	}
-
-	public Options getOptions() {
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesClusterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesClusterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesClusterCommand.java
new file mode 100644
index 0000000..4276a67
--- /dev/null
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesClusterCommand.java
@@ -0,0 +1,76 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+
+ *  http://www.apache.org/licenses/LICENSE-2.0
+
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.stratos.cli.commands;
+
+import org.apache.commons.cli.*;
+import org.apache.stratos.cli.Command;
+import org.apache.stratos.cli.RestCommandLineService;
+import org.apache.stratos.cli.StratosCommandContext;
+import org.apache.stratos.cli.exception.CommandException;
+import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Un-deploy kubernetes cluster command.
+ */
+public class UnDeployKubernetesClusterCommand implements Command<StratosCommandContext> {
+
+    private static final Logger logger = LoggerFactory.getLogger(UnDeployKubernetesClusterCommand.class);
+
+    public UnDeployKubernetesClusterCommand() {
+    }
+
+    @Override
+    public String getName() {
+        return "undeploy-kubernetes-cluster";
+    }
+
+    @Override
+    public String getDescription() {
+        return "Undeploy kubernetes cluster";
+    }
+
+    @Override
+    public String getArgumentSyntax() {
+        return "[cluster-id]";
+    }
+
+    @Override
+    public Options getOptions() {
+        return null;
+    }
+
+    @Override
+    public int execute(StratosCommandContext context, String[] args) throws CommandException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("Executing command: ", getName());
+        }
+
+        if ((args == null) || (args.length <= 0)) {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+
+        String clusterId = args[0];
+        RestCommandLineService.getInstance().undeployKubernetesCluster(clusterId);
+        return CliConstants.COMMAND_SUCCESSFULL;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesGroupCommand.java
deleted file mode 100644
index d0fdf45..0000000
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UnDeployKubernetesGroupCommand.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.stratos.cli.commands;
-
-import org.apache.commons.cli.*;
-import org.apache.stratos.cli.Command;
-import org.apache.stratos.cli.RestCommandLineService;
-import org.apache.stratos.cli.StratosCommandContext;
-import org.apache.stratos.cli.exception.CommandException;
-import org.apache.stratos.cli.utils.CliConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Un-deploy kubernetes group command.
- */
-public class UnDeployKubernetesGroupCommand implements Command<StratosCommandContext> {
-
-    private static final Logger logger = LoggerFactory.getLogger(UnDeployKubernetesGroupCommand.class);
-
-    public UnDeployKubernetesGroupCommand() {
-    }
-
-    @Override
-    public String getName() {
-        return "undeploy-kubernetes-group";
-    }
-
-    @Override
-    public String getDescription() {
-        return "Undeploy kubernetes group";
-    }
-
-    @Override
-    public String getArgumentSyntax() {
-        return "[cluster-id]";
-    }
-
-    @Override
-    public Options getOptions() {
-        return null;
-    }
-
-    @Override
-    public int execute(StratosCommandContext context, String[] args) throws CommandException {
-        if (logger.isDebugEnabled()) {
-            logger.debug("Executing command: ", getName());
-        }
-
-        if ((args == null) || (args.length <= 0)) {
-            context.getStratosApplication().printUsage(getName());
-            return CliConstants.COMMAND_FAILED;
-        }
-
-        String clusterId = args[0];
-        RestCommandLineService.getInstance().undeployKubernetesCluster(clusterId);
-        return CliConstants.COMMAND_SUCCESSFULL;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
index 0688d65..e39f6c0 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
@@ -35,7 +35,7 @@ import java.io.IOException;
  */
 public class UpdateKubernetesHostCommand implements Command<StratosCommandContext> {
 
-    private static final Logger logger = LoggerFactory.getLogger(AddKubernetesGroupCommand.class);
+    private static final Logger logger = LoggerFactory.getLogger(UpdateKubernetesHostCommand.class);
 
     private Options options;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
index 4c52f37..ceab67a 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
@@ -35,7 +35,7 @@ import java.io.IOException;
  */
 public class UpdateKubernetesMasterCommand implements Command<StratosCommandContext> {
 
-    private static final Logger logger = LoggerFactory.getLogger(AddKubernetesGroupCommand.class);
+    private static final Logger logger = LoggerFactory.getLogger(UpdateKubernetesMasterCommand.class);
 
     private Options options;
 


[4/6] stratos git commit: Renaming kubernetes group to kubernetes cluster and moving kubernetes domain classes to cloud controller

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
index b2af060..0e28a68 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/util/CloudControllerUtil.java
@@ -27,16 +27,15 @@ import org.apache.stratos.cloud.controller.context.CloudControllerContext;
 import org.apache.stratos.cloud.controller.domain.*;
 import org.apache.stratos.cloud.controller.exception.CloudControllerException;
 import org.apache.stratos.cloud.controller.exception.InvalidIaasProviderException;
-import org.apache.stratos.cloud.controller.exception.InvalidKubernetesGroupException;
+import org.apache.stratos.cloud.controller.exception.InvalidKubernetesClusterException;
 import org.apache.stratos.cloud.controller.exception.InvalidKubernetesHostException;
 import org.apache.stratos.cloud.controller.exception.InvalidKubernetesMasterException;
 import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.registry.Deserializer;
 import org.apache.stratos.cloud.controller.registry.RegistryManager;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
-import org.apache.stratos.common.kubernetes.KubernetesHost;
-import org.apache.stratos.common.kubernetes.KubernetesMaster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesHost;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesMaster;
 import org.apache.stratos.messaging.domain.topology.Topology;
 import org.wso2.carbon.registry.core.exceptions.RegistryException;
 
@@ -370,61 +369,61 @@ public class CloudControllerUtil {
 		return clusterId;
 	}
 	
-	public static void validateKubernetesGroup(KubernetesGroup kubernetesGroup) throws InvalidKubernetesGroupException {
+	public static void validateKubernetesCluster(KubernetesCluster kubernetesCluster) throws InvalidKubernetesClusterException {
         CloudControllerContext context = CloudControllerContext.getInstance();
 	    
-	    if (kubernetesGroup == null) {
-            throw new InvalidKubernetesGroupException("Kubernetes group can not be null");
+	    if (kubernetesCluster == null) {
+            throw new InvalidKubernetesClusterException("Kubernetes cluster can not be null");
         }
-        if (StringUtils.isEmpty(kubernetesGroup.getGroupId())) {
-            throw new InvalidKubernetesGroupException("Kubernetes group groupId can not be empty");
+        if (StringUtils.isEmpty(kubernetesCluster.getClusterId())) {
+            throw new InvalidKubernetesClusterException("Kubernetes cluster groupId can not be empty");
         }
-        if (context.kubernetesGroupExists(kubernetesGroup)) {
-            throw new InvalidKubernetesGroupException(String.format("Kubernetes group already exists " +
-                    "[id] %s", kubernetesGroup.getGroupId()));
+        if (context.kubernetesClusterExists(kubernetesCluster)) {
+            throw new InvalidKubernetesClusterException(String.format("Kubernetes cluster already exists " +
+                    "[id] %s", kubernetesCluster.getClusterId()));
         }
-        if (kubernetesGroup.getKubernetesMaster() == null) {
-            throw new InvalidKubernetesGroupException("Mandatory field master has not been set " +
-                    "for the Kubernetes group [id] " + kubernetesGroup.getGroupId());
+        if (kubernetesCluster.getKubernetesMaster() == null) {
+            throw new InvalidKubernetesClusterException("Mandatory field master has not been set " +
+                    "for the Kubernetes cluster [id] " + kubernetesCluster.getClusterId());
         }
-        if (kubernetesGroup.getPortRange() == null) {
-            throw new InvalidKubernetesGroupException("Mandatory field portRange has not been set " +
-                    "for the Kubernetes group [id] " + kubernetesGroup.getGroupId());
+        if (kubernetesCluster.getPortRange() == null) {
+            throw new InvalidKubernetesClusterException("Mandatory field portRange has not been set " +
+                    "for the Kubernetes cluster [id] " + kubernetesCluster.getClusterId());
         }
 
         // Port range validation
-        if (kubernetesGroup.getPortRange().getUpper() > CloudControllerConstants.PORT_RANGE_MAX ||
-                kubernetesGroup.getPortRange().getUpper() < CloudControllerConstants.PORT_RANGE_MIN ||
-                kubernetesGroup.getPortRange().getLower() > CloudControllerConstants.PORT_RANGE_MAX ||
-                kubernetesGroup.getPortRange().getLower() < CloudControllerConstants.PORT_RANGE_MIN ||
-                kubernetesGroup.getPortRange().getUpper() < kubernetesGroup.getPortRange().getLower()) {
-            throw new InvalidKubernetesGroupException("Port range is invalid " +
-                    "for the Kubernetes group [id]" + kubernetesGroup.getGroupId());
+        if (kubernetesCluster.getPortRange().getUpper() > CloudControllerConstants.PORT_RANGE_MAX ||
+                kubernetesCluster.getPortRange().getUpper() < CloudControllerConstants.PORT_RANGE_MIN ||
+                kubernetesCluster.getPortRange().getLower() > CloudControllerConstants.PORT_RANGE_MAX ||
+                kubernetesCluster.getPortRange().getLower() < CloudControllerConstants.PORT_RANGE_MIN ||
+                kubernetesCluster.getPortRange().getUpper() < kubernetesCluster.getPortRange().getLower()) {
+            throw new InvalidKubernetesClusterException("Port range is invalid " +
+                    "for the Kubernetes cluster [id]" + kubernetesCluster.getClusterId());
         }
         try {
-            validateKubernetesMaster(kubernetesGroup.getKubernetesMaster());
-            validateKubernetesHosts(kubernetesGroup.getKubernetesHosts());
+            validateKubernetesMaster(kubernetesCluster.getKubernetesMaster());
+            validateKubernetesHosts(kubernetesCluster.getKubernetesHosts());
 
             // check whether master already exists
-            if (context.kubernetesHostExists(kubernetesGroup.getKubernetesMaster().getHostId())) {
-                throw new InvalidKubernetesGroupException("Kubernetes host already exists [id] " +
-                        kubernetesGroup.getKubernetesMaster().getHostId());
+            if (context.kubernetesHostExists(kubernetesCluster.getKubernetesMaster().getHostId())) {
+                throw new InvalidKubernetesClusterException("Kubernetes host already exists [id] " +
+                        kubernetesCluster.getKubernetesMaster().getHostId());
             }
 
             // Check for duplicate hostIds
-            if (kubernetesGroup.getKubernetesHosts() != null) {
+            if (kubernetesCluster.getKubernetesHosts() != null) {
                 List<String> hostIds = new ArrayList<String>();
-                hostIds.add(kubernetesGroup.getKubernetesMaster().getHostId());
+                hostIds.add(kubernetesCluster.getKubernetesMaster().getHostId());
 
-                for (KubernetesHost kubernetesHost : kubernetesGroup.getKubernetesHosts()) {
+                for (KubernetesHost kubernetesHost : kubernetesCluster.getKubernetesHosts()) {
                     if (hostIds.contains(kubernetesHost.getHostId())) {
-                        throw new InvalidKubernetesGroupException(
+                        throw new InvalidKubernetesClusterException(
                                 String.format("Kubernetes host [id] %s already defined in the request", kubernetesHost.getHostId()));
                     }
 
                     // check whether host already exists
                     if (context.kubernetesHostExists(kubernetesHost.getHostId())) {
-                        throw new InvalidKubernetesGroupException("Kubernetes host already exists [id] " +
+                        throw new InvalidKubernetesClusterException("Kubernetes host already exists [id] " +
                                 kubernetesHost.getHostId());
                     }
 
@@ -433,9 +432,9 @@ public class CloudControllerUtil {
             }
 
         } catch (InvalidKubernetesHostException e) {
-            throw new InvalidKubernetesGroupException(e.getMessage());
+            throw new InvalidKubernetesClusterException(e.getMessage());
         } catch (InvalidKubernetesMasterException e) {
-            throw new InvalidKubernetesGroupException(e.getMessage());
+            throw new InvalidKubernetesClusterException(e.getMessage());
         }
     }
 	
@@ -471,5 +470,4 @@ public class CloudControllerUtil {
             throw new InvalidKubernetesMasterException(e.getMessage());
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java
index b3269f7..14198f7 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/autoscaler/partition/ApplicationLevelNetworkPartition.java
@@ -26,6 +26,7 @@ import java.util.List;
 public class ApplicationLevelNetworkPartition {
 
     private String id;
+    private String kubernetesClusterId;
     private boolean activeByDefault;
     private List<Partition> partitions;
 
@@ -37,6 +38,14 @@ public class ApplicationLevelNetworkPartition {
         this.id = id;
     }
 
+    public String getKubernetesClusterId() {
+        return kubernetesClusterId;
+    }
+
+    public void setKubernetesClusterId(String kubernetesClusterId) {
+        this.kubernetesClusterId = kubernetesClusterId;
+    }
+
     public boolean isActiveByDefault() {
         return activeByDefault;
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java
new file mode 100644
index 0000000..d0ca181
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesCluster.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.common.beans.kubernetes;
+
+import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+@XmlRootElement
+public class KubernetesCluster {
+
+    private String clusterId;
+    private String description;
+    private List<KubernetesHost> kubernetesHosts;
+    private KubernetesMaster kubernetesMaster;
+    private PortRange portRange;
+    private List<PropertyBean> property;
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public List<KubernetesHost> getKubernetesHosts() {
+        return kubernetesHosts;
+    }
+
+    public void setKubernetesHosts(List<KubernetesHost> kubernetesHosts) {
+        this.kubernetesHosts = kubernetesHosts;
+    }
+
+    public KubernetesMaster getKubernetesMaster() {
+        return kubernetesMaster;
+    }
+
+    public void setKubernetesMaster(KubernetesMaster kubernetesMaster) {
+        this.kubernetesMaster = kubernetesMaster;
+    }
+
+    public PortRange getPortRange() {
+        return portRange;
+    }
+
+    public void setPortRange(PortRange portRange) {
+        this.portRange = portRange;
+    }
+
+    public List<PropertyBean> getProperty() {
+        return property;
+    }
+
+    public void setProperty(List<PropertyBean> property) {
+        this.property = property;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesGroup.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesGroup.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesGroup.java
deleted file mode 100644
index 3bd21ef..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/beans/kubernetes/KubernetesGroup.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.common.beans.kubernetes;
-
-import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
-@XmlRootElement
-public class KubernetesGroup {
-
-    private String groupId;
-    private String description;
-    private List<KubernetesHost> kubernetesHosts;
-    private KubernetesMaster kubernetesMaster;
-    private PortRange portRange;
-    private List<PropertyBean> property;
-
-    public String getGroupId() {
-        return groupId;
-    }
-
-    public void setGroupId(String groupId) {
-        this.groupId = groupId;
-    }
-
-    public List<KubernetesHost> getKubernetesHosts() {
-        return kubernetesHosts;
-    }
-
-    public void setKubernetesHosts(List<KubernetesHost> kubernetesHosts) {
-        this.kubernetesHosts = kubernetesHosts;
-    }
-
-    public KubernetesMaster getKubernetesMaster() {
-        return kubernetesMaster;
-    }
-
-    public void setKubernetesMaster(KubernetesMaster kubernetesMaster) {
-        this.kubernetesMaster = kubernetesMaster;
-    }
-
-    public PortRange getPortRange() {
-        return portRange;
-    }
-
-    public void setPortRange(PortRange portRange) {
-        this.portRange = portRange;
-    }
-
-    public List<PropertyBean> getProperty() {
-        return property;
-    }
-
-    public void setProperty(List<PropertyBean> property) {
-        this.property = property;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesGroup.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesGroup.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesGroup.java
deleted file mode 100644
index d7f54be..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesGroup.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.common.kubernetes;
-
-import org.apache.stratos.common.Properties;
-
-import java.io.Serializable;
-import java.util.Arrays;
-
-/**
- * The model class for KubernetesGroup definition.
- */
-public class KubernetesGroup implements Serializable {
-
-    private static final long serialVersionUID = 3210149484906093132L;
-    private String groupId;
-    private KubernetesHost[] kubernetesHosts;
-    private KubernetesMaster kubernetesMaster;
-    private PortRange portRange;
-    private String description;
-    private Properties properties = new Properties();
-
-    public String getGroupId() {
-        return groupId;
-    }
-
-    public void setGroupId(String groupId) {
-        this.groupId = groupId;
-    }
-
-    public KubernetesHost[] getKubernetesHosts() {
-        return kubernetesHosts;
-    }
-
-    public void setKubernetesHosts(KubernetesHost[] kubernetesHosts) {
-        if(kubernetesHosts == null) {
-            this.kubernetesHosts = new KubernetesHost[0];
-        } else {
-            this.kubernetesHosts = Arrays.copyOf(kubernetesHosts, kubernetesHosts.length);
-        }
-    }
-
-    public KubernetesMaster getKubernetesMaster() {
-        return kubernetesMaster;
-    }
-
-    public void setKubernetesMaster(KubernetesMaster kubernetesMaster) {
-        this.kubernetesMaster = kubernetesMaster;
-    }
-
-    public PortRange getPortRange() {
-        return portRange;
-    }
-
-    public void setPortRange(PortRange portRange) {
-        this.portRange = portRange;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Properties getProperties() {
-        return properties;
-    }
-
-    public void setProperties(Properties properties) {
-        this.properties = properties;
-    }
-
-    public String toString() {
-        return "KubernetesGroup [groupId=" + groupId +
-                " , kubernetesHosts=" + Arrays.toString(kubernetesHosts) +
-                " , kubernetesMaster=" + kubernetesMaster +
-                " , portRange=" + portRange +
-                " , description=" + description +
-                " , properties=" + properties + "]";
-    }
-
-    @Override
-    public boolean equals(Object anObject) {
-        if (anObject == null) {
-            return false;
-        }
-        if (this == anObject) {
-            return true;
-        }
-        if (!(anObject instanceof KubernetesGroup)) {
-            return false;
-        }
-        KubernetesGroup kubernetesGroupObj = (KubernetesGroup) anObject;
-        if (this.groupId == null || kubernetesGroupObj.getGroupId() == null) {
-            return false;
-        } else if (!this.groupId.equals(kubernetesGroupObj.getGroupId())) {
-            return false;
-        }
-
-        if (this.portRange == null || kubernetesGroupObj.getPortRange() == null) {
-            return false;
-        } else if (!this.portRange.equals(kubernetesGroupObj.getPortRange())) {
-            return false;
-        }
-
-        if (this.properties == null) {
-            if (kubernetesGroupObj.getProperties() != null) {
-                return false;
-            }
-        } else if (!this.properties.equals(kubernetesGroupObj.getProperties())) {
-            return false;
-        }
-
-        if (this.description == null) {
-            if (kubernetesGroupObj.description != null) {
-                return false;
-            }
-        } else if (!this.description.equals(kubernetesGroupObj.getDescription())) {
-            return false;
-        }
-
-        if (this.kubernetesMaster == null || kubernetesGroupObj.getKubernetesMaster() == null) {
-            return false;
-        } else if (!this.kubernetesMaster.equals(kubernetesGroupObj.getKubernetesMaster())) {
-            return false;
-        }
-
-        if (this.getKubernetesHosts() == null) {
-            if (kubernetesGroupObj.getKubernetesHosts() != null) {
-                return false;
-            }
-        } else if (!Arrays.equals(this.kubernetesHosts, kubernetesGroupObj.getKubernetesHosts())) {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((this.portRange == null) ? 0 : this.portRange.hashCode());
-        result = prime * result + ((this.groupId == null) ? 0 : this.groupId.hashCode());
-        result = prime * result + ((this.description == null) ? 0 : this.description.hashCode());
-        result = prime * result + ((this.kubernetesMaster == null) ? 0 : this.kubernetesMaster.hashCode());
-        result = prime * result + ((this.kubernetesHosts == null) ? 0 : Arrays.hashCode(this.kubernetesHosts));
-        result = prime * result + ((this.properties == null) ? 0 : this.properties.hashCode());
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesHost.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesHost.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesHost.java
deleted file mode 100644
index 49ed025..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesHost.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.stratos.common.kubernetes;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.Properties;
-
-import java.io.Serializable;
-
-/**
- * The model class for KubernetesHost beans. This represents a Kubernetes CoreOS host instance
- */
-public class KubernetesHost implements Serializable {
-    private static final long serialVersionUID = 1798748592432690645L;
-    private static final Log log = LogFactory.getLog(KubernetesHost.class);
-    protected String hostId;
-    protected String hostname;
-    protected String hostIpAddress;
-    protected Properties properties = new Properties();
-
-    public KubernetesHost() {
-
-    }
-
-    public KubernetesHost(String hostId, String hostname, String hostIpAddress) {
-        this.hostId = hostId;
-        this.hostname = hostname;
-        this.hostIpAddress = hostIpAddress;
-    }
-
-    public String getHostId() {
-        return hostId;
-    }
-
-    public void setHostId(String hostId) {
-        this.hostId = hostId;
-    }
-
-    public String getHostname() {
-        return hostname;
-    }
-
-    public void setHostname(String hostname) {
-        this.hostname = hostname;
-    }
-
-    public String getHostIpAddress() {
-        return hostIpAddress;
-    }
-
-    public void setHostIpAddress(String hostIpAddress) {
-        this.hostIpAddress = hostIpAddress;
-    }
-
-    public Properties getProperties() {
-        return properties;
-    }
-
-    public void setProperties(Properties properties) {
-        this.properties = properties;
-    }
-
-    @Override
-    public String toString() {
-        return "KubernetesHost [hostId=" + hostId +
-                " hostname=" + hostname +
-                " hostIpAddress=" + hostIpAddress +
-                " properties=" + properties + "]";
-    }
-
-    @Override
-    public boolean equals(Object anObject) {
-        if (anObject == null) {
-            return false;
-        }
-        if (this == anObject) {
-            return true;
-        }
-
-        if (!(anObject instanceof KubernetesHost)) {
-            return false;
-        }
-        KubernetesHost kubernetesHostObj = (KubernetesHost) anObject;
-
-        if (this.hostId == null || kubernetesHostObj.getHostId() == null) {
-            return false;
-        } else if (!this.hostId.equals(kubernetesHostObj.getHostId())) {
-            return false;
-        }
-
-        if (this.hostIpAddress == null || kubernetesHostObj.getHostIpAddress() == null) {
-            return false;
-        } else if (!this.hostIpAddress.equals(kubernetesHostObj.getHostIpAddress())) {
-            return false;
-        }
-
-        if (this.hostname == null) {
-            if (kubernetesHostObj.getHostname() != null) {
-                return false;
-            }
-        } else if (!this.hostname.equals(kubernetesHostObj.getHostname())) {
-            return false;
-        }
-
-        if (this.properties == null) {
-            if (kubernetesHostObj.getProperties() != null) {
-                return false;
-            }
-        } else if (this.properties.equals(kubernetesHostObj.getProperties())) {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((this.hostId == null) ? 0 : this.hostId.hashCode());
-        result = prime * result + ((this.hostname == null) ? 0 : this.hostname.hashCode());
-        result = prime * result + ((this.hostIpAddress == null) ? 0 : this.hostIpAddress.hashCode());
-        result = prime * result + ((this.properties == null) ? 0 : this.properties.hashCode());
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesMaster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesMaster.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesMaster.java
deleted file mode 100644
index 25badf2..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/KubernetesMaster.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.stratos.common.kubernetes;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.io.Serializable;
-
-/**
- * The model class for KubernetesMaster beans. This represents a Kubernetes CoreOS master host instance
- */
-public class KubernetesMaster extends KubernetesHost implements Serializable {
-    private static final long serialVersionUID = -4369535909362724532L;
-
-    private static final Log log = LogFactory.getLog(KubernetesMaster.class);
-
-    private String endpoint;
-
-    public KubernetesMaster() {
-
-    }
-
-    public KubernetesMaster(String hostId, String hostname, String hostIpAddress, String endpoint) {
-        this.hostId = hostId;
-        this.hostname = hostname;
-        this.hostIpAddress = hostIpAddress;
-        this.endpoint = endpoint;
-    }
-
-    public String getEndpoint() {
-        return endpoint;
-    }
-
-    public void setEndpoint(String endpoint) {
-        this.endpoint = endpoint;
-    }
-
-    @Override
-    public String toString() {
-        return "KubernetesMaster [hostId=" + hostId +
-                " hostname=" + hostname +
-                " hostIpAddress=" + hostIpAddress +
-                " endpoint=" + endpoint +
-                " properties=" + properties + "]";
-    }
-
-    @Override
-    public boolean equals(Object anObject) {
-        if (anObject == null) {
-            return false;
-        }
-        if (this == anObject) {
-            return true;
-        }
-
-        if (!(anObject instanceof KubernetesMaster)) {
-            return false;
-        }
-
-        return super.equals(anObject);
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = super.hashCode();
-        result = prime * result + ((this.endpoint == null) ? 0 : this.endpoint.hashCode());
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/PortRange.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/PortRange.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/PortRange.java
deleted file mode 100644
index 538c46a..0000000
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/kubernetes/PortRange.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.common.kubernetes;
-
-import java.io.Serializable;
-
-/**
- * The model class for PortRange definition.
- */
-public class PortRange implements Serializable {
-    private static final long serialVersionUID = -8658155576745059779L;
-    int upper;
-    int lower;
-
-    public int getUpper() {
-        return upper;
-    }
-
-    public void setUpper(int upper) {
-        this.upper = upper;
-    }
-
-    public int getLower() {
-        return lower;
-    }
-
-    public void setLower(int lower) {
-        this.lower = lower;
-    }
-
-    public String toString() {
-        return "[ upper=" + upper + " , lower=" + lower + " ]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.manager.console/console/configure_form.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/configure_form.jag b/components/org.apache.stratos.manager.console/console/configure_form.jag
index 0b603a0..d7d9d0b 100644
--- a/components/org.apache.stratos.manager.console/console/configure_form.jag
+++ b/components/org.apache.stratos.manager.console/console/configure_form.jag
@@ -101,11 +101,11 @@ switch (formtype) {
         break;
 
     case "docker":
-        list_data = util.RESTCalls.getKubernetesGroups();
+        list_data = util.RESTCalls.getKubernetesClusters();
         if(list_data == null){
             list_data = null; //TODO endpoint doesn't return correct info
         }else{
-            formDataEdit = list_data.kubernetesGroup;
+            formDataEdit = list_data.kubernetesCluster;
             for (specNumber in list_data) {
                 if (list_data[specNumber].groupId == elements.action) {
                     formDataEdit = list_data[specNumber];

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.manager.console/console/controllers/configure/configure_requests.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/configure/configure_requests.jag b/components/org.apache.stratos.manager.console/console/controllers/configure/configure_requests.jag
index 8d6690e..16ef515 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/configure/configure_requests.jag
+++ b/components/org.apache.stratos.manager.console/console/controllers/configure/configure_requests.jag
@@ -37,7 +37,7 @@ try {
             formSubmit = util.RESTCalls.deployCartridgeDefinition(formPayload);
             break;
         case "docker":
-            formSubmit = util.RESTCalls.deployKubernetesGroupDefinition(formPayload);
+            formSubmit = util.RESTCalls.deployKubernetesClusterDefinition(formPayload);
             break;
         default:
             session.put("deploy-status", { "message": "Sorry Endpoint Error", "status": "error" });

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag b/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
index ba235c1..e301f75 100644
--- a/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
+++ b/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
@@ -59,8 +59,8 @@ RESTCalls = new function(){
         return this.send("POST","/autoscalingPolicies",policyDefinition);
     };
 
-    this.deployKubernetesGroupDefinition = function(groupDefinition){
-        return this.send("POST","/kubernetesClusters",groupDefinition);
+    this.deployKubernetesClusterDefinition = function(clusterDefinition){
+        return this.send("POST","/kubernetesClusters",clusterDefinition);
     };
 
     this.deployGroupDefinition = function(groupDefinition){
@@ -100,7 +100,7 @@ RESTCalls = new function(){
         return this.sendReceive("GET","/policy/deployment",{});
     };
 
-    this.getKubernetesGroups = function(){
+    this.getKubernetesClusters = function(){
         return this.sendReceive("GET","/kubernetesClusters",{});
     };
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/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 4446267..88687f3 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
@@ -26,9 +26,9 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.cloud.controller.stub.*;
 import org.apache.stratos.cloud.controller.stub.domain.*;
-import org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup;
-import org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost;
-import org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesMaster;
+import org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster;
+import org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost;
+import org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.manager.internal.DataHolder;
 import org.apache.stratos.manager.utils.ApplicationManagementUtil;
@@ -147,16 +147,16 @@ public class CloudControllerServiceClient {
         return stub.getClusterContext(clusterId);
     }
     
-    public boolean deployKubernetesGroup(KubernetesGroup kubernetesGroup) throws RemoteException,
-            CloudControllerServiceInvalidKubernetesGroupExceptionException {
-        return stub.addKubernetesGroup(kubernetesGroup);
+    public boolean deployKubernetesCluster(KubernetesCluster kubernetesCluster) throws RemoteException,
+            CloudControllerServiceInvalidKubernetesClusterExceptionException {
+        return stub.addKubernetesCluster(kubernetesCluster);
     }
 
-    public boolean deployKubernetesHost(String kubernetesGroupId, KubernetesHost kubernetesHost)
+    public boolean deployKubernetesHost(String kubernetesClusterId, KubernetesHost kubernetesHost)
             throws RemoteException, CloudControllerServiceInvalidKubernetesHostExceptionException,
-            CloudControllerServiceNonExistingKubernetesGroupExceptionException {
+            CloudControllerServiceNonExistingKubernetesClusterExceptionException {
 
-        return stub.addKubernetesHost(kubernetesGroupId, kubernetesHost);
+        return stub.addKubernetesHost(kubernetesClusterId, kubernetesHost);
     }
 
     public boolean updateKubernetesMaster(KubernetesMaster kubernetesMaster) throws RemoteException,
@@ -165,18 +165,18 @@ public class CloudControllerServiceClient {
         return stub.updateKubernetesMaster(kubernetesMaster);
     }
 
-    public KubernetesGroup[] getAvailableKubernetesGroups() throws RemoteException {
-        return stub.getKubernetesGroups();
+    public KubernetesCluster[] getAvailableKubernetesClusters() throws RemoteException {
+        return stub.getKubernetesClusters();
     }
 
-    public KubernetesGroup getKubernetesGroup(String kubernetesGroupId) throws RemoteException,
-            CloudControllerServiceNonExistingKubernetesGroupExceptionException {
-        return stub.getKubernetesGroup(kubernetesGroupId);
+    public KubernetesCluster getKubernetesCluster(String kubernetesClusterId) throws RemoteException,
+            CloudControllerServiceNonExistingKubernetesClusterExceptionException {
+        return stub.getKubernetesCluster(kubernetesClusterId);
     }
 
-    public boolean undeployKubernetesGroup(String kubernetesGroupId) throws RemoteException,
-            CloudControllerServiceNonExistingKubernetesGroupExceptionException {
-        return stub.removeKubernetesGroup(kubernetesGroupId);
+    public boolean undeployKubernetesCluster(String kubernetesClusterId) throws RemoteException,
+            CloudControllerServiceNonExistingKubernetesClusterExceptionException {
+        return stub.removeKubernetesCluster(kubernetesClusterId);
     }
 
     public boolean undeployKubernetesHost(String kubernetesHostId) throws RemoteException,
@@ -184,14 +184,14 @@ public class CloudControllerServiceClient {
         return stub.removeKubernetesHost(kubernetesHostId);
     }
 
-    public KubernetesHost[] getKubernetesHosts(String kubernetesGroupId) throws RemoteException,
-            CloudControllerServiceNonExistingKubernetesGroupExceptionException {
-        return stub.getHostsForKubernetesGroup(kubernetesGroupId);
+    public KubernetesHost[] getKubernetesHosts(String kubernetesClusterId) throws RemoteException,
+            CloudControllerServiceNonExistingKubernetesClusterExceptionException {
+        return stub.getHostsForKubernetesCluster(kubernetesClusterId);
     }
 
-    public KubernetesMaster getKubernetesMaster(String kubernetesGroupId) throws RemoteException,
-            CloudControllerServiceNonExistingKubernetesGroupExceptionException {
-        return stub.getMasterForKubernetesGroup(kubernetesGroupId);
+    public KubernetesMaster getKubernetesMaster(String kubernetesClusterId) throws RemoteException,
+            CloudControllerServiceNonExistingKubernetesClusterExceptionException {
+        return stub.getMasterForKubernetesCluster(kubernetesClusterId);
     }
 
     public boolean updateKubernetesHost(KubernetesHost kubernetesHost) throws RemoteException,

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index d0a6176..e852005 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -18,16 +18,14 @@
  */
 package org.apache.stratos.rest.endpoint.api;
 
-import com.google.gson.Gson;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-//import org.apache.stratos.common.beans.ApplicationBean;
 import org.apache.stratos.common.beans.StratosApiResponse;
 import org.apache.stratos.common.beans.UserInfoBean;
 import org.apache.stratos.common.beans.autoscaler.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionBean;
-import org.apache.stratos.common.beans.kubernetes.KubernetesGroup;
+import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
 import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
 import org.apache.stratos.common.beans.kubernetes.KubernetesMaster;
 import org.apache.stratos.common.beans.repositoryNotificationInfoBean.Payload;
@@ -1372,7 +1370,7 @@ public class StratosApiV41 extends AbstractApi {
     /**
      * Deploy kubernetes host cluster.
      *
-     * @param kubernetesGroup the kubernetes group
+     * @param kubernetesCluster the kubernetes cluster
      * @return the response
      * @throws RestAPIException the rest api exception
      */
@@ -1381,10 +1379,10 @@ public class StratosApiV41 extends AbstractApi {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/add/kubernetes")
-    public Response addKubernetesHostCluster(KubernetesGroup kubernetesGroup) throws RestAPIException {
+    public Response addKubernetesHostCluster(KubernetesCluster kubernetesCluster) throws RestAPIException {
 
-        StratosApiV41Utils.addKubernetesGroup(kubernetesGroup);
-        URI url = uriInfo.getAbsolutePathBuilder().path(kubernetesGroup.getGroupId()).build();
+        StratosApiV41Utils.addKubernetesCluster(kubernetesCluster);
+        URI url = uriInfo.getAbsolutePathBuilder().path(kubernetesCluster.getClusterId()).build();
         return Response.created(url).build();
     }
 
@@ -1459,7 +1457,7 @@ public class StratosApiV41 extends AbstractApi {
     @Consumes("application/json")
     @AuthorizationAction("/permission/admin/manage/view/kubernetes")
     public Response getKubernetesHostClusters() throws RestAPIException {
-        return Response.ok().entity(StratosApiV41Utils.getAvailableKubernetesGroups()).build();
+        return Response.ok().entity(StratosApiV41Utils.getAvailableKubernetesClusters()).build();
     }
 
     /**
@@ -1476,7 +1474,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/admin/manage/view/kubernetes")
     public Response getKubernetesHostCluster(@PathParam("kubernetesClusterId") String kubernetesClusterId) throws RestAPIException {
         try {
-            return Response.ok().entity(StratosApiV41Utils.getKubernetesGroup(kubernetesClusterId)).build();
+            return Response.ok().entity(StratosApiV41Utils.getKubernetesCluster(kubernetesClusterId)).build();
         } catch (RestAPIException e) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }
@@ -1536,7 +1534,7 @@ public class StratosApiV41 extends AbstractApi {
     @AuthorizationAction("/permission/admin/manage/add/kubernetes")
     public Response removeKubernetesHostCluster(@PathParam("kubernetesClusterId") String kubernetesClusterId) throws RestAPIException {
         try {
-            StratosApiV41Utils.removeKubernetesGroup(kubernetesClusterId);
+            StratosApiV41Utils.removeKubernetesCluster(kubernetesClusterId);
         } catch (RestAPIException e) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/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 1cffecb..cefa3c4 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
@@ -69,7 +69,7 @@ import org.apache.stratos.common.beans.cartridge.definition.CartridgeDefinitionB
 import org.apache.stratos.common.beans.cartridge.definition.PersistenceBean;
 import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
 import org.apache.stratos.common.beans.cartridge.definition.VolumeBean;
-import org.apache.stratos.common.beans.kubernetes.KubernetesGroup;
+import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
 import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
 import org.apache.stratos.common.beans.kubernetes.KubernetesMaster;
 import org.apache.stratos.common.beans.repositoryNotificationInfoBean.Payload;
@@ -1262,20 +1262,20 @@ public class StratosApiV41Utils {
 
     // Util methods for Kubernetes clusters
     
-    public static boolean addKubernetesGroup(KubernetesGroup kubernetesGroupBean) throws RestAPIException {
+    public static boolean addKubernetesCluster(KubernetesCluster kubernetesClusterBean) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
-            org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup kubernetesGroup =
-                    ObjectConverter.convertToCCKubernetesGroupPojo(kubernetesGroupBean);
+            org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster =
+                    ObjectConverter.convertToCCKubernetesClusterPojo(kubernetesClusterBean);
 
             try {
-                return cloudControllerServiceClient.deployKubernetesGroup(kubernetesGroup);
+                return cloudControllerServiceClient.deployKubernetesCluster(kubernetesCluster);
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);
                 throw new RestAPIException(e.getMessage(), e);
-            } catch (CloudControllerServiceInvalidKubernetesGroupExceptionException e) {
-                String message = e.getFaultMessage().getInvalidKubernetesGroupException().getMessage();
+            } catch (CloudControllerServiceInvalidKubernetesClusterExceptionException e) {
+                String message = e.getFaultMessage().getInvalidKubernetesClusterException().getMessage();
                 log.error(message, e);
                 throw new RestAPIException(message, e);
             }
@@ -1283,16 +1283,16 @@ public class StratosApiV41Utils {
         return false;
     }
 
-    public static boolean addKubernetesHost(String kubernetesGroupId, KubernetesHost kubernetesHostBean)
+    public static boolean addKubernetesHost(String kubernetesClusterId, KubernetesHost kubernetesHostBean)
             throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
-            org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost kubernetesHost =
+            org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost kubernetesHost =
                     ObjectConverter.convertKubernetesHostToStubKubernetesHost(kubernetesHostBean);
 
             try {
-                return cloudControllerServiceClient.deployKubernetesHost(kubernetesGroupId, kubernetesHost);
+                return cloudControllerServiceClient.deployKubernetesHost(kubernetesClusterId, kubernetesHost);
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);
                 throw new RestAPIException(e.getMessage(), e);
@@ -1300,8 +1300,8 @@ public class StratosApiV41Utils {
                 String message = e.getFaultMessage().getInvalidKubernetesHostException().getMessage();
                 log.error(message, e);
                 throw new RestAPIException(message, e);
-            } catch (CloudControllerServiceNonExistingKubernetesGroupExceptionException e) {
-                String message = e.getFaultMessage().getNonExistingKubernetesGroupException().getMessage();
+            } catch (CloudControllerServiceNonExistingKubernetesClusterExceptionException e) {
+                String message = e.getFaultMessage().getNonExistingKubernetesClusterException().getMessage();
                 log.error(message, e);
                 throw new RestAPIException(message, e);
             }
@@ -1313,7 +1313,7 @@ public class StratosApiV41Utils {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
-            org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesMaster kubernetesMaster =
+            org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster kubernetesMaster =
                     ObjectConverter.convertStubKubernetesMasterToKubernetesMaster(kubernetesMasterBean);
 
             try {
@@ -1334,14 +1334,14 @@ public class StratosApiV41Utils {
         return false;
     }
 
-    public static KubernetesGroup[] getAvailableKubernetesGroups() throws RestAPIException {
+    public static KubernetesCluster[] getAvailableKubernetesClusters() throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
             try {
-                org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup[]
-                        kubernetesGroups = cloudControllerServiceClient.getAvailableKubernetesGroups();
-                return ObjectConverter.convertStubKubernetesGroupsToKubernetesGroups(kubernetesGroups);
+                org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster[]
+                        kubernetesClusters = cloudControllerServiceClient.getAvailableKubernetesClusters();
+                return ObjectConverter.convertStubKubernetesClustersToKubernetesClusters(kubernetesClusters);
 
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);
@@ -1351,20 +1351,20 @@ public class StratosApiV41Utils {
         return null;
     }
 
-    public static KubernetesGroup getKubernetesGroup(String kubernetesGroupId) throws RestAPIException {
+    public static KubernetesCluster getKubernetesCluster(String kubernetesClusterId) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
             try {
-                org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup
-                        kubernetesGroup = cloudControllerServiceClient.getKubernetesGroup(kubernetesGroupId);
-                return ObjectConverter.convertStubKubernetesGroupToKubernetesGroup(kubernetesGroup);
+                org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster
+                        kubernetesCluster = cloudControllerServiceClient.getKubernetesCluster(kubernetesClusterId);
+                return ObjectConverter.convertStubKubernetesClusterToKubernetesCluster(kubernetesCluster);
 
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);
                 throw new RestAPIException(e.getMessage(), e);
-            } catch (CloudControllerServiceNonExistingKubernetesGroupExceptionException e) {
-                String message = e.getFaultMessage().getNonExistingKubernetesGroupException().getMessage();
+            } catch (CloudControllerServiceNonExistingKubernetesClusterExceptionException e) {
+                String message = e.getFaultMessage().getNonExistingKubernetesClusterException().getMessage();
                 log.error(message, e);
                 throw new RestAPIException(message, e);
             }
@@ -1372,18 +1372,18 @@ public class StratosApiV41Utils {
         return null;
     }
 
-    public static boolean removeKubernetesGroup(String kubernetesGroupId) throws RestAPIException {
+    public static boolean removeKubernetesCluster(String kubernetesClusterId) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
             try {
-                return cloudControllerServiceClient.undeployKubernetesGroup(kubernetesGroupId);
+                return cloudControllerServiceClient.undeployKubernetesCluster(kubernetesClusterId);
 
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);
                 throw new RestAPIException(e.getMessage(), e);
-            } catch (CloudControllerServiceNonExistingKubernetesGroupExceptionException e) {
-                String message = e.getFaultMessage().getNonExistingKubernetesGroupException().getMessage();
+            } catch (CloudControllerServiceNonExistingKubernetesClusterExceptionException e) {
+                String message = e.getFaultMessage().getNonExistingKubernetesClusterException().getMessage();
                 log.error(message, e);
                 throw new RestAPIException(message, e);
             }
@@ -1410,13 +1410,13 @@ public class StratosApiV41Utils {
         return false;
     }
 
-    public static KubernetesHost[] getKubernetesHosts(String kubernetesGroupId) throws RestAPIException {
+    public static KubernetesHost[] getKubernetesHosts(String kubernetesClusterId) throws RestAPIException {
 
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
             try {
-                org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost[]
-                        kubernetesHosts = cloudControllerServiceClient.getKubernetesHosts(kubernetesGroupId);
+                org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[]
+                        kubernetesHosts = cloudControllerServiceClient.getKubernetesHosts(kubernetesClusterId);
 
                 List<KubernetesHost> arrayList = ObjectConverter.convertStubKubernetesHostsToKubernetesHosts(kubernetesHosts);
                 KubernetesHost[] array = new KubernetesHost[arrayList.size()];
@@ -1425,8 +1425,8 @@ public class StratosApiV41Utils {
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);
                 throw new RestAPIException(e.getMessage(), e);
-            } catch (CloudControllerServiceNonExistingKubernetesGroupExceptionException e) {
-                String message = e.getFaultMessage().getNonExistingKubernetesGroupException().getMessage();
+            } catch (CloudControllerServiceNonExistingKubernetesClusterExceptionException e) {
+                String message = e.getFaultMessage().getNonExistingKubernetesClusterException().getMessage();
                 log.error(message, e);
                 throw new RestAPIException(message, e);
             }
@@ -1434,19 +1434,19 @@ public class StratosApiV41Utils {
         return null;
     }
 
-    public static KubernetesMaster getKubernetesMaster(String kubernetesGroupId) throws RestAPIException {
+    public static KubernetesMaster getKubernetesMaster(String kubernetesClusterId) throws RestAPIException {
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
             try {
-                org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesMaster
-                        kubernetesMaster = cloudControllerServiceClient.getKubernetesMaster(kubernetesGroupId);
+                org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster
+                        kubernetesMaster = cloudControllerServiceClient.getKubernetesMaster(kubernetesClusterId);
                 return ObjectConverter.convertStubKubernetesMasterToKubernetesMaster(kubernetesMaster);
 
             } catch (RemoteException e) {
                 log.error(e.getMessage(), e);
                 throw new RestAPIException(e.getMessage(), e);
-            } catch (CloudControllerServiceNonExistingKubernetesGroupExceptionException e) {
-                String message = e.getFaultMessage().getNonExistingKubernetesGroupException().getMessage();
+            } catch (CloudControllerServiceNonExistingKubernetesClusterExceptionException e) {
+                String message = e.getFaultMessage().getNonExistingKubernetesClusterException().getMessage();
                 log.error(message, e);
                 throw new RestAPIException(message, e);
             }
@@ -1457,7 +1457,7 @@ public class StratosApiV41Utils {
     public static boolean updateKubernetesHost(KubernetesHost kubernetesHostBean) throws RestAPIException {
         CloudControllerServiceClient cloudControllerServiceClient = getCloudControllerServiceClient();
         if (cloudControllerServiceClient != null) {
-            org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost kubernetesHost =
+            org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost kubernetesHost =
                     ObjectConverter.convertKubernetesHostToStubKubernetesHost(kubernetesHostBean);
             try {
                 return cloudControllerServiceClient.updateKubernetesHost(kubernetesHost);

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterAlreadyExistException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterAlreadyExistException.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterAlreadyExistException.java
new file mode 100644
index 0000000..4332747
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterAlreadyExistException.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.rest.endpoint.exception;
+
+import javax.ws.rs.core.Response;
+
+public class KubernetesClusterAlreadyExistException extends RestAPIException {
+    private String message;
+    private Response.Status httpStatusCode;
+
+    public KubernetesClusterAlreadyExistException() {
+        super();
+    }
+
+    public KubernetesClusterAlreadyExistException(String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+    }
+
+    public KubernetesClusterAlreadyExistException(Response.Status httpStatusCode, String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+        this.httpStatusCode = httpStatusCode;
+    }
+
+    public KubernetesClusterAlreadyExistException(String message) {
+        super(message);
+        this.message = message;
+    }
+
+    public KubernetesClusterAlreadyExistException(Response.Status httpStatusCode, String message) {
+        super(message);
+        this.message = message;
+        this.httpStatusCode = httpStatusCode;
+    }
+
+    public KubernetesClusterAlreadyExistException(Throwable cause) {
+        super(cause);
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public Response.Status getHTTPStatusCode() {
+        return httpStatusCode;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterDoesNotExistException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterDoesNotExistException.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterDoesNotExistException.java
new file mode 100644
index 0000000..944e9cb
--- /dev/null
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesClusterDoesNotExistException.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.rest.endpoint.exception;
+
+import javax.ws.rs.core.Response;
+
+public class KubernetesClusterDoesNotExistException extends Exception {
+    private String message;
+    private Response.Status httpStatusCode;
+
+    public KubernetesClusterDoesNotExistException() {
+        super();
+    }
+
+    public KubernetesClusterDoesNotExistException(String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+    }
+
+    public KubernetesClusterDoesNotExistException(Response.Status httpStatusCode, String message, Throwable cause) {
+        super(message, cause);
+        this.message = message;
+        this.httpStatusCode = httpStatusCode;
+    }
+
+    public KubernetesClusterDoesNotExistException(String message) {
+        super(message);
+        this.message = message;
+    }
+
+    public KubernetesClusterDoesNotExistException(Response.Status httpStatusCode, String message) {
+        super(message);
+        this.message = message;
+        this.httpStatusCode = httpStatusCode;
+    }
+
+    public KubernetesClusterDoesNotExistException(Throwable cause) {
+        super(cause);
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public Response.Status getHTTPStatusCode() {
+        return httpStatusCode;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupAlreadyExistException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupAlreadyExistException.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupAlreadyExistException.java
deleted file mode 100644
index 2747e49..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupAlreadyExistException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.rest.endpoint.exception;
-
-import javax.ws.rs.core.Response;
-
-public class KubernetesGroupAlreadyExistException extends RestAPIException {
-    private String message;
-    private Response.Status httpStatusCode;
-
-    public KubernetesGroupAlreadyExistException() {
-        super();
-    }
-
-    public KubernetesGroupAlreadyExistException(String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public KubernetesGroupAlreadyExistException(Response.Status httpStatusCode, String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-        this.httpStatusCode = httpStatusCode;
-    }
-
-    public KubernetesGroupAlreadyExistException(String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public KubernetesGroupAlreadyExistException(Response.Status httpStatusCode, String message) {
-        super(message);
-        this.message = message;
-        this.httpStatusCode = httpStatusCode;
-    }
-
-    public KubernetesGroupAlreadyExistException(Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public Response.Status getHTTPStatusCode() {
-        return httpStatusCode;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupDoesNotExistException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupDoesNotExistException.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupDoesNotExistException.java
deleted file mode 100644
index ff3cdb3..0000000
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/exception/KubernetesGroupDoesNotExistException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.rest.endpoint.exception;
-
-import javax.ws.rs.core.Response;
-
-public class KubernetesGroupDoesNotExistException extends Exception {
-    private String message;
-    private Response.Status httpStatusCode;
-
-    public KubernetesGroupDoesNotExistException() {
-        super();
-    }
-
-    public KubernetesGroupDoesNotExistException(String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-    }
-
-    public KubernetesGroupDoesNotExistException(Response.Status httpStatusCode, String message, Throwable cause) {
-        super(message, cause);
-        this.message = message;
-        this.httpStatusCode = httpStatusCode;
-    }
-
-    public KubernetesGroupDoesNotExistException(String message) {
-        super(message);
-        this.message = message;
-    }
-
-    public KubernetesGroupDoesNotExistException(Response.Status httpStatusCode, String message) {
-        super(message);
-        this.message = message;
-        this.httpStatusCode = httpStatusCode;
-    }
-
-    public KubernetesGroupDoesNotExistException(Throwable cause) {
-        super(cause);
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public Response.Status getHTTPStatusCode() {
-        return httpStatusCode;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/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 a414fd1..0793ada 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
@@ -27,7 +27,6 @@ import org.apache.stratos.autoscaler.stub.pojo.*;
 import org.apache.stratos.cloud.controller.stub.domain.*;
 import org.apache.stratos.common.Properties;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.common.beans.ApplicationBean;
 import org.apache.stratos.common.beans.GroupBean;
 import org.apache.stratos.common.beans.autoscaler.partition.ApplicationLevelNetworkPartition;
 import org.apache.stratos.common.beans.autoscaler.partition.Partition;
@@ -36,7 +35,7 @@ import org.apache.stratos.common.beans.autoscaler.policy.deployment.ApplicationP
 import org.apache.stratos.common.beans.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.common.beans.cartridge.definition.*;
 import org.apache.stratos.common.beans.cartridge.definition.PropertyBean;
-import org.apache.stratos.common.beans.kubernetes.KubernetesGroup;
+import org.apache.stratos.common.beans.kubernetes.KubernetesCluster;
 import org.apache.stratos.common.beans.kubernetes.KubernetesHost;
 import org.apache.stratos.common.beans.kubernetes.KubernetesMaster;
 import org.apache.stratos.common.beans.kubernetes.PortRange;
@@ -933,30 +932,31 @@ public class ObjectConverter {
         return serviceDefinitionBeans;
     }
 
-    public static org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup convertToCCKubernetesGroupPojo(KubernetesGroup kubernetesGroupBean) {
+    public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster
+        convertToCCKubernetesClusterPojo(KubernetesCluster kubernetesClusterBean) {
 
-        org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup kubernetesGroup = new
-                org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup();
+        org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster = new
+                org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster();
 
-        kubernetesGroup.setGroupId(kubernetesGroupBean.getGroupId());
-        kubernetesGroup.setDescription(kubernetesGroupBean.getDescription());
-        kubernetesGroup.setKubernetesMaster(convertStubKubernetesMasterToKubernetesMaster(kubernetesGroupBean.getKubernetesMaster()));
-        kubernetesGroup.setPortRange(convertPortRangeToStubPortRange(kubernetesGroupBean.getPortRange()));
-        kubernetesGroup.setKubernetesHosts(convertToASKubernetesHostsPojo(kubernetesGroupBean.getKubernetesHosts()));
-        kubernetesGroup.setProperties((convertPropertyBeansToCCStubProperties(kubernetesGroupBean.getProperty())));
+        kubernetesCluster.setClusterId(kubernetesClusterBean.getClusterId());
+        kubernetesCluster.setDescription(kubernetesClusterBean.getDescription());
+        kubernetesCluster.setKubernetesMaster(convertStubKubernetesMasterToKubernetesMaster(kubernetesClusterBean.getKubernetesMaster()));
+        kubernetesCluster.setPortRange(convertPortRangeToStubPortRange(kubernetesClusterBean.getPortRange()));
+        kubernetesCluster.setKubernetesHosts(convertToASKubernetesHostsPojo(kubernetesClusterBean.getKubernetesHosts()));
+        kubernetesCluster.setProperties((convertPropertyBeansToCCStubProperties(kubernetesClusterBean.getProperty())));
 
-        return kubernetesGroup;
+        return kubernetesCluster;
     }
 
-    private static org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost[]
+    private static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[]
         convertToASKubernetesHostsPojo(List<KubernetesHost> kubernetesHosts) {
 
         if (kubernetesHosts == null || kubernetesHosts.isEmpty()) {
             return null;
         }
         int kubernetesHostCount = kubernetesHosts.size();
-        org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost[]
-                kubernetesHostsArr = new org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost[kubernetesHostCount];
+        org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[]
+                kubernetesHostsArr = new org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[kubernetesHostCount];
         for (int i = 0; i < kubernetesHostCount; i++) {
             KubernetesHost kubernetesHostBean = kubernetesHosts.get(i);
             kubernetesHostsArr[i] = convertKubernetesHostToStubKubernetesHost(kubernetesHostBean);
@@ -965,28 +965,28 @@ public class ObjectConverter {
     }
 
 
-    private static org.apache.stratos.cloud.controller.stub.kubernetes.PortRange
+    private static org.apache.stratos.cloud.controller.stub.domain.kubernetes.PortRange
         convertPortRangeToStubPortRange(PortRange portRangeBean) {
 
         if (portRangeBean == null) {
             return null;
         }
-        org.apache.stratos.cloud.controller.stub.kubernetes.PortRange
-                portRange = new org.apache.stratos.cloud.controller.stub.kubernetes.PortRange();
+        org.apache.stratos.cloud.controller.stub.domain.kubernetes.PortRange
+                portRange = new org.apache.stratos.cloud.controller.stub.domain.kubernetes.PortRange();
         portRange.setLower(portRangeBean.getLower());
         portRange.setUpper(portRangeBean.getUpper());
         return portRange;
     }
 
-    public static org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost
+    public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost
         convertKubernetesHostToStubKubernetesHost(KubernetesHost kubernetesHostBean) {
 
         if (kubernetesHostBean == null) {
             return null;
         }
 
-        org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost
-                kubernetesHost = new org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost();
+        org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost
+                kubernetesHost = new org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost();
         kubernetesHost.setHostId(kubernetesHostBean.getHostId());
         kubernetesHost.setHostIpAddress(kubernetesHostBean.getHostIpAddress());
         kubernetesHost.setHostname(kubernetesHostBean.getHostname());
@@ -995,15 +995,15 @@ public class ObjectConverter {
         return kubernetesHost;
     }
 
-    public static org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesMaster
+    public static org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster
         convertStubKubernetesMasterToKubernetesMaster(KubernetesMaster kubernetesMasterBean) {
 
         if (kubernetesMasterBean == null) {
             return null;
         }
 
-        org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesMaster
-                kubernetesMaster = new org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesMaster();
+        org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster
+                kubernetesMaster = new org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster();
         kubernetesMaster.setHostId(kubernetesMasterBean.getHostId());
         kubernetesMaster.setHostIpAddress(kubernetesMasterBean.getHostIpAddress());
         kubernetesMaster.setHostname(kubernetesMasterBean.getHostname());
@@ -1013,33 +1013,33 @@ public class ObjectConverter {
         return kubernetesMaster;
     }
 
-    public static KubernetesGroup[] convertStubKubernetesGroupsToKubernetesGroups(org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup[] kubernetesGroups) {
+    public static KubernetesCluster[] convertStubKubernetesClustersToKubernetesClusters(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster[] kubernetesClusters) {
 
-        if (kubernetesGroups == null) {
+        if (kubernetesClusters == null) {
             return null;
         }
-        KubernetesGroup[] kubernetesGroupsBean = new KubernetesGroup[kubernetesGroups.length];
-        for (int i = 0; i < kubernetesGroups.length; i++) {
-            kubernetesGroupsBean[i] = convertStubKubernetesGroupToKubernetesGroup(kubernetesGroups[i]);
+        KubernetesCluster[] kubernetesClustersBean = new KubernetesCluster[kubernetesClusters.length];
+        for (int i = 0; i < kubernetesClusters.length; i++) {
+            kubernetesClustersBean[i] = convertStubKubernetesClusterToKubernetesCluster(kubernetesClusters[i]);
         }
-        return kubernetesGroupsBean;
+        return kubernetesClustersBean;
     }
 
-    public static KubernetesGroup convertStubKubernetesGroupToKubernetesGroup(org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesGroup kubernetesGroup) {
-        if (kubernetesGroup == null) {
+    public static KubernetesCluster convertStubKubernetesClusterToKubernetesCluster(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesCluster kubernetesCluster) {
+        if (kubernetesCluster == null) {
             return null;
         }
-        KubernetesGroup kubernetesGroupBean = new KubernetesGroup();
-        kubernetesGroupBean.setGroupId(kubernetesGroup.getGroupId());
-        kubernetesGroupBean.setDescription(kubernetesGroup.getDescription());
-        kubernetesGroupBean.setPortRange(convertStubPortRangeToPortRange(kubernetesGroup.getPortRange()));
-        kubernetesGroupBean.setKubernetesHosts(convertStubKubernetesHostsToKubernetesHosts(kubernetesGroup.getKubernetesHosts()));
-        kubernetesGroupBean.setKubernetesMaster(convertStubKubernetesMasterToKubernetesMaster(kubernetesGroup.getKubernetesMaster()));
-        kubernetesGroupBean.setProperty(convertCCStubPropertiesToPropertyBeans(kubernetesGroup.getProperties()));
-        return kubernetesGroupBean;
+        KubernetesCluster kubernetesClusterBean = new KubernetesCluster();
+        kubernetesClusterBean.setClusterId(kubernetesCluster.getClusterId());
+        kubernetesClusterBean.setDescription(kubernetesCluster.getDescription());
+        kubernetesClusterBean.setPortRange(convertStubPortRangeToPortRange(kubernetesCluster.getPortRange()));
+        kubernetesClusterBean.setKubernetesHosts(convertStubKubernetesHostsToKubernetesHosts(kubernetesCluster.getKubernetesHosts()));
+        kubernetesClusterBean.setKubernetesMaster(convertStubKubernetesMasterToKubernetesMaster(kubernetesCluster.getKubernetesMaster()));
+        kubernetesClusterBean.setProperty(convertCCStubPropertiesToPropertyBeans(kubernetesCluster.getProperties()));
+        return kubernetesClusterBean;
     }
 
-    public static KubernetesMaster convertStubKubernetesMasterToKubernetesMaster(org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesMaster kubernetesMaster) {
+    public static KubernetesMaster convertStubKubernetesMasterToKubernetesMaster(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesMaster kubernetesMaster) {
         if (kubernetesMaster == null) {
             return null;
         }
@@ -1052,7 +1052,7 @@ public class ObjectConverter {
         return kubernetesMasterBean;
     }
 
-    public static List<KubernetesHost> convertStubKubernetesHostsToKubernetesHosts(org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost[] kubernetesHosts) {
+    public static List<KubernetesHost> convertStubKubernetesHostsToKubernetesHosts(org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost[] kubernetesHosts) {
         if (kubernetesHosts == null) {
             return null;
         }
@@ -1064,7 +1064,7 @@ public class ObjectConverter {
     }
 
     private static KubernetesHost convertStubKubernetesHostToKubernetesHost(
-            org.apache.stratos.cloud.controller.stub.kubernetes.KubernetesHost kubernetesHost) {
+            org.apache.stratos.cloud.controller.stub.domain.kubernetes.KubernetesHost kubernetesHost) {
         if (kubernetesHost == null) {
             return null;
         }
@@ -1108,7 +1108,7 @@ public class ObjectConverter {
         return propertyBean;
     }
 
-    private static PortRange convertStubPortRangeToPortRange(org.apache.stratos.cloud.controller.stub.kubernetes.PortRange portRange) {
+    private static PortRange convertStubPortRangeToPortRange(org.apache.stratos.cloud.controller.stub.domain.kubernetes.PortRange portRange) {
         if (portRange == null) {
             return null;
         }


[3/6] stratos git commit: Renaming kubernetes group to kubernetes cluster and moving kubernetes domain classes to cloud controller

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/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 259cace..7c069b4 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: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://policy.exception.autoscaler.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: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">
+<?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">
@@ -200,9 +200,9 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax24="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax216="http://pojo.applications.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: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://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
+        <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"/>
@@ -211,29 +211,17 @@
             <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="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="ax21:AutoscalePolicy"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
             <xs:element name="AutoScalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax23:InvalidPolicyException"/>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax21:InvalidPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -247,7 +235,7 @@
             <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax21:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax23:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -282,7 +270,7 @@
             <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax21:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax23:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -459,6 +447,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:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://policy.exception.autoscaler.stratos.apache.org/xsd">
             <xs:complexType name="InvalidPolicyException">

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
index eb80231..653d321 100644
--- a/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
+++ b/service-stubs/org.apache.stratos.cloud.controller.service.stub/pom.xml
@@ -48,7 +48,7 @@
                                 <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
                                     <arg line="-uri src/main/resources/CloudControllerService.wsdl -u -uw -o target/generated-code
                                     -p org.apache.stratos.cloud.controller.stub
-                                    -ns2p http://domain.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.domain,http://exception.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.exception,http://impl.services.controller.cloud.stratos.apache.org=org.apache.stratos.cloud.controller.stub.services.impl,http://common.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub,http://kubernetes.common.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.kubernetes"/>
+                                    -ns2p http://domain.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.domain,http://exception.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.exception,http://impl.services.controller.cloud.stratos.apache.org=org.apache.stratos.cloud.controller.stub.services.impl,http://common.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub,http://kubernetes.domain.controller.cloud.stratos.apache.org/xsd=org.apache.stratos.cloud.controller.stub.domain.kubernetes"/>
                                     <classpath refid="maven.dependency.classpath"/>
                                     <classpath refid="maven.compile.classpath"/>
                                     <classpath refid="maven.runtime.classpath"/>


[5/6] stratos git commit: Renaming kubernetes group to kubernetes cluster and moving kubernetes domain classes to cloud controller

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
index 89e8bf8..01bd479 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/context/CloudControllerContext.java
@@ -18,19 +18,18 @@
  */
 package org.apache.stratos.cloud.controller.context;
 
-import org.apache.axis2.clustering.ClusteringAgent;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesClusterContext;
 import org.apache.stratos.common.clustering.DistributedObjectProvider;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
-import org.apache.stratos.common.kubernetes.KubernetesHost;
-import org.apache.stratos.common.kubernetes.KubernetesMaster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesHost;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesMaster;
 import org.apache.stratos.cloud.controller.domain.*;
 import org.apache.stratos.cloud.controller.exception.*;
 import org.apache.stratos.cloud.controller.internal.ServiceReferenceHolder;
-import org.apache.stratos.cloud.controller.registry.Deserializer;
 import org.apache.stratos.cloud.controller.registry.RegistryManager;
 import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
 import org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher;
@@ -77,11 +76,11 @@ public class CloudControllerContext implements Serializable {
 	/* We keep following maps in order to make the look up time, small. */
     
     /** 
-     * KubernetesGroups against groupIds
-     * Key - Kubernetes group id
-     * Value - {@link KubernetesGroup}
+     * KubernetesClusters against clusterIds
+     * Key - Kubernetes cluster id
+     * Value - {@link org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster}
      */
-    private Map<String, KubernetesGroup> kubernetesGroupsMap;
+    private Map<String, KubernetesCluster> kubernetesClustersMap;
 
     /**
      * Key - cluster id
@@ -103,7 +102,7 @@ public class CloudControllerContext implements Serializable {
 
     /**
      * Key - Kubernetes cluster id
-     * Value - {@link org.apache.stratos.cloud.controller.domain.KubernetesClusterContext}
+     * Value - {@link org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesClusterContext}
      */
     private Map<String, KubernetesClusterContext> kubClusterIdToKubClusterContextMap;
 
@@ -158,7 +157,7 @@ public class CloudControllerContext implements Serializable {
         distributedObjectProvider = ServiceReferenceHolder.getInstance().getDistributedObjectProvider();
 
         // Initialize objects
-        kubernetesGroupsMap = distributedObjectProvider.getMap(CC_KUB_GROUP_ID_TO_GROUP_MAP);
+        kubernetesClustersMap = distributedObjectProvider.getMap(CC_KUB_GROUP_ID_TO_GROUP_MAP);
         clusterIdToMemberContextListMap = distributedObjectProvider.getMap(CC_CLUSTER_ID_TO_MEMBER_CTX_MAP);
         memberIdToMemberContextMap = distributedObjectProvider.getMap(CC_MEMBER_ID_TO_MEMBER_CTX_MAP);
         memberIdToScheduledTaskMap = distributedObjectProvider.getMap(CC_MEMBER_ID_TO_SCH_TASK_MAP);
@@ -227,7 +226,7 @@ public class CloudControllerContext implements Serializable {
         return acquireWriteLock(CC_SCH_TASK_WRITE_LOCK);
     }
 
-    public Lock acquireKubernetesGroupWriteLock() {
+    public Lock acquireKubernetesClusterWriteLock() {
         return acquireWriteLock(CC_KUB_GROUP_WRITE_LOCK);
     }
 
@@ -446,8 +445,8 @@ public class CloudControllerContext implements Serializable {
         cartridgeTypeToPartitionIdsMap.remove(cartridgeType);
     }
 
-    public KubernetesClusterContext getKubernetesClusterContext(String kubClusterId) {
-        return kubClusterIdToKubClusterContextMap.get(kubClusterId);
+    public KubernetesClusterContext getKubernetesClusterContext(String kubernetesClusterId) {
+        return kubClusterIdToKubClusterContextMap.get(kubernetesClusterId);
     }
 
     public void addKubernetesClusterContext(KubernetesClusterContext kubernetesClusterContext) {
@@ -457,11 +456,11 @@ public class CloudControllerContext implements Serializable {
     }
     
     /**
-     * Remove a registered Kubernetes group from registry
+     * Remove a registered Kubernetes cluster from registry
      */
-    public synchronized void removeKubernetesGroup(String kubernetesGroupId) {
+    public synchronized void removeKubernetesCluster(String kubernetesClusterId) {
         // Remove entry from information model
-        kubernetesGroupsMap.remove(kubernetesGroupId);
+        kubernetesClustersMap.remove(kubernetesClusterId);
     }
 
     /**
@@ -475,28 +474,28 @@ public class CloudControllerContext implements Serializable {
             log.info("Removing Kubernetes Host: " + kubernetesHostId);
         }
         try {
-            KubernetesGroup kubernetesGroupStored = getKubernetesGroupContainingHost(kubernetesHostId);
+            KubernetesCluster kubernetesClusterStored = getKubernetesClusterContainingHost(kubernetesHostId);
 
             // Kubernetes master can not be removed
-            if (kubernetesGroupStored.getKubernetesMaster().getHostId().equals(kubernetesHostId)) {
+            if (kubernetesClusterStored.getKubernetesMaster().getHostId().equals(kubernetesHostId)) {
                 throw new NonExistingKubernetesHostException("Kubernetes master is not allowed to be removed [id] " + kubernetesHostId);
             }
 
             List<KubernetesHost> kubernetesHostList = new ArrayList<KubernetesHost>();
-            for (KubernetesHost kubernetesHost : kubernetesGroupStored.getKubernetesHosts()) {
+            for (KubernetesHost kubernetesHost : kubernetesClusterStored.getKubernetesHosts()) {
                 if (!kubernetesHost.getHostId().equals(kubernetesHostId)) {
                     kubernetesHostList.add(kubernetesHost);
                 }
             }
             // member count will be equal only when host object was not found
-            if (kubernetesHostList.size() == kubernetesGroupStored.getKubernetesHosts().length) {
+            if (kubernetesHostList.size() == kubernetesClusterStored.getKubernetesHosts().length) {
                 throw new NonExistingKubernetesHostException("Kubernetes host not found for [id] " + kubernetesHostId);
             }
             KubernetesHost[] kubernetesHostsArray = new KubernetesHost[kubernetesHostList.size()];
             kubernetesHostList.toArray(kubernetesHostsArray);
 
             // Update information model
-            kubernetesGroupStored.setKubernetesHosts(kubernetesHostsArray);
+            kubernetesClusterStored.setKubernetesHosts(kubernetesHostsArray);
 
             if (log.isInfoEnabled()) {
                 log.info(String.format("Kubernetes host removed successfully: [id] %s", kubernetesHostId));
@@ -508,31 +507,31 @@ public class CloudControllerContext implements Serializable {
         }
     }
 
-    public void addKubernetesGroup(KubernetesGroup kubernetesGroup) {
-        kubernetesGroupsMap.put(kubernetesGroup.getGroupId(), kubernetesGroup);
+    public void addKubernetesCluster(KubernetesCluster kubernetesCluster) {
+        kubernetesClustersMap.put(kubernetesCluster.getClusterId(), kubernetesCluster);
     }
 
-    public void updateKubernetesGroup(KubernetesGroup kubernetesGroup) {
-        kubernetesGroupsMap.put(kubernetesGroup.getGroupId(), kubernetesGroup);
+    public void updateKubernetesCluster(KubernetesCluster kubernetesCluster) {
+        kubernetesClustersMap.put(kubernetesCluster.getClusterId(), kubernetesCluster);
     }
     
-    public boolean kubernetesGroupExists(KubernetesGroup kubernetesGroup) {
-        return kubernetesGroupsMap.containsKey(kubernetesGroup);
+    public boolean kubernetesClusterExists(KubernetesCluster kubernetesCluster) {
+        return kubernetesClustersMap.containsKey(kubernetesCluster);
     }
 
     public boolean kubernetesHostExists(String hostId) {
         if (StringUtils.isEmpty(hostId)) {
             return false;
         }
-        for (KubernetesGroup kubernetesGroup : kubernetesGroupsMap.values()) {
-            if (kubernetesGroup.getKubernetesHosts() != null) {
-                for (KubernetesHost kubernetesHost : kubernetesGroup.getKubernetesHosts()) {
+        for (KubernetesCluster kubernetesCluster : kubernetesClustersMap.values()) {
+            if (kubernetesCluster.getKubernetesHosts() != null) {
+                for (KubernetesHost kubernetesHost : kubernetesCluster.getKubernetesHosts()) {
                     if (kubernetesHost.getHostId().equals(hostId)) {
                         return true;
                     }
                 }
             }
-            if (hostId.equals(kubernetesGroup.getKubernetesMaster().getHostId())) {
+            if (hostId.equals(kubernetesCluster.getKubernetesMaster().getHostId())) {
                 return true;
             }
         }
@@ -540,61 +539,65 @@ public class CloudControllerContext implements Serializable {
     }
 
 
-    public KubernetesHost[] getKubernetesHostsInGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Cannot find for empty group id");
+    public KubernetesHost[] getKubernetesHostsInGroup(String kubernetesClusterId) throws NonExistingKubernetesClusterException {
+        if (StringUtils.isEmpty(kubernetesClusterId)) {
+            throw new NonExistingKubernetesClusterException("Kubernetes cluster id is null");
         }
 
-        KubernetesGroup kubernetesGroup = kubernetesGroupsMap.get(kubernetesGroupId);
-        if (kubernetesGroup != null) {
-            return kubernetesGroup.getKubernetesHosts();
+        KubernetesCluster kubernetesCluster = kubernetesClustersMap.get(kubernetesClusterId);
+        if (kubernetesCluster != null) {
+            return kubernetesCluster.getKubernetesHosts();
         }
-        throw new NonExistingKubernetesGroupException("Kubernetes group not found for group id: " + kubernetesGroupId);
+        throw new NonExistingKubernetesClusterException("Kubernetes cluster not found: [kubernetes-cluster-id] "
+                + kubernetesClusterId);
     }
 
-    public KubernetesMaster getKubernetesMasterInGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Cannot find for empty group id");
+    public KubernetesMaster getKubernetesMasterInGroup(String kubernetesClusterId)
+            throws NonExistingKubernetesClusterException {
+        if (StringUtils.isEmpty(kubernetesClusterId)) {
+            throw new NonExistingKubernetesClusterException("Kubernetes cluster id is null");
         }
-        KubernetesGroup kubernetesGroup = kubernetesGroupsMap.get(kubernetesGroupId);
-        if (kubernetesGroup != null) {
-            return kubernetesGroup.getKubernetesMaster();
+        KubernetesCluster kubernetesCluster = kubernetesClustersMap.get(kubernetesClusterId);
+        if (kubernetesCluster != null) {
+            return kubernetesCluster.getKubernetesMaster();
         }
-        throw new NonExistingKubernetesGroupException("Kubernetes master not found for group id: " + kubernetesGroupId);
+        throw new NonExistingKubernetesClusterException("Kubernetes master not found: [kubernetes-cluster-id] "
+                + kubernetesClusterId);
     }
 
-    public KubernetesGroup getKubernetesGroup(String groupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(groupId)) {
-            throw new NonExistingKubernetesGroupException("Kubernetes group id is empty");
+    public KubernetesCluster getKubernetesCluster(String kubernetesClusterId)
+            throws NonExistingKubernetesClusterException {
+        if (StringUtils.isEmpty(kubernetesClusterId)) {
+            throw new NonExistingKubernetesClusterException("Kubernetes cluster id is empty");
         }
-        KubernetesGroup kubernetesGroup = kubernetesGroupsMap.get(groupId);
-        if (kubernetesGroup != null) {
-            return kubernetesGroup;
+        KubernetesCluster kubernetesCluster = kubernetesClustersMap.get(kubernetesClusterId);
+        if (kubernetesCluster != null) {
+            return kubernetesCluster;
         }
-        throw new NonExistingKubernetesGroupException("Kubernetes group not found: [group-id]: " + groupId);
+        throw new NonExistingKubernetesClusterException("Kubernetes cluster not found: [kubernetes-cluster-id] " + kubernetesClusterId);
     }
 
-    public KubernetesGroup getKubernetesGroupContainingHost(String hostId) throws NonExistingKubernetesGroupException {
+    public KubernetesCluster getKubernetesClusterContainingHost(String hostId) throws NonExistingKubernetesClusterException {
         if (StringUtils.isEmpty(hostId)) {
             return null;
         }
-        for (KubernetesGroup kubernetesGroup : kubernetesGroupsMap.values()) {
-            if (hostId.equals(kubernetesGroup.getKubernetesMaster().getHostId())) {
-                return kubernetesGroup;
+        for (KubernetesCluster kubernetesCluster : kubernetesClustersMap.values()) {
+            if (hostId.equals(kubernetesCluster.getKubernetesMaster().getHostId())) {
+                return kubernetesCluster;
             }
-            if (kubernetesGroup.getKubernetesHosts() != null) {
-                for (KubernetesHost kubernetesHost : kubernetesGroup.getKubernetesHosts()) {
+            if (kubernetesCluster.getKubernetesHosts() != null) {
+                for (KubernetesHost kubernetesHost : kubernetesCluster.getKubernetesHosts()) {
                     if (kubernetesHost.getHostId().equals(hostId)) {
-                        return kubernetesGroup;
+                        return kubernetesCluster;
                     }
                 }
             }
         }
-        throw new NonExistingKubernetesGroupException("Kubernetes group not found containing host id: " + hostId);
+        throw new NonExistingKubernetesClusterException("Kubernetes cluster not found containing host id: " + hostId);
     }
 
-    public KubernetesGroup[] getKubernetesGroups() {
-        return kubernetesGroupsMap.values().toArray(new KubernetesGroup[kubernetesGroupsMap.size()]);
+    public KubernetesCluster[] getKubernetesClusters() {
+        return kubernetesClustersMap.values().toArray(new KubernetesCluster[kubernetesClustersMap.size()]);
     }
 
     public boolean isClustered() {
@@ -627,7 +630,7 @@ public class CloudControllerContext implements Serializable {
                     if (dataObj instanceof CloudControllerContext) {
                         CloudControllerContext serializedObj = (CloudControllerContext) dataObj;
 
-                        copyMap(serializedObj.kubernetesGroupsMap, kubernetesGroupsMap);
+                        copyMap(serializedObj.kubernetesClustersMap, kubernetesClustersMap);
                         copyMap(serializedObj.clusterIdToMemberContextListMap, clusterIdToMemberContextListMap);
                         copyMap(serializedObj.memberIdToMemberContextMap, memberIdToMemberContextMap);
                         copyMap(serializedObj.kubClusterIdToKubClusterContextMap, kubClusterIdToKubClusterContextMap);

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/KubernetesClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/KubernetesClusterContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/KubernetesClusterContext.java
deleted file mode 100644
index 83feabd..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/KubernetesClusterContext.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.domain;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.kubernetes.client.KubernetesApiClient;
-
-/**
- * Holds information about a Kubernetes Cluster.
- *
- *
- */
-public class KubernetesClusterContext implements Serializable {
-
-	private static final long serialVersionUID = -802025758806195791L;
-	private static final Log log = LogFactory.getLog(KubernetesClusterContext.class);
-	
-	// id of the Kubernetes cluster
-    private String kubernetesClusterId;
-    private int upperPort;
-    private int lowerPort;
-    // kubernetes master ip
-    private String masterIp;
-    private String masterPort;
-    // available list of ports
-    private List<Integer> servicePorts;
-    // kubernetes client API instance
-    private transient KubernetesApiClient kubApi;
-    
-    public KubernetesClusterContext(String id, String masterIp, String masterPort, int lowerPort, int upperPort) {
-    	servicePorts = new ArrayList<Integer>();
-        this.lowerPort = lowerPort;
-    	this.upperPort = upperPort;
-    	// Generate the ports
-        generateServicePorts(lowerPort, upperPort);
-    	this.kubernetesClusterId = id;
-    	this.masterIp = masterIp;
-    	this.masterPort = masterPort;
-    	this.setKubApi(new KubernetesApiClient(getEndpoint(masterIp, masterPort)));
-    	
-	}
-    
-	private String getEndpoint(String ip, String port) {
-		return "http://"+ip+":"+port+"/api/v1beta1/";
-	}
-
-	public String getKubernetesClusterId() {
-		return kubernetesClusterId;
-	}
-
-	public void setKubernetesClusterId(String kubernetesClusterId) {
-		this.kubernetesClusterId = kubernetesClusterId;
-	}
-
-	public List<Integer> getServicePorts() {
-		return servicePorts;
-	}
-
-	public void setServicePorts(List<Integer> servicePorts) {
-		this.servicePorts = servicePorts;
-	}
-	
-	public int getNextServicePort() {
-	    if (servicePorts.isEmpty()) {
-	        return -1;
-	    }
-		return servicePorts.remove(0);
-	}
-	
-	public void deallocatePort(int port) {
-		if (!servicePorts.contains(port)) {
-			servicePorts.add(port);
-            // TODO Sort elements
-		}
-	}
-
-	private void generateServicePorts(int lowerPort, int upperPort) {
-		for (int port = lowerPort; port <= upperPort; port++) {
-			servicePorts.add(port);
-		}
-	}
-
-	public String getMasterIp() {
-		return masterIp;
-	}
-
-	public void setMasterIp(String masterIp) {
-		this.masterIp = masterIp;
-	}
-
-	public KubernetesApiClient getKubApi() {
-		if (kubApi == null) {
-			kubApi = new KubernetesApiClient(getEndpoint(masterIp, masterPort));
-		}
-		return kubApi;
-	}
-
-	public void setKubApi(KubernetesApiClient kubApi) {
-		this.kubApi = kubApi;
-	}
-
-	public int getUpperPort() {
-        return upperPort;
-    }
-
-    public void setUpperPort(int upperPort) {
-        this.upperPort = upperPort;
-    }
-
-    public int getLowerPort() {
-        return lowerPort;
-    }
-
-    public void setLowerPort(int lowerPort) {
-        this.lowerPort = lowerPort;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((servicePorts == null) ? 0 : servicePorts.hashCode());
-        result = prime * result + ((kubernetesClusterId == null) ? 0 : kubernetesClusterId.hashCode());
-        result = prime * result + lowerPort;
-        result = prime * result + ((masterIp == null) ? 0 : masterIp.hashCode());
-        result = prime * result + ((masterPort == null) ? 0 : masterPort.hashCode());
-        result = prime * result + upperPort;
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        KubernetesClusterContext other = (KubernetesClusterContext) obj;
-        if (servicePorts == null) {
-            if (other.servicePorts != null)
-                return false;
-        } else if (!servicePorts.equals(other.servicePorts))
-            return false;
-        if (kubernetesClusterId == null) {
-            if (other.kubernetesClusterId != null)
-                return false;
-        } else if (!kubernetesClusterId.equals(other.kubernetesClusterId))
-            return false;
-        if (lowerPort != other.lowerPort)
-            return false;
-        if (masterIp == null) {
-            if (other.masterIp != null)
-                return false;
-        } else if (!masterIp.equals(other.masterIp))
-            return false;
-        if (masterPort == null) {
-            if (other.masterPort != null)
-                return false;
-        } else if (!masterPort.equals(other.masterPort))
-            return false;
-        if (upperPort != other.upperPort)
-            return false;
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesCluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesCluster.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesCluster.java
new file mode 100644
index 0000000..1394cf6
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesCluster.java
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.cloud.controller.domain.kubernetes;
+
+import org.apache.stratos.common.Properties;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+/**
+ * The model class for KubernetesCluster definition.
+ */
+public class KubernetesCluster implements Serializable {
+
+    private static final long serialVersionUID = 3210149484906093132L;
+
+    private String clusterId;
+    private KubernetesHost[] kubernetesHosts;
+    private KubernetesMaster kubernetesMaster;
+    private PortRange portRange;
+    private String description;
+    private Properties properties = new Properties();
+
+    public String getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(String clusterId) {
+        this.clusterId = clusterId;
+    }
+
+    public KubernetesHost[] getKubernetesHosts() {
+        return kubernetesHosts;
+    }
+
+    public void setKubernetesHosts(KubernetesHost[] kubernetesHosts) {
+        if(kubernetesHosts == null) {
+            this.kubernetesHosts = new KubernetesHost[0];
+        } else {
+            this.kubernetesHosts = Arrays.copyOf(kubernetesHosts, kubernetesHosts.length);
+        }
+    }
+
+    public KubernetesMaster getKubernetesMaster() {
+        return kubernetesMaster;
+    }
+
+    public void setKubernetesMaster(KubernetesMaster kubernetesMaster) {
+        this.kubernetesMaster = kubernetesMaster;
+    }
+
+    public PortRange getPortRange() {
+        return portRange;
+    }
+
+    public void setPortRange(PortRange portRange) {
+        this.portRange = portRange;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+
+    public String toString() {
+        return "KubernetesCluster [groupId=" + clusterId +
+                " , kubernetesHosts=" + Arrays.toString(kubernetesHosts) +
+                " , kubernetesMaster=" + kubernetesMaster +
+                " , portRange=" + portRange +
+                " , description=" + description +
+                " , properties=" + properties + "]";
+    }
+
+    @Override
+    public boolean equals(Object anObject) {
+        if (anObject == null) {
+            return false;
+        }
+        if (this == anObject) {
+            return true;
+        }
+        if (!(anObject instanceof KubernetesCluster)) {
+            return false;
+        }
+        KubernetesCluster kubernetesClusterObj = (KubernetesCluster) anObject;
+        if (this.clusterId == null || kubernetesClusterObj.getClusterId() == null) {
+            return false;
+        } else if (!this.clusterId.equals(kubernetesClusterObj.getClusterId())) {
+            return false;
+        }
+
+        if (this.portRange == null || kubernetesClusterObj.getPortRange() == null) {
+            return false;
+        } else if (!this.portRange.equals(kubernetesClusterObj.getPortRange())) {
+            return false;
+        }
+
+        if (this.properties == null) {
+            if (kubernetesClusterObj.getProperties() != null) {
+                return false;
+            }
+        } else if (!this.properties.equals(kubernetesClusterObj.getProperties())) {
+            return false;
+        }
+
+        if (this.description == null) {
+            if (kubernetesClusterObj.description != null) {
+                return false;
+            }
+        } else if (!this.description.equals(kubernetesClusterObj.getDescription())) {
+            return false;
+        }
+
+        if (this.kubernetesMaster == null || kubernetesClusterObj.getKubernetesMaster() == null) {
+            return false;
+        } else if (!this.kubernetesMaster.equals(kubernetesClusterObj.getKubernetesMaster())) {
+            return false;
+        }
+
+        if (this.getKubernetesHosts() == null) {
+            if (kubernetesClusterObj.getKubernetesHosts() != null) {
+                return false;
+            }
+        } else if (!Arrays.equals(this.kubernetesHosts, kubernetesClusterObj.getKubernetesHosts())) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((this.portRange == null) ? 0 : this.portRange.hashCode());
+        result = prime * result + ((this.clusterId == null) ? 0 : this.clusterId.hashCode());
+        result = prime * result + ((this.description == null) ? 0 : this.description.hashCode());
+        result = prime * result + ((this.kubernetesMaster == null) ? 0 : this.kubernetesMaster.hashCode());
+        result = prime * result + ((this.kubernetesHosts == null) ? 0 : Arrays.hashCode(this.kubernetesHosts));
+        result = prime * result + ((this.properties == null) ? 0 : this.properties.hashCode());
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesClusterContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesClusterContext.java
new file mode 100644
index 0000000..0132475
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesClusterContext.java
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ * KIND, either express or implied.  See the License for the 
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cloud.controller.domain.kubernetes;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.kubernetes.client.KubernetesApiClient;
+
+/**
+ * Holds information about a Kubernetes Cluster.
+ *
+ *
+ */
+public class KubernetesClusterContext implements Serializable {
+
+	private static final long serialVersionUID = -802025758806195791L;
+	private static final Log log = LogFactory.getLog(KubernetesClusterContext.class);
+	
+	// id of the Kubernetes cluster
+    private String kubernetesClusterId;
+    private int upperPort;
+    private int lowerPort;
+    // kubernetes master ip
+    private String masterIp;
+    private String masterPort;
+    // available list of ports
+    private List<Integer> servicePorts;
+    // kubernetes client API instance
+    private transient KubernetesApiClient kubApi;
+    
+    public KubernetesClusterContext(String id, String masterIp, String masterPort, int lowerPort, int upperPort) {
+    	servicePorts = new ArrayList<Integer>();
+        this.lowerPort = lowerPort;
+    	this.upperPort = upperPort;
+    	// Generate the ports
+        generateServicePorts(lowerPort, upperPort);
+    	this.kubernetesClusterId = id;
+    	this.masterIp = masterIp;
+    	this.masterPort = masterPort;
+    	this.setKubApi(new KubernetesApiClient(getEndpoint(masterIp, masterPort)));
+    	
+	}
+    
+	private String getEndpoint(String ip, String port) {
+		return "http://"+ip+":"+port+"/api/v1beta1/";
+	}
+
+	public String getKubernetesClusterId() {
+		return kubernetesClusterId;
+	}
+
+	public void setKubernetesClusterId(String kubernetesClusterId) {
+		this.kubernetesClusterId = kubernetesClusterId;
+	}
+
+	public List<Integer> getServicePorts() {
+		return servicePorts;
+	}
+
+	public void setServicePorts(List<Integer> servicePorts) {
+		this.servicePorts = servicePorts;
+	}
+	
+	public int getNextServicePort() {
+	    if (servicePorts.isEmpty()) {
+	        return -1;
+	    }
+		return servicePorts.remove(0);
+	}
+	
+	public void deallocatePort(int port) {
+		if (!servicePorts.contains(port)) {
+			servicePorts.add(port);
+            // TODO Sort elements
+		}
+	}
+
+	private void generateServicePorts(int lowerPort, int upperPort) {
+		for (int port = lowerPort; port <= upperPort; port++) {
+			servicePorts.add(port);
+		}
+	}
+
+	public String getMasterIp() {
+		return masterIp;
+	}
+
+	public void setMasterIp(String masterIp) {
+		this.masterIp = masterIp;
+	}
+
+	public KubernetesApiClient getKubApi() {
+		if (kubApi == null) {
+			kubApi = new KubernetesApiClient(getEndpoint(masterIp, masterPort));
+		}
+		return kubApi;
+	}
+
+	public void setKubApi(KubernetesApiClient kubApi) {
+		this.kubApi = kubApi;
+	}
+
+	public int getUpperPort() {
+        return upperPort;
+    }
+
+    public void setUpperPort(int upperPort) {
+        this.upperPort = upperPort;
+    }
+
+    public int getLowerPort() {
+        return lowerPort;
+    }
+
+    public void setLowerPort(int lowerPort) {
+        this.lowerPort = lowerPort;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((servicePorts == null) ? 0 : servicePorts.hashCode());
+        result = prime * result + ((kubernetesClusterId == null) ? 0 : kubernetesClusterId.hashCode());
+        result = prime * result + lowerPort;
+        result = prime * result + ((masterIp == null) ? 0 : masterIp.hashCode());
+        result = prime * result + ((masterPort == null) ? 0 : masterPort.hashCode());
+        result = prime * result + upperPort;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        KubernetesClusterContext other = (KubernetesClusterContext) obj;
+        if (servicePorts == null) {
+            if (other.servicePorts != null)
+                return false;
+        } else if (!servicePorts.equals(other.servicePorts))
+            return false;
+        if (kubernetesClusterId == null) {
+            if (other.kubernetesClusterId != null)
+                return false;
+        } else if (!kubernetesClusterId.equals(other.kubernetesClusterId))
+            return false;
+        if (lowerPort != other.lowerPort)
+            return false;
+        if (masterIp == null) {
+            if (other.masterIp != null)
+                return false;
+        } else if (!masterIp.equals(other.masterIp))
+            return false;
+        if (masterPort == null) {
+            if (other.masterPort != null)
+                return false;
+        } else if (!masterPort.equals(other.masterPort))
+            return false;
+        if (upperPort != other.upperPort)
+            return false;
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesHost.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesHost.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesHost.java
new file mode 100644
index 0000000..4350809
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesHost.java
@@ -0,0 +1,146 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.stratos.cloud.controller.domain.kubernetes;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.Properties;
+
+import java.io.Serializable;
+
+/**
+ * The model class for KubernetesHost beans. This represents a Kubernetes CoreOS host instance
+ */
+public class KubernetesHost implements Serializable {
+    private static final long serialVersionUID = 1798748592432690645L;
+    private static final Log log = LogFactory.getLog(KubernetesHost.class);
+    protected String hostId;
+    protected String hostname;
+    protected String hostIpAddress;
+    protected Properties properties = new Properties();
+
+    public KubernetesHost() {
+
+    }
+
+    public KubernetesHost(String hostId, String hostname, String hostIpAddress) {
+        this.hostId = hostId;
+        this.hostname = hostname;
+        this.hostIpAddress = hostIpAddress;
+    }
+
+    public String getHostId() {
+        return hostId;
+    }
+
+    public void setHostId(String hostId) {
+        this.hostId = hostId;
+    }
+
+    public String getHostname() {
+        return hostname;
+    }
+
+    public void setHostname(String hostname) {
+        this.hostname = hostname;
+    }
+
+    public String getHostIpAddress() {
+        return hostIpAddress;
+    }
+
+    public void setHostIpAddress(String hostIpAddress) {
+        this.hostIpAddress = hostIpAddress;
+    }
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public void setProperties(Properties properties) {
+        this.properties = properties;
+    }
+
+    @Override
+    public String toString() {
+        return "KubernetesHost [hostId=" + hostId +
+                " hostname=" + hostname +
+                " hostIpAddress=" + hostIpAddress +
+                " properties=" + properties + "]";
+    }
+
+    @Override
+    public boolean equals(Object anObject) {
+        if (anObject == null) {
+            return false;
+        }
+        if (this == anObject) {
+            return true;
+        }
+
+        if (!(anObject instanceof KubernetesHost)) {
+            return false;
+        }
+        KubernetesHost kubernetesHostObj = (KubernetesHost) anObject;
+
+        if (this.hostId == null || kubernetesHostObj.getHostId() == null) {
+            return false;
+        } else if (!this.hostId.equals(kubernetesHostObj.getHostId())) {
+            return false;
+        }
+
+        if (this.hostIpAddress == null || kubernetesHostObj.getHostIpAddress() == null) {
+            return false;
+        } else if (!this.hostIpAddress.equals(kubernetesHostObj.getHostIpAddress())) {
+            return false;
+        }
+
+        if (this.hostname == null) {
+            if (kubernetesHostObj.getHostname() != null) {
+                return false;
+            }
+        } else if (!this.hostname.equals(kubernetesHostObj.getHostname())) {
+            return false;
+        }
+
+        if (this.properties == null) {
+            if (kubernetesHostObj.getProperties() != null) {
+                return false;
+            }
+        } else if (this.properties.equals(kubernetesHostObj.getProperties())) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((this.hostId == null) ? 0 : this.hostId.hashCode());
+        result = prime * result + ((this.hostname == null) ? 0 : this.hostname.hashCode());
+        result = prime * result + ((this.hostIpAddress == null) ? 0 : this.hostIpAddress.hashCode());
+        result = prime * result + ((this.properties == null) ? 0 : this.properties.hashCode());
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesMaster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesMaster.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesMaster.java
new file mode 100644
index 0000000..475f73a
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/KubernetesMaster.java
@@ -0,0 +1,90 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.stratos.cloud.controller.domain.kubernetes;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.Serializable;
+
+/**
+ * The model class for KubernetesMaster beans. This represents a Kubernetes CoreOS master host instance
+ */
+public class KubernetesMaster extends KubernetesHost implements Serializable {
+    private static final long serialVersionUID = -4369535909362724532L;
+
+    private static final Log log = LogFactory.getLog(KubernetesMaster.class);
+
+    private String endpoint;
+
+    public KubernetesMaster() {
+
+    }
+
+    public KubernetesMaster(String hostId, String hostname, String hostIpAddress, String endpoint) {
+        this.hostId = hostId;
+        this.hostname = hostname;
+        this.hostIpAddress = hostIpAddress;
+        this.endpoint = endpoint;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public void setEndpoint(String endpoint) {
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    public String toString() {
+        return "KubernetesMaster [hostId=" + hostId +
+                " hostname=" + hostname +
+                " hostIpAddress=" + hostIpAddress +
+                " endpoint=" + endpoint +
+                " properties=" + properties + "]";
+    }
+
+    @Override
+    public boolean equals(Object anObject) {
+        if (anObject == null) {
+            return false;
+        }
+        if (this == anObject) {
+            return true;
+        }
+
+        if (!(anObject instanceof KubernetesMaster)) {
+            return false;
+        }
+
+        return super.equals(anObject);
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = super.hashCode();
+        result = prime * result + ((this.endpoint == null) ? 0 : this.endpoint.hashCode());
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/PortRange.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/PortRange.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/PortRange.java
new file mode 100644
index 0000000..86cd1b7
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/kubernetes/PortRange.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.cloud.controller.domain.kubernetes;
+
+import java.io.Serializable;
+
+/**
+ * The model class for PortRange definition.
+ */
+public class PortRange implements Serializable {
+    private static final long serialVersionUID = -8658155576745059779L;
+    int upper;
+    int lower;
+
+    public int getUpper() {
+        return upper;
+    }
+
+    public void setUpper(int upper) {
+        this.upper = upper;
+    }
+
+    public int getLower() {
+        return lower;
+    }
+
+    public void setLower(int lower) {
+        this.lower = lower;
+    }
+
+    public String toString() {
+        return "[ upper=" + upper + " , lower=" + lower + " ]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesClusterException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesClusterException.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesClusterException.java
new file mode 100644
index 0000000..3b5b930
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesClusterException.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.stratos.cloud.controller.exception;
+
+/**
+ * Exception class for handling invalid Kubernetes cluster
+ */
+public class InvalidKubernetesClusterException extends Exception {
+
+    private String message;
+
+    public InvalidKubernetesClusterException(String message, Exception exception){
+        super(message, exception);
+        this.message = message;
+    }
+
+    public InvalidKubernetesClusterException(Exception exception){
+        super(exception);
+    }
+
+    public InvalidKubernetesClusterException(String msg){
+        super(msg);
+        this.message = msg;
+    }
+
+    @Override
+    public String getMessage() {
+        return this.message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesGroupException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesGroupException.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesGroupException.java
deleted file mode 100644
index db5fb30..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/InvalidKubernetesGroupException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.stratos.cloud.controller.exception;
-
-/**
- * Exception class for handling invalid Kubernetes Group
- */
-public class InvalidKubernetesGroupException extends Exception {
-
-    private String message;
-
-    public InvalidKubernetesGroupException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public InvalidKubernetesGroupException(Exception exception){
-        super(exception);
-    }
-
-    public InvalidKubernetesGroupException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesClusterException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesClusterException.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesClusterException.java
new file mode 100644
index 0000000..e425163
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesClusterException.java
@@ -0,0 +1,49 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+package org.apache.stratos.cloud.controller.exception;
+
+/**
+ * Exception class for handling non-existing Kubernetes cluster
+ */
+public class NonExistingKubernetesClusterException extends Exception {
+
+    private String message;
+
+    public NonExistingKubernetesClusterException(String message, Exception exception){
+        super(message, exception);
+        this.message = message;
+    }
+
+    public NonExistingKubernetesClusterException(Exception exception){
+        super(exception);
+    }
+
+    public NonExistingKubernetesClusterException(String msg){
+        super(msg);
+        this.message = msg;
+    }
+
+    @Override
+    public String getMessage() {
+        return this.message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesGroupException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesGroupException.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesGroupException.java
deleted file mode 100644
index ba48fbe..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/NonExistingKubernetesGroupException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-package org.apache.stratos.cloud.controller.exception;
-
-/**
- * Exception class for handling non-existing Kubernetes Group
- */
-public class NonExistingKubernetesGroupException extends Exception {
-
-    private String message;
-
-    public NonExistingKubernetesGroupException(String message, Exception exception){
-        super(message, exception);
-        this.message = message;
-    }
-
-    public NonExistingKubernetesGroupException(Exception exception){
-        super(exception);
-    }
-
-    public NonExistingKubernetesGroupException(String msg){
-        super(msg);
-        this.message = msg;
-    }
-
-    @Override
-    public String getMessage() {
-        return this.message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/KubernetesIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/KubernetesIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/KubernetesIaas.java
index 8e57ba9..e9150bd 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/KubernetesIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/KubernetesIaas.java
@@ -26,6 +26,7 @@ import org.apache.stratos.cloud.controller.concurrent.ScheduledThreadExecutor;
 import org.apache.stratos.cloud.controller.context.CloudControllerContext;
 import org.apache.stratos.cloud.controller.domain.*;
 import org.apache.stratos.cloud.controller.domain.Cartridge;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesClusterContext;
 import org.apache.stratos.cloud.controller.exception.*;
 import org.apache.stratos.cloud.controller.functions.ContainerClusterContextToReplicationController;
 import org.apache.stratos.cloud.controller.iaases.validators.KubernetesPartitionValidator;
@@ -35,8 +36,8 @@ import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
 import org.apache.stratos.cloud.controller.util.PodActivationWatcher;
 import org.apache.stratos.common.beans.NameValuePair;
 import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
-import org.apache.stratos.common.kubernetes.PortRange;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.PortRange;
 import org.apache.stratos.kubernetes.client.KubernetesApiClient;
 import org.apache.stratos.kubernetes.client.exceptions.KubernetesClientException;
 import org.apache.stratos.kubernetes.client.model.*;
@@ -151,17 +152,17 @@ public class KubernetesIaas extends Iaas {
                         partition.getProperties(),
                         partition.toString());
 
-                KubernetesGroup kubernetesGroup = CloudControllerContext.getInstance().
-                        getKubernetesGroup(kubernetesClusterId);
-                handleNullObject(kubernetesGroup, "Could not start container, kubernetes group not found: " +
+                KubernetesCluster kubernetesCluster = CloudControllerContext.getInstance().
+                        getKubernetesCluster(kubernetesClusterId);
+                handleNullObject(kubernetesCluster, "Could not start container, kubernetes cluster not found: " +
                         "[kubernetes-cluster-id] " + kubernetesClusterId + " [cluster-id] " + clusterId +
                         " [member-id] " + memberId);
 
                 // Prepare kubernetes context
-                String kubernetesMasterIp = kubernetesGroup.getKubernetesMaster().getHostIpAddress();
-                PortRange kubernetesPortRange = kubernetesGroup.getPortRange();
+                String kubernetesMasterIp = kubernetesCluster.getKubernetesMaster().getHostIpAddress();
+                PortRange kubernetesPortRange = kubernetesCluster.getPortRange();
                 String kubernetesMasterPort = CloudControllerUtil.getProperty(
-                        kubernetesGroup.getKubernetesMaster().getProperties(), StratosConstants.KUBERNETES_MASTER_PORT,
+                        kubernetesCluster.getKubernetesMaster().getProperties(), StratosConstants.KUBERNETES_MASTER_PORT,
                         StratosConstants.KUBERNETES_MASTER_DEFAULT_PORT);
 
                 KubernetesClusterContext kubClusterContext = getKubernetesClusterContext(kubernetesClusterId,

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java
index a95aa37..8ecb7d9 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java
@@ -25,7 +25,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.cloud.controller.context.CloudControllerContext;
 import org.apache.stratos.cloud.controller.domain.IaasProvider;
 import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.exception.NonExistingKubernetesGroupException;
+import org.apache.stratos.cloud.controller.exception.NonExistingKubernetesClusterException;
 import org.apache.stratos.common.constants.StratosConstants;
 
 /**
@@ -55,9 +55,9 @@ public class KubernetesPartitionValidator implements PartitionValidator {
         if (properties.containsKey(StratosConstants.KUBERNETES_CLUSTER_ID)) {
             String kubernetesClusterId = properties.getProperty(StratosConstants.KUBERNETES_CLUSTER_ID);
             try {
-                CloudControllerContext.getInstance().getKubernetesGroup(kubernetesClusterId);
+                CloudControllerContext.getInstance().getKubernetesCluster(kubernetesClusterId);
                 return iaasProvider;
-            } catch (NonExistingKubernetesGroupException e) {
+            } catch (NonExistingKubernetesClusterException e) {
                 String message = "Kubernetes partition is not valid: [partition-id] " + partitionId;
                 log.error(message, e);
                 throw new InvalidPartitionException(message, e);

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java
index 5f5124e..8ac170e 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/CloudControllerService.java
@@ -20,9 +20,9 @@ package org.apache.stratos.cloud.controller.services;
 
 import org.apache.stratos.cloud.controller.domain.*;
 import org.apache.stratos.cloud.controller.exception.*;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
-import org.apache.stratos.common.kubernetes.KubernetesHost;
-import org.apache.stratos.common.kubernetes.KubernetesMaster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesHost;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesMaster;
 import org.apache.stratos.messaging.domain.topology.ClusterStatus;
 
 /**
@@ -229,48 +229,48 @@ public interface CloudControllerService {
             ClusterInstanceCreationException;
     
     /**
-     * Retrieves registered Kubernetes Groups.
+     * Retrieves registered Kubernetes clusters.
      */
-    public KubernetesGroup[] getKubernetesGroups();
+    public KubernetesCluster[] getKubernetesClusters();
 
     /**
-     * Retrieves Kubernetes Group for given Kubernetes Group ID.
+     * Retrieves Kubernetes cluster for given Kubernetes cluster ID.
      *
-     * @param kubernetesGroupId
+     * @param kubernetesClusterId
      */
-    public KubernetesGroup getKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException;
+    public KubernetesCluster getKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException;
 
     /**
-     * Retrieves Kubernetes Master for given Kubernetes Group ID.
+     * Retrieves Kubernetes Master for given Kubernetes cluster ID.
      *
-     * @param kubernetesGroupId
+     * @param kubernetesClusterId
      */
-    public KubernetesMaster getMasterForKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException;
+    public KubernetesMaster getMasterForKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException;
 
     /**
-     * Retrieves Kubernetes Hosts for given Kubernetes Group ID.
+     * Retrieves Kubernetes Hosts for given Kubernetes cluster ID.
      *
-     * @param kubernetesGroupId
+     * @param kubernetesClusterId
      */
-    public KubernetesHost[] getHostsForKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException;
+    public KubernetesHost[] getHostsForKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException;
 
     /**
      * Register a Kubernetes cluster.
      *
-     * @param kubernetesGroup
-     * @throws org.apache.stratos.cloud.controller.exception.InvalidKubernetesGroupException
+     * @param kubernetesCluster
+     * @throws org.apache.stratos.cloud.controller.exception.InvalidKubernetesClusterException
      */
-    public boolean addKubernetesGroup(KubernetesGroup kubernetesGroup) throws InvalidKubernetesGroupException;
+    public boolean addKubernetesCluster(KubernetesCluster kubernetesCluster) throws InvalidKubernetesClusterException;
 
     /**
-     * Add a Kubernetes host to a Kubernetes Group.
+     * Add a Kubernetes host to a Kubernetes cluster.
      *
      * @param groupId
      * @param kubernetesHost
      * @throws org.apache.stratos.cloud.controller.exception.InvalidKubernetesHostException
      */
     public boolean addKubernetesHost(String groupId, KubernetesHost kubernetesHost) throws
-            InvalidKubernetesHostException, NonExistingKubernetesGroupException;
+            InvalidKubernetesHostException, NonExistingKubernetesClusterException;
 
     /**
      * Update a Kubernetes host.
@@ -285,9 +285,9 @@ public interface CloudControllerService {
      * Remove a Kubernetes host.
      *
      * @param groupId
-     * @throws NonExistingKubernetesGroupException
+     * @throws NonExistingKubernetesClusterException
      */
-    public boolean removeKubernetesGroup(String groupId) throws NonExistingKubernetesGroupException;
+    public boolean removeKubernetesCluster(String groupId) throws NonExistingKubernetesClusterException;
 
     /**
      * Update a Kubernetes host.
@@ -298,7 +298,7 @@ public interface CloudControllerService {
     public boolean removeKubernetesHost(String hostId) throws NonExistingKubernetesHostException;
 
     /**
-     * Update a Kubernetes Master in a Kubernetes Group.
+     * Update a Kubernetes Master in a Kubernetes cluster.
      *
      * @param kubernetesMaster
      * @throws NonExistingKubernetesMasterException

http://git-wip-us.apache.org/repos/asf/stratos/blob/78e8011e/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 bc80291..8ec8595 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
@@ -38,9 +38,9 @@ import org.apache.stratos.cloud.controller.services.CloudControllerService;
 import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
 import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
 import org.apache.stratos.common.Property;
-import org.apache.stratos.common.kubernetes.KubernetesGroup;
-import org.apache.stratos.common.kubernetes.KubernetesHost;
-import org.apache.stratos.common.kubernetes.KubernetesMaster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesCluster;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesHost;
+import org.apache.stratos.cloud.controller.domain.kubernetes.KubernetesMaster;
 import org.apache.stratos.messaging.domain.topology.*;
 import org.apache.stratos.messaging.event.topology.MemberReadyToShutdownEvent;
 
@@ -1076,52 +1076,52 @@ public class CloudControllerServiceImpl implements CloudControllerService {
     }
 
     @Override
-    public KubernetesGroup[] getKubernetesGroups() {
-        return CloudControllerContext.getInstance().getKubernetesGroups();
+    public KubernetesCluster[] getKubernetesClusters() {
+        return CloudControllerContext.getInstance().getKubernetesClusters();
     }
 
     @Override
-    public KubernetesGroup getKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        return CloudControllerContext.getInstance().getKubernetesGroup(kubernetesGroupId);
+    public KubernetesCluster getKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException {
+        return CloudControllerContext.getInstance().getKubernetesCluster(kubernetesClusterId);
     }
 
     @Override
-    public KubernetesMaster getMasterForKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        return CloudControllerContext.getInstance().getKubernetesMasterInGroup(kubernetesGroupId);
+    public KubernetesMaster getMasterForKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException {
+        return CloudControllerContext.getInstance().getKubernetesMasterInGroup(kubernetesClusterId);
     }
 
     @Override
-    public KubernetesHost[] getHostsForKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        return CloudControllerContext.getInstance().getKubernetesHostsInGroup(kubernetesGroupId);
+    public KubernetesHost[] getHostsForKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException {
+        return CloudControllerContext.getInstance().getKubernetesHostsInGroup(kubernetesClusterId);
     }
 
 
     @Override
-    public boolean addKubernetesGroup(KubernetesGroup kubernetesGroup) throws InvalidKubernetesGroupException {
-        if (kubernetesGroup == null) {
-            throw new InvalidKubernetesGroupException("Kubernetes Group can not be null");
+    public boolean addKubernetesCluster(KubernetesCluster kubernetesCluster) throws InvalidKubernetesClusterException {
+        if (kubernetesCluster == null) {
+            throw new InvalidKubernetesClusterException("Kubernetes cluster can not be null");
         }
 
         Lock lock = null;
         try {
-            lock = CloudControllerContext.getInstance().acquireKubernetesGroupWriteLock();
+            lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock();
 
             if (log.isInfoEnabled()) {
-                log.info("Deploying new Kubernetes group: " + kubernetesGroup);
+                log.info("Deploying new Kubernetes cluster: " + kubernetesCluster);
             }
-            CloudControllerUtil.validateKubernetesGroup(kubernetesGroup);
+            CloudControllerUtil.validateKubernetesCluster(kubernetesCluster);
 
             // Add to information model
-            CloudControllerContext.getInstance().addKubernetesGroup(kubernetesGroup);
+            CloudControllerContext.getInstance().addKubernetesCluster(kubernetesCluster);
             CloudControllerContext.getInstance().persist();
 
             if (log.isInfoEnabled()) {
-                log.info(String.format("Kubernetes group added successfully: [id] %s, [description] %s",
-                        kubernetesGroup.getGroupId(), kubernetesGroup.getDescription()));
+                log.info(String.format("Kubernetes cluster added successfully: [id] %s, [description] %s",
+                        kubernetesCluster.getClusterId(), kubernetesCluster.getDescription()));
             }
             return true;
         } catch (Exception e) {
-            throw new InvalidKubernetesGroupException(e.getMessage(), e);
+            throw new InvalidKubernetesClusterException(e.getMessage(), e);
         } finally {
             if (lock != null) {
                 CloudControllerContext.getInstance().releaseWriteLock(lock);
@@ -1130,45 +1130,45 @@ public class CloudControllerServiceImpl implements CloudControllerService {
     }
 
     @Override
-    public boolean addKubernetesHost(String kubernetesGroupId, KubernetesHost kubernetesHost) throws
-            InvalidKubernetesHostException, NonExistingKubernetesGroupException {
+    public boolean addKubernetesHost(String kubernetesClusterId, KubernetesHost kubernetesHost) throws
+            InvalidKubernetesHostException, NonExistingKubernetesClusterException {
         if (kubernetesHost == null) {
             throw new InvalidKubernetesHostException("Kubernetes host can not be null");
         }
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Kubernetes group id can not be null");
+        if (StringUtils.isEmpty(kubernetesClusterId)) {
+            throw new NonExistingKubernetesClusterException("Kubernetes cluster id can not be null");
         }
 
         Lock lock = null;
         try {
-            lock = CloudControllerContext.getInstance().acquireKubernetesGroupWriteLock();
+            lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock();
 
             if (log.isInfoEnabled()) {
-                log.info("Deploying new Kubernetes Host: " + kubernetesHost + " for Kubernetes group id: " + kubernetesGroupId);
+                log.info("Deploying new Kubernetes Host: " + kubernetesHost + " for Kubernetes cluster id: " + kubernetesClusterId);
             }
             CloudControllerUtil.validateKubernetesHost(kubernetesHost);
 
-            KubernetesGroup kubernetesGroupStored = getKubernetesGroup(kubernetesGroupId);
+            KubernetesCluster kubernetesClusterStored = getKubernetesCluster(kubernetesClusterId);
             ArrayList<KubernetesHost> kubernetesHostArrayList;
 
-            if (kubernetesGroupStored.getKubernetesHosts() == null) {
+            if (kubernetesClusterStored.getKubernetesHosts() == null) {
                 kubernetesHostArrayList = new ArrayList<KubernetesHost>();
             } else {
                 if (CloudControllerContext.getInstance().kubernetesHostExists(kubernetesHost.getHostId())) {
                     throw new InvalidKubernetesHostException("Kubernetes host already exists: [id] " + kubernetesHost.getHostId());
                 }
                 kubernetesHostArrayList = new
-                        ArrayList<KubernetesHost>(Arrays.asList(kubernetesGroupStored.getKubernetesHosts()));
+                        ArrayList<KubernetesHost>(Arrays.asList(kubernetesClusterStored.getKubernetesHosts()));
             }
             kubernetesHostArrayList.add(kubernetesHost);
 
             // Update information model
-            kubernetesGroupStored.setKubernetesHosts(kubernetesHostArrayList.toArray(new KubernetesHost[kubernetesHostArrayList.size()]));
-            CloudControllerContext.getInstance().updateKubernetesGroup(kubernetesGroupStored);
+            kubernetesClusterStored.setKubernetesHosts(kubernetesHostArrayList.toArray(new KubernetesHost[kubernetesHostArrayList.size()]));
+            CloudControllerContext.getInstance().updateKubernetesCluster(kubernetesClusterStored);
             CloudControllerContext.getInstance().persist();
 
             if (log.isInfoEnabled()) {
-                log.info(String.format("Kubernetes host added successfully: [id] %s", kubernetesGroupStored.getGroupId()));
+                log.info(String.format("Kubernetes host added successfully: [id] %s", kubernetesClusterStored.getClusterId()));
             }
 
             return true;
@@ -1182,31 +1182,31 @@ public class CloudControllerServiceImpl implements CloudControllerService {
     }
 
     @Override
-    public boolean removeKubernetesGroup(String kubernetesGroupId) throws NonExistingKubernetesGroupException {
-        if (StringUtils.isEmpty(kubernetesGroupId)) {
-            throw new NonExistingKubernetesGroupException("Kubernetes group id can not be empty");
+    public boolean removeKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException {
+        if (StringUtils.isEmpty(kubernetesClusterId)) {
+            throw new NonExistingKubernetesClusterException("Kubernetes cluster id can not be empty");
         }
 
         Lock lock = null;
         try {
-            lock = CloudControllerContext.getInstance().acquireKubernetesGroupWriteLock();
+            lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock();
 
             if (log.isInfoEnabled()) {
-                log.info("Removing Kubernetes group: " + kubernetesGroupId);
+                log.info("Removing Kubernetes cluster: " + kubernetesClusterId);
             }
             try {
                 // Remove entry from information model
-                CloudControllerContext.getInstance().removeKubernetesGroup(kubernetesGroupId);
+                CloudControllerContext.getInstance().removeKubernetesCluster(kubernetesClusterId);
 
                 if (log.isInfoEnabled()) {
-                    log.info(String.format("Kubernetes group removed successfully: [id] %s", kubernetesGroupId));
+                    log.info(String.format("Kubernetes cluster removed successfully: [id] %s", kubernetesClusterId));
                 }
 
                 CloudControllerContext.getInstance().persist();
 
                 return true;
             } catch (Exception e) {
-                throw new NonExistingKubernetesGroupException(e.getMessage(), e);
+                throw new NonExistingKubernetesClusterException(e.getMessage(), e);
             }
         } finally {
             if (lock != null) {
@@ -1223,34 +1223,34 @@ public class CloudControllerServiceImpl implements CloudControllerService {
 
         Lock lock = null;
         try {
-            lock = CloudControllerContext.getInstance().acquireKubernetesGroupWriteLock();
+            lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock();
 
             if (log.isInfoEnabled()) {
                 log.info("Removing Kubernetes Host: " + kubernetesHostId);
             }
             try {
-                KubernetesGroup kubernetesGroupStored = CloudControllerContext.getInstance().getKubernetesGroupContainingHost(kubernetesHostId);
+                KubernetesCluster kubernetesClusterStored = CloudControllerContext.getInstance().getKubernetesClusterContainingHost(kubernetesHostId);
 
                 // Kubernetes master can not be removed
-                if (kubernetesGroupStored.getKubernetesMaster().getHostId().equals(kubernetesHostId)) {
+                if (kubernetesClusterStored.getKubernetesMaster().getHostId().equals(kubernetesHostId)) {
                     throw new NonExistingKubernetesHostException("Kubernetes master is not allowed to be removed [id] " + kubernetesHostId);
                 }
 
                 List<KubernetesHost> kubernetesHostList = new ArrayList<KubernetesHost>();
-                for (KubernetesHost kubernetesHost : kubernetesGroupStored.getKubernetesHosts()) {
+                for (KubernetesHost kubernetesHost : kubernetesClusterStored.getKubernetesHosts()) {
                     if (!kubernetesHost.getHostId().equals(kubernetesHostId)) {
                         kubernetesHostList.add(kubernetesHost);
                     }
                 }
                 // member count will be equal only when host object was not found
-                if (kubernetesHostList.size() == kubernetesGroupStored.getKubernetesHosts().length) {
+                if (kubernetesHostList.size() == kubernetesClusterStored.getKubernetesHosts().length) {
                     throw new NonExistingKubernetesHostException("Kubernetes host not found for [id] " + kubernetesHostId);
                 }
                 KubernetesHost[] kubernetesHostsArray = new KubernetesHost[kubernetesHostList.size()];
                 kubernetesHostList.toArray(kubernetesHostsArray);
 
                 // Update information model
-                kubernetesGroupStored.setKubernetesHosts(kubernetesHostsArray);
+                kubernetesClusterStored.setKubernetesHosts(kubernetesHostsArray);
 
                 if (log.isInfoEnabled()) {
                     log.info(String.format("Kubernetes host removed successfully: [id] %s", kubernetesHostId));
@@ -1274,16 +1274,16 @@ public class CloudControllerServiceImpl implements CloudControllerService {
             throws InvalidKubernetesMasterException, NonExistingKubernetesMasterException {
         Lock lock = null;
         try {
-            lock = CloudControllerContext.getInstance().acquireKubernetesGroupWriteLock();
+            lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock();
             CloudControllerUtil.validateKubernetesMaster(kubernetesMaster);
             if (log.isInfoEnabled()) {
                 log.info("Updating Kubernetes master: " + kubernetesMaster);
             }
             try {
-                KubernetesGroup kubernetesGroupStored = CloudControllerContext.getInstance().getKubernetesGroupContainingHost(kubernetesMaster.getHostId());
+                KubernetesCluster kubernetesClusterStored = CloudControllerContext.getInstance().getKubernetesClusterContainingHost(kubernetesMaster.getHostId());
 
                 // Update information model
-                kubernetesGroupStored.setKubernetesMaster(kubernetesMaster);
+                kubernetesClusterStored.setKubernetesMaster(kubernetesMaster);
 
                 CloudControllerContext.getInstance().persist();
 
@@ -1308,24 +1308,24 @@ public class CloudControllerServiceImpl implements CloudControllerService {
 
         Lock lock = null;
         try {
-            lock = CloudControllerContext.getInstance().acquireKubernetesGroupWriteLock();
+            lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock();
             CloudControllerUtil.validateKubernetesHost(kubernetesHost);
             if (log.isInfoEnabled()) {
                 log.info("Updating Kubernetes Host: " + kubernetesHost);
             }
 
             try {
-                KubernetesGroup kubernetesGroupStored = CloudControllerContext.getInstance().getKubernetesGroupContainingHost(kubernetesHost.getHostId());
-                for (int i = 0; i < kubernetesGroupStored.getKubernetesHosts().length; i++) {
-                    if (kubernetesGroupStored.getKubernetesHosts()[i].getHostId().equals(kubernetesHost.getHostId())) {
+                KubernetesCluster kubernetesClusterStored = CloudControllerContext.getInstance().getKubernetesClusterContainingHost(kubernetesHost.getHostId());
+                for (int i = 0; i < kubernetesClusterStored.getKubernetesHosts().length; i++) {
+                    if (kubernetesClusterStored.getKubernetesHosts()[i].getHostId().equals(kubernetesHost.getHostId())) {
                         // Update the information model
-                        kubernetesGroupStored.getKubernetesHosts()[i] = kubernetesHost;
+                        kubernetesClusterStored.getKubernetesHosts()[i] = kubernetesHost;
 
                         if (log.isInfoEnabled()) {
                             log.info(String.format("Kubernetes host updated successfully: [id] %s", kubernetesHost.getHostId()));
                         }
 
-                        CloudControllerContext.getInstance().updateKubernetesGroup(kubernetesGroupStored);
+                        CloudControllerContext.getInstance().updateKubernetesCluster(kubernetesClusterStored);
                         CloudControllerContext.getInstance().persist();
                         return true;
                     }