Fixes Hyper-V issue due to ML2 RPC versioning

The ML2 RPC version 1.1 breaks the hyper-v agent and
consequentially the RPC version in the Hyper-V agent needs
to be set to 1.1 to match the ML2 RPC base API version.

Conflicts:
	neutron/plugins/hyperv/agent/hyperv_neutron_agent.py

(cherry picked from commit 771327adbe9e563506f98ca561de9ded4d987698)

Change-Id: Idc4ae8d7dcff4331aca148a8f2a7a2b01679b3a8
Closes-Bug: #1353697
Allow unsharing a network used as gateway/floatingip

If network has ports that connect it as gateway to another network, such
as an external network, or "floating ip" ports it should still be
possible to "unshare" it since these ports represent usage of the
network as an external network, not as a VM data network.

Change-Id: Ic33ae7ac193e4fc9fe06a4cfd579a4aacf0e6354
Closes-bug: #1293184
(cherry picked from commit 7a2053c7a27bdec02e97b46736c5fcce5f2d053a)
Fix metadata agent's auth info caching

metadata agent does not implement auth info cache correctly but
retrieves from keystone every time

Cherry-pick from https://review.openstack.org/#/c/118996/

Conflicts:
	neutron/agent/metadata/agent.py
	neutron/tests/unit/test_metadata_agent.py

Change-Id: Ifc1f580185d7600b48aaf80d112fc80e0c4253f2
Closes-bug: #1365352
Big Switch: Retry on 503 errors from backend

Retries requests to the backend controller up to 3
additional times with 3 seconds in between each request
if a 503 service unavailable message was returned.
The scenarios that return 503 messages from floodlight
are normally short lived locks for things like OpenStack
synchronization or upgrade blocks. Retrying should work
in the majority of cases.

Conflicts:
	neutron/tests/unit/bigswitch/test_servermanager.py

Closes-Bug: #1357105
Change-Id: Ifacd3a384cfc797ba6d6af5f3c8649c333473259
(cherry picked from commit 48a2221648f490540fdf1ee099d39b8e5230f053)
Send network name and uuid to subnet create

Added the network segment name and uuid parameters to the infomation sent to
Cisco N1kV during subnet creation to allow for proper association of the
subnet and network segment.

Conflicts:
        neutron/tests/unit/cisco/n1kv/test_n1kv_plugin.py

Change-Id: I375d49ec43f79360189ecf5de0583873b8039db9
Closes-Bug: 1332713
(cherry picked from commit 779ddd17c575b55612e59ae5a605a14689820b98)
Improve ODL ML2 Exception Handling

Raise a MechanismDriverError when authentication with ODL fails.
Re-raise HTTPError in "sync_resources" for exceptions whose status code is not 404.

Closes-Bug: #1311758
Change-Id: I99d2c4f270007c369024525ba4e6188d232a0b13
(cherry picked from commit 7db44edd3c5ad4aea508c3cc74a8b0b8d785c26b)
BSN: Add context to backend request for debugging

Include the request context with calls to the backend
Big Switch controllers to assist with event correlation
and debugging object provenance.

This also removes mutable objects from default arguments
in some of the server manager function definitions that
were interferring with the new use of the headers dict.

Note: The commit to master stripped out an auth_token
field, however that logic is removed because Icehouse
did not have the auth_token to begin with.

Conflicts:
	neutron/plugins/bigswitch/servermanager.py
	neutron/tests/unit/bigswitch/test_servermanager.py
	neutron/tests/unit/ml2/drivers/test_bigswitch_mech.py

Closes-Bug: #1364696
Change-Id: I5b80b1596cc145742457b3603cbcd67f6e0d9f36
(cherry picked from commit 50c65d16bee8e6e46840f232519e92d9ba9989b4)
Merge "Fix metadata agent's auth info caching" into stable/icehouse
Don't allow user to set firewall rule with port and no protocol

Creating firewall rules specifying a destination port and/or a source
port without a protocol, generates rules without src or dest port
restriction. This was a real security issue for cloud users.

This patch generates a 400 Bad request "Source/destination port
requires a protocol" in case of creation/update of firewall rules
specifying a destination port and/or a source port and without protocol.

DocImpact
Closes-Bug: #1365961

Change-Id: I4a3a1d9ae7ec4b2a864b3edc83d65ef7f80cbba5
(cherry picked from commit 6f3ae396ed9a9525d4ca77fb8e9b2857fe79b568)
Merge "Fixes Hyper-V issue due to ML2 RPC versioning" into stable/icehouse
Merge "Big Switch: Retry on 503 errors from backend" into stable/icehouse
Merge "Improve ODL ML2 Exception Handling" into stable/icehouse
Don't spawn metadata-proxy for non-isolated nets

If the configuation option "enable_isolated_metadata = True" for the
DHCP agent is set, the neutron-ns-metadata-proxy process is spawned
for all networks, regardless if they are isolated or not. In case
the network is not isolated (ie. connected to a neutron router), the
L3 agent also spawns a proxy process, and the DHCP's proxy is left
unused. This patch adds a check prior to the spawning of new proxies:
if a network is not isolated, no proxy is spawned.

Conflicts:
	neutron/tests/unit/test_dhcp_agent.py

Change-Id: I9bdb8c3d37997b22435bca33ec47a67db08efa51
Closes-bug: #1361545
(cherry picked from commit 9569b2fe58d0e836071992f545886ca985d5ace8)
Merge "Allow unsharing a network used as gateway/floatingip" into stable/icehouse
Merge "BSN: Add context to backend request for debugging" into stable/icehouse
Merge "Don't allow user to set firewall rule with port and no protocol" into stable/icehouse
Merge "Don't spawn metadata-proxy for non-isolated nets" into stable/icehouse
Merge "Send network name and uuid to subnet create" into stable/icehouse
loadbalancer: add driver for LVS loadbalancing
remove bad import