stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject [3/3] stratos git commit: Initial implementation of kubernetes iaas createInstance(), terminateInstance() methods
Date Sun, 21 Dec 2014 16:10:45 GMT
Initial implementation of kubernetes iaas createInstance(), terminateInstance() methods


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

Branch: refs/heads/master
Commit: 405ff36de8c79cd1b786272cb7ebeb1c1644c8f4
Parents: 9a355d9
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Sun Dec 21 21:38:51 2014 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Sun Dec 21 21:40:19 2014 +0530

----------------------------------------------------------------------
 .../autoscaler/api/AutoScalerServiceImpl.java   |   3 +-
 .../applications/ApplicationUtils.java          |   4 +-
 .../partition/ClusterLevelPartitionContext.java |   4 +-
 .../partition/GroupLevelPartitionContext.java   |   2 +-
 .../internal/AutoscalerServerComponent.java     |   4 +-
 .../kubernetes/KubernetesManager.java           |   4 +-
 .../monitor/cluster/ClusterMonitor.java         |   2 +-
 .../autoscaler/registry/RegistryManager.java    |   2 +-
 .../stratos/autoscaler/util/AutoscalerUtil.java |   2 +-
 .../publisher/CartridgeAgentEventPublisher.java |   1 +
 .../domain/ApplicationClusterContext.java       |   3 -
 .../cloud/controller/domain/Cartridge.java      |   2 +-
 .../cloud/controller/domain/ClusterContext.java |   7 +
 .../domain/KubernetesClusterContext.java        |  48 +-
 ...inerClusterContextToKubernetesContainer.java |  25 +-
 ...tainerClusterContextToKubernetesService.java |  79 +--
 ...erClusterContextToReplicationController.java |  54 +-
 .../functions/PodToMemberContext.java           |  36 +-
 .../stratos/cloud/controller/iaases/Iaas.java   |   4 +-
 .../cloud/controller/iaases/JcloudsEC2Iaas.java |   6 +-
 .../cloud/controller/iaases/JcloudsIaas.java    |   5 +-
 .../controller/iaases/JcloudsOpenstackIaas.java |   2 +-
 .../cloud/controller/iaases/KubernetesIaas.java | 617 ++++++++-----------
 .../cloud/controller/iaases/MockIaas.java       |   2 +-
 .../messaging/topology/TopologyBuilder.java     |   9 +-
 .../impl/CloudControllerServiceImpl.java        |   2 +-
 .../services/impl/InstanceCreator.java          |   3 +-
 .../controller/util/CloudControllerUtil.java    |   6 +-
 .../org/apache/stratos/common/Properties.java   |   9 +
 .../org/apache/stratos/common/Property.java     |   6 +-
 .../common/constants/StratosConstants.java      |   2 +-
 .../kubernetes/client/KubernetesApiClient.java  |  80 +--
 .../KubernetesAPIClientInterface.java           |  17 +-
 .../kubernetes/client/model/Container.java      |  16 +-
 .../client/model/EnvironmentVariable.java       |   2 -
 .../stratos/kubernetes/client/model/Label.java  |  40 --
 .../stratos/kubernetes/client/model/Labels.java |  42 ++
 .../kubernetes/client/model/Manifest.java       |  37 +-
 .../stratos/kubernetes/client/model/Pod.java    |  34 +-
 .../client/model/ReplicationController.java     |  25 +-
 .../kubernetes/client/model/Service.java        |  31 +-
 .../live/KubernetesApiClientLiveTest.java       |  61 +-
 .../kubernetes/client/unit/PodUnitTest.java     |   8 +-
 .../behaviour/CartridgeMgtBehaviour.java        |   2 +-
 .../manager/CartridgeSubscriptionManager.java   |   5 +-
 .../utils/ApplicationManagementUtil.java        |   4 +-
 46 files changed, 651 insertions(+), 708 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
index 43e881d..4499f17 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/api/AutoScalerServiceImpl.java
@@ -413,7 +413,8 @@ public class AutoScalerServiceImpl implements AutoScalerServiceInterface {
                 Properties properties = entry.getValue();
                 if (properties != null) {
                     for (Property property : properties.getProperties()) {
-                        metaDataServiceClien.addPropertyToCluster(appId, alias, property.getName(), property.getValue());
+                        metaDataServiceClien.addPropertyToCluster(appId, alias, property.getName(),
+                                String.valueOf(property.getValue()));
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
index d0918e6..f48b8a9 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/ApplicationUtils.java
@@ -227,7 +227,7 @@ public class ApplicationUtils {
                         if ("DEPLOYMENT".equals(payloadParamSubstring)) {
                             isDeploymentParam = true;
                         }
-                        payloadData.add(payloadParamSubstring, propertyEntry.getValue());
+                        payloadData.add(payloadParamSubstring, String.valueOf(propertyEntry.getValue()));
                     }
                 }
             }
@@ -239,7 +239,7 @@ public class ApplicationUtils {
 				if (property.getName().startsWith("payload_parameter.")) {
                     String payloadParamName = property.getName();
                     String payloadParamSubstring = payloadParamName.substring(payloadParamName.indexOf(".") + 1);
-                    payloadData.add(payloadParamSubstring, property.getValue());
+                    payloadData.add(payloadParamSubstring, String.valueOf(property.getValue()));
 				}
 			}
 		}

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
index 547aca7..5724e71 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
@@ -145,7 +145,7 @@ public class ClusterLevelPartitionContext extends PartitionContext implements Se
         }
         synchronized (pendingMembers) {
             for (Iterator<MemberContext> iterator = pendingMembers.iterator(); iterator.hasNext(); ) {
-                MemberContext pendingMember = (MemberContext) iterator.next();
+                MemberContext pendingMember = iterator.next();
                 if (id.equals(pendingMember.getMemberId())) {
                     iterator.remove();
                     return true;
@@ -653,7 +653,7 @@ public class ClusterLevelPartitionContext extends PartitionContext implements Se
                 Iterator<Entry<String, MemberContext>> iterator = obsoletedMembers.entrySet().iterator();
                 while (iterator.hasNext()) {
                     Map.Entry<String, MemberContext> pairs = iterator.next();
-                    MemberContext obsoleteMember = (MemberContext) pairs.getValue();
+                    MemberContext obsoleteMember = pairs.getValue();
                     if (obsoleteMember == null) {
                         continue;
                     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
index ccb8cfe..6a6b93f 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/GroupLevelPartitionContext.java
@@ -177,7 +177,7 @@ public class GroupLevelPartitionContext extends PartitionContext implements Seri
         }
         synchronized (pendingInstances) {
             for (Iterator<Instance> iterator = pendingInstances.iterator(); iterator.hasNext(); ) {
-                Instance pendingInstance = (Instance) iterator.next();
+                Instance pendingInstance = iterator.next();
                 if (id.equals(pendingInstance.getInstanceId())) {
                     iterator.remove();
                     return true;

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/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 5fc6f89..9de9587 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
@@ -39,7 +39,6 @@ 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.drools.reteoo.PartitionManager;
 import org.osgi.service.component.ComponentContext;
 import org.wso2.carbon.ntask.core.service.TaskService;
 import org.wso2.carbon.registry.api.RegistryException;
@@ -50,7 +49,6 @@ import java.io.File;
 import java.util.Iterator;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
-import java.util.logging.FileHandler;
 
 /**
  * @scr.component name=org.apache.stratos.autoscaler.internal.AutoscalerServerComponent"
@@ -136,7 +134,7 @@ public class AutoscalerServerComponent {
 			Iterator<KubernetesGroup> kubernetesGroupIterator = kubernetesGroupList.iterator();
 			while (kubernetesGroupIterator.hasNext()) {
 				KubernetesGroup kubernetesGroup = kubernetesGroupIterator.next();
-				KubernetesManager.getInstance().addNewKubernetesGroup(kubernetesGroup);
+				KubernetesManager.getInstance().addKubernetesGroup(kubernetesGroup);
 			}
 
 			//starting the processor chain

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/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
index 4eb420a..e67fd8d 100644
--- 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
@@ -158,9 +158,9 @@ public class KubernetesManager {
 
 
     /**
-     * Register a new KubernetesGroup in AutoScaler.
+     * Register a KubernetesGroup in AutoScaler.
      */
-    public synchronized boolean addNewKubernetesGroup(KubernetesGroup kubernetesGroup)
+    public synchronized boolean addKubernetesGroup(KubernetesGroup kubernetesGroup)
             throws InvalidKubernetesGroupException {
 
         if (kubernetesGroup == null) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
index 27cad51..2211775 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/cluster/ClusterMonitor.java
@@ -176,7 +176,7 @@ public class ClusterMonitor extends AbstractClusterMonitor {
         if (props != null && props.getProperties() != null) {
             for (Property prop : props.getProperties()) {
                 if (prop.getName().equals("PRIMARY")) {
-                    if (Boolean.parseBoolean(prop.getValue())) {
+                    if (Boolean.parseBoolean(String.valueOf(prop.getValue()))) {
                         log.debug("Adding member id [" + memberContext.getMemberId() + "] " +
                                 "member instance id [" + memberContext.getInstanceId() + "] as a primary member");
                         return true;

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/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 28e107c..5cb8bda 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
@@ -275,7 +275,7 @@ public class RegistryManager {
 
             String applicationResourcePath = AutoScalerConstants.AUTOSCALER_RESOURCE +
                     AutoScalerConstants.APPLICATION_CONTEXTS_RESOURCE + "/" + applicationId;
-            return (ApplicationContext) getApplicationContextByResourcePath(applicationResourcePath);
+            return getApplicationContextByResourcePath(applicationResourcePath);
         } finally {
             PrivilegedCarbonContext.endTenantFlow();
         }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
index 144d062..ebf5908 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/AutoscalerUtil.java
@@ -327,7 +327,7 @@ public class AutoscalerUtil {
                 if ((property != null) && (property.getValue() != null)) {
                     org.apache.stratos.cloud.controller.stub.Property newProperty = new org.apache.stratos.cloud.controller.stub.Property();
                     newProperty.setName(property.getName());
-                    newProperty.setValue(property.getValue());
+                    newProperty.setValue(String.valueOf(property.getValue()));
                     stubProps.addProperties(newProperty);
                 }
             }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/event/publisher/CartridgeAgentEventPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/event/publisher/CartridgeAgentEventPublisher.java b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/event/publisher/CartridgeAgentEventPublisher.java
index 5b01a4f..269cb47 100644
--- a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/event/publisher/CartridgeAgentEventPublisher.java
+++ b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/event/publisher/CartridgeAgentEventPublisher.java
@@ -56,6 +56,7 @@ public class CartridgeAgentEventPublisher {
 					CartridgeAgentConfiguration.getInstance().getClusterInstanceId(),
 					CartridgeAgentConfiguration.getInstance().getNetworkPartitionId(),
 					CartridgeAgentConfiguration.getInstance().getPartitionId());
+
 			String topic = Util.getMessageTopicName(event);
 			EventPublisher eventPublisher = EventPublisherPool
 					.getPublisher(topic);

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ApplicationClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ApplicationClusterContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ApplicationClusterContext.java
index ca3457d..cdd8cf3 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ApplicationClusterContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ApplicationClusterContext.java
@@ -43,11 +43,9 @@ public class ApplicationClusterContext {
     // properties
     private Properties properties;
 
-
     public ApplicationClusterContext() {
     }
 
-
     public String getClusterId() {
         return clusterId;
     }
@@ -139,5 +137,4 @@ public class ApplicationClusterContext {
     public void setProperties(Properties properties) {
         this.properties = properties;
     }
-
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
index c3d5d03..6cce42b 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/Cartridge.java
@@ -127,7 +127,7 @@ public class Cartridge implements Serializable{
     
     public void addIaasProviders(Map<String, IaasProvider> map) {
         for (Iterator<String> iterator = map.keySet().iterator(); iterator.hasNext();) {
-            String key = (String) iterator.next();
+            String key = iterator.next();
             IaasProvider value = map.get(key);
             
             partitionToIaasProvider.put(key, value);

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
index 06e48cc..1652997 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/ClusterContext.java
@@ -78,6 +78,13 @@ public class ClusterContext implements Serializable{
         return hostName;
     }
 
+    public String findContainerHostName() {
+        if (hostName.indexOf('.') != -1) {
+            hostName = hostName.replace('.', '-');
+        }
+        return hostName;
+    }
+
     public void setHostName(String hostName) {
         this.hostName = hostName;
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/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
index aecd614..83feabd 100644
--- 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
@@ -22,6 +22,7 @@ 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;
@@ -44,16 +45,16 @@ public class KubernetesClusterContext implements Serializable {
     private String masterIp;
     private String masterPort;
     // available list of ports
-    private List<Integer> availableHostPorts;
+    private List<Integer> servicePorts;
     // kubernetes client API instance
     private transient KubernetesApiClient kubApi;
     
     public KubernetesClusterContext(String id, String masterIp, String masterPort, int lowerPort, int upperPort) {
-    	availableHostPorts = new ArrayList<Integer>();
+    	servicePorts = new ArrayList<Integer>();
+        this.lowerPort = lowerPort;
     	this.upperPort = upperPort;
-    	this.lowerPort = lowerPort;
-    	// populate the ports
-        populatePorts(lowerPort, upperPort);
+    	// Generate the ports
+        generateServicePorts(lowerPort, upperPort);
     	this.kubernetesClusterId = id;
     	this.masterIp = masterIp;
     	this.masterPort = masterPort;
@@ -68,35 +69,36 @@ public class KubernetesClusterContext implements Serializable {
 	public String getKubernetesClusterId() {
 		return kubernetesClusterId;
 	}
+
 	public void setKubernetesClusterId(String kubernetesClusterId) {
 		this.kubernetesClusterId = kubernetesClusterId;
 	}
 
-	public List<Integer> getAvailableHostPorts() {
-		return availableHostPorts;
+	public List<Integer> getServicePorts() {
+		return servicePorts;
 	}
 
-	public void setAvailableHostPorts(List<Integer> availableHostPorts) {
-		this.availableHostPorts = availableHostPorts;
+	public void setServicePorts(List<Integer> servicePorts) {
+		this.servicePorts = servicePorts;
 	}
 	
-	public int getAnAvailableHostPort() {
-	    if (availableHostPorts.isEmpty()) {
+	public int getNextServicePort() {
+	    if (servicePorts.isEmpty()) {
 	        return -1;
 	    }
-		return availableHostPorts.remove(0);
+		return servicePorts.remove(0);
 	}
 	
-	public void deallocateHostPort (int port) {
-		if (!availableHostPorts.contains(port)) {
-			availableHostPorts.add(port);
+	public void deallocatePort(int port) {
+		if (!servicePorts.contains(port)) {
+			servicePorts.add(port);
+            // TODO Sort elements
 		}
 	}
 
-	private void populatePorts(int i, int j) {
-
-		for (int x = i; x < j; x++) {
-			availableHostPorts.add(x);
+	private void generateServicePorts(int lowerPort, int upperPort) {
+		for (int port = lowerPort; port <= upperPort; port++) {
+			servicePorts.add(port);
 		}
 	}
 
@@ -139,7 +141,7 @@ public class KubernetesClusterContext implements Serializable {
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((availableHostPorts == null) ? 0 : availableHostPorts.hashCode());
+        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());
@@ -157,10 +159,10 @@ public class KubernetesClusterContext implements Serializable {
         if (getClass() != obj.getClass())
             return false;
         KubernetesClusterContext other = (KubernetesClusterContext) obj;
-        if (availableHostPorts == null) {
-            if (other.availableHostPorts != null)
+        if (servicePorts == null) {
+            if (other.servicePorts != null)
                 return false;
-        } else if (!availableHostPorts.equals(other.availableHostPorts))
+        } else if (!servicePorts.equals(other.servicePorts))
             return false;
         if (kubernetesClusterId == null) {
             if (other.kubernetesClusterId != null)

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesContainer.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesContainer.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesContainer.java
index 2a9137a..4b0916b 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesContainer.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesContainer.java
@@ -49,31 +49,22 @@ public class ContainerClusterContextToKubernetesContainer implements Function<Me
         ClusterContext clusterContext = CloudControllerContext.getInstance().getClusterContext(clusterId);
 
         Container container = new Container();
-        container.setName(getCompatibleName(clusterContext.getHostName()));
+        container.setName(clusterContext.findContainerHostName());
 
         Cartridge cartridge = CloudControllerContext.getInstance().getCartridge(clusterContext.getCartridgeType());
-
         if (cartridge == null) {
-            log.error("Cannot find a Cartridge of type : " + clusterContext.getCartridgeType());
-            return null;
+            String message = "Could not find cartridge: [cartridge-type] " + clusterContext.getCartridgeType();
+            log.error(message);
+            throw new RuntimeException(message);
         }
 
         container.setImage(cartridge.getContainer().getImageName());
-
         container.setPorts(getPorts(clusterContext, cartridge));
-
         container.setEnv(getEnvironmentVars(memberContext, clusterContext));
 
         return container;
     }
 
-    private String getCompatibleName(String hostName) {
-        if (hostName.indexOf('.') != -1) {
-            hostName = hostName.replace('.', '-');
-        }
-        return hostName;
-    }
-
     private Port[] getPorts(ClusterContext ctxt, Cartridge cartridge) {
         Port[] ports = new Port[cartridge.getPortMappings().size()];
         List<Port> portList = new ArrayList<Port>();
@@ -91,7 +82,6 @@ public class ContainerClusterContextToKubernetesContainer implements Function<Me
     }
 
     private EnvironmentVariable[] getEnvironmentVars(MemberContext memberCtxt, ClusterContext ctxt) {
-
         String kubernetesClusterId = CloudControllerUtil.getProperty(ctxt.getProperties(),
                 StratosConstants.KUBERNETES_CLUSTER_ID);
 
@@ -102,19 +92,16 @@ public class ContainerClusterContextToKubernetesContainer implements Function<Me
             Properties props1 = memberCtxt.getProperties();
             if (props1 != null) {
                 for (Property prop : props1.getProperties()) {
-                    addToEnvironment(envVars, prop.getName(), prop.getValue());
+                    addToEnvironment(envVars, prop.getName(), String.valueOf(prop.getValue()));
                 }
             }
         }
 
         EnvironmentVariable[] vars = new EnvironmentVariable[envVars.size()];
-
         return envVars.toArray(vars);
-
     }
 
     private void addToEnvironment(List<EnvironmentVariable> envVars, String payload) {
-
         if (payload != null) {
             String[] entries = payload.split(",");
             for (String entry : entries) {
@@ -128,11 +115,9 @@ public class ContainerClusterContextToKubernetesContainer implements Function<Me
     }
 
     private void addToEnvironment(List<EnvironmentVariable> envVars, String name, String value) {
-
         EnvironmentVariable var = new EnvironmentVariable();
         var.setName(name);
         var.setValue(value);
         envVars.add(var);
     }
-
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesService.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesService.java
index d6f0a0f..4adba07 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesService.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToKubernetesService.java
@@ -16,48 +16,37 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.stratos.cloud.controller.functions;
-
-import org.apache.stratos.cloud.controller.context.CloudControllerContext;
-import org.apache.stratos.cloud.controller.domain.ClusterContext;
-import org.apache.stratos.cloud.controller.domain.ContainerClusterContext;
-import org.apache.stratos.cloud.controller.domain.KubernetesClusterContext;
-import org.apache.stratos.cloud.controller.domain.MemberContext;
-import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
-import org.apache.stratos.common.constants.StratosConstants;
-import org.apache.stratos.kubernetes.client.model.Selector;
-import org.apache.stratos.kubernetes.client.model.Service;
-
-import com.google.common.base.Function;
-
-/**
- * Is responsible for converting a {@link ContainerClusterContext} object to a Kubernetes
- * {@link Service} Object.
- */
-public class ContainerClusterContextToKubernetesService implements Function<MemberContext, Service> {
-
-    @Override
-    public Service apply(MemberContext memberContext) {
-
-        String clusterId = memberContext.getClusterId();
-        ClusterContext clusterContext = CloudControllerContext.getInstance().getClusterContext(clusterId);
-
-        String kubernetesClusterId = CloudControllerUtil.getProperty(
-                clusterContext.getProperties(), StratosConstants.KUBERNETES_CLUSTER_ID);
-        KubernetesClusterContext kubClusterContext = CloudControllerContext.getInstance()
-                .getKubernetesClusterContext(kubernetesClusterId);
-
-        Service service = new Service();
-        service.setApiVersion("v1beta1");
-        service.setId(CloudControllerUtil.getCompatibleId(clusterId));
-        service.setKind("Service");
-        int hostPort = kubClusterContext.getAnAvailableHostPort();
-        service.setPort(hostPort);
-        Selector selector = new Selector();
-        selector.setName(clusterId);
-        service.setSelector(selector);
-
-        return service;
-    }
-
-}
+//package org.apache.stratos.cloud.controller.functions;
+//
+//import org.apache.stratos.cloud.controller.context.CloudControllerContext;
+//import org.apache.stratos.cloud.controller.domain.ClusterContext;
+//import org.apache.stratos.cloud.controller.domain.ContainerClusterContext;
+//import org.apache.stratos.cloud.controller.domain.KubernetesClusterContext;
+//import org.apache.stratos.cloud.controller.domain.MemberContext;
+//import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
+//import org.apache.stratos.common.constants.StratosConstants;
+//import org.apache.stratos.kubernetes.client.model.Selector;
+//import org.apache.stratos.kubernetes.client.model.Service;
+//
+//import com.google.common.base.Function;
+//
+///**
+// * Is responsible for converting a {@link ContainerClusterContext} object to a Kubernetes
+// * {@link Service} Object.
+// */
+//public class ContainerClusterContextToKubernetesService implements Function<ClusterContext, Service> {
+//
+//    @Override
+//    public Service apply(ClusterContext clusterContext) {
+//
+//        String clusterId = clusterContext.getClusterId();
+//        String kubernetesClusterId = CloudControllerUtil.getProperty(
+//                clusterContext.getProperties(), StratosConstants.KUBERNETES_CLUSTER_ID);
+//        KubernetesClusterContext kubClusterContext = CloudControllerContext.getInstance()
+//                .getKubernetesClusterContext(kubernetesClusterId);
+//
+//
+//
+//        return service;
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToReplicationController.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToReplicationController.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToReplicationController.java
index af63a3f..7aeaa3e 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToReplicationController.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/ContainerClusterContextToReplicationController.java
@@ -22,10 +22,8 @@ import org.apache.stratos.cloud.controller.context.CloudControllerContext;
 import org.apache.stratos.cloud.controller.domain.ClusterContext;
 import org.apache.stratos.cloud.controller.domain.ContainerClusterContext;
 import org.apache.stratos.cloud.controller.domain.MemberContext;
-import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
-import org.apache.stratos.common.constants.StratosConstants;
 import org.apache.stratos.kubernetes.client.model.Container;
-import org.apache.stratos.kubernetes.client.model.Label;
+import org.apache.stratos.kubernetes.client.model.Labels;
 import org.apache.stratos.kubernetes.client.model.Manifest;
 import org.apache.stratos.kubernetes.client.model.Pod;
 import org.apache.stratos.kubernetes.client.model.ReplicationController;
@@ -35,8 +33,10 @@ import org.apache.stratos.kubernetes.client.model.State;
 import com.google.common.base.Function;
 
 /**
- * Is responsible for converting a {@link ContainerClusterContext} object to a Kubernetes
- * {@link ReplicationController} Object.
+ * Is responsible for converting a {@link org.apache.stratos.cloud.controller.domain.MemberContext} object to a Kubernetes
+ * {@link ReplicationController} object:
+ * - A replication controller is created for each cluster but uses the same environment variables
+ * generated by the member context, hence using member context.
  */
 public class ContainerClusterContextToReplicationController implements
         Function<MemberContext, ReplicationController> {
@@ -44,44 +44,42 @@ public class ContainerClusterContextToReplicationController implements
     @Override
     public ReplicationController apply(MemberContext memberContext) {
 
-        String clusterId = memberContext.getClusterId();
-        ClusterContext clusterContext = CloudControllerContext.getInstance().getClusterContext(clusterId);
-
         ReplicationController replicationController = new ReplicationController();
-        replicationController.setId(clusterContext.getClusterId());
+        replicationController.setId(memberContext.getClusterId());
         replicationController.setKind("ReplicationController");
         replicationController.setApiVersion("v1beta1");
-        State desiredState = new State();
-        String minReplicas = CloudControllerUtil.getProperty(clusterContext.getProperties(),
-                StratosConstants.KUBERNETES_MIN_REPLICAS);
-        desiredState.setReplicas(Integer.parseInt(minReplicas));
+
+        State state = new State();
+        state.setReplicas(1);
         Selector selector = new Selector();
-        selector.setName(clusterContext.getClusterId());
-        desiredState.setReplicaSelector(selector);
+        selector.setName(memberContext.getClusterId());
+        state.setReplicaSelector(selector);
 
         Pod podTemplate = new Pod();
         State podState = new State();
         Manifest manifest = new Manifest();
         manifest.setVersion("v1beta1");
-        manifest.setId(clusterContext.getClusterId());
+        manifest.setId(memberContext.getClusterId());
+        podTemplate.setState(podState);
 
+        // Add container to the manifest
         ContainerClusterContextToKubernetesContainer containerFunc = new ContainerClusterContextToKubernetesContainer();
         Container container = containerFunc.apply(memberContext);
-
-        manifest.setContainers(new Container[] { container });
-
+        manifest.addContainer(container);
         podState.setManifest(manifest);
-        podTemplate.setDesiredState(podState);
-        Label l1 = new Label();
-        l1.setName(clusterContext.getClusterId());
-        podTemplate.setLabels(l1);
 
-        desiredState.setPodTemplate(podTemplate);
-        replicationController.setDesiredState(desiredState);
+        // Set pod labels
+        Labels podLabels = new Labels();
+        podLabels.setName(memberContext.getClusterId());
+        podTemplate.setLabels(podLabels);
+
+        state.setPodTemplate(podTemplate);
+        replicationController.setDesiredState(state);
 
-        Label l2 = new Label();
-        l2.setName(clusterContext.getClusterId());
-        replicationController.setLabels(l2);
+        // Set replication controller labels
+        Labels replicatoionControllerLabels = new Labels();
+        replicatoionControllerLabels.setName(memberContext.getClusterId());
+        replicationController.setLabels(replicatoionControllerLabels);
 
         return replicationController;
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/PodToMemberContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/PodToMemberContext.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/PodToMemberContext.java
index a744eb1..c8d05d2 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/PodToMemberContext.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/functions/PodToMemberContext.java
@@ -26,23 +26,19 @@ import com.google.common.base.Function;
  * Is responsible for converting a {@link Pod} object to a
  * {@link MemberContext} Object.
  */
-public class PodToMemberContext implements Function<Pod, MemberContext> {
-
-    @Override
-    public MemberContext apply(Pod pod) {
-
-        if (pod == null) {
-            return null;
-        }
-        MemberContext memberContext = new MemberContext();
-        memberContext.setMemberId(pod.getId());
-        memberContext.setDefaultPrivateIP(pod.getCurrentState().getHostIP());
-        memberContext.setPrivateIPs(new String[]{pod.getCurrentState().getHostIP()});
-        memberContext.setDefaultPublicIP(pod.getCurrentState().getHostIP());
-        memberContext.setPublicIPs(new String[]{pod.getCurrentState().getHostIP()});
-        memberContext.setInitTime(System.currentTimeMillis());
-        
-        return memberContext;
-    }
-
-}
+//public class PodToMemberContext implements Function<Pod, MemberContext> {
+//
+//    @Override
+//    public MemberContext apply(Pod pod) {
+//        if (pod == null) {
+//            return null;
+//        }
+//        MemberContext memberContext = new MemberContext();
+//        memberContext.setInstanceId(pod.getId());
+//        memberContext.setPrivateIpAddress(pod.getCurrentState().getHostIP());
+//        memberContext.setPublicIpAddress(pod.getCurrentState().getHostIP());
+//        memberContext.setInitTime(System.currentTimeMillis());
+//
+//        return memberContext;
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/Iaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/Iaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/Iaas.java
index 4270f19..2224a56 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/Iaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/Iaas.java
@@ -54,7 +54,7 @@ public abstract class Iaas {
      * @param memberContext
      * @return updated memberContext
      */
-    public abstract MemberContext createInstance(MemberContext memberContext) throws CartridgeNotFoundException;
+    public abstract MemberContext startInstance(MemberContext memberContext) throws CartridgeNotFoundException;
 
     /**
      * This will deallocate/release the given IP address back to pool.
@@ -155,5 +155,5 @@ public abstract class Iaas {
      * @throws InvalidCartridgeTypeException
      * @throws InvalidMemberException
      */
-    public abstract void terminateInstance(MemberContext memberContext) throws InvalidCartridgeTypeException, InvalidMemberException;
+    public abstract void terminateInstance(MemberContext memberContext) throws InvalidCartridgeTypeException, InvalidMemberException, MemberTerminationFailedException;
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsEC2Iaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsEC2Iaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsEC2Iaas.java
index 23c62d0..3133cad 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsEC2Iaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsEC2Iaas.java
@@ -276,7 +276,7 @@ public class JcloudsEC2Iaas extends JcloudsIaas {
 
 		// first try to find an unassigned IP.
 		ArrayList<PublicIpInstanceIdPair> unassignedIps = Lists
-				.newArrayList(Iterables.filter(elasticIPAddressApi.describeAddressesInRegion(region, new String[0]),
+				.newArrayList(Iterables.filter(elasticIPAddressApi.describeAddressesInRegion(region),
 						new Predicate<PublicIpInstanceIdPair>() {
 
 							@Override
@@ -419,8 +419,8 @@ public class JcloudsEC2Iaas extends JcloudsIaas {
         		getAvailabilityZoneAndRegionApiForRegion(region).get();
         
         Set<AvailabilityZoneInfo> availabilityZones =
-                                                      zoneRegionApi.describeAvailabilityZonesInRegion(region,
-                                                              new DescribeAvailabilityZonesOptions[0]);
+                                                      zoneRegionApi.describeAvailabilityZonesInRegion(region
+													  );
         for (AvailabilityZoneInfo zoneInfo : availabilityZones) {
             String configuredZone = zoneInfo.getZone();
             if (zone.equalsIgnoreCase(configuredZone)) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsIaas.java
index 6d1e7f3..11d11ed 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsIaas.java
@@ -102,7 +102,7 @@ public abstract class JcloudsIaas extends Iaas {
     }
 
     @Override
-    public MemberContext createInstance(MemberContext memberContext) {
+    public MemberContext startInstance(MemberContext memberContext) {
         // generate the group id from domain name and sub domain name.
         // Should have lower-case ASCII letters, numbers, or dashes.
         // Should have a length between 3-15
@@ -279,7 +279,8 @@ public abstract class JcloudsIaas extends Iaas {
         }
     }
 
-    public void terminateInstance(MemberContext memberContext) throws InvalidCartridgeTypeException, InvalidMemberException {
+    public void terminateInstance(MemberContext memberContext) throws InvalidCartridgeTypeException,
+            InvalidMemberException {
         String memberId = memberContext.getMemberId();
         String cartridgeType = memberContext.getCartridgeType();
         String nodeId = memberContext.getInstanceId();

http://git-wip-us.apache.org/repos/asf/stratos/blob/405ff36d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsOpenstackIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsOpenstackIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsOpenstackIaas.java
index d3386f2..6a7bc24 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsOpenstackIaas.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/JcloudsOpenstackIaas.java
@@ -397,7 +397,7 @@ public class JcloudsOpenstackIaas extends JcloudsIaas {
 
         IaasProvider iaasInfo = getIaasProvider();
         String region = ComputeServiceBuilderUtil.extractRegion(iaasInfo);
-        ComputeServiceContext context = iaasInfo.getComputeService().getContext();;
+        ComputeServiceContext context = iaasInfo.getComputeService().getContext();
         NovaApi novaApi = context.unwrapApi(NovaApi.class);
         VolumeApi volumeApi = novaApi.getVolumeExtensionForZone(region).get();
         Volume.Status volumeStatus = this.getVolumeStatus(volumeApi, volumeId);


Mime
View raw message