Remove useless api sample template files for flavor-rxtx v3

flavor-rxtx template files flavor-get-resp.* and flavors-detail-resp.*
isn't used by any api sample test. So remove them.

Change-Id: I74760bcd5367487aca31cdf94fa5e5715f19f4c6
Add decorator expected_errors for flavors_extraspecs v3

This patch add decorator expected_errors and also add catching
for FlavorNotFound.

Partially implements bp nova-v3-api

DocImpact

Change-Id: I56556871f649ba56211d3f523a184e3171dd3b7e
Remove unused flag 'host_state_interval'

Patch I749204d7d6461993d0c42bf5877b65c5ec17c62f removed periodic task
`_report_driver_status()`, which fanout this host's capabilities to
nova scheduler. So the flag 'host_state_interval' is not used.
Just remove it in this patch.

DocImpact: the 'host_state_interval' flag has been removed. It was last used in
grizzly and was not used in havana.

Change-Id: Ieb047ccb33cdecc6f25b6ae128dcac4e1c00cd98
Periodic task _heal_instance_info_cache can now use slave db

This periodic task will now use a slave db for all reads if a slave
is configured. For deployments with no slave, behavior remains unchanged.

Change-Id: Iafda7ff7a895b21a75c6d3923269f45bc84c81b0
Partially-implements: blueprint periodic-tasks-to-db-slave
LOG.warn() and LOG.error() should support translation

Based on a search done in nova code,
some logs have to be changed in order to support translation

Change-Id: I371b714d004bcd0091ae569d4b82ae8d19fba708
Closes-Bug: #1235088
Extends V3 servers api for pci support

All pci passthrough code is merged into nova, but the API does not support.
this patch extends the servers to show PCI information for instance and compute
node. This is a part of PCI APIs, for more information see the  blueprint.

Partially implement blueprint pci-api-support

Change-Id: I99eeeca67983c49433ab0079f490a454d250f5e0
libvirt: add a test to guard against set_host_enabled raising an error

Commit cc70e3a adds a finally block to _get_new_connection to
automatically disable the host if making a connection to libvirt fails.

The set_host_enabled method currently swallows all exceptions which is
good so it doesn't mask the original libvirt failure in
_get_new_connection, but we need to have a test that makes sure that
isn't unintentionally regressed. This patch adds the test.

Related-Bug: #1257644

Change-Id: I4beec053794edc75ef2d0060a05285f7ed0b99ac
Make obj_from_primitive() preserve version information

When we hydrate an object from a remote client, we need to know
the version and not pretend like it's just the current version.

Related-Bug: #1258256
Change-Id: I68bbfa18addfb7e51efc10a757135e338302a787
Hide injected_file related quotas for V3 API

The injected_files, injected_file_content_bytes and
injected_file_path_bytes are all related to the
os-personalities extension which has been removed. They
can't be removed from the core quotas code as that has
to still support the V2 API. So for the V3 API we just
hide them.

DocImpact

Partially implements blueprint v3-api-remove-extensions

Change-Id: Iedb6e1427ac22f1926e929f3391e56403c37d088
Remove the api_thread_pool option from libvirt driver

This gave us the option to select if calls to libvirtd are done
in a native thread or directly. This was added because the person
who wrote the thread pool code was afraid of regressions for existing
deployments. But now we have enough features in nova that require
that this is always set to True or else users can have issues with
them. To this point the firewall overrode this option to make
sure that its call was always in a native thread no matter the
value of this option was.

The reasons behind this were discussed during this review:
https://review.openstack.org/#/c/57000/

Closes-Bug: #1254811

DocImpact: removes api_thread_pool flag from the libvirt group

Change-Id: Ifad7f1bdf2af69e4fcd6f9a04bf2f7ff5251afd6
Libvirt: Making the video driver element configurable

hw_video_model can be provided via the image properties in Glance.
It may be set to one of the following values: "vga", "cirrus", "vmvga", "xen" or "qxl",
as these are currently being supported by libvirt.

    glance image-update \
       --property hw_video_model=qxl \
       [image]

DocImpact
Partially implements blueprint libvirt-video-driver-selection
Change-Id: Ie710eb9d8d094865d651373c6f9882f1ac12b49a
Ensure api_paste_conf is an absolute path

If api_paste_conf is specified as a relative path and the directory from
where the nova-api service is started contains a file with the same
name, the wsgi loader won't try to find the absolute path to that file
which is required when not passing the base directory to the
paste.deploy library.

This change ensures the config_path is an absolute path so it can be
found by the paste.deploy library.

Closes-Bug: #1259183
Change-Id: I0eb6ef1d69d302634b8c842449f997ec10c13933
Rename instance_type to flavor in baremetal virt driver

Goes through the baremetal virt driver and associated classes and tests
and renames instance_type to flavor. This patch does not handle renaming
instance_type in nova.test.utils or the instance_type_id column in the
instance db model so those parts are left unchanged here.

DocImpact: Renames the 'instance_type_extra_specs' option in the
baremetal group to 'flavor_extra_specs'.

Part of blueprint flavor-instance-type-dedup

Change-Id: I4405464aea2b2e2142ed1207fb9c25ed9e863cb0
Merge "Hide injected_file related quotas for V3 API"
Merge "Extends V3 servers api for pci support"
Merge "libvirt: add a test to guard against set_host_enabled raising an error"
Merge "Periodic task _heal_instance_info_cache can now use slave db"
Merge "Remove the api_thread_pool option from libvirt driver"
Merge "LOG.warn() and LOG.error() should support translation"
Merge "Rename instance_type to flavor in baremetal virt driver"