Validate cores and ram when booting instance

There is no validating for cores and ram in creating instance workflow.
The user can submit the form even the requested cores or ram are exceed
the quota.

Change-Id: I25d49f709d120a6a56692b174e17969cba1c8065
Closes-bug: 1349370
Enable changing volume type of a volume

Expose the functionality of the 'cinder retype' command in the UI.
It allows user to change the volume type of a volume whose status is
in-use or available when horizon's cinder API version is >= 2.

cinder retype is only supported starting cinder v2.

If enabled_backends is specified in /etc/cinder/cinder.conf,
retype is actually performed by a specific driver.
It depends on the drivers (backends) that are associated
with volume types.
Volume types are set through type-key extra specs.

If enabled_backends in cinder.conf is not specified, volumes are
created by LVM so retype is actually performaned in LVM.

During retype, if cinder finds it can not retype, it will check
if the migration policy is on_demand or never. If the policy is
is never, then cinder does not do anything, otherwise, it will
perform migration. By default, in the horizon retype dialog UI,
migration policy is never which is also the default
of the cinder cli command.

Currently in horizon cinder api default version is 1. In order to
test this functionallity, you need to update
openstack_dashboard/local/local_settings.py to have the "volume"
API to use version 2 so the "Change Volume Type" action menu
shows up for the volume. If local_settings.py is not available, you
need to copy the local_settings.py.example file, change it to
local_settings.py, update other necessary settings and also update
have the API version setting like the followings:

OPENSTACK_API_VERSIONS = {
    #"data_processing": 1.1,
    #"identity": 3,
    "volume": 2
}

Implements: blueprint volume-retype

Change-Id: Id8bc539e1849f5910df34d7b76cc250ec82f9671
sort Database Launch Instance Flavor list

Use the same sort_flavor_list utility method that Instances
Launch Instance uses.

Change-Id: Ibbe4cbca5f963b33c2d73049dba58142119fb06e
Closes-Bug: #1360014
Merge "sort Database Launch Instance Flavor list"
Merge "Enable changing volume type of a volume"
Merge "Validate cores and ram when booting instance"
Merge branch 'master' of https://github.com/openstack/horizon