Updated Branches:
  refs/heads/master 11e4b33ca -> 5bc7f7eb3

adding few debug logs and sorting a toString method


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

Branch: refs/heads/master
Commit: 5bc7f7eb3c44c337c53ec604733917f3127bbbd3
Parents: 11e4b33
Author: Nirmal Fernando <[email protected]>
Authored: Tue Jan 14 09:39:11 2014 +0530
Committer: Nirmal Fernando <[email protected]>
Committed: Tue Jan 14 09:39:11 2014 +0530

----------------------------------------------------------------------
 .../controller/deployment/partition/Partition.java     | 13 ++++++++-----
 .../controller/impl/CloudControllerServiceImpl.java    |  7 +++++++
 2 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/5bc7f7eb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployment/partition/Partition.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployment/partition/Partition.java
 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployment/partition/Partition.java
index 99e0c10..b680902 100644
--- 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployment/partition/Partition.java
+++ 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/deployment/partition/Partition.java
@@ -106,13 +106,16 @@ public class Partition implements Serializable{
         return provider;
     }
 
-    public void setProvider(String provider) {
+       public void setProvider(String provider) {
         this.provider = provider;
     }
-    
-    public String toString() {
-        return "Partition Id: "+this.id+", Partition Provider: "+this.provider;
-    }
+       
+       @Override
+       public String toString() {
+               return "Partition [id=" + id + ", provider=" + provider
+                               + ", partitionMin=" + partitionMin + ", 
partitionMax="
+                               + partitionMax + ", properties=" + properties + 
"]";
+       }
     
     public boolean equals(Object obj) {
         if(obj != null && obj instanceof Partition) {

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/5bc7f7eb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
index ce3eae9..57ef924 100644
--- 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
+++ 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
@@ -963,12 +963,19 @@ public class CloudControllerServiceImpl implements 
CloudControllerService {
                                                                   
CloudControllerUtil.toJavaUtilProperties(partition.getProperties()));
             // add to a temporary Map
             partitionToIaasProviders.put(partition.getId(), 
updatedIaasProvider);
+            
+            if (log.isDebugEnabled()) {
+               log.debug("Partition "+partition.toString()+ " is validated 
successfully "
+                               + "against the Cartridge: "+cartridgeType);
+            }
 
         }
 
         // if and only if the deployment policy valid
         cartridge.addIaasProviders(partitionToIaasProviders);
         
+        log.info("All partitions were validated successfully, against the 
Cartridge: "+cartridgeType);
+        
         return true;
     }
 

Reply via email to