Merge "Remove _instance_update usage in _build_instance"
libvirt: support live migrations of instances with config drives

In case of shared storage, to allow an instance with a configdrive
to be migrated if we must store the configdrive into the same backend
as other disks.

Related to bug #1246201

Change-Id: I699f0746da03f7ef669d68665996c839d4d99ee4
Create compute api var at __init__

No need to create compute api object at every func call.

Change-Id: I723cb5e26b2de68e1ea8bdb8505567030eb98406
Fix V2 unit tests to test hypervisor API as admin

Hypervisors API are Admin API and unit tests should test those accordingly.
But All the V2 hypervisors Unit tests tests those as a non Admin API

This patch fix this issue and add more non-admin unit tests

Change-Id: I5c29828d567e2044786d4bcbff4970219c6e8c5f
Closes-Bug: #1360113
Merge "libvirt: fix _disk_resize to make sure converted image will be restored"
Merge "Merge BadRequest tests of "attach interfaces" API"
Fix typo in comment

While looking at the code I noticed a typo in a comment.

Change-Id: Id31c3a87ca5c902699167bd2d63e8dea6d62ba23
XenAPI: Remove interrupted snapshots

Currently the VDI chain can grow very long when a snapshots happen at
the same time as nova-compute being terminated.

While we now clean up the instance state, the VDI chain is left in a bad
state, it has an extra snapshot that is no longer required.

This change improves that by looking at when we detect a failed
snapshot, we go back and tidy up the VDI chain.

Partial-Bug: #1331440

Change-Id: I9bae82048910d8c45bc2a4093064c1ac68f15750
Allow to create a flavor without specifying id

On current v2 API, "create a flavor" API allows a request without
specifying "id" parameter. The API of v3 API, which is source of
v2.1, doesn't allow it now. However, it will cause a backwards
incompatible issue when implementing v2.1 API.
This patch makes v3 API allow it.

Partially implements blueprint v2-on-v3-api

Change-Id: I2d3fda323df57f8c0c116347e3c4a38c807de31b
Merge "Add some v2 agents API tests"
Add QuotaError handling to servers rebuild API

Commit 718a3f057cee0b1163c40fbcbedda29bd2ef9dfe made
nova.compute.api.API._check_injected_file_quota raise more specific
over-quota exceptions but the rebuild API was never updated to handle
the QuotaError exceptions and translate to a proper HTTP error.

This change does a few things:

1. Makes the specific file path/content limit exceeded exceptions
   extend the more generic OnsetFileLimitExceeded exception.

2. Adds the OverQuota checking to the rebuild APIs with tests.

3. Adds unit tests for the three different exceptions raised from
   _check_injected_file_quota in the compute API since those did not
   exist before.

Closes-Bug: #1358380

Change-Id: I9c72dea6075fcf554abb8e669cf4dd3129176912
Merge "Move _is_mapping to more central location"
Adds Hyper-V Compute Driver soft reboot implementation

Adds a soft reboot implementation for feature parity with other
Nova drivers as specified in the base virt driver's interface.

Co-Authored-By: Simona Iuliana Toader <itoader@cloudbasesolutions.com>

Change-Id: I963cbdacdfefca47d6e45fa0aafac188963bcaed
Implements: blueprint hyper-v-soft-reboot
Fix class name for ServerGroupAffinityFilter

The class name for ServerGroupAffinityFilter is
ServerGroupAffinityFilter and not ServerGroupAntiAffinityFilter. The
wrong class lead to a wrong display on
http://docs.openstack.org/developer/nova/devref/filter_scheduler.html

Change-Id: I690a60cb70eab4837544ddd0bff6f1264e639592
Closes-Bug: #1360375
neutronv2: treat instance as object in deallocate_for_instance

The deallocate_for_instance method is given an instance object
but the neutronv2 API was treating it like a dict. This changes
the method to use dot notatoin for accessing fields on the
object and updates the unit tests to pass an instance object
rather than a dict.

Part of blueprint compute-manager-objects-juno

Change-Id: I784d1d59c23da8485d355251aba26b98bd9c7a16
Change v3 flavors to v2.1

This patch changes v3 flavors API to v2.1 and makes v2
unit tests share between v2 and v2.1.

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3.

Partially implements blueprint v2-on-v3-api

Change-Id: I1e52c034a8c50fde3aa31e1e79c8f113424fd2e1
Merge "scheduler sends select_destinations notifications"
Merge "libvirt: support live migrations of instances with config drives"
Merge "libvirt: skip disk resize when resize_instance is False"
Merge "VMware: Remove references to ebs_root from spawn()"