service aware lb alias consists of cartridge (service) type

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

Branch: refs/heads/master
Commit: ba3b50c32243a9280293317cad6a68cb6a0eec9d
Parents: 8f6e7c2
Author: Nirmal Fernando <[email protected]>
Authored: Tue Dec 10 21:30:47 2013 +0530
Committer: Nirmal Fernando <[email protected]>
Committed: Tue Dec 10 21:30:47 2013 +0530

----------------------------------------------------------------------
 .../org/apache/stratos/rest/endpoint/services/ServiceUtils.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ba3b50c3/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
index a83a594..115a6b6 100644
--- 
a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
+++ 
b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/services/ServiceUtils.java
@@ -84,7 +84,6 @@ public class ServiceUtils {
                 // call CC
                 
cloudControllerServiceClient.deployCartridgeDefinition(cartridgeConfig);
                 
-                org.apache.stratos.cloud.controller.pojo.Property lbRefType;
                 // analyze properties and pick up, if not a LB.
                 Properties properties = cartridgeConfig.getProperties();
                 String cartridgeType = cartridgeConfig.getType();
@@ -203,7 +202,7 @@ public class ServiceUtils {
                                                 
intersection(cartridgeDepPolicies, lbCartridgeDepPolicies);
                                         
                                         for (DeploymentPolicy deploymentPolicy 
: validDepPolicies) {
-                                            String alias = "lb"+new 
Random().nextInt();
+                                            String alias = 
"lb"+cartridgeType+new Random().nextInt();
                                             subscribe(cartridgeType, alias, 
cartridgeInfo.getDefaultAutoscalingPolicy(), 
                                                       
deploymentPolicy.getId(), null, false, null, null, null, null, 
                                                       ctxt, userName, 
tenantDomain);

Reply via email to