Rename private functions in db.sqla.api

instance_get_all_by_filters() called 3 helper functions: exact_filter,
regex_filter and tag_filter. None of these functions had any other
callers.

This change prefixes them with _ to identify them as private.
Additionally, it removes the model arguments to the functions as these
always relate to an Instance and/or its InstanceMetadata.
Consequently, the functions are renamed to identify them as specific
to an Instance query. exact_filter is moved from the top of the module
to be next to the other 2.

Change-Id: I671315122438022b13d6b315b577ef2a5cf42545
Remove old Baremetal Host Manager

Baremetal was deprecated in Juno and its driver was removed in
46ed619b9ab1d61582f36155eea0d4a88f31fd50

This cleans out the parts that's still left in the scheduler.

Change-Id: I86f583f7d0747a164dae4530e25f8b01c2144673
Remove the volume api related useless policy rules

There are some old policy rules used by old nova volume, those are
useless anymore, this patch clean them up.

Change-Id: Ibcdba00652808158019600f8ad75e80c85f9423e
Closes-Bug: #1398686
Assert order of DB index members

Order of columns can matter. Most SQL databases can use the leading
columns for optimizing queries that don't include all of the columns.
Ignoring the order can result in an index being added that may not
be able to be used to optimize the same queries.

Change-Id: Ie827aaacbcfbc01e32591d29aab79ef75aa0c5d9
Fix long hostname in dnsmasq

dnsmasq only supports 63 character hostnames. Longer names cause
dnsmasq to ignore the entry and not hand out a DHCP address.

Trunacte hostnames longer then 63 characters in order to make
DHCP work.

Closes-Bug: #1238910
Change-Id: Ie1697577bc14038faccd50caf2fea20cac342388
Adds global API version check for microversions

Adds a check for a request that the version requested is within the
global API version range supported by the REST API. Both the minimum
and maximum are currently set to "2.1". The maximum will be increased
everytime an API change is made.

Also sets up some template/doc files for clearly documenting
the REST API changes with each microversion increment.

Partially implements blueprint api-microversions

Change-Id: Ie7fdb2928d957c03ed788c2ddd29fe798c645fce
Workflow documentation is now in infra-manual

Replace URLs for workflow documentation to appropriate parts of the
OpenStack Project Infrastructure Manual.

Change-Id: Ice00abcbb431b29e28beb0cd8810b8653ef66139
Remove except Exception cases

Replaced 'except Exception' cases with the specific exceptions
that the given code can throw in the util module. In some cases
we added extra unit test to cover the specific exception.

Change-Id: I980237ed9d27f122b4725b8c05015a81764dd6b8
Partial-Bug: #1223605
Remove needless workaround in utils module

Workaround for bug in netaddr library has been removed due to the fix
was introduced in 0.7.6 and nova currently requires 0.7.12 or newer version.

Change-Id: If83cd8ee770d57547f4cfcdbba4a9fbfd55d5983
Related-Bug: #957708
Libvirt normalize numa cell ids

This patch normalizes the cell ids before writing xml.
As cell ids are used to store host cell association,
they need to be normalized before writing xml, or otherwise
the xml will be invalid.

Change-Id: I9b565670f5b0ad24c7a5ff1853648594643b4c7a
Closes-bug: #1397381
Remove unused cinder code

The removed functions aren't used anywhere except in unit tests, so just
remove them.

Change-Id: Id52e8837152fa8654131ca79e50582e03622b765
Downgrade quota exceeded log messages

A user going over quota is a everyday occurrence, no need to log as a
warning. This information is only useful when trying to debug, so move
to debug level.

Change-Id: I6a59d62962ff660aec4898ad525c4b3c3b04faba
Cleanup timeutils override in tests/functional/test_servers

The ServersTest._force_reclaim helper method sets up a timeutils
override but never removes it. This allows the override to potentially
leak into other tests causing spurious failures in completely unrelated
tests.

Change-Id: I637a1dd6301e5645a47dbd65026acfab83e6ae26
Closes-bug: 1399817
Remove unnecessary timeutils override cleanup

The test cases never setup an override in timeutils so the cleanup
is unnecessary.

Change-Id: I54be56d631812be15c489df2b83fd1e750b9162b
Merge "Fix long hostname in dnsmasq"
Support macvtap for vif_type being hw_veb

This patch programs VLAN into a VF pci device, and properly
plug/unplug it into the instance.

Change-Id: I85eb3c1347d057d1f292e747f950065b8f394147
Closes-Bug: 1370348
Co-Authored-By: Itzik Brown <ItzikB@mellanox.com>
Virt: change instance_type to flavor

The commit Ieebfcbc2478ba8d7036c1af30efbbf640aa7df73 made
use of instance_type. This should have been flavor.

This is related to blueprint flavor-instance-type-dedup.

Change-Id: Ib7cb7a0926050e3d0873328f84e8554884a48468
Libvirt: make use of flavor passed by spawn method

Make use of the flavor passed by the spawn method instead
of reading from the DB.

Change-Id: I7612f931e95c5f2a5a0cf93ed87ee2d983bfae0a
VMware: support passing flavor object in spawn

Makes use of the flavor, if defined, passed by the spawn method. This
saves a database call.

Change-Id: I7ba648a37306ce97cd8ae20e7d2a44c0cf7fc479
Merge "Assert order of DB index members"