stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject [01/12] stratos git commit: Renaming iaas classes and moving them to new packages
Date Wed, 24 Dec 2014 17:36:24 GMT
Repository: stratos
Updated Branches:
  refs/heads/master c69d25242 -> c4e4634d8


http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/openstack/OpenstackPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/openstack/OpenstackPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/openstack/OpenstackPartitionValidator.java
new file mode 100644
index 0000000..bde75ea
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/openstack/OpenstackPartitionValidator.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ * KIND, either express or implied.  See the License for the 
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cloud.controller.iaases.openstack;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.cloud.controller.domain.Partition;
+import org.apache.stratos.cloud.controller.exception.InvalidIaasProviderException;
+import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
+import org.apache.stratos.cloud.controller.iaases.Iaas;
+import org.apache.stratos.cloud.controller.domain.IaasProvider;
+import org.apache.stratos.cloud.controller.iaases.PartitionValidator;
+import org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil;
+import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
+import org.apache.stratos.messaging.domain.topology.Scope;
+
+import java.util.Properties;
+
+
+/**
+ * The Openstack Nova {@link org.apache.stratos.cloud.controller.iaases.PartitionValidator} implementation.
+ *
+ *
+ */
+public class OpenstackPartitionValidator implements PartitionValidator {
+    
+    private static final Log log = LogFactory.getLog(OpenstackPartitionValidator.class);
+
+    private IaasProvider iaasProvider;
+    private Iaas iaas;
+
+    @Override
+    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
+        try {
+            // validate the existence of the zone and hosts properties.
+            if (properties.containsKey(Scope.region.toString())) {
+                String region = properties.getProperty(Scope.region.toString());
+                
+                if (iaasProvider.getImage() != null && !iaasProvider.getImage().contains(region)) {
+
+                    String msg = "Invalid partition detected, invalid region: [partition-id] " + partition.getId() +
+                                         " [region] " + region;
+                    log.error(msg);
+                    throw new InvalidPartitionException(msg);
+                } 
+                
+                iaas.isValidRegion(region);
+                
+                IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
+                Iaas updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
+                updatedIaas.setIaasProvider(updatedIaasProvider);
+                
+                if (properties.containsKey(Scope.zone.toString())) {
+                    String zone = properties.getProperty(Scope.zone.toString());
+                    iaas.isValidZone(region, zone);
+                    
+                    updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE, zone);
+                    updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
+                    updatedIaas.setIaasProvider(updatedIaasProvider);
+                } 
+                
+                updateOtherProperties(updatedIaasProvider, properties);
+                return updatedIaasProvider;
+            } else {
+
+                return iaasProvider;
+            }
+        } catch (Exception e) {
+            String msg = "Invalid partition detected: [partition-id] " + partition.getId() + e.getMessage();
+            log.error(msg, e);
+            throw new InvalidPartitionException(msg, e);
+        }
+    }
+    
+    private void updateOtherProperties(IaasProvider updatedIaasProvider,
+			Properties properties) {
+    	Iaas updatedIaas;
+		try {
+			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
+
+			for (Object property : properties.keySet()) {
+				if (property instanceof String) {
+					String key = (String) property;
+					updatedIaasProvider.setProperty(key,
+							properties.getProperty(key));
+					if (log.isDebugEnabled()) {
+						log.debug("Added property " + key
+								+ " to the IaasProvider.");
+					}
+				}
+			}
+			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
+			updatedIaas.setIaasProvider(updatedIaasProvider);
+		} catch (InvalidIaasProviderException ignore) {
+		}
+    	
+	}
+
+    @Override
+    public void setIaasProvider(IaasProvider iaas) {
+        this.iaasProvider = iaas;
+        this.iaas = iaas.getIaas();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/AWSEC2PartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/AWSEC2PartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/AWSEC2PartitionValidator.java
deleted file mode 100644
index 6b85913..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/AWSEC2PartitionValidator.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidIaasProviderException;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-import org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil;
-import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
-import org.apache.stratos.messaging.domain.topology.Scope;
-
-import java.util.Properties;
-
-
-/**
- * AWS-EC2 {@link PartitionValidator} implementation.
- *
- *
- */
-public class AWSEC2PartitionValidator implements PartitionValidator {
-    
-    private static final Log log = LogFactory.getLog(AWSEC2PartitionValidator.class);
-    private IaasProvider iaasProvider;
-    private Iaas iaas;
-
-    @Override
-    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
-        // validate the existence of the region and zone properties.
-        try {
-            if (properties.containsKey(Scope.region.toString())) {
-                String region = properties.getProperty(Scope.region.toString());
-                
-                if (iaasProvider.getImage() != null && !iaasProvider.getImage().contains(region)) {
-
-                    String message = "Invalid partition detected, invalid region: [partition-id] " + partition.getId() +
-                                         " [region] " + region;
-                    log.error(message);
-                    throw new InvalidPartitionException(message);
-                } 
-                
-                iaas.isValidRegion(region);
-                
-                IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
-                Iaas updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-                updatedIaas.setIaasProvider(updatedIaasProvider);
-                
-                if (properties.containsKey(Scope.zone.toString())) {
-                    String zone = properties.getProperty(Scope.zone.toString());
-                    iaas.isValidZone(region, zone);
-                    updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE, zone);
-                    updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-                    updatedIaas.setIaasProvider(updatedIaasProvider);
-                } 
-                
-                updateOtherProperties(updatedIaasProvider, properties);
-                return updatedIaasProvider;
-                
-            } else {
-                
-                return iaasProvider;
-            }
-        } catch (Exception ex) {
-            String message = "Invalid partition detected: [partition-id] " + partition.getId();
-            log.error(message, ex);
-            throw new InvalidPartitionException(message, ex);
-        }
-    }
-
-    private void updateOtherProperties(IaasProvider updatedIaasProvider,
-			Properties properties) {
-    	Iaas updatedIaas;
-		try {
-			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-
-			for (Object property : properties.keySet()) {
-				if (property instanceof String) {
-					String key = (String) property;
-					updatedIaasProvider.setProperty(key,
-							properties.getProperty(key));
-					if (log.isDebugEnabled()) {
-						log.debug("Added property " + key
-								+ " to the IaasProvider.");
-					}
-				}
-			}
-			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-			updatedIaas.setIaasProvider(updatedIaasProvider);
-		} catch (InvalidIaasProviderException ignore) {
-		}
-    	
-	}
-
-	@Override
-    public void setIaasProvider(IaasProvider iaas) {
-        this.iaasProvider = iaas;
-        this.iaas = iaas.getIaas();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/CloudstackPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/CloudstackPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/CloudstackPartitionValidator.java
deleted file mode 100644
index f1bb11d..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/CloudstackPartitionValidator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-import org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil;
-import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
-import org.apache.stratos.messaging.domain.topology.Scope;
-
-import java.util.Properties;
-
-
-public class CloudstackPartitionValidator implements PartitionValidator {
-
-    private static final Log log = LogFactory.getLog(AWSEC2PartitionValidator.class);
-
-    private IaasProvider iaasProvider;
-    private Iaas iaas;
-
-    @Override
-    public void setIaasProvider(IaasProvider iaas) {
-        this.iaasProvider = iaas;
-        this.iaas = iaas.getIaas();
-    }
-
-    @Override
-    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
-
-        try {
-            IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
-            Iaas updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-            updatedIaas.setIaasProvider(updatedIaasProvider);
-
-            if (properties.containsKey(Scope.zone.toString())) {
-                String zone = properties.getProperty(Scope.zone.toString());
-                iaas.isValidZone(null, zone);
-                updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE, zone);
-                updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-                updatedIaas.setIaasProvider(updatedIaasProvider);
-            }
-
-        } catch (Exception e) {
-            String msg = "Invalid partition detected: [partition-id] " + partition.getId() + e.getMessage();
-            log.error(msg, e);
-            throw new InvalidPartitionException(msg, e);
-        }
-        return iaasProvider;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/DockerPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/DockerPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/DockerPartitionValidator.java
deleted file mode 100644
index 46259d6..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/DockerPartitionValidator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidIaasProviderException;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil;
-
-import java.util.Properties;
-
-/**
- * Docker partition validator definition.
- */
-public class DockerPartitionValidator implements PartitionValidator {
-
-	private static final Log log = LogFactory.getLog(DockerPartitionValidator.class);
-
-    private IaasProvider iaasProvider;
-
-    @Override
-    public void setIaasProvider(IaasProvider iaasProvider) {
-        this.iaasProvider = iaasProvider;
-    }
-
-    @Override
-    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
-    	// in Docker case currently we only update the custom properties passed via Partitions, and
-    	// no validation done as of now.
-    	IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
-    	updateOtherProperties(updatedIaasProvider, properties);
-        return updatedIaasProvider;
-    }
-    
-    private void updateOtherProperties(IaasProvider updatedIaasProvider,
-			Properties properties) {
-    	Iaas updatedIaas;
-		try {
-			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-
-			for (Object property : properties.keySet()) {
-				if (property instanceof String) {
-					String key = (String) property;
-					updatedIaasProvider.setProperty(key,
-							properties.getProperty(key));
-					if (log.isDebugEnabled()) {
-						log.debug("Added property " + key
-								+ " to the IaasProvider.");
-					}
-				}
-			}
-			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-			updatedIaas.setIaasProvider(updatedIaasProvider);
-		} catch (InvalidIaasProviderException ignore) {
-		}
-    	
-	}
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/GCEPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/GCEPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/GCEPartitionValidator.java
deleted file mode 100644
index f828ccd..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/GCEPartitionValidator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-
-
-/**
- * The VCloud {@link PartitionValidator} implementation.
- *
- */
-public class GCEPartitionValidator implements PartitionValidator {
-    
-    private static final Log log = LogFactory.getLog(VCloudPartitionValidator.class);
-
-    private IaasProvider iaasProvider;
-
-    @Override
-    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
-        return iaasProvider;
-    }
-
-    @Override
-    public void setIaasProvider(IaasProvider iaasProvider) {
-        this.iaasProvider = iaasProvider;
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java
deleted file mode 100644
index f057e9f..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/KubernetesPartitionValidator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.context.CloudControllerContext;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.exception.NonExistingKubernetesClusterException;
-
-import java.util.Properties;
-
-/**
- * Kubernetes partition validator
- */
-public class KubernetesPartitionValidator implements PartitionValidator {
-
-    private static final Log log = LogFactory.getLog(KubernetesPartitionValidator.class);
-
-    private IaasProvider iaasProvider;
-
-    @Override
-    public void setIaasProvider(IaasProvider iaasProvider) {
-        this.iaasProvider = iaasProvider;
-    }
-
-    /**
-     * Validate the given properties for its existent in this partition.
-     *
-     * @param partition  partition.
-     * @param properties set of properties to be validated.
-     * @return cloned and modified {@link IaasProvider} which maps to the given partition.
-     * @throws InvalidPartitionException if at least one property is evaluated to be invalid.
-     */
-    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
-
-        String kubernetesClusterId = partition.getKubernetesClusterId();
-        if (StringUtils.isBlank(kubernetesClusterId)) {
-            String message = "Kubernetes cluster id not found in partition: [partition-id] " + partition.getId();
-            log.error(message);
-            throw new InvalidPartitionException(message);
-        }
-
-        try {
-            CloudControllerContext.getInstance().getKubernetesCluster(kubernetesClusterId);
-            return iaasProvider;
-        } catch (NonExistingKubernetesClusterException e) {
-            String message = "Kubernetes partition is not valid: [partition-id] " + partition.getId();
-            log.error(message, e);
-            throw new InvalidPartitionException(message, e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/OpenstackNovaPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/OpenstackNovaPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/OpenstackNovaPartitionValidator.java
deleted file mode 100644
index 06fb509..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/OpenstackNovaPartitionValidator.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidIaasProviderException;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-import org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceUtil;
-import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
-import org.apache.stratos.messaging.domain.topology.Scope;
-
-import java.util.Properties;
-
-
-/**
- * The Openstack Nova {@link PartitionValidator} implementation.
- *
- *
- */
-public class OpenstackNovaPartitionValidator implements PartitionValidator {
-    
-    private static final Log log = LogFactory.getLog(OpenstackNovaPartitionValidator.class);
-
-    private IaasProvider iaasProvider;
-    private Iaas iaas;
-
-    @Override
-    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
-        try {
-            // validate the existence of the zone and hosts properties.
-            if (properties.containsKey(Scope.region.toString())) {
-                String region = properties.getProperty(Scope.region.toString());
-                
-                if (iaasProvider.getImage() != null && !iaasProvider.getImage().contains(region)) {
-
-                    String msg = "Invalid partition detected, invalid region: [partition-id] " + partition.getId() +
-                                         " [region] " + region;
-                    log.error(msg);
-                    throw new InvalidPartitionException(msg);
-                } 
-                
-                iaas.isValidRegion(region);
-                
-                IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
-                Iaas updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-                updatedIaas.setIaasProvider(updatedIaasProvider);
-                
-                if (properties.containsKey(Scope.zone.toString())) {
-                    String zone = properties.getProperty(Scope.zone.toString());
-                    iaas.isValidZone(region, zone);
-                    
-                    updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE, zone);
-                    updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-                    updatedIaas.setIaasProvider(updatedIaasProvider);
-                } 
-                
-                updateOtherProperties(updatedIaasProvider, properties);
-                return updatedIaasProvider;
-            } else {
-
-                return iaasProvider;
-            }
-        } catch (Exception e) {
-            String msg = "Invalid partition detected: [partition-id] " + partition.getId() + e.getMessage();
-            log.error(msg, e);
-            throw new InvalidPartitionException(msg, e);
-        }
-    }
-    
-    private void updateOtherProperties(IaasProvider updatedIaasProvider,
-			Properties properties) {
-    	Iaas updatedIaas;
-		try {
-			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-
-			for (Object property : properties.keySet()) {
-				if (property instanceof String) {
-					String key = (String) property;
-					updatedIaasProvider.setProperty(key,
-							properties.getProperty(key));
-					if (log.isDebugEnabled()) {
-						log.debug("Added property " + key
-								+ " to the IaasProvider.");
-					}
-				}
-			}
-			updatedIaas = CloudControllerServiceUtil.buildIaas(updatedIaasProvider);
-			updatedIaas.setIaasProvider(updatedIaasProvider);
-		} catch (InvalidIaasProviderException ignore) {
-		}
-    	
-	}
-
-    @Override
-    public void setIaasProvider(IaasProvider iaas) {
-        this.iaasProvider = iaas;
-        this.iaas = iaas.getIaas();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/PartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/PartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/PartitionValidator.java
deleted file mode 100644
index 6a8810a..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/PartitionValidator.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import java.util.Properties;
-
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-
-/**
- * All the IaaSes needs to write a partition validator which implements this interface.
- */
-public interface PartitionValidator {
-
-    /**
-     * set the IaasProvider reference.
-     * 
-     * @param iaasProvider {@link IaasProvider}
-     */
-    public abstract void setIaasProvider(IaasProvider iaasProvider);
-
-    /**
-     * Validate the given properties for its existent in this partition.
-     * 
-     * @param partition partition.
-     * @param properties set of properties to be validated.
-     * @return cloned and modified {@link IaasProvider} which maps to the given partition.
-     * @throws InvalidPartitionException if at least one property is evaluated to be invalid.
-     */
-    public abstract IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException;
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/VCloudPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/VCloudPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/VCloudPartitionValidator.java
deleted file mode 100644
index a6b9920..0000000
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/validators/VCloudPartitionValidator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.cloud.controller.iaases.validators;
-
-import java.util.Properties;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.cloud.controller.domain.Partition;
-import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
-import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.domain.IaasProvider;
-
-
-/**
- * The VCloud {@link PartitionValidator} implementation.
- *
- */
-public class VCloudPartitionValidator implements PartitionValidator {
-    
-    @SuppressWarnings("unused")
-	private static final Log log = LogFactory.getLog(VCloudPartitionValidator.class);
-    private IaasProvider iaasProvider;
-    @SuppressWarnings("unused")
-	private Iaas iaas;
-
-    @Override
-    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
-        //TODO: implement real validation logic 
-        return iaasProvider;
-       
-    }
-
-    @Override
-    public void setIaasProvider(IaasProvider iaas) {
-        this.iaasProvider = iaas;
-        this.iaas = iaas.getIaas();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudIaas.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudIaas.java
new file mode 100644
index 0000000..6a91823
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudIaas.java
@@ -0,0 +1,262 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ * KIND, either express or implied.  See the License for the 
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cloud.controller.iaases.vcloud;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.cloud.controller.exception.CloudControllerException;
+import org.apache.stratos.cloud.controller.iaases.JcloudsIaas;
+import org.apache.stratos.cloud.controller.util.ComputeServiceBuilderUtil;
+import org.apache.stratos.cloud.controller.domain.IaasProvider;
+import org.apache.stratos.cloud.controller.iaases.PartitionValidator;
+import org.jclouds.compute.ComputeService;
+import org.jclouds.compute.domain.NodeMetadata;
+import org.jclouds.compute.domain.Template;
+import org.jclouds.compute.domain.TemplateBuilder;
+import org.jclouds.compute.options.TemplateOptions;
+import org.jclouds.vcloud.compute.options.VCloudTemplateOptions;
+import org.jclouds.vcloud.domain.network.IpAddressAllocationMode;
+import org.wso2.carbon.utils.CarbonUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+public class VCloudIaas extends JcloudsIaas {
+
+
+	private static final Log log = LogFactory.getLog(VCloudIaas.class);
+	
+	private static final String SHELL_TYPE = "shellType";
+	private static final String SCRIPTS_PATH = "scripts";
+	private static final String CUSTOMIZATION_SCRIPT = "customization";
+	private static final String PAYLOAD = "PAYLOAD";
+	
+	public VCloudIaas(IaasProvider iaasProvider) {
+		super(iaasProvider);
+	}
+
+	@Override
+	public void buildComputeServiceAndTemplate() {
+		// builds and sets Compute Service
+        ComputeService computeService = ComputeServiceBuilderUtil.buildDefaultComputeService(getIaasProvider());
+        getIaasProvider().setComputeService(computeService);
+
+		// builds and sets Template
+		buildTemplate();
+
+	}
+
+	public void buildTemplate() {
+		IaasProvider iaasInfo = getIaasProvider();
+		
+		if (iaasInfo.getComputeService() == null) {
+			String msg = "Compute service is null for IaaS provider: "
+					+ iaasInfo.getName();
+			log.fatal(msg);
+			throw new CloudControllerException(msg);
+		}
+
+		TemplateBuilder templateBuilder = iaasInfo.getComputeService()
+				.templateBuilder();
+
+		// set image id specified
+		templateBuilder.imageId(iaasInfo.getImage());
+
+		// build the Template
+		Template template = templateBuilder.build();
+
+		// if you wish to auto assign IPs, instance spawning call should be
+		// blocking, but if you
+		// wish to assign IPs manually, it can be non-blocking.
+		// is auto-assign-ip mode or manual-assign-ip mode? - default mode is
+		// non-blocking
+		boolean blockUntilRunning = Boolean.parseBoolean(iaasInfo
+				.getProperty("autoAssignIp"));
+		template.getOptions().as(TemplateOptions.class)
+				.blockUntilRunning(blockUntilRunning);
+
+		// this is required in order to avoid creation of additional security
+		// groups by Jclouds.
+		template.getOptions().as(TemplateOptions.class)
+				.inboundPorts(22, 80, 8080, 443, 8243);
+
+		template.getOptions().as(VCloudTemplateOptions.class)
+				.ipAddressAllocationMode(IpAddressAllocationMode.POOL);
+
+		// set Template
+		iaasInfo.setTemplate(template);
+	}
+
+	@Override
+	public void setDynamicPayload(byte[] payload) {
+		// in vCloud case we need to run a script
+		IaasProvider iaasProvider = getIaasProvider();
+
+		if (iaasProvider.getTemplate() == null) {
+			if (log.isDebugEnabled()) {
+				log.debug("Payload for vCloud not found");
+			}
+			return;
+		}
+
+		String shellType = iaasProvider.getProperty(SHELL_TYPE);
+
+		if (shellType == null || shellType.isEmpty()) {
+			if (log.isDebugEnabled()) {
+				log.debug("Shell Type for vCloud Customization script not found from properties");
+			}
+			return;
+		}
+
+		if (log.isDebugEnabled()) {
+			log.debug(String.format("Shell Type '%s' will be used for vCloud Customization script", shellType));
+		}
+
+		// Payload is a String value
+		String payloadStr = new String(payload);
+
+		if (log.isDebugEnabled()) {
+			log.debug(String.format("Payload '%s' will be used for vCloud Customization script", payload));
+		}
+
+		Template template = iaasProvider.getTemplate();
+
+		File scriptPath = new File(CarbonUtils.getCarbonConfigDirPath(), SCRIPTS_PATH);
+
+		File customizationScriptFile = new File(new File(scriptPath, shellType), CUSTOMIZATION_SCRIPT);
+
+		if (!customizationScriptFile.exists()) {
+			if (log.isWarnEnabled()) {
+				log.warn(String.format("The vCloud Customization script '%s' does not exist",
+						customizationScriptFile.getAbsolutePath()));
+			}
+			return;
+		}
+
+		String customizationScript = null;
+
+		try {
+			customizationScript = FileUtils.readFileToString(customizationScriptFile);
+		} catch (IOException e) {
+			if (log.isErrorEnabled()) {
+				log.error(
+						String.format("Error reading the vCloud Customization script '%s'",
+								customizationScriptFile.getAbsolutePath()), e);
+			}
+		}
+
+		if (StringUtils.isEmpty(customizationScript)) {
+			if (log.isDebugEnabled()) {
+				log.debug("No content vCloud Customization script not found from properties");
+			}
+			return;
+		}
+
+		// Set payload
+		customizationScript = customizationScript.replaceAll(PAYLOAD, payloadStr);
+
+		if (log.isDebugEnabled()) {
+			log.debug(String.format("The vCloud Customization script\n%s", customizationScript));
+		}
+
+		// Run the script
+		template.getOptions().runScript(customizationScript);
+	}
+
+	@Override
+	public boolean createKeyPairFromPublicKey(String region, String keyPairName, String publicKey) {
+
+		// TODO
+		return false;
+	}
+
+	@Override
+	public List<String> associateAddresses(NodeMetadata node) {
+
+		// TODO
+		return null;
+
+	}
+
+	@Override
+	public String associatePredefinedAddress(NodeMetadata node, String ip) {
+    	return "";
+    }
+
+	@Override
+	public void releaseAddress(String ip) {
+		// TODO
+	}
+
+    @Override
+    public boolean isValidRegion(String region) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    public boolean isValidZone(String region, String zone) {
+        // TODO Auto-generated method stub
+        return true;
+    }
+
+    @Override
+    public boolean isValidHost(String zone, String host) {
+        // TODO Auto-generated method stub
+        return true;
+    }
+
+    @Override
+    public PartitionValidator getPartitionValidator() {
+        return new VCloudPartitionValidator();
+    }
+
+	@Override
+	public String createVolume(int sizeGB, String snapshotId) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public String attachVolume(String instanceId, String volumeId, String deviceName) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public void detachVolume(String instanceId, String volumeId) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void deleteVolume(String volumeId) {
+		// TODO Auto-generated method stub
+		
+	}
+
+    @Override
+    public String getIaasDevice(String device) {
+        return device;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudPartitionValidator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudPartitionValidator.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudPartitionValidator.java
new file mode 100644
index 0000000..81c9f6b
--- /dev/null
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/vcloud/VCloudPartitionValidator.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one 
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ * KIND, either express or implied.  See the License for the 
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.stratos.cloud.controller.iaases.vcloud;
+
+import java.util.Properties;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.cloud.controller.domain.Partition;
+import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
+import org.apache.stratos.cloud.controller.iaases.Iaas;
+import org.apache.stratos.cloud.controller.domain.IaasProvider;
+import org.apache.stratos.cloud.controller.iaases.PartitionValidator;
+
+
+/**
+ * The VCloud {@link org.apache.stratos.cloud.controller.iaases.PartitionValidator} implementation.
+ *
+ */
+public class VCloudPartitionValidator implements PartitionValidator {
+    
+    @SuppressWarnings("unused")
+	private static final Log log = LogFactory.getLog(VCloudPartitionValidator.class);
+    private IaasProvider iaasProvider;
+    @SuppressWarnings("unused")
+	private Iaas iaas;
+
+    @Override
+    public IaasProvider validate(Partition partition, Properties properties) throws InvalidPartitionException {
+        //TODO: implement real validation logic 
+        return iaasProvider;
+       
+    }
+
+    @Override
+    public void setIaasProvider(IaasProvider iaas) {
+        this.iaasProvider = iaas;
+        this.iaas = iaas.getIaas();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
index 820c979..885ad35 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerServiceComponent.java
@@ -25,8 +25,8 @@ import com.hazelcast.core.HazelcastInstance;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.cloud.controller.context.CloudControllerContext;
-import org.apache.stratos.cloud.controller.iaases.mock.MockIaasService;
-import org.apache.stratos.cloud.controller.iaases.mock.config.MockIaasConfig;
+import org.apache.stratos.cloud.controller.iaases.mock.service.MockIaasService;
+import org.apache.stratos.cloud.controller.iaases.mock.service.config.MockIaasConfig;
 import org.apache.stratos.cloud.controller.messaging.receiver.application.ApplicationTopicReceiver;
 import org.apache.stratos.cloud.controller.messaging.receiver.cluster.status.ClusterStatusTopicReceiver;
 import org.apache.stratos.cloud.controller.exception.CloudControllerException;

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceUtil.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceUtil.java
index f86ec9d..9fdd77f 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceUtil.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceUtil.java
@@ -32,11 +32,9 @@ import org.apache.stratos.cloud.controller.domain.Partition;
 import org.apache.stratos.cloud.controller.exception.InvalidIaasProviderException;
 import org.apache.stratos.cloud.controller.exception.InvalidPartitionException;
 import org.apache.stratos.cloud.controller.iaases.Iaas;
-import org.apache.stratos.cloud.controller.iaases.validators.PartitionValidator;
-import org.apache.stratos.cloud.controller.iaases.validators.KubernetesPartitionValidator;
+import org.apache.stratos.cloud.controller.iaases.PartitionValidator;
 import org.apache.stratos.cloud.controller.messaging.publisher.StatisticsDataPublisher;
 import org.apache.stratos.cloud.controller.messaging.topology.TopologyBuilder;
-import org.apache.stratos.cloud.controller.util.CloudControllerConstants;
 import org.apache.stratos.cloud.controller.util.CloudControllerUtil;
 import org.apache.stratos.messaging.domain.topology.MemberStatus;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
----------------------------------------------------------------------
diff --git a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
index 5a0737a..9e715d2 100644
--- a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
+++ b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/cloud-controller.xml
@@ -42,7 +42,7 @@
 		same property over and over again. -->
 	<iaasProviders>
 		<!-- iaasProvider type="openstack" name="Openstack">
-            <className>org.apache.stratos.cloud.controller.iaases.JcloudsOpenstackIaas</className>
+            <className>org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas</className>
 			<provider>openstack-nova</provider>
 			<identity svns:secretAlias="cloud.controller.openstack.identity">demo:demo</identity>
 			<credential svns:secretAlias="cloud.controller.openstack.credential">openstack</credential>
@@ -54,7 +54,7 @@
 			<property name="Y" value="y" />
 		</iaasProvider -->
         <!-- iaasProvider type="ec2" name="Amazon EC2">
-            <className>org.apache.stratos.cloud.controller.iaases.JcloudsEC2Iaas</className>
+            <className>org.apache.stratos.cloud.controller.iaases.ec2.EC2Iaas</className>
             <provider>aws-ec2</provider>
             <identity svns:secretAlias="cloud.controller.ec2.identity">identity</identity>
             <credential svns:secretAlias="cloud.controller.ec2.credential">credential</credential>
@@ -65,13 +65,13 @@
             <property name="keyPair" value="keypair-name"/>
         </iaasProvider -->
         <iaasProvider type="kubernetes" name="Kubernetes">
-            <className>org.apache.stratos.cloud.controller.iaases.KubernetesIaas</className>
+            <className>org.apache.stratos.cloud.controller.iaases.kubernetes.KubernetesIaas</className>
             <provider>kubernetes</provider>
             <identity svns:secretAlias="cloud.controller.kubernetes.identity">identity</identity>
             <credential svns:secretAlias="cloud.controller.kubernetes.credential">credential</credential>
         </iaasProvider>
         <iaasProvider type="mock" name="Mock">
-            <className>org.apache.stratos.cloud.controller.iaases.MockIaas</className>
+            <className>org.apache.stratos.cloud.controller.iaases.mock.MockIaas</className>
             <provider>mock</provider>
             <identity svns:secretAlias="cloud.controller.mock.identity">identity</identity>
             <credential svns:secretAlias="cloud.controller.mock.credential">credential</credential>

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/tools/stratos-installer/config/all/repository/conf/cloud-controller.xml
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/config/all/repository/conf/cloud-controller.xml b/tools/stratos-installer/config/all/repository/conf/cloud-controller.xml
index fe52a22..0aea4c5 100644
--- a/tools/stratos-installer/config/all/repository/conf/cloud-controller.xml
+++ b/tools/stratos-installer/config/all/repository/conf/cloud-controller.xml
@@ -16,14 +16,14 @@
   #  KIND, either express or implied.  See the License for the
   #  specific language governing permissions and limitations
   #  under the License.
-  --> 
+  -->
 <cloudController xmlns:svns="http://org.wso2.securevault/configuration">
 
 	<svns:secureVault
 		provider="org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler" />
 
     	<dataPublisher enable="false">
-		<!-- BAM Server Info - default values are 'admin' and 'admin' 
+		<!-- BAM Server Info - default values are 'admin' and 'admin'
 			 Optional element. -->
 		<bamServer>
             		<!-- BAM server URL should be specified in carbon.xml -->
@@ -43,14 +43,14 @@
 
     	<topologySync enable="true">
 		<property name="cron" value="1 * * * * ? *" />
-	</topologySync>	
+	</topologySync>
 
-        <!-- Specify the properties that are common to an IaaS here. This element 
-                is not necessary [0..1]. But you can use this section to avoid specifying 
+        <!-- Specify the properties that are common to an IaaS here. This element
+                is not necessary [0..1]. But you can use this section to avoid specifying
                 same property over and over again. -->
 	<iaasProviders>
         	<EC2_PROVIDER_STARTiaasProvider type="ec2" name="ec2 specific details">
-                	<className>org.apache.stratos.cloud.controller.iaases.JcloudsEC2Iaas</className>
+                	<className>org.apache.stratos.cloud.controller.iaases.ec2.EC2Iaas</className>
                         <provider>aws-ec2</provider>
                         <identity svns:secretAlias="cloud.controller.ec2.identity">EC2_IDENTITY</identity>
                         <credential svns:secretAlias="cloud.controller.ec2.credential">EC2_CREDENTIAL</credential>
@@ -61,33 +61,33 @@
                         <property name="keyPair" value="EC2_KEYPAIR"/>
                 </iaasProviderEC2_PROVIDER_END>
                 <OPENSTACK_PROVIDER_STARTiaasProvider type="openstack" name="openstack specific details">
-            		<className>org.apache.stratos.cloud.controller.iaases.JcloudsOpenstackIaas</className>
+            		<className>org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas</className>
                         <provider>openstack-nova</provider>
                         <identity svns:secretAlias="cloud.controller.openstack.identity">OPENSTACK_IDENTITY</identity>
                         <credential svns:secretAlias="cloud.controller.openstack.credential">OPENSTACK_CREDENTIAL</credential>
                         <property name="jclouds.endpoint" value="OPENSTACK_ENDPOINT" />
-            		<property name="jclouds.openstack-nova.auto-create-floating-ips" value="false"/>
+            		    <property name="jclouds.openstack-nova.auto-create-floating-ips" value="false"/>
                         <property name="jclouds.api-version" value="2.0/" />
-			<property name="openstack.networking.provider" value="OPENSTACK_NETWORKING_PROVIDER" />
+			            <property name="openstack.networking.provider" value="OPENSTACK_NETWORKING_PROVIDER" />
                         <property name="X" value="x" />
                         <property name="Y" value="y" />
                         <property name="securityGroups" value="OPENSTACK_SECURITY_GROUPS"/>
                         <property name="keyPair" value="OPENSTACK_KEYPAIR"/>
-        	</iaasProviderOPENSTACK_PROVIDER_END>
+        	    </iaasProviderOPENSTACK_PROVIDER_END>
                 <VCLOUD_PROVIDER_STARTiaasProvider type="vcloud" name="VMware vCloud specific details">
-                        <className>org.apache.stratos.cloud.controller.iaases.JcloudsVCloudIaas</className>
+                        <className>org.apache.stratos.cloud.controller.iaases.vcloud.VCloudIaas</className>
                         <provider>vcloud</provider>
                         <identity svns:secretAlias="cloud.controller.vcloud.identity">VCLOUD_IDENTITY</identity>
                         <credential svns:secretAlias="cloud.controller.vcloud.credential">VCLOUD_CREDENTIAL</credential>
                         <property name="jclouds.endpoint" value="VCLOUD_ENDPOINT" />
                         <property name="jclouds.vcloud.version.schema" value="1.5" />
                         <property name="jclouds.api-version" value="1.5" />
-			<property name="autoAssignIp" value="true" />
+			            <property name="autoAssignIp" value="true" />
                         <property name="X" value="x" />
                         <property name="Y" value="y" />
                 </iaasProviderVCLOUD_PROVIDER_END>
                 <GCE_PROVIDER_STARTiaasProvider type="gce" name="GCE specific details">
-                        <className>org.apache.stratos.cloud.controller.iaases.JcloudsGCEIaas</className>
+                        <className>org.apache.stratos.cloud.controller.iaases.gce.GCEIaas</className>
                         <provider>google-compute-engine</provider>
                         <identity svns:secretAlias="cloud.controller.gce.identity">GCE_IDENTITY</identity>
                         <credential svns:secretAlias="cloud.controller.gce.credential">GCE_CREDENTIAL</credential>

http://git-wip-us.apache.org/repos/asf/stratos/blob/e195f2f1/tools/stratos-installer/config/cc/repository/conf/cloud-controller.xml
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/config/cc/repository/conf/cloud-controller.xml b/tools/stratos-installer/config/cc/repository/conf/cloud-controller.xml
index b512eeb..57189e0 100644
--- a/tools/stratos-installer/config/cc/repository/conf/cloud-controller.xml
+++ b/tools/stratos-installer/config/cc/repository/conf/cloud-controller.xml
@@ -51,7 +51,7 @@
                 same property over and over again. -->
 	<iaasProviders>
         	<EC2_PROVIDER_STARTiaasProvider type="ec2" name="ec2 specific details">
-                	<className>org.apache.stratos.cloud.controller.iaases.JcloudsEC2Iaas</className>
+                	<className>org.apache.stratos.cloud.controller.iaases.ec2.EC2Iaas</className>
                         <provider>aws-ec2</provider>
                         <identity svns:secretAlias="cloud.controller.ec2.identity">EC2_IDENTITY</identity>
                         <credential svns:secretAlias="cloud.controller.ec2.credential">EC2_CREDENTIAL</credential>
@@ -62,7 +62,7 @@
                         <property name="keyPair" value="EC2_KEYPAIR"/>
                 </iaasProviderEC2_PROVIDER_END>
                 <OPENSTACK_PROVIDER_STARTiaasProvider type="openstack" name="openstack specific details">
-            		<className>org.apache.stratos.cloud.controller.iaases.JcloudsOpenstackIaas</className>
+            		<className>org.apache.stratos.cloud.controller.iaases.openstack.OpenstackIaas</className>
                         <provider>openstack-nova</provider>
                         <identity svns:secretAlias="cloud.controller.openstack.identity">OPENSTACK_IDENTITY</identity>
                         <credential svns:secretAlias="cloud.controller.openstack.credential">OPENSTACK_CREDENTIAL</credential>
@@ -76,7 +76,7 @@
                         <property name="keyPair" value="OPENSTACK_KEYPAIR"/>
         	</iaasProviderOPENSTACK_PROVIDER_END>
                 <VCLOUD_PROVIDER_STARTiaasProvider type="vcloud" name="VMware vCloud specific details">
-                        <className>org.apache.stratos.cloud.controller.iaases.JcloudsVCloudIaas</className>
+                        <className>org.apache.stratos.cloud.controller.iaases.vcloud.VCloudIaas</className>
                         <provider>vcloud</provider>
                         <identity svns:secretAlias="cloud.controller.vcloud.identity">VCLOUD_IDENTITY</identity>
                         <credential svns:secretAlias="cloud.controller.vcloud.credential">VCLOUD_CREDENTIAL</credential>


Mime
View raw message