Plugin aware extensions should also be reset at each test setup

PluginAwareExtensionManager caches extension according plugin.
At each db plugin test setup, testing plugin and router are newly
created.
However, the extension manager held the extensions for first time
loaded plugin. Because of their cache.

So if a plugin conditional extension exists, it could not be loaded by
testing order.

Fixes bug 1043381.

Change-Id: Ic994aab61c3d67aa9d422594484049f41ff8b321
prevent invalid deletion of ports using by L3 devices

bug 1039947

The bug noticed that an admin user could delete a port that stored
the underlying IP allocation for a floating IP.  This patch prevents
the direction deletion of ports via the API for ports that are used as
router interfaces, router gateways, of for floating IPs.

Add a unit test to check such an invalid delete, and also updates
unit tests to avoid them tripping over the new checks.

Change-Id: Ief28e3181583428d55259275a7c21151a4a4fa9b
Do not transfer ips if there isn't any

Fixes bug 1044403

Check if the interface being attached to the bridge has ips
before iterating over them

Change-Id: I54315831f240c6810707e7247e7a76c1bfa8742e
expose openvswitch GRE tunnel_id via provider API

The provider:vlan_id extended attribute is renamed to
provider:segmentation_id, and the openvswitch plugin returns the
tunnel_id of GRE networks as this attribute.

Fixes bug 1044375. Final patch in series that fixes bug 1037341 and
bug 1035492.

Detailed changes:

- Rename provider:vlan_id to provider:segmentation_id.
- Use consts for providernet extension's attribute names
- Remove validation clause from provider:segmentation_id resource attribute map data.
- Validate provider:segmentation_id in linuxbridge and openvswitch plugins.
- Rename physical_id to segmentation_id in the openvswitch schema, plugin, and agent.

Change-Id: Ic023b30b6e3275955bcb8a09c7936035dacf3f87
misc L3 fixes.

- fix iptables rules for handling inter-subnet traffic so that this
traffic is not SNATed when a gateway exists.

- handle remapping of floating ip from one internal ip to another

- enable ip forwarding on a per-network namespace basis.

- make metadata_ip optional. specifying it when no gateway is configured
results in a very log timeout.

Change-Id: I738094aeafe42cbf2c64eda3bb038ef1e58a6550
Add lease expiration management to ip recycling

Fixes bug 1022804

This is the 3rd and final patch for this bug.  This patch alters ip allocation
recycling to honor lease expiration. Allocations that are in the
expiration wait state have null port_ids.

Change-Id: Ib7960b142eb15733c6418b01973d02a827634cb6
Merge "expose openvswitch GRE tunnel_id via provider API"
Merge "misc L3 fixes."
Merge "Plugin aware extensions should also be reset at each test setup"
netns commands should always run in the root ns

fixes bug 1044542

Previously, some netns commands were executed in the context of the
namespace defined in the wrapper. These commands should be be executed in
the root namespace for the most reliable results.

Change-Id: I4915aa6f75af3f65ce2adb40360bcd841f549239
Fixes agent problem with RPC

Fixed bug 1044135

When quantum-openvswitch-agent or quantum-linuxbridge-agent were
called the eventlet monkey patch was not invoked.

Change-Id: Iafb7fd02d37415c3466213d28280bcb4573de4a8
Merge "netns commands should always run in the root ns"