API extension for fpinging instances

It may be interesting for a cloud user or administrator to perform a
simple instance monitoring. A ping could be an acceptable solution: it
is fast and quite reliable. A limit for ping is 1 time a minute by
default.

API calls.

GET /os-fping?[all_tenants=1]&[include=uuid[,uuid...][&exclude=...]
Performs fping for all VM in the current project and returns results. If
`all_tenants` is requested, data for all projects is returned.
By default, `all_tenants` is allowed only for admins.
`include` and `exclude` are parameters specifying VM masks. Consider
that VM list is `VM_all`, then if `include` is set, the result will be
`VM_all * VM_include`. if `include` is set, the result will be `VM_all -
VM_exclude`. `exclude` is ignored if `include` is specified.

GET /os-fping/<vm-uuid>
Performs a check for single instance.

Configuration flags.

fping_path - full path to fping

Implement blueprint fping-instances-ext

Change-Id: I7d942270aa52bd6216eda0d7ae366ef0195d52a8
Move all mount classes into a subdirectory

The disk API will be growing some new classes in future commits.
To avoid ambiguity in module names, move all the mount classes
into a subdirectory nova/virt/disk/mount/

blueprint: virt-disk-api-refactoring
Change-Id: I03898b4060bd0c488713c9d9f19caebdcd39113c
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add support for backdoor_port to be returned with a rpc call.

This adds an rpc call for compute and network that will return
the eventlet_backdoor port for the service.

Change-Id: I95fdb5ca9bce9f3128300e3b5601fb2b2fc5e82f
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Issue a hard shutdown if clean fails on resize up

In the xenapi driver, a clean shutdown is attempted during a resize up.
If the Xenapi raises an exception it is logged and ignored and the
resize will fail later in the process.  This adds a hard shutdown
attempt if the clean shutdown fails.

The resize up case was overlooked in
I458931a19dd2375ad7142d60cb8b6ed274de9483 so this adds it for
consistency and error handling.

Change-Id: Idf4a20433b9d5726db4e54d5cf61a93db57d4cc9
updated api_samples with real hypervisor_hostname

now that hypervisor_hostname is getting set in tests, update
api_samples with something better than none

part of blueprint:nova-api-samples

DocImpact

Change-Id: Iaac6a5d2d172eb3c56b64f0dc2a6075a79412712
Fix use_single_default_gateway

With FlatDHCP and use_single_default_gateway nova-network creates
an invalid entry in the dnsmasq .opts file for the network that
contains a blank router option.  New instances will not receive
a default gateway.

Change-Id: I4c2da61def0681b7b253ae387bf83c069484e28b
Fixes: bug #1075859
don't explode if a 413 didn't set Retry-After

We use 413 error code not only for temporary out of memory
conditions but also for over quota issues. These kinds of
requests don't set a Retry-After header, but the code assumed
that was a valid key, thus exploding on a KeyError. Issue
caught in looking at tempest traces.

Fixes bug #1079387

Change-Id: Id406ab0799a35220b189b2e5292be092eb821ec5
Ditch unused import and variable

Removes a couple of unused things in fixed_ips API extension

Change-Id: I2c4530339be11ea45b58437ce20a9b065f9b24c7
Fix use of 'volume' variable name

Using 'volume' as a variable name conflicts with the module imported by
the same name.  This removes pyflakes warnings.

Change-Id: I938e6f07790973d0dd72ab0f22aa8fde597f9dd7
Merge "Ditch unused import and variable"
Merge "Fix use of 'volume' variable name"
Merge "Fix use_single_default_gateway"
Merge "updated api_samples with real hypervisor_hostname"
Merge "don't explode if a 413 didn't set Retry-After"
Merge "Move all mount classes into a subdirectory"
Merge "Add support for backdoor_port to be returned with a rpc call."
Merge "Issue a hard shutdown if clean fails on resize up"
Merge "API extension for fpinging instances"
Pass around instance instead of just uuid.

While looking at a no-db-compute related patch, it became apparent that
it would be nice if the full instance was passed to _instance_update()
in the compute manager, as opposed to just the UUID.  This patch
implements that along with all other required changes to make it happen.

Related to blueprint no-db-compute.

Change-Id: I2594bed9c666ecb44652141fe57161c3a2c2955b
Move db lookup for block device mappings.

This patch moves the db blookup for block device mappings for an
instance out of the _setup_block_device_mapping() function in the
compute manager.  The db lookups are now done much closer to the rpc
entry-points to the compute manager.

There are two rpc methods that eventually call down into this function:
run_instance and rebuild_instance.  This bit of refactoring will make it
a bit easier to update these methods to take in the block device
mappings over rpc.

Part of blueprint no-db-messaging.

Change-Id: Id7d061e10ddc9e0d081e0ee97331631796b47729