The new library is already supported in django 3.2 and gives us better
support for IPv6 addresses and encrypted connections.
Also, the same library is being used by all other OpenStack projects.
Depends-on: https://review.opendev.org/c/openstack/devstack/+/898302
Closes-Bug: #2039225
Change-Id: I964ac4d0d62dff4c1f7c1f1373763fbf23024269
VariableDoesNotExist error in DEBUG messages from django.template are
super noisy. It happens even for cases where variables are not defined
like "default" filter. It also happens with Django built-in templates.
Previously we tried to fix VariableDoesNotExist errors in our templates,
but it tunrs out there is no convenient way to prevent it.
We agreed to disable django.template DEBUG messages by default
in the horizon weekly meeting [1].
Closes-Bug: #1720893
[1] https://meetings.opendev.org/meetings/horizon/2022/horizon.2022-02-23-15.00.log.html#l-105
Change-Id: Ife9a91c7cd050b30d7f1eca8861a0d6629a23827
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
horizon already deprecated launch instance Django based implementation
in the wallaby cycle [1]. This patch remove code for launch instance
Django based implementation as angular based implementation is the
default one from long and all features gaps between angular and Django
implementation is closed.
It also moves SetAdvanced step code to ``resize_instance.py`` as
``workflows/create_instance.py`` file is deleted and remove server_group
option from Advanced Options of resizing instance action because
"server_group" is not required while resizing an instance as per
nova-api reference [2].
Closes-Bug: #1869222
[1] https://review.opendev.org/c/openstack/horizon/+/779125
[2] https://docs.openstack.org/api-ref/compute/?expanded=resize-server-resize-action-detail#resize-server-resize-action
Change-Id: I5e01cd81f309491f1a58ea93911030366a86e3c7
The keystone doesn't use 5000 port anymore from Newton version. And all
the references should be changed together.
Change-Id: I3f02686ab5b3abf48f129fde92e90427ca148317
neutron supports the qutoas API from long ago and most deployments
are expected to enable the neutron quotas support in horizon.
This commit changes the default value of enable_quotas in
OPENSTACK_NEUTRON_NETWORK to True.
Part of blueprint ini-based-configuration
Change-Id: I5923f08752e6a5ccd4c9cf2fa1deb6c879111f43
In Train release, we move most settings from local_settings.py.example
to openstack_dashboard/defaults.py. It is worth covered in the Train
release notes so that operators who depend on local_settings.py.example
can be aware of the change.
Also drops settings related to the operation log feature in
local_settings.py.example are as they are defined in
horizon/defaults.py (which is loaded by
openstack_dashboard/defaults.py).
Change-Id: Ib06925aef305ffa1545d10529acd42d04177f5e1
IMAGE_RESERVED_CUSTOM_PROPERTIES has been not used since Juno.
commit 2e3299dc57 drops the usage of
IMAGE_RESERVED_CUSTOM_PROPERTIES.
OPENSTACK_HEAT_STACK is specific to heat-dashboard and
it was moved to heat-dashboard.
FLAVOR_EXTRA_KEYS deprecation notice has been dropped. No code refers to
it for a long time (at least the recent four releases).
Part of blueprint ini-based-configuration
Change-Id: I1b81f3e437feafb18423225a93900b07ae91cc75
This commit also moves descriptions of settings defined in openstack_auth
from openstack_dashboard/settings.py and local_settings.py(.example)
to openstack_auth/settings.py.
Note that if openstack_dashboard has different default settings
from openstack_auth defaults, they are now moved to
openstack_dashboard/defaults.py.
Part of blueprint ini-based-configuration
Change-Id: I59eebc388de0bcbd4d1fe35c6138efbd3e04c5b8
Log level 'DEBUG' is useful to debug our CI.
local_settings.py.example is used as a template of local_settings.py
in our CI and it is not easy to change the log level in
local_settings.py using a shell script.
This commit sets the log level of 'console' to 'DEBUG'
when DEBUG settings is true.
Note that this does not mean the change of the default value.
Change-Id: If767cbc6c027060d564bdc2839bf6e61f6425d01
This commit mainly covers settings in the remaining files
under openstack_dashboard.
Note that HORIZON_CONFIG, horizon and openstack_auth are not covered.
They will be covered by follow-up patches.
Part of blueprint ini-based-configuration
Change-Id: Ibd70e030445a073d9a62da9867850f4893135a89
This commit mainly covers settings
in openstack_dashboard/dashboards/identity/.
Part of blueprint ini-based-configuration
Change-Id: Ibb174f62d0047a10b2832dd2ff350f5f32955b08
This commit mainly covers settings
in openstack_dashboard/dashboards/project/.
Part of blueprint ini-based-configuration
Change-Id: I22413d2fe20576a507634dc4e2d0354c7db8800a
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
This commit mainly covers settings
in openstack_dashboard/dashboards/admin/.
Part of blueprint ini-based-configuration
Change-Id: Ifb3e9401a926ba9e035e1b498a4a4493c1b594f5
Currently horizon defines default values of settings in the logic
using getattr(settings, <setting name>, <default value>) and
it is not easy to handle the default values of available settings.
This commit starts the effort to define default settings explicitly.
This is a preparation for ini-based-configurations.
It covers settings in openstack_dashboard/api.
Part of blueprint ini-based-configuration
Change-Id: Id4c3287f0a572fd14ea93b54bcab8fabda39e583
Cinder API v3 is a default version for Horizon so we need
to use it in the documentation.
data-processing API version is removed from the Horizon
documentation since it's availale in a separate plugin.
Change-Id: I5f178b70f73c23f8220f44a418eec689f0bc3b1c
Due to [1] patch it's better to update [2] file.
Otherwise it create confusion to a new devloper if use
"tox -e runserver" for developments.
[1] https://review.openstack.org/#/c/630790
[2] openstack_dashboard/local/local_settings.py.example
Change-Id: I2146b33f46c417c5f1d61a4958336c92f0c03e9c
This commit changes the default SESSION_ENGINE to the cached
sessions and the default cached backend to memcached.
The cached sessions with memcahced is our current recommendation, but
we do not use it in our default settings and do not test it in our CI
(horizon-dsvm-tempest-plugin). It is better to use the recommended
configurations in our CI.
The previous default SESSION_ENGINE, the signed cookies, has
a limitation on the length o cookies and using keystone3 can hit this
easily. It is not ready for production for most cases.
For a cache backend, considering multi-process web server deployments,
memcahced is recommended rather than a local memory backend.
Note for developers: If you use "tox -e runserver" for developments,
SESSION_ENGINE = 'django.contrib.sessions.backends.cache' might not
work expectedly. From my testing, I was forced to log-in frequently
when moving pages. If you hit this, my suggestion is to configure
SESSION_ENGINE to django.contrib.sessions.backends.signed_cookies.
Change-Id: I1c4578ec5a7f70a59c6348d76ad0c12956a18573
Closes-Bug: #1736021
From Rocky we can now support Django's recursive template
inheritance. Let's move away from all these stand alone
templates for deployers to override and instead direct them
to recursively extend the existing templates and the blocks they
need.
This adds more blocks, docs on how to use them, and an example
theme which can be turned on and used to show how this works.
blueprint: less-customization-templates
Change-Id: I69f1e16ff1b88cec78580df0911fe3c01b7507dd
Operators now can control whether the links of "Download OpenRC" and
"Download clouds.yaml" are displayed or not via new settings
SHOW_OPENRC_FILE and SHOW_OPENSTACK_CLOUDS_YAML.
openrc and clouds.yaml files provided by horizon now assume
the basic simple deployment and do not cover keystone authentication
like saml2, openid and so on. The default openrc and clouds.yaml
from horizon do not make sense for such environments.
Change-Id: I1407a24387c7d7bd2c20c995cebf1350f8090e72
Partial-Bug: #1795851
In favor of keystone v2 support, SHOW_KEYSTONE_V2_RC now defaults
to False. SHOW_KEYSTONE_V2_RC setting is also deprecated.
Along with this change, "v3" part of "OpenStack RC File (Identity API v3)"
is now unnecessary, so "v3" information is dropped.
Change-Id: If0359e2dc1f2c8fb5f3c87046fd23043f94abc21
PKI Tokens got removed from Keystone in 2016[1] so this check is no
longer needed.
OPENSTACK_TOKEN_HASH_ALGORITHM setting is dropped
as it is used only in PKI token check.
[1] https://review.openstack.org/#/c/374479/
Change-Id: I2de02fe6fab531842752b03c5e17af2bcf502cd8
Add a new optional WEBSSO_KEYSTONE_URL property to facilitate WEBSSO
deployments where network segmentation is used per security requirement.
In this case, the controllers are not reachable from public network.
Therefore, user's browser will not be able to reach OPENSTACK_KEYSTONE_URL
if it is set to the internal endpoint.
If WEBSSO_KEYSTONE_URL is set, it will be used instead of
OPENSTACK_KEYSTONE_URL.
Change-Id: I05ea4227aa4c2cb0a73015ed7fd29cf1a96e696a
Closes-bug: #1544703
In scenarios where the cloud operators have only a single Identity Provider,
we can have a default redirection to remove unnecessary user clicks and
improve user experience.
Closes-bug: #1784368
Change-Id: I251703dcaeac43174fbcba7e0658c6f92098b2e0
The actions on Angularized users panel and roles panel does not support
following setting.
OPENSTACK_KEYSTONE_BACKEND = {
'can_edit_user': True,
'can_edit_role': True,
}
This patch enables to support these settings.
To enable this settings, add 'OPENSTACK_KEYSTONE_BACKEND' into
'REST_API_REQUIRED_SETTINGS' setting.
Change-Id: I7888bd2c2977dc010911d2e7ecf42815354e081b
Closes-Bug: #1779268
DEFAULT_SERVICE_REGIONS is cumbersome when you have
more than one keystone endpoint and all you want to do
is set a global default service region.
This adds '*' as an optional fallback key to mean global default.
If an endpoint matches it will take precedence over the '*' value.
This also fixes the precedence order for DEFAULT_SERVICE_REGIONS
so that a user controlled cookie is used instead when that cookie
is valid for the given catalog. This changes the way the setting
works, but retains the intended result the setting was originally
intended for.
Change-Id: Ieefbd642d853fcfcf22a17d9edcc7daae72790a4
blueprint: global-default-service-region
Closes-Bug: #1772345
Related-Bugs: #1359774#1703390
Nose has been in maintenance mode for the past several years. It has
issue with exit code [1] which leads to false positive results for our
seleniun-headless job.
This patch changes test runner for Horizon tests and does the following
things:
* Django test runner executes test in a different order than Nose does.
That's why we've got an issue with side-effect in
horizon.tests.unit.tables.test_tables.MyToggleAction class. This patch
adds workaround to it.
* Rename filename of test files to names starting with 'test_'
so that the django test runner can find tests expectedly.
* '--with-html-output' option is temporary dropped and will be added in
a following patch.
* Integraion tests is marked via django.test.tag mechanism which is
introduced in Django 1.10
* 'selenium-headless' is broken now because we don't have geckodriver on
gates, this patch makes it non-voting.
* 'tox -e cover' is fixed
* Remove @memorized decorator from
dashboards.project.images.images.tables.filter_tenant_ids function.
[1] https://github.com/nose-devs/nose/issues/984
Depends-On: https://review.openstack.org/572095
Depends-On: https://review.openstack.org/572124
Depends-On: https://review.openstack.org/572390
Depends-On: https://review.openstack.org/572391
Related blueprint: improve-horizon-testing
Change-Id: I7fb2fd7dd40f301ea822154b9809a9a07610c507
We previously supported so-called "Simple FIP disassociation"
which allows users to disassociate and release a FIP in a single action.
We no longer support nova-network based features, but I believe it is worth
implemented even in a neutron-only era. This patch introduces a checkbox
"Release floating IP" to support this with neutron.
At the same time, this patch also fixes a bug that the existing FIP
disassociation action disassociates and releases a first FIP of
a requested server. Even though it is a rare case where a single
server has multiple FIPs, this is a bug. After this patch, FIPs
associated with the requested server are listed in the form and
a user can select an FIP to be disassociated.
This patch drops a setting parameter 'simple_ip_management' without
deprecation notice. This is actually no side effect because this setting
just toggled the FIP disassociate action in the instance table and
it provides nothing more than that. We can do the same thing by
the policy file.
Change-Id: Ie8053bdd3a3e4c7897c7c906788d40c2a1d3f708
Closes-Bug: #1226003
- HORIZON_IMAGES_ALLOW_UPLOAD (deprecated in Newton)
- CUSTOM_THEME_PATH (deprecated in Mitaka)
- DEFAULT_THEME_PATH (deprecated in Mitaka)
- OPENSTACK_TOKEN_HASH_ENABLED (deprecated in Mitaka)
- TOKEN_DELETION_DISABLED
(not documented but it was marked as deprecated in Ocata
in django-openstack-auth commit 5810f9c6)
The related logics related to dropped deprecated settings
have been dropped too.
- custom_path and default_path of get_available_themes() were
dropped as they are no longer needed in favor of
the removal of CUSTOM_THEME_PATH and DEFAULT_THEME_PATH.
- Unused remove_project_cache(), is_token_deletion_disabled()
and delete_token() have been dropped.
Change-Id: Ic9406623cc092884c4136f78fb967b129bfda487
Settings related to horizon plugins should be documented in individual
project repos. We support local_settings.d mechanism, so horizon plugins
can provide their own settings examples.
One example is SAHARA_AUTO_IP_ALLOCATION_ENABLED. This option has been
deprecated and replaced by another setting. It is hard for horizon team
to track this kind of changes.
This is just a change in the example local_settings.py and there is no
feature change, so there is no deprecation required.
Change-Id: Ib28110246567808f9e9c0f99c6032f7bdc931643
The docstring of getExtensions service in cinder.service.js
was a copy from nova service and not correct. The docstring was
updated based on the current cinder v2 API.
Thanks to a recent improvement in reno, touching release notes
in older releases in the master branch no longer polute the rendered
release notes. Changing URLs (or other things) in the master branch
does not affect the rendered release notes, but updating URLs to the
latest would help avoiding mechanical patches of updating links :)
Change-Id: I2aec3adeb400323d42a3a5083f8bc0798eeff917
The keystone API version 3 has become the default API version
for a long time and our CI already uses keystone v3 API only.
In addition, our documentation recommended to use the cached session,
so switching the default API version to 3 does not hit the limitation
on the maximum size of session data when using the cookie-based
sessions.
This is based on django_opensatck_auth review
https://review.openstack.org/#/c/158384/
Implements blueprint: default-keystone-api-3
Change-Id: I79e9fbd3567cc69468694dbf043fecf422347c7e
* Setting 'SHOW_V2_KEYSTONE_RC' added and will control whether
or not user's are able to see links for the V2 rc file on both
the API Access panel and the user menu.
Change-Id: I454fcf578dd8c4d2b9b52c3a9e5426b85e5298b5
Now instance panel is sending API calls to Neutron to get the addresses
info about network. It take some time until Nova network info cache is
synced when IP address operation like floating IP association is made
in Neutron. The API calls to Neutron exist from this reason.
However, it retrieves a full list of port, so it can potentially leads
to performance issues in large deployments. This commit adds a setting
flag to control whether API calls to Neutron is used or skipped in
the project instance table.
This commits drops a call of servers_update_addresses() in the admin
instance table. In the admin instance table there is no need to retrieve
IP addresses from neutron because the main purpose of the admin panel is
to see all instances and IP addresses in nova network info cache will be
synced soon.
Closes-Bug: #1722417
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ie16784eb6352f70ab644dc8b6ea03fc6a881d3f9