Unimplemented pause should not change vm state on PowerVM

The instance of PowerVM does not support pause, but
after pause the instance, the state change to PAUSED,
it's unreasonable.

Change-Id: I4fb184388c37ea8708cdacc173dc1b2dbd4d1597
Fixes: bug #1202082
Handle instance being deleted while in filter scheduler

Adds handling of InstanceNotFound when trying to update the
scheduled_at time of an instance.

Users can delete an instance at any time (and many test
cases delete very quickly), so this should be a warning
not an error

Fixes bug 1191126

Change-Id: I72b296668f60b1de71ff8c6d7bbb749023d89f12
Sync v2/v3 console_output API extensions

Synchronises changes made to the v2 version of the console_output
API extension to v3 in commit c651f4928c65407cff86a9f9efc046a0f76a9519
which fixed bug  #1194032

Partially implements blueprint nova-v3-api

Change-Id: Ie28d771d25636decb7b1f17756654be56762b35f
port disk_config API into v3 part1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then
make the changes required for it to work as a v3 extension.

This is being tried in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Partially implements: bp v3-api-extension-versioning

Change-Id: Ia2ef4ab8cb63878d16360378c61e5182f4593200
Fix aggregate_get_by_host host filtering

aggregate_get_by_host never actually joins the _hosts relationship,
so aggregates with non-matching hosts are still included in the output.

This change adds the join and improves the tests to cover the bug.

Fixes bug 1201277.

Change-Id: I87ebfe3de193b9ae47e3a2c8350a49d9cc863fb0
Fix IPAddress and CIDR type decorators

Use load_dialect_impl() user hook instead of calling
with_variant() on a type implementation in IPAddress
and CIDR type decorators. This makes this code work
with SQLAlchemy 0.8.x versions.

Fixes bug 1200231

Change-Id: Ib0eb582f472116bda817d3e35e26888dc116ad58
Fix filtering aggregate metadata by key

Filtering by metadata key has no effect in the following two functions:

    aggregate_metadata_get_by_host
    aggregate_host_get_by_metadata_key

Rely on the explicit join instead of joinedload to load the _metadata
relationship in these functions (indicated by the contains_eager
option), so that filtering by key still applies when the metadata is
collected.

Fixes bug 1201283.

Change-Id: I3e44b5db8d67787bfa14f0e57d30a02a271a8833
Remove redundant if statements in cells.state

Removed redundant if statements since checking if cell is None twice
was not intuitive.

Change-Id: I20d7ade5acd27d23ba53ef065d0e4d24218182c2
Remove unnecessary comments for instance rebuild tests.

Just remove the unnecessary comments which may be confused.

Change-Id: I86df10a4ce1fc88e7dd47764e4ea0cdeababd389
Refresh network cache when reassigning a floating IP in Neutron

When Nova associates or disassociates a floating IP address
the network info cache is always refreshed due to the
@refresh_cache decorator

However if you (re)associate a floating IP which is already
associated with another instance on a Neutron based system then
the address is correcly disassociated first, but the cache refresh
is not trigged for the original  instance. As a result Nova will
show the same address for two instances until the periodic
clean-up kicks in some minutes later.

Fixed bug: 1173227

Change-Id: Iea81532911478026b9b2c0578a1eda7a97b09d80
Disable ssl layer compression for glance requests.

This may improve data throughput, eg when high network bandwidth is
available and you are using already compressed image formats such as
qcow2 .

Addresses bug 1189887.

Change-Id: Iacc42d8e0cab218258c3029d5395e02fddb75197
Create key manager interface

This interface provides a thin wrapper around an underlying key management
implementation such as Barbican or a KMIP server. The key manager interface is
used by the volume encryption code to retrieve keys for volumes.

Implements: blueprint encrypt-cinder-volumes
Change-Id: I9b0dcb7d648ee6809185c71ba457c8a8a6c90d50
SecurityImpact
Raise exceptions when Spice/VNC are unavailable

Bug 1192724

Both Spice and/or VNC may be enabled from the perspective of compute
configuration but their actual availability can vary based on
whether either was enabled/disabled at the time the instance was
launched. This patch raises a proper exception in this case, such
that clients (including Horizon) can either message the user or fall
back.

Change-Id: If06e726e606f4a27c8ec4617400b728ce7112e3b
Code dedup in test_libvirt_vif

- externed common assertions to methods
- externed common parts to methods:
  - description of net data
  - description of mappings data
  - creating fakelibvirt connection
  - creating libvirt configuration
  - getting node from xml

bp nova-tests-code-duplication

Change-Id: Id12e196519473cce27a998e37f33ce584f703a4f
xenapi: no glance upload retry on 401 error

It is possible for a token to expire during a very long image upload.
If this happens, there is little point in retrying the upload, as it
is most likely to fail again for the same reason.

Fixes bug 1199454

Change-Id: Id699135a8ec4c603671b16f0127d0b2cd2a55855
Fix parse_transport_url when url has query string

In python < 2.7.4 the query string from an url is only parsed for the
schemes that the module knows about (not including 'qpid' and 'rabbit').
This behaviour was changed in python 2.7.4 and now it parses the query
string for all the schemes and doesn't appear any more in the path.

This change makes sure that we look for the query string in both members
(query and path).

See http://bugs.python.org/issue9374

Fixes bug #1202149

Change-Id: Ic6afbe7b431e3eb9ff28d3c9b3fa35a52efb3fb6
Fix HTTP response for PortInUse during boot

If an in use port is passed as a network parameter in the request, Nova API
should raise an HTTPConflict (409) error

Fixes bug #1160887

Change-Id: I60103610f9143f1c668927fe40d10a14b39b4c25
Merge "Create key manager interface"
Merge "Remove unnecessary comments for instance rebuild tests."
Merge "xenapi: no glance upload retry on 401 error"