Fix wrong description when updating quotas

when updating quota for a resource, with 'force_update=false', an
exception will be raised when the new value is less than the used quota
values(used and reserved). This patch changes the description of
exception.

Change-Id: Iede70444341817afb6953eb604fe4de186622916
Closes-bug: #1243062
Add flavor-manage to core for V3 API

Adds the flavor-manage plugin to the core list for the V3 API.
This is part of the process of adding all of the flavor related
extensions to core, with the exception of rxtx, as per the discussion
here: https://etherpad.openstack.org/p/NovaV3APICore

Partially implements blueprint nova-v3-api

DocImpact

Change-Id: Idbedce5cc5936abc52235cd40573c8fe841f24fe
Stored metrics into compute_nodes as a json dictionary

The compute manager uses plugins to get the metrics information of each node.
And then sends and stores in DB for the scheduler to read and do scheduling.

The patch reuses table compute_nodes and adds a new TEXT column to store the
metric data as a json dictionary.

This is part of the blueprint utilization-aware-scheduling and the
blueprint generic-host-state-for-scheduler.

Change-Id: I4d20565567e9907cfcc92b1c1b15f3b35a806797
Signed-off-by: Shane Wang <shane.wang@intel.com>
Remove fake_vm_ref from test_vmwareapi.py

This fake method is useless now, we can remove it for now.

Change-Id: Idcef18f1e89cac30b1481580731a4f61b0f22050
Nova-all: Replace basestring by six for python3 compatability

The builtin basestring abstract type was removed in python3,
use str instead, we need to using six.string_types to replace
the basestring for py3 compatibility.

Partial Implements bp: basestring-py3-compatible

Change-Id: I17e87e49e7ebf3cc9c391e9beace8c45d2d2b689
Fix migration 185 to work with old fkey names

Migration 133_folsom.py accidentally changed the name of the FK
constraint on instance_info_caches from instance_info_caches_ibfk_1
to instance_info_caches_instance_uuid_fkey and on virtual_interfaces
from virtual_interfaces_ibfk_1 to
virtual_interfaces_instance_uuid_fkey meaning databases who have
upgraded from before folsom have the old fkey.

This patch adds a check for those with the old fkey name to make sure
it is dropped before changing unique constraints (as is required by
MySQL). It also fixes the fkey name to be as defined in 133 if it
wasn't before (which will persist on downgrade being consistent with
those who have come in after folsom).

Closes-Bug: #1245502

Change-Id: Ib0dcd04fcb9ed776c76d40561181abad2e14f76f
Fix interface-attach removes existing interfaces from db

The following commit 394c693e359ed4f19cc2f7d975b1f9ee5500b7f6 changed
allocate_port_for_instance() to only return the ports that were created
rather than all of the ports on the instance which broke the attach-interface
code.

This patch fixes this issue by remove the sync decorators from:
allocate_for_instance, allocate_port_for_instance, and
deallocate_port_for_instance to just _build_instance_nw_info which
is called in all these cases instead.

Closes-bug: #1223859

Change-Id: I66eb0c0ab926e0a8d1e2c9cfe1f7fd579ea3aa27
Make the vmware pause/unpause unit tests actually test something

The pause/unpause tests for vmware were just passing so this patch
actually makes them test the pause/unpause methods for the
VMwareESXDriver and VMwareVCDriver classes.

Closes-Bug: #1237679

Change-Id: Idf7c6e6f9542b9ab4dd2ab710597f1a198889dfa
Make v3 admin_password parameters consistent

There are API parameters "admin_password" and "admin_pass" on some APIs:
 * AdminPasswordController: admin_password
 * EvacuateController     : admin_password
 * RescueController       : admin_pass
 * ServersController      : admin_pass

These parameters mean the same thing, it is the admin password of a vm
instance. They should be the same parameter name because of the meaning.

DocImpact

Partially implements bp nova-v3-api

Change-Id: I452672e064d0dc4a1d5700bb96c01de8087f33d8
Add log_handler to implement the publish_errors config option

Synced from Olso.
Commit Id is Ibf28ba17f81b5ddeda653f6a3501ecac18ffcd42

This handler sends all error logs as rpc notifications.
Note: when using publish_errors you also need to set the
notification_driver option too.

Change-Id: Ic97b9c8b84d51c84a53ace5b86cc2e72c744f136
Closes-bug: #1240349
Remove unnecessary steps for cold snapshots

Up until now when we created cold snapshots we were stopping the
instance, create an internal snapshot, extract the snapshot to a file
and then delete the internal snapshot before bringing up the instance.

If the instance is shut down, there's no concurrent writer, so the image
can be directly extracted without taking an internal snapshot first,
because the snapshot and the current state are the same.

In this patch the creation and deletion of the internal snapshot are
removed to eliminate the extra steps and optimize the creation of
snapshots a bit.

Closes-Bug: #1242819
Closes-Bug: #1247185

Change-Id: I429fa2e1e26aea321eecbf14edd11263fff525ae
virt root tests: replace assertEquals with assertEqual

assertEquals will be deprecated in Python 3.

This is part of blueprint assertequal

Change-Id: I635ba12a553c33cf962dac22bd38bfcb51ca6f61
image tests: replace assertEquals with assertEqual

assertEquals will be deprecated in Python 3.

This is part of blueprint assertequal

Change-Id: Iabce801165527856e410ac11bfb2842c26c9ad2e
baremetal: replace assertEquals with assertEqual

assertEquals will be deprecated in Python 3.

This is part of blueprint assertequal

Change-Id: I5965cd2d0e05551d5ccdfa68f385770b8801dd91
driver tests (loose ends): replace assertEquals with assertEqual

assertEquals will be deprecated in Python 3.

This is part of blueprint assertequal

Change-Id: I311fd876812eead7243c1ad820b88e83fee397ab
domainEventRegisterAny called too often

Changeid I090765802bfe443440f16722bc7c43b6280fe56a fixes
bug #1240905 but introduced a bug whereby domainEventRegisterAny
is called on every call to _get_connection.

Change-Id: Ifafc6a4c172b1521d62988ccbb3a2f51a95e323f
Fixes: bug #1250135
xenapi: Move settings to their own config section

This commit changes xenapi_* config options to their own section
with the xenapi_ prefix removed where appropriate.  The change
is done in a backwards compatible fashion such that previous
nova.conf files still work.

As part of this update the sample file and text strings are
also updated to reflect new config options.  Test cases have
been adjusted to handle the config hierarchy.

2642897d6f5b8a211424519d99feddc89c3bf180 was followed to
implement this change.

Change-Id: I2e9f720ddce284fc112d6a5651fd277e6e31a17a
Closes-Bug: 1207253
DocImpact
Merge "Remove fake_vm_ref from test_vmwareapi.py"
Merge "baremetal: replace assertEquals with assertEqual"
Merge "driver tests (loose ends): replace assertEquals with assertEqual"