Rename method get_hosts in admin/info/tables.py

There are 2 identical methods defined in admin/info/tables.py,
Rename get_hosts to get_zone_hosts and get_aggregate_hosts.

Change-Id: Ib3d115737400515c4b31178721609055a9658085
Closes-bug: #1262944
Add missing egress sec group for all tcp/udp/icmp

When creating "Security Group Egress ALL TCP/UDP/ICMP", the
direction is always Ingress, need to add egress in the situation.

Fixes bug #1254040

Change-Id: I1a2bdc07d7ca4ecc12ebdb35a1f357de0d09c502
Extend options for custom flavor sorting when launching instances

Until now, flavors were sorted by RAM, ascending, by default.
An option to override this and use a custom callable instead
was introduced via the CREATE_INSTANCE_FLAVOR_SORT dict in
local_settings.py.

This patch introduces another way of using the
CREATE_INSTANCE_FLAVOR_SORT dict: by providing a flavor attribute.

Change-Id: I5b2819cc3ebc97377e673682d0b2c7ddab94e3d3
Closes-Bug: #1254524
Fix behavior of select all checkbox

The "select all" checkbox in tables didn't work due to a missing CSS class.
Add the missing class so that the checkbox behaves as expected.

Change-Id: I5dcfdf9a7a60ea516c5343fabeb7a8f79b107fe7
Closes-Bug: #1259537
Logging error if cookie size is > 4KB

When session storage is configured to use signed cookies, logging error when
cookie size is > 4KB.

Change-Id: Ia766f4505ce0527123a9fa9a62bf6d312858da46
Closes-Bug: #1214197
Set Keypair create button disabled when quota exceeded

We should disable create button when quota exceeded like creating instances.

Change-Id: I9cd044c195ccc1160f7d5cb0ee24fc346669d4d7
Fixes: bug #1250825
Cannot view detailed image with empty name.

After creating an image with empty name (only space characters in the name),
and attempting to view it, the view crashes.
Glance is not returning the name X-Meta-Header on the response if the
name is not set or empty.

Change-Id: I0c55e302d22552e932bdd32e10d00a103d252429
Closes-Bug: 1261367
Modified images list to be sorted alphabetically.

Modified the images drop-down list on the Create Instance modal
dialog to be sorted alphabetically so the user can more easily find
their images.

Closes-Bug: #1262376
Change-Id: I9b1757b5bcebec73159bc643f10767537a3f71bd
Object Upload validated on client side

    Perform a js validation of the Object Upload name. If the name is
not entered, the submit button will appears disabled.

Fixes bug #1125232
Change-Id: Id33f3999e9267f5fc58eb55406fc5b763597839b
Co-Authored-By: Cristian A Sanchez <cristian.a.sanchez@intel.com>
Use memoized_method decorator in views

A lot of horizon's views use the pattern:

    def get_data(self):
        if not hasattr(self, "_data"):
            # Calculate data here.
            self._data = data
        return self._data

This is copy-pasted all over the codebase. It's better to handle that
with a single decorator. In the future, we might even replace it with
some better caching approach.

Closes-bug: #1248230
Change-Id: Id021fccf9032e5068993ec91a7774a5d0fbf29bb
Set "remove rule" field to be required in dialog

The dialog can be open from: the "Firewalls"->"Firewall Policies"
->"More" button of a policy->"Remove Rule"

The "remove rule" field should be required, otherwise, user will
hit error when no rule is select. Removed "required=False",
because it is default to True.

Added 'btn-danger' to the button style

Change-Id: Ifa21419bc93818335057bb16ed2683994c6efee7
Closes-Bug: #1252996
Clean up the hypervisor DataTable members columns

Refactored the class to use filters instead of passing functions.
As noted in the documentation on DataTable. Also corrected a side
effect where a template filter does not check the input value.

Change-Id: I0c4867673611228fbcffa71f65d2e9ed9a1f872e
Closes-Bug: #1203391
Attach volume eventhough the instance is shutoff

It should be possible to attach a volume to a shutoff instance.
Nova CLI (nova volume-attach) allows this and Horizon should be
on par.

Change-Id: Ie7c351e5b23f218d6d10c80b9aebbf233c62b7be
Closes-Bug: 1251255
Merge "Set "remove rule" field to be required in dialog"
Merge "Cannot view detailed image with empty name."
Merge "Rename method get_hosts in admin/info/tables.py"
Merge "Attach volume eventhough the instance is shutoff"
Merge "Modified images list to be sorted alphabetically."
Add missing __contains__() and get() methods to QuotaUsage

The QuotaUsage class was missing __contains__() and get() methods which was
causing unexpected behaviour, e.g:

    >>> usages = quotas.tenant_quota_usages(request)
    >>> 'ram' in usages
    False
    >>> usages.get('ram')
    None

Change-Id: Ib0b1ad69c4bf4effd7c10827d23bcc713bdc5ed6
Merge "Set Keypair create button disabled when quota exceeded"