Make devstack work with xcp-xapi package on Ubuntu 12.04

- allow you to configure the xenapi_user (often other than root)
- allow you to disable the guest installer network
- install the plugins in the xcp-xapi location
- use alternate webserver location when adding the preseed file
- skip the centos specific ip forwarding configuration
- make use xcp inventory, if no xensource-inventory is found
- correctly deal with kpartx to mount the VM VDI in manage_vdi

Change-Id: I8d51725fc97f0bcaa27a46f7a7ced13c369c809e
diff --git a/stack.sh b/stack.sh
index df26027..032c0b9 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1700,7 +1700,7 @@
 # For Example: EXTRA_OPTS=(foo=true bar=2)
 for I in "${EXTRA_OPTS[@]}"; do
     # Attempt to convert flags to options
-    add_nova_opt ${I//-}
+    add_nova_opt ${I//--}
 done
 
 
@@ -1711,8 +1711,9 @@
     read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN."
     add_nova_opt "connection_type=xenapi"
     XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"}
+    XENAPI_USER=${XENAPI_USER:-"root"}
     add_nova_opt "xenapi_connection_url=$XENAPI_CONNECTION_URL"
-    add_nova_opt "xenapi_connection_username=root"
+    add_nova_opt "xenapi_connection_username=$XENAPI_USER"
     add_nova_opt "xenapi_connection_password=$XENAPI_PASSWORD"
     add_nova_opt "flat_injected=False"
     # Need to avoid crash due to new firewall support