vmwareapi: simple refactor of config drive tests

A fairly trivial refactor of multiple identical spawn
invocation calls.

Change-Id: I110df1786b4081abe72428f888c3d27430017ff1
Catch InstanceNotFound exceptions for V2 API deferred delete

Adds handling of InstanceNotFound exceptions in the V2 API
deferred delete and translate them to HTTPNotFound rather
than letting them propagate up causing a traceback in the
nova log.

Co-Authored-By: Michael Still <mikal@stillhq.com>

Change-Id: I3d434f28313ae633bdcb9cef82a7b8b0020b5722
Closes-Bug: 1270803
Catch InstanceNotFound exceptions for V2 API floating_ips

Adds handling of InstanceNotFound exceptions in the V2 API
floating_ips extension and translate them to HTTPNotFound rather
than letting them propogate and causing a traceback in the logs

Co-Authored-By: Michael Still <mikal@stillhq.com>

Change-Id: Idc1a5b2e6b8cb9778d032e5e1fc8112a65fc225c
Closes-Bug: 1271047
Fix invalid facilities documented in rootwrap.conf

The values user0 and user1 do not map to valid facility values.
local1, etc.  Using user0 results in a  pri value that does not map
back to a facility of the same name in syslog.

RFC5424 suggest values values of local0 through local7.  Setting
syslog_log_facility to one of those values results in a message with a
priority that can be mapped back to the original string value.

This fix adjusts the comment in rootwrap.conf to suggest the local
prefix instead of the user prefix.

Closes-Bug #1280879

Change-Id: Ibefffb5619641b75b4f8ac8ce8112a34cf03f0ce
Fix the validation of flavor_extraspecs v2 API

"create flavor_extraspecs" v2 API does not validate the data type
of a request body. If invalid parameter is passed, an internal error
happens. If many invalid requests come, a log file would be occupied
with traceback.

In addition, it does not validate the lengths of both key and value of
extra_specs. extra_specs are stored into the instance_type_extra_specs
table, and the key and value are defined as String(255).

This patch fixes the validation code from the viewpoint of data type
and key/value length.

Closes-Bug: #1264220

Change-Id: I195bd5d45a896e9b26dd81dab1e49c9f939b4805
Support IPv6 when booting instances

When nova uses neutron, IPv6 addresses may be allocated.  This ensures
those addresses are supported.

Change-Id: Ic904f3a7811b07264128bc62067cdf0bca9efac9
Closes-bug: #1267685
Accurate comment in compute layer

Currently instance usually refer to an object instead of a dict
but comments didn't update in compute, this patch update it.

Change-Id: I7902f09b21c951c1e7a9d32a75b3c75208fb6d86
Remove 3 unnecessary variables in scheduler

Remove 3 lines which is unnecessary because already set its value

Change-Id: I8ba107963b8798e15b6336dbe355f86d2ef505f8
Add doc update for 4 filters which is missing in filter_scheduler.rst

DiskFilter
NumInstancesFilter
IoOpsFilter
PciPassthroughFilter
are missing in doc/source/devref/filter_scheduler.rst, add them.

DocImpact

Change-Id: I50868598c9769783e1677c9ec50abf031896af82
Closes-Bug: #1276575
Updated development.environment.rst

Enhanced the discussion of tools/install_venv.py to say that it
installs the items listed in test-requirements.txt as well as
those listed in requirements.txt.

Re-wrapped the relevant paragraph.

Since the change to delete run_tests.sh and tools/install_venv.py
(https://review.openstack.org/#/c/76627/)
has been abandoned, the doc of install_venv.py should still be
accurate.

Change-Id: I5cfd9f179f40b2418129067d0940bfdbf47512cb
Closes-Bug: #1266671
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
Handle IpAddressGenerationClient neutron

Handles IpAddressGenerationClient neutron exception which
can occur when allocating a floating ip fails because
the pool has been exhausted. Convert the exception
to a nova NoMoreFloatingIps exception which will be handled
by the api layer and converted to a 404.

Change-Id: Ib5320a13b5cc0c493ef0763d0e2b4575dc699bdf
Partial-Bug: 1210598
rename ExtensionsResource to ExtensionsController

every other "resource" in the api is named either *Controller or just
Controller, so updating this one to match, no effect on anything.

here's a little audit of just about all the nova api calls, the stuff at
the bottom shows some stats:
https://gist.githubusercontent.com/termie/9500927/raw/ac724f0762224bc60bb79c4b0fecfdd12afe5ca7/calls

Change-Id: I71df08048d5b0fa868f68bfe9cb9176507dde3b7
VMware: remove unused code (_delete method in vmops.py)

This code was added in commit 24d609447399e468937f8a278854690864ffabcd and
never used.

Change-Id: I5ad022113666e7be32b512c05165999de2d0c267
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
Remove action-args from nova-manage help

During help [action_args [action_args ...]] could be
confusing for users

$ nova-manage network list -h
usage: nova-manage network list [-h]
         [action_args [action_args ...]]

Because of that action_args is set to "SUPPRESS" from the help

Change-Id: I0fdc480724d3b59a8eebb2d294f324441c5e46b2
Closes-Bug: #1260538
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