Fix ec2 CreateVolumes/DescribeVolumes status

In admin context CreateVolumes/DescribeVolumes returns
extraneous information such as project_id, host, instance
data etc. This results in output which is not compatible
with the ec2 API. This change removes the addition
of the extra information.

This only partially fixes bug #1074901 as mapping the internal
volume states to ones specified by the ec2 api results in the devstack
euca.sh exercises to fail. But that can't be fixed until the fix
in this patch is through as the extraneous information returned by DescribeVolumes
causes euca-describe-volumes to not to show the attachment state for
a volume which is needed by the euca exercises.

Change-Id: I48a96fbfe4bb2e3da9514d688638ecdf3a168303
ec2 CreateVolumes/DescribeVolumes status mapping

'attaching' and 'detaching' are not valid ec2 API volume status
values. Instead map them both to 'in-use'.

Note this will not pass the devstack exercises until
https://review.openstack.org/#/c/27244/ goes through

Fixes bug #1074901

Change-Id: Id3dfd525d24d622aab5e350e42713fdb7671b31e
Adds tests for isolated_hosts_filter

The isolated_hosts_filter takes two configuration options. This patch
adds three tests defining the behaviour for when one or more of these
variables are missing.

This patch speeds things up a bit when the isolated_images option is
missing, making it do less dict lookups to come up with the same answer.

Matrix of isolated_hosts_filter changes:

+----------------------+--------------------+--------------+
| Config options       | Before patch       | After        |
+----------------------+--------------------+--------------+
| 0        + 0         | No filtering       | Same as B4   |
|                      | no tests           | Tested       |
+----------------------+--------------------+--------------+
| 0        + iso_image | Block iso'd images | Same as B4   |
|                      | no tests           | Tested       |
+----------------------+--------------------+--------------+
| iso_host + 0         | Block iso'd images | Same as b4   |
|                      | no tests           | Tested       |
+----------------------+--------------------+--------------+
| iso_host + iso_image | Block matched h+i  | Same as b4   |
|                      | Tested             | Tested       |
+----------------------+--------------------+--------------+

Change-Id: Ibe6725e39a771b31fdf49513335275deba33e96b
Destroy conntrack table on source host during migration

If a VM migrates from hostA to hostB, there will still be connections
in the conntrack table of the hostA. If, for any reason, VM is migrated back
to the hostA, while those connections are still in conntrack table, persistent
connections (such is ssh) to VM, from outside, will get dropped. They get
dropped cause hostA was expecting different packets and cause of that requires
establishing new connection. By dropping conntrack table entries for VM
we make sure that connection flow is not interupted by old packets.

Change-Id: If8e146e05914e9febd6fc40a1d8085306c1244ea
Fix VMware Hyper console url parameter error.

fix bug #1172177

Change-Id: Iab858741cba61f218c639d76fa80c047196bcc64
Refactor work with db.instance_type_* methods

Remove session parameter from public methods:
  *) instace_type_get
  *) instance_type_get_by_name
  *) instance_type_get_by_flavor_id

instance_type_destroy performance optimization:
  Get instance_type_ref without unnecessary extra specs

instance_type_access_get_by_flavor_id performance optimization:
was:
1 query get instance_type with joined extra_specs
1 query lazy load instance_type_projects
now:
1 query get instance_type id
1 query get all instance_type_projects that correspond to id

instance_type_access_add performance optimization:
was:
1 query get instance_type with extraspecs
1 query add instance_type_access
now:
1 get only instance_type id
1 query add instance_type_access

instance_type_access_remove performance optimization:
Same as in instance_type_access_add

blueprint db-session-cleanup

Change-Id: I6d1456289a97c46d7e8c9345474396c08e053970
Merge "Adds tests for isolated_hosts_filter"
Merge "Fix ec2 CreateVolumes/DescribeVolumes status"
Merge "ec2 CreateVolumes/DescribeVolumes status mapping"
Merge "Fix VMware Hyper console url parameter error."
Merge "Destroy conntrack table on source host during migration"
Merge "Refactor work with db.instance_type_* methods"