xenapi - quantum: L2 agents for dom0 and domU

This patch makes it easier to support the all-in-one installation of
XenServer with Quantum:
- separate agents for domU and dom0 openvswitches. The domU agent's name
  is "q-domua", and the dom0 agent is called "q-agt"
- create a physnet1 physical network to connect those openvswitches

Note: This patch depends on the quantum patch:

    https://review.openstack.org/15022

For a diagram, see:
    http://goo.gl/BuAdg

Change-Id: Iff851438553528b9051edd380ecbb2c0415cbf78
diff --git a/lib/nova b/lib/nova
index 9fc4ded..ea932a3 100644
--- a/lib/nova
+++ b/lib/nova
@@ -80,7 +80,10 @@
     PUBLIC_INTERFACE_DEFAULT=eth3
     GUEST_INTERFACE_DEFAULT=eth1
     # Allow ``build_domU.sh`` to specify the flat network bridge via kernel args
-    FLAT_NETWORK_BRIDGE_DEFAULT=$(grep -o 'flat_network_bridge=[[:alnum:]]*' /proc/cmdline | cut -d= -f 2 | sort -u)
+    FLAT_NETWORK_BRIDGE_DEFAULT=$(sed -e 's/.* flat_network_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline)
+    if is_service_enabled quantum; then
+        XEN_INTEGRATION_BRIDGE=$(sed -e 's/.* xen_integration_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline)
+    fi
 elif [ "$VIRT_DRIVER" = 'baremetal' ]; then
     NETWORK_MANAGER=${NETWORK_MANAGER:-FlatManager}
     PUBLIC_INTERFACE_DEFAULT=eth0