mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 12318: NaaS: Dynamic CIDR for virtual router This patch in fact use ExternalGuestNetworkGuru to replace GuestNetworkGuru. The problem is the virtual router would normally use 10.1.1.0/8 as CIDR, but when we want to upgrade to external firewall e.g. Netscaler, the CIDR would need to be changed to different value e.g. 10.x.x.0/24 based on VLAN, because the external firewall can not support one CIDR for multiply VLAN right now. So we have to use the same policy for virtual router. This patch also add one field "specified_cidr" to the networks table. If this field is true, then it means user specify the CIDR of this network, thus we can not granutee the CIDR after upgrade is valid, so we would like to prohibit the upgrade of network offering. This should also fix bug 12318. The reason for bug 12318 is the pre-set gateway address of domR is overrided by ExternalGuestNetworkGuru. After this patch, ExternalGuestNetworkGuru would respect the existed value in Nic, rather than simply wiping it out. It would do calcuation to get the relevant address after VLAN changed. More clean up can be done in the future, when we proved that this policy change doesn't break... status 12234: resolved fixed status 12318: resolved fixed