xenapi: Use a jeos vm as a template

DevStack was using templating to speed up the setup process with
XenServer. The template already included some devstack customisations,
not just a clean OS. This change modifies devstack behaviour, so that
the template is a simple clean operating system. This makes it easier to
use custom OS as a template, potentially speeding up the tests.

related to blueprint xenapi-devstack-cleanup

Change-Id: I6cb0a7ed7a90e749b78329a8e2b65fb8b7fcfa5f
Add Cinder V2 API to keystone catalog

Support both SQL and templated keystone backend. This will add an
additional endpoint to go with v1.

Change-Id: I19168d55c2ffad2b1cd668b6c1341dc8e49e9c1f
Force $DEST to have wider permissions

This is particularly useful in the case where we create the
home directory above and the permissions are too strict.

Other users, such as the apache user, need read/execute for this
directory.

Change-Id: I908d993dbcd863b482030afcc04e5e7b9f4cffa1
Add some missing pkgs to Cinder install

Added python-dev even though it's picked up
by other projects already, just to be explicit.

Also added libpq-dev, this way users can just
run "sudo pip install -r test-requirements.txt"
and perform everything in run_tests.sh without the
need for venv.

Change-Id: I3953032ac40ef78fc6f67d77539e13539fbbb2ac
More Python package fixes

* Add tools/fixup_stuff.sh to fix prettytable and httplib2 install
  with pip 1.4+
* Cache downloads properly in tools/install_pip.sh

Change-Id: I482590cb91f7a10c1436bc9015afd572ac1cc73e
Generate heat images for tempest tests

This requires HEAT_CREATE_TEST_IMAGE to be set for any images
to be created.

If the file (files/fedora-vm-heat-cfntools-tempest.qcow2) already
exists then disk-image-create will not be called, and the existing
image file will be registered with glance. This is most likely to
happen in the following scenarios:
- a second run of stack.sh
- the image has been pre-built elsewhere (such as during devstack-gate
  image building)
Change-Id: I276573a20927e72f2cb68784f655c1ba1913ae8a
Pip install fails because of --use-mirrors parameter

Having --use-mirrors parameter in pip commands causes pip to hang on
some distros.

Pypi uses CDN for long time already, so there's no point to keep this
parameter no more.

Wipe PIP_USE_MIRRORS out of the "function" file.

Change-Id: I70adaf6591834af2482e09eb7f8f9f60df8e7692
Closes-Bug: #1069309
Add auth config for neutron metadata proxy

 * Without auth config, the proxy will return 500 errors on
   cloud-init requests, which will cause VM connectivity
   checks to fail.
 * A cleaner fix would be for the metadata proxy to reuse the
   configuration from the keystone_authtoken section of
   neutron.conf, but I chose the easier route because of a
   pending switch from REST to RPC communication (RPC won't
   need the auth config).
 * Fixes bug 1210664

Change-Id: Iaa3c74f5ada2404119c44c8cbdad380eda158f66
Merge "More Python package fixes"
Allow disabling of debug logging

I find that enabling the debug log level often causes me to miss
important error messages due to the sheer volume of information
logged.  This change allows configuration of the debug option
in a number of the projects so it can be disabled globally
without having to make one-off changes after each re-stack.

Note that this does not apply to Keystone or Swift right now.
They use a different method to configure their logging level and
I'm not as familiar with them so I didn't want to mess with their
settings.

Change-Id: I185d496543d245a644854c8a37f3359377cb978c
Merge "Force $DEST to have wider permissions"
VMware: Add cinder support to devstack

The patch set adds cinder support to devstack. VMware cinder support
can be found at:
 - Nova - https://review.openstack.org/#/c/40245/
 - Cinder - https://review.openstack.org/#/c/41600/

Change-Id: I0a05643010ea6cfb6635505accc3dcf411fdd419
Merge "xenapi: Use a jeos vm as a template"
Fix option for metadata access in nicira neutron plugin

Bug 1211850

Set metadata_mode option rather than enable_metadata_access_network.

Change-Id: Ia85aba4d0dfb3e7b21937cf15aebc629e3705aed
Faster old oslo.config detection

Just search in the path where python searches for modules.
Let's use python for searching, it knows the exact rules.

Change-Id: I659f734c418ab5e56f4956f418af48dfbe054c8a
Merge "Allow disabling of debug logging"
Merge "Add some missing pkgs to Cinder install"
Merge "Add auth config for neutron metadata proxy"
Merge "Add Cinder V2 API to keystone catalog"
Merge "Generate heat images for tempest tests"