Using no proxy option to skip wget and curl proxy settings in config

When end users specify proxy settings in config file for wget /etc/wgetrc:
http_proxy = http://...
or for curl ${HOME}/.curlrc:
proxy = http://...

Using `http_proxy="" wget' can not skip the proxy setting in the
config files, also it can skip proxy settings in env viriables.

In order to skip proxy setting in both env and config file, we pass
--no-proxy option for wget, and --noproxy '*' for curl.

Fixes bug #1224836

Change-Id: I2b25aeca9edf2ce4525fb1db325e5e24c18b4d55
set errexit and xtrace in helper scripts

stack.sh invokes some helper scripts as separate processes, rather than
by source'ing them.  As with stack.sh itself, abort immediately on the
first error, so that errors don't compound and result in confusing error
messages.  If one of these helper scripts aborts, stack.sh itself will
also abort in the usual manner.

Due to the change in behaviour, tweak some mv invocations to ensure that
they don't trigger false failures.

As with stack.sh itself, also enable xtrace so we can see exactly what's
happening.  In particular this allows us to see the cause of any
premature termination due to a command failing whilst errexit is
enabled.

Change-Id: I7a55784c31e5395e29ab9bbe2bb112b83b9be693
Merge "set errexit and xtrace in helper scripts"
Merge "Using no proxy option to skip wget and curl proxy settings in config"
xenapi: enable user interaction with stack.sh

In XenServer, devstack runs inside a virtual machine. This makes it hard
for the user to interact with stack.sh should a parameter be missing.
This change will create an upstart job (devstack) that runs
stack.sh with console enabled so user can interact with it by running
vncviewer or using XenCenter.

Logging the output is also disabled, stamp files are used instead to
detect the script run status in case install_os_domU.sh is used.

As run.sh.log is removed, standard devstack logging should be used.

The change also removes the environment settings from run.sh, as they
are not needed, they should be specified in localrc. This way user
cannot get different experiences by using unstack.sh/stack.sh or run.sh

Also a proper unstack.sh is called instead of killing screen in run.sh

Change-Id: I7eb12bd74746cc7a1db3aa9fd68ece645a50001d
xenapi: enable user to specify FLAT_NETWORK_BRIDGE

install_os_domU.sh failed, if the FLAT_NETWORK_BRIDGE is found in
localrc. As nova looks up the network by either name-label or bridge
name, it makes sense to enable the user to specify this parameter. As an
example, if the user wants to use name-labels to specify networks, and
those name-labels could be used in domU to create bridges:

VM_BRIDGE_OR_NET_NAME="osvmnet"
FLAT_NETWORK_BRIDGE="osvmnet"

In this case, the domU will know only about a name label, so it could be
decoupled from which xapi bridges used.

This change also adds some fixes (missing double quotes).

Change-Id: I045e367ef441be20c4e8cb8af3c1149392db796b
xenapi: display IP and DevStack result on console

The devstack setup service can update /etc/issue, displaying the status
of the installation and the VM's management IP. With this change, after
the devstack service finsihed, the login prompt will look like this:

OpenStack VM - Installed by DevStack
  Management IP:   10.219.3.108
  Devstack run:    SUCCEEDED

DevStackOSDomU login:

This helps people to log in to their system.

Change-Id: Idd6bbd5faf9ced5618cd3e95191bfc3b89473fa2
XenAPI: Get the management network dynamically

xenbr0 is correct for most installations, but not all.  Notable xenserver-core
may use a differently named device.  Since we can auto detect this, remove the
config and do so.

Change-Id: I989f6ddd5ffb526ab350f263ef6fc402c596304a
XenAPI: Get pool default SR rather than "Local storage"

Match the nova default of using the Pool default SR as the storage for
VMs

Change-Id: I3b681ae7062ba0db3d9eab70b410b7d9658e37c9
xenapi: max out VCPU count

Give as much VCPUs to the DevStack machine as possible. First asking
xenapi about its CPU count, and as a fallback, count the CPUs in dom0.
This should result in faster test runs.

Change-Id: I1ffb99ecd435f1d7eb5754fe9cd99f0e8ceae6dc