Commit Graph

16 Commits

Author SHA1 Message Date
Akihiro Motoki cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
Ivan Kolodyazhny 086c6607ef Add auth_type to template context for openrc file rendering
We need to path auth_type value to the template because different
templates could be rendered for credentials and websso auth_type.

Closes-Bug: #1871806
Change-Id: If218813e0b4a8cc51c4e590081c5f3c50b35b8a7
2020-04-09 09:19:47 +00:00
Ivan Kolodyazhny f33e5fd8ac Drop deprecated Keystone V2 API support
Keystone V2 API was deprecated in Stein release in Horizon and
removed from Keystone in Queens release.

Change-Id: I917e273d3174adf0874e516b3d635ccb8ba58a27
2019-09-12 17:15:07 +00:00
Stephen Finucane ea24949ede trivial: Add TODOs for remaining function-based views
These are going the way of the dinosaur and will eventually need to be
replaced, some of them in coming patches.

Change-Id: I3a1d514c8770478349b4f91b128c8230b108d979
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2019-09-11 07:29:49 +09:00
Akihiro Motoki fcdc67b819 Define default settings explicitly (openstack_dashboard 3/5)
This commit mainly covers settings
in openstack_dashboard/dashboards/project/.

Part of blueprint ini-based-configuration
Change-Id: I22413d2fe20576a507634dc4e2d0354c7db8800a
2019-07-03 14:54:16 +09:00
Ivan Kolodyazhny 2e52e4a4e0 Remove deprecated SHOW_KEYSTONE_V2_RC config option
SHOW_KEYSTONE_V2_RC is deprecated since Stein release and it's safe
to remove it now.

Keystone v2 support removal will be implemented in a follow up patch.

Change-Id: Ib3098789a3aef47f4f4b84fd56f03376ce2ea96f
2019-05-14 11:55:53 +00:00
Akihiro Motoki e832c8549b Allow to specify custom templates for clouds.yaml and openrc
Change-Id: I1ef6899f4d14c660eba50f16e813c280657475fc
Closes-Bug: #1795851
2019-01-13 01:53:18 +09:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
David Lyle f25748293e Handle novaclient ec2 cert support removal
In Queens, ec2 cert support was removed from python-novaclient.
This causes horizon to be unable to get the keystone values of
ec2 credentials.

This patch removes the code that handles ec2 certs from nova.
Since the ec2 cert code in nova was removed in Mitaka. There is
no real risk of breaking backwards compatibility.

Change-Id: I470761d67004f6e6b188d3afc4b7f081b7bc708f
Closes-Bug: #1729175
2018-01-25 16:09:17 -07:00
Sam Morrison 2d2a562194 Set PROJECT_DOMAIN_NAME in generated v3 openrc
Change-Id: I97435d2137b5bd74cd9f8ebfb927e4e28a0dc00a
Closes-bug: 1715525
2017-09-08 15:28:57 +10:00
Akihiro Motoki 2f76bac3a1 Strip blank lines from downloaded clouds.yaml file
There are a lot of blank lines in clouds.yaml downloaded from
horizon. This is as a result of rendering Django templates.
This commit stripped blank lines from the rendered content.

The logic was kept.
You can see the detail logic in django.shortcuts.render().

Change-Id: Ie5b0652adead671823b81a8de8958638a3058eb2
Closes-Bug: #1680558
2017-04-06 18:47:34 +00:00
Monty Taylor 6d315598aa Add support for downloading clouds.yaml files
python-openstackclient, shade, openstacksdk and Ansible's OpenStack
modules all support reading client config information from a file called
clouds.yaml instead of from environment variables set from openrc files.
Unfortunately, the only thing horizon currently offers for download is
old-style openrc files.

Add support for downloading clouds.yaml files.

Change-Id: I0611dd44524b746ad993bff7435ec8628a83a762
2017-04-06 17:16:55 +00:00
Kenji Ishii 1f49ac5346 Sort service list in API Access
Currently, this order is the order of user.catalog_service and
this is not sorted. This patch sort that list by service type.

Change-Id: I7de8e6c349b947a960123d35c2c872a2e97ff72b
Closes-bug: #1676689
2017-03-28 02:06:49 +00:00
Akihiro Motoki baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
Rob Cresswell 6b2b22631b Make API Access a panel under compute
This patch moves the API Access view, from a tab on the Access
& Security panel to its own panel under the Compute panel group

Change-Id: I1e523ba2e7e959474c0fc77f8b6c42994a481081
Implements: blueprint reorganise-access-and-security
2017-01-31 01:01:29 +00:00