Shih-Hao Li 866e1819bf NSX|V3: Fix delete_network issue with native DHCP
Currently when users delete a network with a DHCP-enabled
subnet and without any VM instances in the network, the
operation will fail due to DHCP port not found.

The reason is when neutron's delete_network is called,
it removes ports with DEVICE_OWNER_DHCP in the session.
Thus later the plugin can not find the DHCP port when
detaching the associated DHCP server for the network.

This patch fixes the problem by detaching the DHCP server
in the plugin's delete_network before calling neutron's
delete_network. It also makes sure DHCP service exists
before processing it.

Change-Id: Ifd55f19ae9f7a44e5f38cfe9060523b39f0b6b0f
2016-07-28 15:06:25 -07:00
..
2016-07-02 20:45:45 -04:00