Fix up regression tester

* Clean up to support pydoc
* Support -h
* Make it actually work
* Improve docstrings
* Add copyright

Change-Id: I977df71e8213e39e9eebf9cc56b2dd7625959870
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
Support FlatDHCP network for VMware Hyper.

fix bug #1171783

Change-Id: Ibb75c8e3174283f0f5e94bacfd61ee93e8bd6227
Fix missing kernel output via VNC/Spice on boot

Bug 1164021

Use both ttys0 and tty0 as console options to the kernel during
boot.

Change-Id: I0365ff7cad021fb6ca551651d00d58297087e95e
Fixes race condition of deleting floating ip

Fixes bug #1172599
reproduce steps:
1. create an instance
2. get a floating ip from pool
3. associate the ip to instance created at step 1
4. delete the instance and the ip at a very little interval

reason may be that:
1. the action of delete ip find the ip is associated to a fixed ip at
   first(at api level)
2. and then the fixed ip is released when the instance is deleted
3. so nova-network manager findes this issue and raises
   exception.FloatingIpNotAssociated(address=floating_address)

Change-Id: I253d0b240451e8a728532639e9857894f6fc6870
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
Add missing snapshot image properties for VMware Hyper.

Fix bug #1174199

Change-Id: I50929ed2e66052a37bb5a94cd3863baaebda1e28
Fix flakey TestS3ImageService bug

test_show_translates_image_state_correctly sometimes fails
on some systems. This is caused because the ec2utils cache
is reset after the test rather than before the test (but after
the images are manually added to the db in setUp). This change
resets the ec2utils cache in the correct place

Fixes bug 1174266

Change-Id: I2ff9b71c932c913ca0423b1de4c04ca7d9de59cf
Merge "Add missing snapshot image properties for VMware Hyper."
Merge "Support FlatDHCP network for VMware Hyper."
Merge "Fix missing kernel output via VNC/Spice on boot"
Merge "Fixes race condition of deleting floating ip"
Merge "Fix up regression tester"
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"