Add DHCP support to the QuantumManager and break apart dhcp/gateway
This introduces a new flag "quantum_use_dhcp=<boolean>" which indicates whether or not to enable dhcp for all of the networks. If it is set then we start dnsmasq (and provide it with the IP/MACs from Melange) similar to how this was done in linux_net before. Prior to this if you enabled dhcp then you would also get a gateway device.. some people may not want that so we now require that you specify the gateway when creating the network in order to end up with a device that will act as a gateway. If you're using Melange IPAM and you don't specify the gateway you still end up with one because it doesn't allow you to not have one. This lays the groundwork for the option of not having one in the future, at least :) Also, fix quantum/melange ipam interaction We now query for the subnets by net_id/vif_id instead of searching through all the blocks to find the right one. Both of the allocate and deallocate for instance calls are now using the vif_id -> network_id mapping instead of searching the quantum networks. get_port_by_attachment was also changed to take a net_id so that we don't have to search through all of the quantum networks to find the corresponding port. Change-Id: I6a84da35237b6c5f5cdee91ada92642103439a97
This commit is contained in:
parent
8d6dba4c87
commit
ae2a368761
@ -63,6 +63,7 @@ def setup():
|
||||
num_networks=FLAGS.num_networks,
|
||||
network_size=FLAGS.network_size,
|
||||
cidr_v6=FLAGS.fixed_range_v6,
|
||||
gateway=FLAGS.gateway,
|
||||
gateway_v6=FLAGS.gateway_v6,
|
||||
bridge=FLAGS.flat_network_bridge,
|
||||
bridge_interface=bridge_interface,
|
||||
|
Loading…
x
Reference in New Issue
Block a user