Repository: stratos
Updated Branches:
  refs/heads/tenant-isolation 265b7a2dc -> 96899f7a7


Refactore with uuid


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

Branch: refs/heads/tenant-isolation
Commit: 96899f7a7fe84450bdfaffe8727315ed61ced6e4
Parents: 265b7a2
Author: Gayan Gunarathne <[email protected]>
Authored: Wed Aug 12 16:38:36 2015 +0530
Committer: Gayan Gunarathne <[email protected]>
Committed: Wed Aug 12 16:38:36 2015 +0530

----------------------------------------------------------------------
 .../messaging/topology/TopologyBuilder.java           | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/96899f7a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
index bf23c48..dab6827 100644
--- 
a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
+++ 
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java
@@ -177,7 +177,7 @@ public class TopologyBuilder {
         TopologyEventPublisher.sendClusterCreatedEvent(cluster);
     }
 
-    public static void handleApplicationClustersCreated(String appId, 
List<Cluster> appClusters) {
+    public static void handleApplicationClustersCreated(String appUuid, 
List<Cluster> appClusters) {
 
         TopologyManager.acquireWriteLock();
 
@@ -198,16 +198,16 @@ public class TopologyBuilder {
             TopologyManager.releaseWriteLock();
         }
 
-        log.debug("Creating cluster port mappings: [application-id] " + appId);
+        log.debug("Creating cluster port mappings: [application-id] " + 
appUuid);
         for(Cluster cluster : appClusters) {
-            String cartridgeType = cluster.getServiceUuid();
-            Cartridge cartridge = 
CloudControllerContext.getInstance().getCartridge(cartridgeType);
+            String cartridgeUuid = cluster.getServiceUuid();
+            Cartridge cartridge = 
CloudControllerContext.getInstance().getCartridge(cartridgeUuid);
             if(cartridge == null) {
-                throw new CloudControllerException("Cartridge not found: 
[cartridge-type] " + cartridgeType);
+                throw new CloudControllerException("Cartridge not found: 
[cartridge-uuid] " + cartridgeUuid);
             }
 
             for(PortMapping portMapping : cartridge.getPortMappings()) {
-                ClusterPortMapping clusterPortMapping = new 
ClusterPortMapping(appId,
+                ClusterPortMapping clusterPortMapping = new 
ClusterPortMapping(appUuid,
                         cluster.getClusterId(), portMapping.getName(), 
portMapping.getProtocol(), portMapping.getPort(),
                         portMapping.getProxyPort());
                 
CloudControllerContext.getInstance().addClusterPortMapping(clusterPortMapping);
@@ -219,7 +219,7 @@ public class TopologyBuilder {
         CloudControllerContext.getInstance().persist();
 
         // Send application clusters created event
-        TopologyEventPublisher.sendApplicationClustersCreated(appId, 
appClusters);
+        TopologyEventPublisher.sendApplicationClustersCreated(appUuid, 
appClusters);
     }
 
     public static void handleApplicationClustersRemoved(String appId,

Reply via email to