xenapi: remove pv detection

It was assumed that pygrub is there in domU, so that the RAW and unknown
disks were attached to domU and investigated with pygrub to find out if
PV could be used. This patch removes this functionality. Also some
cleanup is made around the ImageType mess.

From now RAW and unknown disks will not be investigated for PV-ness and
will boot as HVM.

Fixes bug 1196570

Change-Id: If84b93cee36938257b7ad0fa44b3b22878520506
Clean up db.sqla.api.instance_* methods

Remove session parameter from public db methods:
instance_get_all_by_filters
instance_metadata_get
instance_metadata_update
instance_system_metadata_get
instance_system_metadata_update

They were never called with session parameter and they
are fully covered by tests so we are able just to remove
session parameter.

Clean up instance_metadata_get and instance_system_metadata_get
Convert rows to dict in one line instead of 4.

blueprint db-session-cleanup

Change-Id: Ib2f50cc4b5a7a2e283d891141a88c7b1ff9f7d43
Clean up session in db.sqla.api.get_ec2 methods

Remove session parameter from public methods

  get_ec2_volume_id_by_uuid
  get_volume_uuid_by_ec2_id
  get_ec2_snapshot_id_by_uuid
  get_snapshot_uuid_by_ec2_id
  get_ec2_instance_id_by_uuid
  get_instance_uuid_by_ec2_id

Because they are never called with session parameter
we could just remove it.

blueprint db-session-cleanup

Change-Id: Iecced3cf144de4f58a1169ed2d8f6940e229bedb
Add expected_errors for extension baremetal v3

Partially implements bp v3-api-extension-versioning

Change-Id: I294aa1cb4e19aba755d8c2c78fd997c7e447204e
Add expected_errors for extensions simple_tenant_usage v3

Partially implements bp v3-api-extension-versioning

Change-Id: I69d17279f4c8efe13289458fc4aa583b9168fcc7
Convert CamelCase attribute naming to camel_case for servers V3 API

Convert cases of CamelCase attribute naming to camel_case in the
servers V3 API to make the v3 API as whole consistent in the naming
of attributes

Partially implements blueprint nova-v3-api

Change-Id: Ie2c790ae8eb01f02d754911b0a10c4061d0b4a92
Clean up session in db.sqla.api.network_* and sec_groups_* methods

Remove session parameter from network_get():
Create _network_get() that contains same logic that old network_get(),
for internal usage, and new network_get() doesn't contains session
parameter.

Remove session parameter from:
security_group_default_rule_get()
and
security_group_default_rule_list()

They are never called with session parameter.

blueprint db-session-cleanup

Change-Id: If09d13112a35ca40dd288705cfb727d3c7a74774
Clean up session in db.sqla.api.migration_* methods

Remove session parameter from migration_get():
Add _migration_get() that contains same logic that old migration_get(),
for internal usage, and new migration_get() that doesn't contains session
parameter.

Remove session parameters from:
migration_get_unconfirmed_by_dest_compute()
migration_get_in_progress_by_host_and_node()

They are never called with session parameter.

blueprint db-session-cleanup

Change-Id: I3664c78b6aba4c0640903d0f935bc261d5d2129b
Finish DB session cleanup

Remove session parameter from:
 agent_build_get_by_triple()
 bw_usage_update()
They are never called with session parameter

Rename aggregate_get_query() -> _aggregate_get_query()
because it is private method

Enable N309

implement blueprint db-session-cleanup

Change-Id: Idd43d230105cb140d8825a251f03a58ea28cce90
Do not use context in db.sqla.api private methods

We shouldn't check context in private methods,
because context are already checked by public
methods.

Change-Id: I5582c7761c4fb2b2fbfee6e5a2ba77a4c7dd8583
xenapi: remove dup code in make_step_decorator

There is duplicate code in the VMOps class and the make_step_decorator
function. This change makes the make_step_decorator class share code
with the VMOps class for updating progress.

Part of the steps towards unifying spawn and finish_migration.

Change-Id: I98ea9998ba5968f438b69e2b90331ae25cade3e6
Make NovaObject.get() avoid lazy-load when defaulting

Right now, NovaObject.get() will not properly emulate the dict
get() operation where a default value is returned if unset.

This makes it do that, and avoid attempting a lazy-load in the case
where a default is passed for a not-loaded value.

Related to blueprint compute-api-objects

Change-Id: I298d44b82591c14e877b56744eace5d9ddb93198
Merge "Clean up db.sqla.api.instance_* methods"
Merge "Clean up session in db.sqla.api.get_ec2 methods"
Merge "Clean up session in db.sqla.api.network_* and sec_groups_* methods"
Merge "Clean up session in db.sqla.api.migration_* methods"
Merge "Finish DB session cleanup"
Merge "Do not use context in db.sqla.api private methods"
Merge "Make NovaObject.get() avoid lazy-load when defaulting"
Merge "xenapi: remove dup code in make_step_decorator"