Repository: incubator-stratos
Updated Branches:
  refs/heads/master 966a5db50 -> ecf0e7eff


fixing  https://issues.apache.org/jira/browse/STRATOS-544 - you have to build 
the node in order to assoaciate the floating ip and retrieve it as public ip


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

Branch: refs/heads/master
Commit: 9c4e89c1c12adb4eabc8cfa2554ccd1c49f0c87b
Parents: fa893ee
Author: Nirmal Fernando <[email protected]>
Authored: Tue Apr 1 15:48:47 2014 +0530
Committer: Nirmal Fernando <[email protected]>
Committed: Tue Apr 1 15:48:47 2014 +0530

----------------------------------------------------------------------
 .../cloud/controller/impl/CloudControllerServiceImpl.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9c4e89c1/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 d206722..7ae1d00 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
@@ -18,7 +18,9 @@
  */
 package org.apache.stratos.cloud.controller.impl;
 
+import com.google.common.collect.ImmutableSet;
 import com.google.common.net.InetAddresses;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import 
org.apache.stratos.cloud.controller.concurrent.PartitionValidatorCallable;
@@ -42,6 +44,7 @@ import 
org.apache.stratos.messaging.domain.topology.MemberStatus;
 import org.apache.stratos.messaging.util.Constants;
 import org.jclouds.compute.ComputeService;
 import org.jclouds.compute.domain.NodeMetadata;
+import org.jclouds.compute.domain.NodeMetadataBuilder;
 import org.jclouds.compute.domain.Template;
 import org.jclouds.rest.ResourceNotFoundException;
 import org.wso2.carbon.registry.core.exceptions.RegistryException;
@@ -636,7 +639,11 @@ public class CloudControllerServiceImpl implements 
CloudControllerService {
                                                        log.info("Allocated an 
ip address: "
                                                                        + 
memberContext.toString());
                                                }
-                        }                        
+                        }       
+                       
+                       // build the node with the new ip
+                       node = NodeMetadataBuilder.fromNodeMetadata(node)
+                                               
.publicAddresses(ImmutableSet.of(ip)).build();
                     } 
                     
 

Reply via email to