add get_by_metadata_key to AggregateList object

This change adds the get_by_metadata_key function to the AggregateList object
and the aggregate_get_by_metadata_key function to the DB API.

Previously, the only DB API function available for finding aggregates matching
a metadata key returned a dictionary of aggregated metadata. The
aggregate_get_by_metadata_key function returns all rows matching the specified
metadata key, and is called by the existing aggregate_host_get_by_metadata_key
DB API function.

The get_by_metadata_key function returns a list of Aggregate objects matching
the specified metadata key.

Related to blueprint compute-manager-objects-juno

Change-Id: If50c9f613dd192ab44577f26a81dd5b40e3a7af7
libvirt+lxc: Unmount guest FS from host on error

If an error occurs during `_create_domain`, we need to ensure that the guest's
FS is unmounted from the host in all cases.

This is necessary because, if we leave the FS mounted to the host, the
`lvremove` triggered by `delete` won't work because the filesystem will
'still be in use'.

The solution is to wrap the code in a `try/finally` to ensure the cleanup
routines (which unmount) are always called.

Change-Id: If863cf813dddc1e4554fb87b945c68b75b25f9a2
Closes-Bug: 1333827
Fix unit tests related to cloudpipe_update

In some unit tests related to cloudpipe_update, there are two negative
factors(ex. bad url and bad body) and current tests don't verify its
purposes. This patch removes unnecessary factor.

Change-Id: I5e78b47e6f4c7359a7f0c16898a26e3649d92eb2
Fix error status code for cloudpipe_update

When passing bad body in a request, most APIs return BadRequest response.
However, cloudpipe_update API doesn't do it.
This patch fixes the error status code and adds a unit test related to
this change.

Change-Id: I16a48e6913f52baa870e04196529fda619c03098
Fix typo

Change-Id: I674512d817d44897391e62439e1730bdf89ca9b1
Remove unneeded calls in test_shelve to start instances

During running of tox the system can timeout on slower systems.  This
is due to rpc calls to other threads failing in testing.  This
particular case involved shelving calls to start instances.  However,
when we started using objects, these calls became unnecessary for these
unit tests.  Thus we are removing the calls which should remove
the traceback for slow systems.

Change-Id: I52f1e86815cc2cac8dc31865f00eef2d4ffeea59
Partial-Bug: 1311778
Updated from global requirements

Change-Id: Ie52204a9bbfd3e608a947f71dd3f406129aa9533
Return status for compute node

Currently when return compute node information, there is no status returned.

When the corresponding service is disabled or down and users try to
do 'hypervisor-list' or 'hypervisor-show', they will have no idea of it.

Implements: blueprint return-status-for-hypervisor-node
Closes-Bug: #1285259

DocImpact

Change-Id: I17c53b454ccef023f298f1b8875daef965d2325d
Merge "Fix typo"
Merge "Remove unneeded calls in test_shelve to start instances"
Merge "libvirt+lxc: Unmount guest FS from host on error"
Merge "Updated from global requirements"
Merge "Return status for compute node"
Merge "add get_by_metadata_key to AggregateList object"
Merge "Fix unit tests related to cloudpipe_update"
Merge "Fix error status code for cloudpipe_update"