New interface driver for DHCP for routed networking
New interface driver for DHCP for routed networking

This change adds an interface driver that combines with the reference
Neutron DHCP agent to provide DHCP service to unbridged TAP interfaces
on the local compute host.  This is what is needed when using a
'routed' network implementation [1] in which data to and from VMs is
routed on the compute host instead of being bridged.

[1] https://review.openstack.org/#/c/198439/

Use of this interface driver should be triggered by the following
settings in one of the config files that the DHCP agent reads.

    interface_driver = neutron.agent.linux.interface.RoutedInterfaceDriver
    use_namespaces = False

Key points of its implementation are as follows.

- Everything is done in the default namespace.

- The DHCP agent invokes Dnsmasq with modified options, notably
  '--bridge-interface=ns-XXX,tap* --interface=tap*', that tell Dnsmasq
  to listen on all the TAP interfaces and to treat those interfaces as
  aliases of the ns-XXX interface where the DHCP context and IP subnet
  are defined.

- The ns-XXX interface (for the DHCP port) is created as a dummy
  interface.

- The ns-XXX interface is given the subnet's gateway IP address,
  instead of a freshly allocated IP address from the subnet.

- The on-link route for the subnet, which Linux creates automatically,
  must be deleted, since other addresses on that subnet are not in
  fact available via the dummy device.

Partial-Bug: #1472704
Change-Id: I4dc5ae75f722d079a529ea1ae5f2011a3edbc84e

paninetworks/neutron,paninetworks/neutron