stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject [4/6] stratos git commit: Renaming kubernetes group to kubernetes cluster and moving kubernetes domain classes to cloud controller
Date Mon, 22 Dec 2014 03:18:53 GMT
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;
         }


Mime
View raw message