Dis-associate an auto-assigned floating IP should return proper warning

Added new exception class CannotDissociateAutoAssignedFloatingIP and raised
exception instead of return.

Fixes bug 1061499

Change-Id: I348573a235c6b81653837267072b5c48fa15b8af
nova-manage doesn't validate key to update the quota

nova-manage doesn't validate the key value supplied to
update the quota, as a result unnecessary records will be
created in db and user will be under the impression that
quota value got updated.
This patch validates the input value given to the key.

fixes bug 1064359
Change-Id: I9928f30881aa2780a23005b5f69aa67a44f314c5
Add api samples to simple tenant usage extension

Change-Id: Ib6e00e5c049846146619f52732cd06fefac62494
Pass correct task_state on snapshot

This fixes an issue where we were not passing the correct task_state to
the compute manager thereby triggering an 'unexpected task-state error'
when the snapshot finished.

This error only manifested itself in multi-cell setups where the
compute-manager and compute-api are using separate DB's and therefore
must rely on the RPC-layer to enforce consistency.

Fixes bug 1065250

Change-Id: Ie07454f0d2075f5c3f2dd53b4e5ff9983ea3241f
read_deleted snapshot and volume id mappings.

Since the migration that creates the volume_id_mappings and
snapshot_id_mappings tables does not populate the 'deleted' column,
queries to this table should not limit results to 'deleted=0'.
Limiting to non-deleted rows results in duplicate mappings being
created for existing instance mappings after an upgrade, and
throws off volume and snapshot ID to UUID mapping.

This is a stop-gap measure to ensure avoid serious breakage during
an upgrade.  The NULL columns in this table are actually unused
currently and can be populated in later grizzly migrations, if they
end up being used.

Fixes bug 1065785.

Change-Id: I893c994362a203288b9984f0ede24cbb274bfcc5
Migrate DHCP host info during resize

Update instance host to migration_ref['dest_compute'] before
update_dhcp to make its DHCP host info will be written in dhcp-hostsfile.

Make similiar change in finish_revert_resize.

Fixes bug 1065440

Change-Id: I9d3e0ebf8512f98f2943999e7ad95bc58f2bf585
Used instance uuid rather than id in remove-fixed-ip

remove-fixed-ip called db method fixed_ip_get_by_instance. but
fixed_ip_get_by_instance use instance uuid not id, so change to
uuid in remove-fixed-ip.

Fixed bug: #1065899

Change-Id: Ic7526c7e91933424c04be9bb91d4a98cfedd9b01
Make run_tests.sh fail if no tests are actually run

Right now, run_tests seems to report test success if there is a
catastrophic failure early in the process. This can happen if you
have a python file that fails to parse, or if something else in
the test environment setup fails to initialize (such as creating
the empty database for the test run). Nosetests will report
success, but indicate that zero tests were run.

This patch snatches the output of nosetests and, if zero tests
ran, reports to the user that something is broken and offers a few
suggestions.

Change-Id: Ide6fd8b212f0650cb227f60b25d4b4e62ee150ac
Fix imports in openstack compute tests

This makes imports in a number of tests consistent. There were also
various places where files were being stubbed out that werent explicitly
imported. This patch fixes those as well. It also moves compute api
stubbing to stub the actual compute.api.API class instead of
compute.API. Includes a rewrite of test_createserverext to stub the
create method instead of doing a bunch of odd setup with a mock
compute api.

Change-Id: Id8ebb2f65228fafeac69c7ab635ff8909b79c449
Stops compute api import at import time

There is an automatic import of compute.api at import time
whenever anything under compute is imported. This leads to all
sorts of weird dependency problems such as the one here:
https://review.openstack.org/#/c/14170/

This modifies the import to happen when compute.API() is called,
which is how we handle it for network and volume. A few imports
were also modified to make it consistent with this new style.

Change-Id: Ic748376510aa4cc48dfefc6ec36621d0ae498bfc
Merge "read_deleted snapshot and volume id mappings."
Merge "Make run_tests.sh fail if no tests are actually run"
Merge "Migrate DHCP host info during resize"
Merge "Used instance uuid rather than id in remove-fixed-ip"
Merge "Dis-associate an auto-assigned floating IP should return proper warning"
Merge "Pass correct task_state on snapshot"
Merge "Fix imports in openstack compute tests"
Merge "Stops compute api import at import time"
Fixes live_migration missing migrate_data parameter in Hyper-V driver

Fixes Bug #1066513

Live migration on Hyper-V fails due to the parameter "migrate_data" that
has been added to the signature of live_migration(...) in
nova.virt.ComputeDriver.

This fix adds the new parameter.

Change-Id: I393f6706bc144838ae232dfb275460620bc203e2
Merge "nova-manage doesn't validate key to update the quota"