Add VirtualInterface object

Add new objects: VirtualInterface and VirtualInterfaceList.  These are
needed for converting nova-network over to use objects.

Part of blueprint nova-network-objects

Change-Id: Idab38a2a9bd8737fcc8e112759c539b7ebad4df9
Add sort() method to ObjectListBase

This makes lists that inherit from ObjectListBase sort()'able

Related to blueprint icehouse-objects

Change-Id: I3cda27786a770fe98222edac95112708e4a8b645
Join pci_devices when getting all servers in API

The PCI API extension goes back and hits the database for every instance
when getting a list of all instances through the API.  This is causing
problems in testing because it's possible for the instance to be deleted
in between getting the initial list and when the API extension runs.

The API extension really shouldn't be going back to hit the database
anyway, so this patch will resolve that problem.

Change-Id: Id3c8a0b187e399ce2acecd4aaa37ac95e731d46c
Closes-bug: #1270680
Merge "Use oslo.rootwrap library instead of local copy"
Add host and details column to instance_actions_events table

Instance action event could be a useful tool to understand and trouble
shooting the scene after invoking an API request (action) for an
instance.

This change extends the action event model by adding additional two
columns to record on which host this event took place and more detail
message for a specific event.

Implements: blueprint improve-instance-action-events
Change-Id: Id209cd7b8a3a41f86cb802d4dd681443d5717bd0
Add explicit discussion of dependencies to README.rst

Noted that building the documentation has more dependencies
than merely running Nova.
Noted that the standard development environment is sufficient.
Noted that the standard runtime environment plus oslo.sphinx
is sufficient.

Change-Id: I37b84a1bdfbc906b005c0a53c2c570c0695937b3
Closes-Bug: #1266623
Fix race conditions between imagebackend and imagecache

The race may occur in the situation:
* There is a base file that is not used for a long time enough
  to be removed by imagecache.
* imagebackend is provisioning a virtual disk from the base file.
* imagecache is removing the base file.

Then, the base file is removed even though it is about to be used.

To fix this, these changes are in this patch:

* A new function imagecache.refresh_timestamp(base_file) updates
  the owner and mtime of the base file with the lock dedicated
  to the base file.
* imagebacked calls refresh_timestamp(base_file) before provision
  a disk from the base file.
* imagecache.ImageCacheManager._remove_base_file(base_file) uses
  the same lock as used by refresh_timestamp()

Closes-Bug: #1256838
Change-Id: I7c897cf6071d87a2c4532fb3a73863d649d02782
Sync unhandled exception logging change from Oslo

Copying changes from 1 Oslo commit: Ibf00173a07510b2ec0c81a29624004f17810a4e4
This is related to the bug fix for adding error type to unhandled
exception log message.

Change-Id: Ie8af57a148753121f79136af928feb0edaea228b
Closes-Bug: #1265561
Fix the flavor_ref type of unit tests

Some unit tests define a flavor_ref as tuple type, that seems typo.
This patch fixes it.

Change-Id: I8edd93be630ca78b4a4b33a1544b7421a244ae3f
Merge "VMware: bug fix for VM rescue when config drive is configured"
VMware: fix missing datastore regex with ESX driver

When using shared datastore and the ESX driver the administrator
is unable to indicate which datastore to use.

Note: there were extensive tests added for the VC driver for the
regex support. These are invoked by passing the flag for the regex
when the ESX driver is created.

Change-Id: Ifb0a4a8df2b26f3521b1301462d1f2c3eeba5c14
Closes-bug: #1246206
Join pci_devices for servers API

A previous change, 119e2a690a64fdfd541010590285f754b3393653, joined
pci_devices in the v3 servers API when getting a full list of instances.
This was to work around a race condition with the PCI API extension.
When the PCI extension runs later, it lazy-loads pci_devices.  This may
raise InstanceNotFound if the instance was deleted in the meantime.

The last patch did not fully resolve this race condition, as we are also
seeing it rather regularly in API calls for a single server.  This patch
updates the compute_api.get() calls to join pci_devices, as well.

Change-Id: Id3e60c3c56c2eb4209e8aca8a2c26881ca86b435
Closes-bug: #1270680
Sync module units from oslo

Module units landed in Nova first, then was accepted by oslo with
minor changes. This patch removes nova specific unit module and
test, replaces with module units in oslo.

commit in Oslo:'Add unit constants' f9308560c36918cc

Change-Id: I6054c18a56f59d33a69f4714be19d34fbe9de335
Co-Authored-By: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Added a new scheduler filter for metrics

The scheduler filter MetricsFilter filters out those hosts which don't
have the metrics data available as required by metric settings.

This is part of the blueprint utilization-aware-scheduling.

DocImpact: Added a new metrics filter.

Change-Id: Ib4a898774daf683c4496ef3e9953d23027f11ac0
Nova Docker driver must remove network namespace

The docker hypervisor creates for each container a network
namespace which represents the nova network. This network
namespace must be removed/destroyed when nova instance will
be destroyed in order to cleanup the machine properly.

Change-Id: I6fa306d06fb16f8ceddb06e22566974237082759
Closes-Bug: 1261007
Merge "Make availability_zone optional in create for aggregates"
VMware: use .get() to access 'summary.accessible'

the key 'summary.accessible' is not always present in
property-sets hence use .get() instead of []

Change-Id: Ia291b39d1322c486be13f677a816168b501de3fb
Closes-Bug: 1252400
Add instance faults during live_migrate errors

When there is an error in the compute manager relating to
live-migrate, this change ensures that an instance fault is
recorded to help debug any issues.

We also need to look at better reporting of errors to users,
but this is not in the scope of this small change.

Change-Id: Ib4f0d0aea64468a4a1495b0318fc531a7d0d4eaa
Merge "Ensure MTU is set when the OVS vif driver is used"
Merge "Fix rbd backend not working for none admin ceph user"