Policy check for forced_host should be before the instance is created

Move the policy enforcment for force_host and force_node into the
_handle_az() method so that any violation of policy is detected before
the DB entry for the instance is created.

Fixes bug: 1220220

Change-Id: Iaf6df4f8df6cca71fcb860244ccf758d7908b8f1
VMware: Fix volume detach failure

The VMwareVCDriver method "detach_volume" is missing the "encryption"
argument and thus does not conform to the driver API. Adding the missing
argument solves TypeError being thrown when detaching a volume.

Change-Id: Ib785c2b2cf4c25deed272f8e3f0f47abe6139d1c
Closes-Bug: #1226826
Add tests for pre_live_migration

Add tests to ensure retrying plug_vifs in pre_live_migration works.

Closes-bug: #1228749
Change-Id: I80d4cdc27836511c55b2555556edd7a1964c7158
Don't wrap Glance exceptions in NovaExceptions

Exception objects from glanceclient are not serializable
in Nova and shouldn't be directly wrapped inside NovaExceptions.
The glanceclient portions of Nova that translate from Glance
to Nova should be creating new corresponding exceptions
independent of the Glance counterparts.

Change-Id: Ifbe992796f8c5738ae350617d41a9c312fa8ab94
xenapi: set vcpu cap to ensure weight is applied

There is a bug in XenServer 6.1 and 6.2 that means the vcpu weight
we set is ignored if the cap is not also set.

Setting the cap to its default of 0, meaning no cap, to ensure the
weight value is applied.

Fixes bug 1213960
Change-Id: I367a9afe188734cf5e95c01fc014b9044003d6e3
Add notification for pause/unpause instance

When pause/unpause instance, there are no notifications, this
will cause someone cannot know when pause/unpause operation
would be finished.

All other instance operations do have notifications. We should
also add notification support for those two operations.

Change-Id: I5b8cc33a5992f5f028a3220217dcf7a0288d150d
Closes-Bug: #1043861
Full sync of quota_usages

Migration 203 added a user_id column to the quota_usages table.  Now
some usages are incremented/decremented on a per user basis but there
are preexisting usages stored with a NULL user, and some usages are
tracked per project but there are usages stored with a user_id.  These
quotas are never decremented leading to invalid quota limits being
enforced.

This migration performs a full sync of quotas, and removes the incorrect
rows for each resource type.

Change-Id: Iff96f81e36b135df94a6f25c9443d0e9333bd18f
Closes-Bug: #1212798
VMware: Fix bug for root disk size

The code would not configure the root disk size to that specified
in the flavor. This was always the size of the glance image.

Fixes bug: 1226052

Change-Id: I75ea766e3c96a2e0ad8a8d7cf7d24d80e1f94050
Fix processutils.execute errors on windows

Added a check for existence of geteuid.

This fix is related to oslo-incubator commit:
d6a963e911b8456c06dceb5ee3cc88a70c08bf82

Closes-Bug: #1209410

Change-Id: Ibaa1f061bf161768890d4708dc945180121726f9
Fix indentation in virt.libvirt.blockinfo module

Fixes confusing indentation in is_disk_bus_valid_for_virt function where
leading 8 spaces were used instead of 4.

Change-Id: Ic320dc6860b1efa7464d631c4c649be13d7206a1
Merge "xenapi: set vcpu cap to ensure weight is applied"
Merge "VMware: Fix bug for root disk size"
Merge "Don't wrap Glance exceptions in NovaExceptions"
Merge "Fix processutils.execute errors on windows"
Merge "Full sync of quota_usages"
Merge "Policy check for forced_host should be before the instance is created"
Merge "Add notification for pause/unpause instance"
Merge "VMware: Fix volume detach failure"
Merge "Fix indentation in virt.libvirt.blockinfo module"
Merge "Add tests for pre_live_migration"