You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/05/24 19:45:30 UTC

git commit: updated refs/heads/4.4 to 6f2ee6d

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 3fc781d66 -> 6f2ee6daa


CLOUDSTACK-6485 prevent ipaddress asignment of gateway to gateway-interface on vpc router


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

Branch: refs/heads/4.4
Commit: 6f2ee6daacc8b282477f89651dc81c33beb3befd
Parents: 3fc781d
Author: Daan Hoogland <da...@onecht.net>
Authored: Sat May 24 19:44:00 2014 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Sat May 24 19:45:18 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/network/vpc/VpcManagerImpl.java | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6f2ee6da/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index 0d24544..62c6da1 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -1624,6 +1624,18 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
             networkAclId = aclId;
         }
 
+        {   // experimental block, this is a hack
+            // set vpc id in network to null
+            // might be needed for all types of broadcast domains
+            // the ugly hack is that vpc gateway nets are created as guest network
+            // while they are not.
+            // A more permanent solution would be to define a type of 'gatewaynetwork'
+            // so that handling code is not mixed between the two
+            NetworkVO gatewaynet = _ntwkDao.findById(privateNtwk.getId());
+            gatewaynet.setVpcId(vpcId);
+            _ntwkDao.persist(gatewaynet);
+        }
+
         //2) create gateway entry
                     VpcGatewayVO gatewayVO =
                         new VpcGatewayVO(ipAddress, VpcGateway.Type.Private, vpcId, privateNtwk.getDataCenterId(), privateNtwk.getId(), broadcastUri, gateway, netmask,