stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject stratos git commit: Initializing iaas instance soon after creating it
Date Thu, 11 Dec 2014 17:41:22 GMT
Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test 043cdce57 -> aca65c9a9


Initializing iaas instance soon after creating it


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

Branch: refs/heads/4.1.0-test
Commit: aca65c9a913968c9bcee28fb171fd5d8d220be02
Parents: 043cdce
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Thu Dec 11 23:11:01 2014 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Thu Dec 11 23:11:16 2014 +0530

----------------------------------------------------------------------
 .../apache/stratos/cloud/controller/domain/IaasProvider.java    | 5 +----
 .../controller/services/impl/CloudControllerServiceUtil.java    | 4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/aca65c9a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/IaasProvider.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/IaasProvider.java
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/IaasProvider.java
index f8870b6..87d77fc 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/IaasProvider.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/IaasProvider.java
@@ -221,6 +221,7 @@ public class IaasProvider implements Serializable {
                 if(iaas == null) {
                     try {
                         iaas = CloudControllerUtil.createIaasInstance(this);
+                        iaas.initialize();
                     } catch (InvalidIaasProviderException e) {
                         throw new RuntimeException("Could not create IaaS instance", e);
                     }
@@ -229,10 +230,6 @@ public class IaasProvider implements Serializable {
     	}
         return iaas;
     }
-
-    public void setIaas(Iaas iaas) {
-        this.iaas = iaas;
-    }
     
     public void reset(){
 //    	nodeIds = new ArrayList<String>();

http://git-wip-us.apache.org/repos/asf/stratos/blob/aca65c9a/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 cdde8d0..6285d00 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
@@ -48,9 +48,7 @@ public class CloudControllerServiceUtil {
     private static final Log log = LogFactory.getLog(CloudControllerServiceUtil.class);
 
     public static Iaas buildIaas(IaasProvider iaasProvider) throws InvalidIaasProviderException
{
-        Iaas iaas = iaasProvider.getIaas();
-        iaas.initialize();
-        return iaas;
+        return iaasProvider.getIaas();
     }
 
     /**


Mime
View raw message