Fix import/export; only download when needed

If image is a filepath, then we're not using image service so
no need to download from glance

Change-Id: Id6f2b9269bee4471f0accf068e9ce6051691aa1c
Policy distribution through nova.

Implementing functionality in cobalt to allow distribution of
vmspolicyd policies to all known vms hosts. The client takes a path to
a locally accessible policy file, and the contents of this file is
copied into all the policy definition files on all hosts. The compute
service does so basic validation on the provided definitions before
installing them.

Change-Id: I3506a00b9b65d7df6d0a9f878a2b99d0b5c1bbbf
Update setup.py to allow easier packaging in different environments.

* deduplicate common setup keywords

* setup packages as namespace packages

It is actually valid to have a python package that lacks __init__.py
(like the gridcentric module does) it's just a different type of package
called a namespace package. More information on those here:

http://cdent.tumblr.com/post/216241761/python-namespace-packages-for-tiddlyweb
http://www.siafoo.net/article/77#multiple-distributions-one-virtual-package

* set PACKAGE and VERSION correctly on pip install

sdists do not preserve environment variables they were generated with,
so later attempts to pip install them will fail.

this implements a system for making package metadata sticky when an
sdist is created, by parsing the PKG-INFO and preferring those values.

* Retrieve the version from git tags

This is only one of the many ways to do it.

Change-Id: I288f55ae565d71fbeaa955ff46485c16a7c24b22
Adding standard ubuntu .conf path to Cobalt.

Change-Id: I86e73e02c00969bf0bf021a941fd4709cbe82a38
Merge "Update setup.py to allow easier packaging in different environments." into stable/folsom
(OS-133 Fix) More informative image names

Glance live image names now reflect display names instead of "instance-xxxxx"
The extension for *.gc image was removed, and type changed to "Live-Image"
Disk files still have .#.disk extension, but with updated display name.

Note: locally "instance-xxx" and ".gc" are still used because vms requires it.
Name is converted on upload/download to glance.

Change-Id: I4375d8895b09f5544434bdd1a6099daef0dfd23e
Fixing type error for target.

Change-Id: I447dce9ebced4f23bf144e33dd15082b43bf9fed
Make support for instances with attached volumes an explicit capability.

This is not universally supported across the board (essex...). In immediate
practical terms, it will help grinder.

Change-Id: Ic41a7c43bf502164299e18f6a0ef5ed1d1721b67
Merge "(OS-133 Fix) More informative image names" into stable/folsom
Merge "Make support for instances with attached volumes an explicit capability." into stable/folsom
Fix OS-142: Lock source instance during bless

Source instance will no longer be able to be deleted, rebooted, etc. while being blessed.

Upon deletion "Cannot delete while blessing. Please try again later." is displayed.
Upon reboot, pause, etc. "ERROR: Cannot 'pause' while instance is in task_state blessing (HTTP 409)"
is displayed. This fix applies for both admin and regular users.

Change-Id: I8a849fbdacd56eee1b97925b65d99440a337c2ed
Allow raw image types to be created for launched instances

fixes OS-158

If an instance specifies a ramdisk or kernel then these images are
raw copied into the instances directory instead of having a qcow2
overlay. For some reason, when having the qcow2 over the qemu
process fails and the instance is toast. We need to ensure that we
can have the ramdisk and kernel copied as raw into the instances
directory.

Change-Id: Ic9342181be8f4015322264a692f676958ea1435c
Pre export name fix

Updated to reflect usage of file_name instead of name when downloading from
glance.
Update setup.py to contain the list of dependencies.

Change-Id: I54b5d3246f6fdcdc2320b3819f963af461ea33e3
Update setup.py to contain the list of dependencies.

Change-Id: I54b5d3246f6fdcdc2320b3819f963af461ea33e3

Conflicts:

	setup.py
Merge branch 'stable/essex' into stable/folsom-essex-merge
Make allocate network more reliable.

In a contended host this method fails because it uses the default timeout
(typically one minute). The error condition can be reproduced quite reliably
using the grinder launch_multiple test. With this commit you get the following
in the logs (folsom):

2013-06-04 23:49:41 17245 DEBUG nova.openstack.common.rpc.amqp [-] MSG_ID is 09d2220e2296439ebb6d41488ac8a786 multicall /usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py:355
2013-06-04 23:49:42 17245 ERROR nova.openstack.common.rpc.common [-] Timed out waiting for RPC response: timed out
2013-06-04 23:49:42 17245 TRACE nova.openstack.common.rpc.common Traceback (most recent call last):
2013-06-04 23:49:42 17245 TRACE nova.openstack.common.rpc.common   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/impl_kombu.py", line 518, in ensure
....
2013-06-04 23:49:42 17245 TRACE nova.openstack.common.rpc.common timeout: timed out
2013-06-04 23:49:42 17245 TRACE nova.openstack.common.rpc.common
2013-06-04 23:49:42 DEBUG nova.gridcentric.manager [req-42327ad0-9853-4094-bd55-cc47809ec3c5 cd680f57d92e440b8827d25304dd9110 63575cec367a4703aec77fe504c74a80] Allocate network for instance=instance-0000ba3e timed out after 60 seconds, try 0. _instance_network_info /usr/lib/python2.7/dist-packages/gridcentric/nova/extension/manager.py:865

Which would have otherwise killed the launch.

This is in line with findings from Peter about lock convoy-ing with nova-network.

The proposed fix is to catch the timeout, and keep retrying getting the network
info we asked to allocate until we exhaust the time specified in our own
internal timeout. That puts the policy for this method in line with that used
for other network methods we call like pre_live_migration.

Change-Id: I76b3964f737cd703d7d34b16ed162f779e0be262
Merge "Pre export name fix" into stable/folsom
Save power_state in export

Exported fields were explicitly listed, power_state was missed
so imported instances would have no power state, causing
an error upon nova list due to stricter verification in openstack

Change-Id: I8d89265c943f1c24ccf6dc8b8a4763826a9dcfba
Use imported instance's display_name on glance

As per OS-133 and commit 9076fc45fbc81ff0463bd1e173bd2b1bf52df4e7's
move to use more informative names on glance.

Change-Id: I085771e38a5f99dfc42178e4b825d7eec8a55025