Fetch routers ports for metadata access from DB

Bug 1176963

There is no need to retrieve the ports from the NVP backend, so
a DB query will be enough.

Change-Id: If3529cc5694434e8cdc9d21a4043f94212146d2d
Improve checking of return values for functions in linuxbridge agent plugin

Fixes bug 1167780

Changed return values for some ensure_* functions to make them more consistent.
Now all ensure_* functions return None on failure and return the entity that was
created within the function when successful. Made changes to the unit tests to
reflect the changed return values.

Change-Id: Ib015ee7cee50bae5d91a4e109e7381519c1e14f7
Create a common function for method _parse_network_vlan_ranges used
by plugins.

The _parse_network_vlan_ranges method does the same thing for the
linuxbridge, ovs, and hyperv plugins. Create a common function for
the plugins to use instead. This paves the way for improving vlan
range verification (see #1169266) in one place.

Fixes Bug #1177428

Change-Id: Ie8c20807e9146dd9c8bc011dd3a4dc10ec871e0b
Merge "Improve checking of return values for functions in linuxbridge agent plugin"
Merge "Fetch routers ports for metadata access from DB"
Merge "Create a common function for method _parse_network_vlan_ranges used by plugins."
Add kill-metadata rootwrap filter to support RHEL.

 * Fixes bug 1178419

Change-Id: I9c1cf0d19d1134ec3b85c905c6c8bb7145847ce7
Add support for OVS l2 agent in XS/XCP domU.

 * Config doc: http://wiki.openstack.org/QuantumDevstackOvsXcp

 * The Open vSwitch agent needs to be deployed on domU but
   interact with a dom0 bridge.
 * Add a root wrapper and associated XenAPI plugin to allow the
   agent to execute networking commands against dom0 from domU.
 * Update ovs_lib mac address discovery to use ip_lib to
   ensure that discovery works even for bridges not local to
   the agent (i.e. dom0 bridges).  A bridge configured with
   a dom0 root wrapper will execute ip link on dom0.
 * Update ip_lib to use a root helper by default to ensure that
   the 'ip' command will execute on dom0.
 * Remove obselete rpm spec and installer for dom0 agent.
 * Credit where credit is due - the XenAPI plugin and its
   packaging were largely copied from nova.
 * Supports blueprint xenapi-ovs

Change-Id: I7795446ee1267712c896f5cb3401f84fb1763ce7
Add support for DHCP agent in XS/XCP compute domU.

 * Config doc: http://wiki.openstack.org/QuantumDevstackOvsXcp

 * For a single-node devstack configuration, the DHCP agent will
   to run in the compute domU, which means DHCP servers need to attach to
   ports on an integration bridge in domU.  For DHCP service to be
   available to VM's, the dom0 and domU integration bridges need to be
   joined via a common interface and traffic between the two bridges
   trunked, and DHCP ports on the domU bridge need to be tagged with the
   appropriate local vlan.
 * Two changes are implied by this use-case:
   1. The OVS agent, which is responsible for tagging ports with the
      local vlan associated with the port's network, needs to tag ports
      on both the dom0 and domU integration bridges.  Since the agent
      keeps local vlan state in memory, running more than one agent
      would require a state-sharing mechanism, so this implementation
      chose the simpler path of relying on a single agent to interact
      with both the dom0 and domU bridges.  The major change was
      updating port-handling methods to be passed the bridge associated
      with a port, rather than presuming a default bridge.
   2. The OVS agent needs to ignore the interface between the dom0 and
      domU bridges.  The interface is not known to Quantum and the agent
      would put the associated port on the 'dead vlan', effectively
      cutting off communication between the bridges.  This
      implementation changes the agent to ignore ports on the dom0
      bridge that have mac addresses used by interfaces in domU.
 * Supports blueprint xenapi-ovs

Change-Id: Id707eaba60c2ed2e9d72eb6791a8a6aa8378c9b8
Add iptables commands to Quantum netwrap

Change-Id: I052705548210e81efa744446b7e56c5d915fd828