Skip security group code when there is no network.

This patch adds a simple check to the nova/quantum API that immediately
returns an empty list if there are no configured networks available.

Fixes bug 1191044

Change-Id: I34ac4dd56c71f99c7ed9ff632d6dc7036d91008d
Fix typo for instance_get_all_by_filters() function.

One special key to filter instance should be 'soft_deleted' instead
of 'soft-deleted'.

Change-Id: I73482a3307a18b8eaf8e179b39b44354248619b8
Session cleanup for db.security_group_* methods

Remove session parameter from:

 security_group_get
 security_group_get_by_name
 security_group_create
 security_group_update
 security_group_ensure_default

security_group_count_by_project left as is as
it involves quota changes and will be done separately
with other _count_by_project functions.

Convert security_group_destroy to use model_query() instead
of session.query().

blueprint db-session-cleanup

Change-Id: I31e8333f67cf900b6f4aa6c5b967a9a6fb71147e
New select_destinations scheduler call

select_destinations returns a list of (host, node) tuples that satisfy
the request_spec and filter_properties passed to it.  This will allow
the conductor to get a list of destinations for workflows such as
creating or resizing an instance and then handle the orchestration
itself.

part of bp query-scheduler

Change-Id: I1a42cea64dbad67562d7efe8d759e6efb5ec8121
Add resume state on host boot function to vmware Hyper.

Fix bug #1183426

Change-Id: Ia4a0cce285aac01c59286f4899cbac0a021039c4
Handle UnexpectedTaskState and InstanceNotFound exceptions

UnexpectedTaskState and InstanceNotFound are thrown when a delete
of the instance happens before the ongoing action is completed.
These are to be handled gracefully.
These exceptions have to be logged and not reraised, as they are false
alarms.

Fixes: bug #1186447

Change-Id: I0647935c4452d4294f49a4c0d08e480584ebec7c
Move tests db.api.instance_* to own class

In this change tests for instance_* moved to own class.

blueprint db-api-tests

Change-Id: Id0a2e4a6736cce9a1a3681ba8617cf0b40dd9678
Sync db.models with migrations.

This patch syncs models with migrations for:
- Snapshot
- SnapshotIdMapping
- TaskLog
- VirtualInterface

Blueprint: db-sync-models-with-migrations

Change-Id: I4f2d5d4ca16f63522d6ebd70661992e4013085f0
Merge "Move tests db.api.instance_* to own class"
Merge "New select_destinations scheduler call"
Merge "Fix typo for instance_get_all_by_filters() function."
Merge "Sync db.models with migrations."
Merge "Add resume state on host boot function to vmware Hyper."
Imported Translations from Transifex

Change-Id: I1d55e980a6fd10dedd832616850d12423776c7a6
Merge "Handle UnexpectedTaskState and InstanceNotFound exceptions"
Merge "Skip security group code when there is no network."
Merge "Session cleanup for db.security_group_* methods"