clear db._ENGINE for each plugin init in Metaplugin

Fixes bug 1036996

Change-Id: I7f289b4ccda281a66666ec1dbf7fc01156b0512c
Ensure network connectivity for linuxbridge flat network.

Fixes bug 1040447

In the event that an IP address and gateway are defined on an interface that is
used in a flat network, then the interface details will be copied to the
bridge when it is created.
If the network is deleted then the IP addresses are returned to the interface.

Change-Id: Ic860d7635c137f49e5aaaa25dc9727ac60227f1a
Merge "clear db._ENGINE for each plugin init in Metaplugin"
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
fix bug where network owned resources block delete

bug 1028174

This patch fixes a bug in delete_network and delete_subnet where the InUse
exception was being thrown for resources owned by the network and not
the tenant.  This patch force deletes network resources if they are the
only blocker to deleting the parent resource.

Change-Id: I822cc4a92cb05cdef88679bb628fad4e5063cddd
Fix dhcp option distribution by dnsmasq

Fixes bug 1022737 host route per subnet distribution
Fixes bug 1028647 --no-gateway support on dhcp agent
Fixes bug 1043022 dns distribution

Change-Id: I567f1f8d1f5d386a253be1965d29f2533f7e88c8
Cisco nexus sub-plugin update_network fix

Fixes bug 1043147

Currently, the cisco nexus sub-plugin doesn’t handle the network admin state parameter
when it’s updated. The fix would enable the sub-plugin to handle an update of the admin
state of the network. In update_network of the nexus sub-plugin, vlan corresponding to that network
is added/removed from the nexus interfaces based on the network state. Unit tests are added as well.

Change-Id: Ia3b5400c2896c1b0160968a2c75c21247ca0c3f4
Ensure proper validation for l3 API attributes

Fixes bug1042042

This patch introduces validation for uuid and ip fields in l3 api
data structures.

Change-Id: Ibc4913e0bcf5b33cb5e4bd42c89b82ec374f5437
Merge "Fix dhcp option distribution by dnsmasq"
Merge "Cisco nexus sub-plugin update_network fix"
remove policy check for host_routes in update_port

Fixes bug 1043630

Port has no 'host_routes' attribute according to the latest V2 API
specification. So, policy check for 'host_routes' is not need any
more, just remove it in this patch.

Change-Id: I925e83d9825f89265843c15e71ee5ed4c33bad5f
Merge "Ensure network connectivity for linuxbridge flat network."
Merge "remove policy check for host_routes in update_port"
Update rootwrap; track changes in nova/cinder

Fix bug 1037815

Summary: Copy/paste the essential parts of the rootwrap
  mechanism from nova/cinder into quantum.  This includes
  the core changes to filter.py and wrapper.py which deal
  with loading filters from files pointed to by
  rootwrap.conf
Detailed changes:
  Transliterate the old rootwrap/*-agent.py files to
  new format, and put the results in etc/quantum/rootwrap.d
  Delete the *-agent.py files.
  Add conf to point to etc/quantum/rootwrap.d
  Add a unit test cribbed from nova to exercise the filter
  mechanism
  Add a unit test to exercise the actual filtered execution
Note that as written, this patch does not set the default
  execute mechanism (in the agent .ini files) to rootwrap,
  leaves it as sudo.  That can be done in a followon
  change, or in distro specific packaging.
Note also that there is still work to do around finishing
  and testing the filter specs themselves.  We've decided
  that that is out of scope for this patch.

Change-Id: I9aba6adc5ba40b6145be5fa38c5ece3b666ae5ca
Mangle network namespace name used by dhcp_agent

fixes bug 1044113

This fix managles the network namespace by prefixing the network id with
qdhcp.

Change-Id: I41f48f805efd83bd3e12049007067200cc384ffe
Implementation of 2nd phase of provider extension for openswitch

Enhances openvswitch plugin to support flat networks and VLANs on
multiple physical networks via the provider extension. Implements
blueprint provider-networks.

See http://wiki.openstack.org/ConfigureOpenvswitch for
configuration and usage details.

A devstack patch to support the updated openvswitch configuration
variables is at https://review.openstack.org/#/c/11418/.

Change-Id: Ic86b6f3b2e354c7d60bc2c330b334c23d349bc29
Modified code PEP8 warning.

*Find more than one space after keywords, then eat one.
*Make sure every continuation line is aligned with the first character after
the top parenthesis in the top line.

Change-Id: Id3eb1ec728bc3329a859d0817d61b639019ffe8b
Merge "Modified code PEP8 warning."
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