Remove unneeded device_owner field from l2pop tuple

The DVR development added this device_owner to the middle of this
tuple during early development because it was thought to be needed.
Over the course of development, it was found to be unnecessary and
much of the code that read it from this value was removed or
obsoleted.  That job went unfinished and so this commit completes it.
This essentially restores the code to what it was before and fixes the
regression that was caused.

Change-Id: Ia901f925883b53e9880dd25688e16e0ffe402bf4
Partial-bug: #1352801
Return port context from _bind_port_if_needed

Previously port was returned causing exception being thrown
in rpc handling code.

Change-Id: Iba498d0600d625f0469392b99ac0bc8c1f1ecff7
Closes-Bug: #1354912
MLNX Agent: ensure removed ports get treated on resyncs

This patch ensures that removed ports will be cleaned up properly if exception
occurs in the daemon_loop.
It does the same for the mlnx-agent as was done for the lb-agent in
Ieada34ad315c0c29aa8462ebf041a448fde007b8.

Refactoring the daemon_loop and scan_ports in a way that -
If there's an exception, the ports that were flagged for cleaning will
be retreated in the following iteration,
unlike previous exception handling, where only existing ports
were treated in the following iteration.

Closes-Bug: 1287648
Change-Id: I3af505773aa3fdc0d17f2079ac1f1b3e93bb64a3
Signed-off-by: Roey Chen <roeyc@mellanox.com>
NSX: fix wording for configuration option

This patch clarifies that in order to use NSX distributed
routers, the replication_mode parameter should be set to
'service'. This is already its default value, so no further
change is needed beyond clarifying wording.

Change-Id: I446c428ecf8c0bf7f6947e69562d60a7fb4383ed
Closes-Bug: #1355502
NSX: unify the two distributed routing extensions

This is done by adopting the router_extra_attributes
models. However, the NSX 'distributed' extension is
slightly different in that it is visible to tenants
and prevents router conversion (allow_put=false).

PUT requests are made return the correct HTTP code;
The access control misalignments will need to be
adjusted via rules in policy.json. This will be
properly documented.

DocImpact

Supports-blueprint: neutron-ovs-dvr

Change-Id: I35a4b54318d8169eb2c73be77ca2f30bbee08b46
add auth token to context

As discussed at
http://lists.openstack.org/pipermail/openstack-dev/2014-July/040644.html
SerivceVM project (and other routervm plugins) need auth token in context.
The first user will be l3 routervm plugin.

Closes-Bug: #1343854
Closes-Bug: #1352698
Change-Id: Id5a4c98059894eef33faf19d5ab063780b362f4a
Make plugin and l3plugin available as mixin's properties

This makes the code simpler and slightly more efficient.
This is a minor refactoring related to a race condition
observed when the agent is processing a router while its
interfaces are being removed.

Related-bug: #1355409

Change-Id: Ic0ce25aa6a977e28b1ab76081c74da4c46c2ca6b
Raise exception for network delete with subnets presents

N1kv plugin should raise an exception during network delete
if there is a subnet that is tied to that network.

Changed the order of the Assert arguments since now it's encoraged to have <expected_value, actual_value> now.

Change-Id: I92f177af0e2a2fbc460e0d668989ce590b7d1cb2
Closes-Bug: 1336107
Merge "MLNX Agent: ensure removed ports get treated on resyncs"
Merge "Return port context from _bind_port_if_needed"
Merge "Make plugin and l3plugin available as mixin's properties"
Merge "Raise exception for network delete with subnets presents"
Merge "NSX: fix wording for configuration option"
Merge "Remove unneeded device_owner field from l2pop tuple"
Merge "NSX: unify the two distributed routing extensions"
Merge "add auth token to context"