cleanup power state (partially implements bp task-management)

Removed duplicate and invalid state in power_state:
FAILED, SHUTOFF, BLOCKED
This is the first step in cleaning up nova state machine
and do better task management (bp/task-management)

http://wiki.openstack.org/VMState

Change-Id: I586b9058fada5efd468870fb187590fc0e37aa8f
Eliminate a race condition on instance deletes.

- Add constraint and equality conditions to nova.db[.sqlalchemy].api
- Use host constraints to ensure the compute api doesn't simply delete
  an instance from the database that a compute manager has already
  started to run.

This race condition is associated with bug #998117

Change-Id: Id74192d3e66bea073327342f57ce0f26987efd2d
XenAPI: Don't hardcode userdevice for VBDs

Cleanup and refactor the way VBDs are allocated so it's clearer what
userdevice each VDI is allocated to. Also, use a dict of VDIs instead
of a list since it's nonsensical to have multiple VDIs of any type
and simplifies the code somewhat.

Change-Id: I46d6215dbd90822970a874af66f22c9a34529a40
Start removing unnecessary classes from XenAPI driver

The XenAPI driver has the concept of helper classes. All methods
have been classmethods and the classes themselves are never
instantiated. As a result, they only add an extra namespace
lookup and provide no value.

The first step is to move some functions from HelperBase to the
session class where it is better suited.

Change-Id: I13d6d49509052d35339a0ef132647bd61179cdd8
Remove vm_utils.VMHelper class

The XenAPI driver has the concept of helper classes. All methods
have been classmethods and the classes themselves are never
instantiated. As a result, they only add an extra namespace
lookup and provide no value.

Change-Id: If8a20501c9a9353359234441580552e41471722b
Remove volume_util.VolumeHelper class

The XenAPI driver has the concept of helper classes. All methods
have been classmethods and the classes themselves are never
instantiated. As a result, they only add an extra namespace
lookup and provide no value.

Change-Id: I26d1adfd378adc0728388185ba81fc4c71a41bdc
Remove network_util.NetworkHelper class

The XenAPI driver has the concept of helper classes. All methods
have been classmethods and the classes themselves are never
instantiated. As a result, they only add an extra namespace
lookup and provide no value.

Change-Id: Ief7d51013d8f313ca8c78cb157599858b156ac3f
Finish removing xenapi.HelperBase class

The XenAPI driver has the concept of helper classes. All methods
have been classmethods and the classes themselves are never
instantiated. As a result, they only add an extra namespace
lookup and provide no value.

This is the last patch in this series

Change-Id: I314dfa6555d38be9b0988270b3367c4ae86b19bb
Use openstack.common.cfg.CONF.

Part of blueprint common-rpc.

This patch makes the rpc code use the global config object from
openstack-common.  Based on some recent discussions on the mailing list,
this may not be the final way configuration handling is done here, but
it is certainly better than the register_opts() hack that is removed by
this patch.

Change-Id: Id128126e0bc064a2a1c710c6bd32fb3d137dc7f6
Use openstack-common's policy module

Reworks nova to use the new policy module in openstack-common.

Change-Id: Iea8651bad85f26804285616330107d9d5f23e6cb
Merge "Eliminate a race condition on instance deletes."
Revert "blueprint <multi-process-api-service>"

This reverts commit e599636d09755f635604f64f17e9f56cac14575e

The nova test runner is leaking processes after this change.

Change-Id: Id74463d53f3b7cd749cba293619abef01499b90d
Finally ack consumed message

To avoid bad messages fill up the queue.

Change-Id: Id57ff33cfcacf698f89fa7f1020c0c887ebe14ed
Merge "Use openstack.common.cfg.CONF."
Merge "Finally ack consumed message"
Merge "XenAPI: Don't hardcode userdevice for VBDs"
Merge changes I26d1adfd,If8a20501,I13d6d495

* changes:
  Remove volume_util.VolumeHelper class
  Remove vm_utils.VMHelper class
  Start removing unnecessary classes from XenAPI driver
Merge "Remove network_util.NetworkHelper class"
Merge "Finish removing xenapi.HelperBase class"
Merge "Use openstack-common's policy module"