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

This commit is contained in:
Daan Hoogland 2014-05-24 19:44:00 +02:00
parent 9fa9e3aaff
commit 16bf065a0d
1 changed files with 12 additions and 0 deletions

View File

@ -1623,6 +1623,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,