CLOUDSTACK-6485 prevent ipaddress asignment of gateway to gateway-interface on vpc router by setting vpcid to null in network

This commit is contained in:
Daan Hoogland 2015-01-26 16:54:53 +01:00
parent 766f8216a0
commit e474454c91
2 changed files with 2 additions and 2 deletions

View File

@ -606,7 +606,7 @@ public class NetworkVO implements Network {
this.strechedL2Network = strechedL2Network;
}
public void setVpcId(long vpcId) {
public void setVpcId(Long vpcId) {
this.vpcId = vpcId;
}
}

View File

@ -1654,7 +1654,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
// 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);
gatewaynet.setVpcId(null);
_ntwkDao.persist(gatewaynet);
}