Remove unnecessary call to get_dhcp_port from DeviceManager

Change-Id: I35459c352e712ea009589f3050205a4c307b909a
Closes-Bug: #1263217
Add extraroute_db support for Cisco N1kv Plugin

Adding extraroute_db support for router
scheduling functionality in Cisco N1kv Plugin.

Change-Id: I2b9082fc820114a9b10148be08021e5d4b5e5043
Closes-Bug: #1287437
Remove legacy quantum config path

partially implements bp quantum-clean-up
Change-Id: Ifd876320a82991fb532988b9cdcecefde36ff378
Validate multicast ip range in Cisco N1kv Plugin

Do the validation of multicast ip range in Cisco N1kv Plugin and send
appropriate parameters to VSM.

Change-Id: Iaa1288d8a6deb2a2f32b263d4556dde8938d75f5
Closes-Bug: #1282754
Add support for router scheduling in Cisco N1kv Plugin

Added functionality for router and network scheduling
in Cisco N1kv Plugin.

Change-Id: I1a8d27670d10ca26fb62a8d02230a1aaf3e7bbca
Closes-Bug: #1286412
Move db migration of ml2 security groups to havana

ml2 plugin is a havana feature. Currently securitygroups table are
created in chain of migration after havana release. It causes db
migration failure when migrating from havana to current head because
securitygroups table is attempted to be created although it was already
created by create_all().

Closes-bug: #1271231
Change-Id: If450bd95de7a5fdfdb2219cfbf7eb0c1323044bb
L3 agent fetches the external network id once

Rather than fetching the id of the external network each time that
_process_routers is called, get it once and remember it.  If the agent
is ever requested to connect to a different ext-net then it will fetch
the current ext-net to double check for the unlikely event that the
ext-net has changed.  If it has then it will remember the new ext-net.

This is only applicable in the case where there is only one ext-net
that has not been configured explicitly in the config file.  That was
the only case that would cause an RPC message in the first place.

Change-Id: I40bbbf6233131ea5d40122ef9495fd3cb7dc823a
Closes-Bug: #1269567
Delete duplicate internal devices in router namespace

When neutron router-interface-delete <router> <subnet> is ran
during L3-agent restart, the agent may fail to delete the old
internal device. After the restart, when the command "neutron
router-interface-add <router> <subnet>" is ran again, the
router ends up having two internal devices configured with the
same IP address.

Closes-Bug: #1244853
Change-Id: I0d7e2db6aa7dae26d0fc3fe1b1527762cb1e3b23
Reset the policy after loading extensions

The loading of extensions might impact how rules are interpreted in the
policies; for instance, the external-net extension specifies how to
convert the router:external field of a network (to a boolean). So we
need to make sure that the policy is recreated afterwards.

We also need to fix a unit test that assumes that the policy is loaded.

Change-Id: Ifde13323b1435fc84c6cb24ab6a71de5d67f6b9f
Closes-Bug: #1280738
Fix class name typo in test_db_rpc_base

Change-Id: I23fd11fe4fdd2988463f2cf592d884cba72cdb41
Closes-Bug: #1281921
Fix unshortened IPv6 address caused DHCP crash

When unshortened IPv6 address provided to allocation pool, DHCP
agent crashed because OpenStack is trying to add same IPv6 addresses
to dhcp tap device.

The root cause is that current code compares provided unshortened
IPv6 address with the returned result of "ip addr list", which is
shortened. So the same IPv6 address is treated as different ones.

The fix is trying to shorten the provided address before comparison.

Change-Id: If1e183e65c5ab785b73771d9a3d4b525d38284a9
Closes-Bug: 1266780
Fix VPN agent does not handle multiple connections per vpn service

    Once the OpenSwan process is created, incoming updated vpnservice
data would not be updated into the process class which leads to config
files and openswan process always keep old configurations

Change-Id: Ia91ab08b1d03fbbe46bafd4967b57181fc4c6e71
Closes-Bug: 1263194
Make sure dnsmasq can distinguish IPv6 address from MAC address

Currrently, due to in dnsmasq host file, the IPv6 address does
not be wrapped with '[]', dnsmasq cannot distinguish IPv6 address
from MAC address, it will cause the deployed instances cannot get
IPv6 address via dnsmasq dhcp service.

Change-Id: I023e44667a238664d11f2ac2cc484432cd301bcc
Closes-Bug: #1281916
Change tenant network type usage for IB Fabric

This patch changes tenant network type usage for InfiniBand Fabric
to vlan type. Add the indication of Fabric Type (Ethernet/InfiniBand)
to the provider_network via the plugin configuration file.
If physical network type is not specified for some provider network
listed in the network_vlan_ranges, use default physical network type.

Co-authored-by: Roey Chen <roeyc@mellanox.com>
Change-Id: Id45acfb8234359a43303c2eee2205a44998c039a
Closes-Bug: 1263638
Fix webob.exc.HTTPForbidden parameter miss

HTTPForbidden should use the parameter 'explanation'
instead of 'detail'.
This patch fixes this bug.

Change-Id: I4c66697daf0ce9e00c8820311dc7141eacd7e733
Closes-Bug: #1283872
l2-population/lb/vxlan : ip neigh add command failed

we were using ip neigh add command which must be replaced by
ip neigh replace, to avoid error when creating a VM with an ip
previously used by a deleted VM

Change-Id: I2405096d5925ae37efd5f8abcc02b99cf0c9f5d3
Closes-Bug: #1282662
Include proper Content-Type in the HTTP response headers

Neutron namespace proxy handler and metadata agent were not setting the
Content-Type in its response. Both of them were returning only the response
data which is obtained from the nova-metadata-service. Since they were returning
only the response data, the Content-Type returned to the clients has the default
one which is - "text/html". Ideally this should be set to the data type which is
present in the HTTP Response. The fix now includes the Content-Type which is
returned by nova-metadata-service

Closes-Bug: #1243878
Change-Id: If68f0b508fbea4ecd1eb0e58d602b5ba6ccbe263
Remove pyudev dependency

pyudev was only used by the linuxbridge-agent to get the list
of virtual network devices. This can be got from /sys instead.
This patch fixes the problem where testr could not import the
lb-agent module because pyudev was not in requirements.txt.

Change-Id: I0a78c91e97de4413f2ecf6fb56d2ff61b36baa78
Closes-Bug: 1269040
BigSwitch: Stop using external locks

Changes BigSwitch server manager REST lock
to an in-memory lock since the plugin isn't
expected to run in independent processes.

Closes-Bug: #1284881
Change-Id: I2fdd5ba79a0c4b94b2b410db54a63f7c0ca47525
ML2 mechanism driver access to binding details

The following properties are added to the PortContext object passed to
ML2 mechanism drivers for port operations:

* bound_driver - name of current bound driver
* original_bound_driver - name previously bound driver in an update
* original_bound_segment - network segment used in previous binding

Some issues with the existing ML2 port binding unit tests were also
fixed.

The remainder of the fix for bug 1276395, making these binding details
available to mechanism drivers when a port is deleted, will be
addressed as part of the fix for bug 1276391.

Partial-Bug: #1276395
Change-Id: I9ecff4a4e044920ed2dde709c89aeb9bc773220d