vmwareapi: simple refactor of config drive tests

A fairly trivial refactor of multiple identical spawn
invocation calls.

Change-Id: I110df1786b4081abe72428f888c3d27430017ff1
Don't allow reboot when instance in rebooting_hard

It shouldn't allow reboot a instance while the instance in
rebooting_hard task state.
If the instance is in rebooting_hard, solf reboot action is
meaningless.

Change-Id: I43147104a7473eaaf1b86f84386bb28b7e3574c3
Closes-bug: #1288926
Instance groups: only display valid instances for policy members

When displaying the members we will validate that the members
are actually valid. There may be cases when the members of an instance
group are not all valid, for example the instance has been deleted.

This is part of blueprint instance-group-api-extension.

Change-Id: I77062ce14d337662254ca3be956620dda3f44cd7
Do not add HPET timer config to non x86 targets

HPET is a harware timer for x86 arch. Also, qemu option '-no-hpet'
is not supported on non x86 targets. This change does not add hpet
in the guest's timer config when the arch is not x86_64 or i686.

Closes-Bug: #1290362

Change-Id: I1b81d1c5ed4f900ed87d1ecbbb97d4fdb22405fa
network_info cache should be cleared before being rescheduled

If an instance fails to boot due to a non-networking error the instance
then gets rescheduled and launched on another compute node. In these cases
deallocate_for_instance() is called which deletes the network ports
allocated though the info_cache for the instance is never cleared. This patch
adds a call to update_instance_cache_with_nw_info() which causes the cache
to get cleared out. Note: the cache is only cleared if the instance hasn't
been marked for deletion. This is due to how instance_info_cache_update()
is implemented.

Change-Id: If967884c9a6276f5949a7a04b597cedcce12ba09
Closes-bug: #1285158
VMware: ensure that the task completed for resize operation

In the event of a VM resize, the code did not wait for the task
to complete. This may lead to a race condition.

Change-Id: I0ce28e9d83da2f0e5741ae99bfba4b0f1d20c699
Closes-bug: #1270573
Use HTTPRequestV3 instead of HTTPRequest in v3 API tests

This patch uses HTTPRequestV3 instead of HTTPRequest in
v3 API tests and removes the "/v3", it has been specified
already in HTTPRequestV3.

Change-Id: I0b973458b2afac4b3e6eb16e11a56bd301f1b6df
Update quantum to neutron in comment

Change-Id: I2606740cde56d947577ec64d21f62d8287a83bc8
Check if nfs/glusterfs export is already mounted

_mount_nfs() do not check if the nfs_share is already mounted on
the same mnt path and pollutes logs with warnings about
'mount.nfs: xxx busy or already mounted'.

The patch will add the method is_mounted to libvirt/utils.py and
use the findmnt tool to find if the same network share on the same target
mount point is already mounted.
If 'findmnt' is not available for any reason (part of utils-linux),
the check will always return False.

Closes-Bug: #1280306
Change-Id: I1d7384ba2f1f1bb82bfbae96cca2772266d2583e
Fix the rpc module import in the service module

After porting Nova to oslo.messaging, we forgot to change the import to
point to the new rpc module, and thus the rpc cleanup() method was never
called on service shutdown.

Change-Id: Ic06a19d9b9b98e1575d0aa72afa0d5ae71f6513a
Remove unnecessary stubbing in test_services

Stubs are already set in the setUp method. self.controller also does
not need to be recreated after updating the extensions list.

Change-Id: I372842bba3e4286da922e7d814137cefe4583bf5
Merge "VMware: ensure that the task completed for resize operation"
Merge "Remove unnecessary stubbing in test_services"
Merge "Check if nfs/glusterfs export is already mounted"
Merge "Fix the rpc module import in the service module"
Merge "Don't allow reboot when instance in rebooting_hard"
Merge "vmwareapi: simple refactor of config drive tests"
Merge "Update quantum to neutron in comment"
Merge "Use HTTPRequestV3 instead of HTTPRequest in v3 API tests"
Instance groups: cleanup

The patch set does the following:
1. use list comprehension for unsupported policy check
2. removes unused import

This is part of blueprint instance-group-api-extension.

Change-Id: Ia1f4203efd1e2ef5880765abc507bb7f9cdea6d6