Access DB values as dict not as attributes. Part 3

We cannot assume nova.db.api will be returning sqlalchemy objects
attributes, instead treat return values as dicts

Part of blueprint db-api-cleanup

Change-Id: Icf45e5475b9d626f7e07efe953615dd82bb69ade
improve sessions for key_pair_(create,destroy)

improve sessions for key_pair_(create,destroy)

blueprint db-session-cleanup

Change-Id: Ia26d9d3a96a5be0a6c475159426f5f8edfe5401e
Allow newer boto library versions

Change the boto dependency specification in pip-requires to just 'boto'
without version restriction, as it was before the build issue.

Change-Id: If6c317ffce867f9e544e47c5b0e4b1f2fe9f082f
Implements volume usage metering.

Add volume usage cache tables to record no. of reads, bytes read,
no. of write, bytes written to a volume.
A periodic task runs in compute manager to query each volume mounted
on a compute host and record its usage, this task also send a
volume.usage notification contains volume usage statistics

Part of blueprint volume-usage-metering

Change-Id: I215ce0c94e9ea5a07e18940802c20d1379b8f6d1
Boot from volume without image supplied

This patch allows for booting instances without supplying an image if
there is block device mapping supplied. It makes changes to nova API
and
compute services to handle requests that do not have any image
supplied.

Also it makes rescue and rebuild work with instances started from
volume.

Finally the patch introduces tests to make sure the system acts as
expected, and in the process fixes and refactors some old tests to make
them test for cases this new functionality can introduce.

This patch is intended to be a proof of concept and a first step
towards
a more cleaner interface for booting from volumes, outlined in
https://etherpad.openstack.org/grizzly-boot-from-volumes.

This patch also introduces a slight modification of the nova API so I
am flagging it with DocImpact. The change is that if the os-volumes
extension is used ImageRef does not need to be supplied to the create
server API call provided there is block_device_mapping provided.

Also note that this is the first step towards introducing a 'volume'
parameter
for starting instances which will replace the somewhat unintuitive
block_device_mapping (they will still be used but not for the boot
device).

This patch is coupled with I5ba9b0f35a5084aa91eca260f46cac83b8b6591e
that provides changes to the nova client.

Implements: blueprint improve-boot-from-volume
Fixes bug #1008622

Change-Id: I530760cfaa5eb0cae590c7383e0840c6b3f896b9
network managers: Pass elevated cxtx to update_dhcp

Updates the Nova FlatDHCPManager and VlanManager network
managers so they pass an elevated context to update_dhcp.
In some cases (linux_net) the network driver may make use of
DB calls which require an admin context.

This fixes an issue where resize operations (confirm, revert)
would fail if the user was not an admin.

This is more fallout from 14e2ed3 where we stopped passing admin
contexts for resize across RPC.

Fixes LP Bug #1085071
Change-Id: I718c40f0df0b2955626033cf3b6f78323527e9cf
Use conductor for resourcetracker instance_update.

Use the instance_update method on the conductor service for issuing
instance update requests from the compute resource tracker.
Notifications are sent out by conductor, so that was removed from the
resource tracker.

The conductor now also accepts 'launched_on' as a valid key.  A
duplicate 'host' key in the list of valid keys was removed.

Part of blueprint no-db-compute.

Change-Id: Id4858cc2ab0d128107ea311e2ababef51c2ded83
Merge "Implements volume usage metering."
Make policy.json not filesystem location specific.

The interaction between the test suite and the policy.json file
is problematic, because it imposes an operational assumption that
the tests are running with the curdir set to nova/tests. There is
no other reason to need to be located in that directory.

Part of blueprint grizzly-testtools.

Change-Id: I863dac815a768a78fa84d632e5f77ed0f4f599b2
Merge "Access DB values as dict not as attributes. Part 3"
Merge "Use conductor for resourcetracker instance_update."
Merge "Make policy.json not filesystem location specific."
Merge "Allow newer boto library versions"
Imported Translations from Transifex

Change-Id: I41b8274775241f6005b279199d1841e0b1025748
Merge "Boot from volume without image supplied"
Added sample tests to extended status API.

Partially implements blueprint nova-api-samples
Fixes bug 1070160

Change-Id: Ide7119a308a03ded101ae76faf8204352ffc8566
Merge "Imported Translations from Transifex"
Merge "Added sample tests to extended status API."
Merge "improve sessions for key_pair_(create,destroy)"
Merge "network managers: Pass elevated cxtx to update_dhcp"