Use call to report state when ovs_agent starts up

Make sure to report ovs_agent state when starting up, otherwise
ovs_agent start_time would not be updated and thus l2pop does
not send fdb entries.

Change-Id: Idd770a85a9eabff112d9613e75d8bb524020234a
Closes-Bug: #1347452
Update DVR Binding when router_id changes

In this patch I modified update_dvr_port_binding to update the
binding if router_id changes.
When a new router namespace is created on a host, sync_router
will call _ensure_host_set_on_port that will update the DVR binding.
With the current code update_dvr_port_binding won't update the
binding if there's an existing binding unless the binding
vif_type is VIF_TYPE_BINDING_FAILED . There's a race when
the router namespace is destroyed and then recreated on the same
host.
The DVR binding is deleted only when the message
update_device_down is processed. If this message is processed
after the update_dvr_port_binding triggered by the namespace creation,
update_dvr_port_binding won't update the binding. When the router
interface will be detected as UP, no DVR binding will be found.

Closes-bug: #1358554
Change-Id: I37fd4ed67dc2019b57e36d082b584c517d8f67a8
Big Switch: Check for 'id' in port before lookup

Check for the presence of the 'id' key before trying
to do a lookup based on the value. This is necessary
because a 'fields' param to get_port(s) may exclude
the 'id' field before the host_id lookup.

Closes-Bug: #1358668
Change-Id: If30567d5deaeabd2de6c6287fac7a81695a41cc5
Add unit tests covering single operations to ODL

This commit adds the remaining test cases (create and update
operations) to fully cover sync_single_resource. It also defines the
filter_* methods as static or class methods and removes their duplicate
arguments.

Change-Id: I6b6153ea577bd685576690559b1c389490ee525d
Closes-Bug: #1325184
Fixes Hyper-V agent issue on Hyper-V 2008 R2

The vmutils.HyperVUtils class used on versions of Hyper-V prior of 2012
is missing the "remove_all_security_rules" method.

Change-Id: Ib14e643c400b230c912589f9480acf59d6e7b147
Closes-Bug: #1360817
Remove status initialization from plugin's create_firewall

This is overwritten by the DB class method, so here is
not necessary.

Change-Id: I7bda448dab81992c8fb6ef8d771138ff070360ba
Remove binding:profile update from Mellanox ML2 MD

Remove temporary work-around that populates physical_network in
binding:profile. Now when both neutron and nova use binding:vif_details
to pass attributes to plug neutron port, this work-around is not nequired.
Remove related temporary code from ML2 plugin.

Change-Id: Ib37203af396f31080b1b27b500a571c20917f5a4
Closes-Bug: 1360762
Layer 3 service plugin to support hardware based routing

Change-Id: Ie8e97a6d4fde0bda7cf049696e1384586492f676
Implements: blueprint brocade-l3-svi-service-plugin
Subnets with prefix length 0 are invalid

This patch changes the API behaviour to return a 400 error
when a subnet with /0 prefix length is specified.

This kind of subnet hardly make any sense, and also cannot
possibly work when DHCP is enabled.

Change-Id: I8f822f14b91475dcf86ea44ee607013e61cbb6f7
Closes-Bug: #1362651
Add endpoint_type parameter to MetaInterfaceDriver

Previously MetaInterfaceDriver communicates with neutron-server
via 'publicURL' because it uses python-neutronclient without
endpoint_type and 'publicURL' is the default.
It causes error when a user intends to use internal or admin URL
for communication between MetaInterfaceDriver and neutron-server.

Change-Id: Id321d5a16a08a4bda618f98bb1eb7cb1b0b9eb08
Closes-bug: #1354285
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.

Change-Id: I9bdb8c3d37997b22435bca33ec47a67db08efa51
Closes-bug: #1361545
Fix a bug in Mellanox plugin RPC caused by secgroup RPC refactoring

SecurityGroupsRpcCallback RPC refactoring patch (commit 2781fce238)
moves get_port_from_device method from plugin RPC callback class to
plugin layer, but Mellanox plugin RPC callback was forgot to update
and as a result RPC calls from agents to Mellanox plugin fails.

Change-Id: I1aa82ac00c16a53a59a93087f0ca4ef281ee3f2b
Related-Bug: #1359416
Clarify message when no probes are cleared

Log number of probes which were deleted by
using neutron-debug probe-clear
Closes-Bug: #1333103

Change-Id: I5b53f0c4651c6df491d414d7d65f98c4a84a5987
Big Switch: Bind IVS ports in ML2 driver

Add support to bind IVS ports in the Big Switch ML2
mechanism driver. The backend controller will be checked
to determine if a host is connected using the Indigo vswitch.
If so, the mechanism driver will mark it as bound since
it will be provisioned by the backend controller.

Implements: blueprint bsn-ml2-bind-ivs
Change-Id: Ic481fc31c8c123899fddf8185c32f127dff53b7a
Big Switch: Separate L3 functions into L3 service

Separate the L3 functions from the core Big Switch
plugin into an L3 service plugin. This is will allow
the L3 functions to be used in ML2 deployments that
use the Big Switch ML2 driver.

DocImpact

Implements: blueprint bsn-l3-service-plugin
Change-Id: I889db0047fb9a85f02d1fb95b9c099e9243a5bb5
Skip functional l3 agent test

Since this test merged there have been periodic failures that
seem to be related to SystemExit being raised.  Skipping for now
to give us time to fix.

Change-Id: Ia857835102a9c4c74820cf5eb3c529a3c2fb421e
Related-bug: 1364171
Implements ProcessMonitor to watch over external processes

This class takes care of all the spawned external processes,
taking the administrator configured action in the case of any
of the external processes die unexpectedly.

Implements: blueprint agent-child-processes-status

Change-Id: I6bc7a415dde5723dac07589859796c2ffeef5b54
Implements sync mechanism between Neutron and Nuage VSD

This will sync resources between Neutron and VSD based on
the configuration parameters. "enable_sync" will enable/disable
the sync and "sync_interval" will control the time interval
between consecutive sync cycles.

DocImpact

Change-Id: I6730bf0166dfd1e35795b679293a2831b5afbc75
Implements: blueprint nuage-neutron-sync
Remove absolute path in KillFilter for metadata-proxy

This commit fix the problem of killing neutron-ns-metadata-proxy
when running in Virtual Environment.

Change-Id: I987dd87e19c218846a48e58b61679b4153d97f66
Closes-bug: #1363773
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.

Closes-Bug: #1357105
Change-Id: Ifacd3a384cfc797ba6d6af5f3c8649c333473259