Cleanup reboot_instance tests

Convert the reboot_instance compute manager tests into true unit tests.

Change-Id: Ife10bda2726a8f84a0a81df3268894bf3e8a0a12
Fix incorrect comment, and move a variable close to use.

Change-Id: Ifd10df2d6ce3844fb676cfb5c294de170cf375bf
instances_path is now defined here.

Remove comment which is now inaccurate.

Change-Id: Ie1aa2167ef2e53f0a1c90ec9727b3580bab8f851
Chown doesn't work on mounted vfat.

As reported by a user. Resolves bug 1092560.

Change-Id: I44c847d5e7f3242ca46a7436bcbc6e519baa88fc
Centralize instance directory logic.

This is the first step to being able to change the name of the instance
directories to something more unique than instance name.

Sneaks up on bug 1023865.

Change-Id: I1340a6b8644680325cba1e90a208e4be33ace6b4
Fix logic error in periodic task wait code.

I was calculating the time to wait for the next run of a periodic
task incorrectly.

Resolves bug 1098819.

Change-Id: Ida60b69014aa06229111e58024e35268262f18fb
Clean up compute API image_create

The _image_create() code in compute manager is the only place where
db.instance_test_and_set is used.. which was added before
'expected_task_state' support was added to instance_update.  By
switching to use self.update(), we can also take advantage of it doing
the state change notification for us.

The instance update and the compute RPC call have been moved out of
_create_image() and into snapshot() and backup() to support a future
cells patch.

Change-Id: Ib6603f732d28e49cb6f351447da5f6e41615dea5
Cells: Reduce the create_image call depth for cells

This patch reduces the create image call depth (for snapshot/backup) by
returning the basic image details to the user before we call down to
the child cell.  The image entry is created in glance immediately, and
the child cell will finish up the rest.

Implements blueprint nova-compute-cells

Change-Id: I048cc532614c602f3aa6b539fb51e951174e4598
Populate service list with availability zone

Fixes bug 1099399

Availability zone was removed from the service object and is now added
via a separate call to availabilty_zones.set_availability_zones

Change-Id: I89126bb72e482f3ce701a9e28035416805a639a0
Keep self and context out of error notification payload.

Back in the day, having self and context in the error notifications
was handy for debugging. Now, there is a lot of confidential stuff
stored in these objects (especially when self = ComputeManager) ...
like passwords, etc.

This patch strips it out.

Also removes dead wrap_exception calls (which did nothing since they
did not specify a notifier).

Change-Id: Ieab7bd79b64e01c7bca18dbce97455e50094871c
Extract validation and provision code to separate method

This enables the blueprint vm-ensembles to make use of the existing
Nova logic for the VM validations prior to scheduling.

Change-Id: I4966742b5f06087ad74ac75cbdf946f0bd9b6431
VMware Compute Driver Rename

blueprint vmware-compute-driver

Rename VMWare to VMware
Rename network_utils to network_util to conform to the util class naming convention
Remove the infinite loop in vim.__getattr__

Change-Id: I5bdad331a86c7aa4ca36e7a8345b53e455678c0f
Fix uses of service_get_all_compute_by_host

There should never be more than 1 service entry for the same topic and
host, however this method returns a list of services.  All callers of
this method except for 1 already account for there being only 1 service
entry for a particular 'compute' host and only use the first entry in the
return list.

This patch renames the DB API call to be 'service_get_by_compute_host'
and returns a single entry.  All uses of the old method are adjusted
accordingly.

Change-Id: I0e0ef62f5d2e71efe756940d9fdd98aa02fef216
Merge "Fix incorrect comment, and move a variable close to use."
Fix addition of CPU features when running against legacy libvirt

When running against an libvirt < 0.9.10 which lacks support for the
'host-model' CPU type, we must fake it by copying the host CPU
model and features. Unfortunately the code was forgetting to
append the new features to the CPU object feature list

Bug: 1099527
Change-Id: I39c6df6e85d77763ad279961fd6f0da70ac2415e
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Merge "instances_path is now defined here."
Merge "Extract validation and provision code to separate method"
Merge "Keep self and context out of error notification payload."
Merge "VMware Compute Driver Rename"
Merge "Fix uses of service_get_all_compute_by_host"