Clearer default implmentation for dhcp_options...

'pass' is less clear than 'return None' for the base implementation.

Change-Id: Iff53d5eb7e88e18849696d858b3d910b6ea71e63
Remove unused oslo.config import

Change-Id: I7cc52bfcda72faf9fbdf67553d21b35823505dd6
Hard reboot doesn't re-create instance folder

When use share storage like ceph, instance's disk data is in ceph,
instance's disk doesn't rely on local instance folder anymore. So
when rebooting a instance, we should create the instance folder if
it is missed.

Closes-Bug: #1349978

Change-Id: I5948c7979a7dbe7764fba6cad1d9867893824024
Optimize 'floating_ip_bulk_create' function

The existing floating_ip_bulk_create() DB API method used a for loop and
a session flush operation for each IP created. This patch consolidates
those many operations into a single INSERT statement, which will
perform better than multiple round-trips to the SQL database. We further
optimize the function by making a return of the changed rows optional.

Change-Id: I5cf075f38696110d2890cfa1ea488ca459d791a3
Correct columns covered in migrations_instance_uuid_and_status_idx

Migration 142 added a new index migrations_instance_uuid_and_status_idx
that covers columns deleted, instance_uuid and status, but the index
added to the model only covers instance_uuid and status.

Change-Id: I6ffdeabbab54223b2be844048917588adaceb9bb
Partially-implements: blueprint validate-migrations-and-model
Add missing indexes from 203 migration to model

Migration 203 added two new indexes to existing tables, but did not
update the model to include them.

Change-Id: If63e8f6c34bb7e4e43cbbda82346e2caffc8eeff
Partially-implements: blueprint validate-migrations-and-model
Make a flavorRef validation strict

V2.0 API doesn't allow empty string as flavorRef and it returns a
BadRequest response if receiving it.
Now V2.1 API doesn't check it now and this patch makes V2.1 API check.
In addition, this patch adds tests for checking both API behaviors.

Partially implements blueprint v2-on-v3-api

Change-Id: I6c80b66102f00c832922cb507b82e9f3b534557f
Check that volume != root device during boot by image

Currently, if an instance is booted by image and a volume is also
specified, if the volume name == the root device name, the instance
boots from the volume instead of from the image. This change adds a
check that the volume name != the root device name if an image is
specified and raises InvalidRequest if the check fails.

Closes-Bug: #1343924

Change-Id: Id967e04483b9fd12fae0bc9bee1a3e7b978b9fd1
Added objects Tag and TagList

Also field 'tags' was added to the instance object.
These objects will be used in new instance-tags API extension.

Implements: blueprint tag-instances
Change-Id: I34ec32f0b3704b01aaca9c0cb2b34eb6d3107513
VMware: optimize resource pool usage

There is no need to query the backend for the cluster resource pool.
This is known at init. Using this save a backend query with a VM
spawn.

Change-Id: I336f8e4a2b68f694ce4a88f7fab76214efb17a0c
Don't mock external locks with Semaphore

The firewall tests were mocking an oslo.concurrency external lock
with a vanilla Semaphore, which is not correct and broke in the
most recent oslo.concurrency release because the external locks
no longer happen to match the API of Semaphore.

The correct way to handle external locking in unit tests is now
to use the external lock fixture in oslo.concurrency.

Change-Id: I372c79e6b77614f2006d111bb538beacf323ee0c
libvirt: reuse defined method to return instance numa topology

Updates code to reuse the already well defined method
hardware.instance_topology_from_instance.

Change-Id: Ia8d578bf31321475a5613a43e7fad6a71055958f
VMware: support spawn of stream-optimized image

This adds support of spawning instances using stream-optimized
disk images. This format is better suited as a glance format as it is
compressed, sparsed and optimized for streaming. The change uses the
oslo.vmware library to provide the functionality to transfer the image
to the server by importing it as a virtual machine.

Implements: blueprint vmware-vsan-support
Co-authored-by: Radoslav Gerganov <rgerganov@vmware.com>

Change-Id: I5c5c2aae733a2d55643d2ea5c293873b21325db6
Hyper-V: Adds VMOps unit tests (part 1)

The Hyper-V driver oldest tests (test_hypervapi.py) are proving hard to
maintain.

The tests in test_hypervapi.py in particular can also be refactored and
split in separate TestCases, one of each *ops module.

This commit refactors the first part of the VMOps test cases.

Co-Authored-By: Robert Tingirica <rtingirica@cloudbasesolutions.com>

Partially implements: blueprint hyper-v-test-refactoring

Change-Id: I359993ef5d15e84dde545b55f1378bdcd629c577
Merge "Added objects Tag and TagList"
Merge "Check that volume != root device during boot by image"
Merge "Remove unused oslo.config import"
Merge "Make a flavorRef validation strict"
Merge "Clearer default implmentation for dhcp_options..."
Merge "Correct columns covered in migrations_instance_uuid_and_status_idx"