Change 'admin_password' into v2 style for servers extension

This patch changes 'admin_password' to 'adminPass' that same
with v2 api. And also change the related unittest.

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3.

Partially implements blueprint v2-on-v3-api

Change-Id: Ie5675f98bb15c55a191a207171e2ffe3be8e6deb
Change 'image_ref'/'flavor_ref' into v2 style for servers

This patch changes 'image_ref'/'flavor_ref' to 'imageRef'/'flavorRef'
that same with v2 api. And also change the related unittest.
The differences between v2 and v3 are described on the wiki page

https://wiki.openstack.org/wiki/NovaAPIv2tov3.

Partially implements blueprint v2-on-v3-api

Change-Id: Ic17334e0a9de89488d5e0c8b75950027d51a3cd4
Fix the exception for a nonexistent flavor

flavor_get_by_flavor_id() raises a FlavorNotFound exception when trying to
delete a nonexistent flavor and REST API layer should catch the exception.
However, one of v2 API catches a NotFound exception instead, and it has
been fixed on v3 API.
This patch fixes the one of v2 API.

This patch is required for v2.1 API development. On the development, we are
sharing current v2 unit tests between v2 and v2.1 for avoiding duplicated
code. Now on v3 API which is source of v2.1, "delete a flavor" API catches
a FlavorNotFound exception. So current unit test test_delete fails against
v2.1 API if not merging this patch, because current v2 unit test raises more
generic exception NotFound but v3 "delete a flavor" API catches more specific
exception FlavorNotFound.

Partially implements blueprint v2-on-v3-api

Change-Id: Iec7bca55f0e9f4b8a85f3b9cd54d8deff2904f86
Handle non-ascii characters in spawn exception msg

If a compute driver's spawn function returns an exception whose text
has any non-ascii characters (e.g., for globalization), the compute
manager's "reschedule logic" doesn't handle it properly as it runs
the text through the str() function, which causes UnicodeEncodeError
exceptions.

This simply sends the exception text through six.text_type so as to
no longer blow up and proceed with rescheduling as intended.

Closes-Bug: #1359427

Change-Id: I3fef783feffbe99c6971543c881e3fce2b60693b
Backport some v3 availability zones API UT to v2 API

This patch adds below v3 availability zones API unittest
into V2 API to improve V2 API unittesting.

Change-Id: Icf5875b68ecde85c044efb1e2b05416de8b0c9db
Restore backward compat for int/float in extra_specs

In icehouse, we were able to store ints, floats in
extra_specs, with I195bd5d45a896e9b26dd81dab1e49c9f939b4805 we
forced the value(s) to be just strings. Let's loosen up
this restriction and still enforce a length check.

Closes-Bug: #1358818
Change-Id: I7687d0214e44d4af1b595c6c6c7ce685d4083556
Merge "Handle non-ascii characters in spawn exception msg"
Merge "Change 'admin_password' into v2 style for servers extension"
Merge "Change 'image_ref'/'flavor_ref' into v2 style for servers"
Merge "Backport some v3 availability zones API UT to v2 API"
Merge "Fix the exception for a nonexistent flavor"
Merge "Restore backward compat for int/float in extra_specs"