Commit Graph

225 Commits

Author SHA1 Message Date
Takashi Kajinami 748e615c78 Support COMPRESS_ENABLED
The COMPRESS_ENABLED option controls whether the compression should be
enabled. This adds support for this option.

Change-Id: Ie3e48afc50770b121daacb90d8c70cf241efd330
2023-12-14 11:36:39 +09:00
Takashi Kajinami 1219aab898 Create dedicated class for ironic-ui
The package name of ironic-ui in Ubnutu/Debian does not follow
the general naming rule and the existing horizon::dashboard can't be
used.

Closes-Bug: #2033929
Change-Id: I7703550897c6b31f2b45ffce75f0ab2bae7a4157
2023-11-14 00:09:12 +09:00
Thomas Goirand d94647073a Add TOTP support
Horizon recently introduced TOTP support. This introduces a few new
parameters to allow users to enable the feature.

Depends-on: https://review.opendev.org/c/openstack/horizon/+/885570
Change-Id: I0b8d86c292715ffbb6d75dadcda7b51b1c190641
2023-10-22 14:40:48 +00:00
Zuul 8a4d294a8e Merge "Remove unused LOCAL_PATH" 2023-09-25 09:41:24 +00:00
Zuul ba53673ea1 Merge "Simplify setting of urls" 2023-09-18 21:16:08 +00:00
Takashi Kajinami b9780547a9 Add support for TOKEN_TIMEOUT_MARGIN
Change-Id: Ia0ceb69a45680a29e7311da94676d026978c2caa
2023-09-12 13:46:06 +09:00
Takashi Kajinami dd1c1e99b4 Remove unused LOCAL_PATH
This variable is not actually used thus can be removed from the file.

Also the os module is not really used in the file and we don't have to
import it now.

Change-Id: Ibefbb147404e22684bc5d9ae0870b706929e4009
2023-09-12 04:38:53 +00:00
Takashi Kajinami 5bc9978891 Simplify setting of urls
Since [1] was merged, all the URL options are set according to
the WEBROOT option. Also the trailing slash is added automatically.

[1] 2a772d64800070689478a49b6aa26a5893b2067b

Change-Id: Ic13cd2e541f21d07ed1b2b1337eeae042dbe2daa
2023-09-12 01:50:09 +09:00
Zuul cbae371699 Merge "Drop unused openstack_dashboard.exceptions" 2023-09-05 15:53:58 +00:00
Zuul d85cc4230d Merge "Stop replacing a dict value" 2023-09-05 15:46:57 +00:00
Takashi Kajinami 19db7a0d2f Stop replacing a dict value
Currently we completely replace some dict values in local_settings but
this causes a few problems.

 - Some keys(eg OPENSTACK_HYPERVISOR_FEATURES['enable_quotas']) are
   missing from the default dict value, which overrides its default
   value (True) in Horizon

 - We have to maintain the default values defined in our manifest
   according to any update in Horizon side.

This updates the logic to override keys only when requested, so that
the configuration basically leverage the defaults defined in Horizon.

Change-Id: I0fa105e595ff053d389e75004638af5856dbb734
2023-08-31 15:13:12 +09:00
Takashi Kajinami fd20f5a039 Drop unused openstack_dashboard.exceptions
The module is no longer used in our local_settings template since [1]
was merged.

[1] 08acafc46b

Change-Id: Ib62a2638e4735ce8f45a4abba9a4e670f35283ee
2023-08-30 21:17:57 +09:00
Zuul 3e4422f427 Merge "Remove hardcoded hypervisor_options values" 2023-08-30 04:11:59 +00:00
Zuul 1606c057f7 Merge "Require boolean value for use_simple_tenant_usage" 2023-08-24 15:14:05 +00:00
Tobias Urdin bec3f3a214 Remove hardcoded hypervisor_options values
The default value of can_set_mount_point
that we merge into the hypervisor_options
parameter is not the Horizon default.

This removes the defaults that sets the
can_set_mount_point to true by default when
Horizon has this as false by default, it's
also only really functional on a very specific
hypervisor.

This also removes the can_set_password config
that we set to False that already is the Horizon
default.

Change-Id: Iba05bce817da1c1bc51acb06b6bdc69beba2ea26
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
2023-08-23 08:52:34 +02:00
Takashi Kajinami 54a31c91fd Require boolean value for use_simple_tenant_usage
The OPENSTACK_USE_SIMPLE_TENANT_USAGE option in horizon expects only
boolean values and using a different type can result in unexpected
result.

This enforces the correct value type to ensure we accept only boolean
to avoid such problems.

Change-Id: Ib3735d354f658dee64a7fd01e609a11d174dbf8d
2023-08-23 10:59:32 +09:00
Takashi Kajinami 9ad8124eb3 Make example of OPENSTACK_SSL_NO_VERIFY consistent with its default
The OPENSTACK_SSL_NO_VERIFY option defaults to False. This ensures
we describe its default value in parameter description so that users
can more easily understand the effective value without explicit
definition.

Change-Id: Ifefb3f90970d13a92f79b64e1f453fb7dc3e5d8d
2023-08-23 10:55:01 +09:00
Radomir Dopieralski 910420589e ENFORCE_PASSWORD_CHECK is a standalone setting
... , not in HORIZON_CONFIG

Change-Id: Ic53612971f8e8d88e3f052583c5f4dba42c4a113
2023-05-15 13:15:17 +09:00
Zuul e5e4a677b2 Merge "Fix missing comma causing syntax error" 2023-04-11 16:34:00 +00:00
Zuul 041da00755 Merge "Stop overriding default value for some limit options" 2023-04-11 16:28:26 +00:00
Zuul ec0775af28 Merge "Use separate file to store SECRET_KEY" 2023-04-11 16:28:24 +00:00
Takashi Kajinami 8a2be0b25a Use separate file to store SECRET_KEY
Horizon supports loading secret key from a separate file. This change
updates the configurations to use that feature instead of putting
the key content in local_settings.

This allows us to more strictly limit access to the key content.

Change-Id: Ie91c2286afc102145ee49f5ef91b250e92af16a7
2023-04-07 09:17:05 +00:00
Takashi Kajinami c7229c6176 Allow tuning cache timeout
This allows users to tune cache timeout in Django.

Change-Id: I18cf8d80074203c044e69609dd7f713f6a2a593d
2023-04-07 14:27:06 +09:00
Takashi Kajinami 10e543f333 Stop overriding default value for some limit options
This removes the hard-coded default values for the following options
so that we can leverage the defaults defined in Horizon itself.
 - API_RESULT_LIMIT
 - API_RESULT_PAGE_SIZE
 - DROPDOWN_MAX_ITEMS

Change-Id: Id392b959ff05bba0dd75343313b2c3f956d29565
2023-04-07 14:04:51 +09:00
Takashi Kajinami bccc7c467d Fix missing comma causing syntax error
This fixes one missing comma in octavia dashboard configuration to
fix the syntax error.

Closes-Bug: #2015271
Change-Id: If896f922db09396415a095fb9a8062eca32a9d06
2023-04-05 00:33:42 +09:00
Takashi Kajinami ead7aabb85 Support customizing HORIZON_CONFIG['bug_url']
Change-Id: I912f7c7d9e7547e0d77b5af9b15492b439f1635c
2023-02-16 16:50:03 +09:00
Takashi Kajinami ba749e09d5 Override help_url only if needed
This omits override of help_url unless users explicitly define their
desired value, to reduce the hard-coded defaults maintained in this
module. This also effectively fixes the different scheme (http, not
https) used by default.

Change-Id: I40b4b20ab10650ae08e49b5773b838653c3c9c07
2023-02-16 16:46:26 +09:00
Takashi Kajinami 08acafc46b Stop replacing whole HORIZON_CONFIG dict
... so that we can leverage the default items defined in horizon.

Change-Id: I6242f8cb48e51892476ead2f764d7d2c96d11448
2023-02-16 16:46:23 +09:00
Takashi Kajinami 4f3e975a9e Deprecate ineffective images_panel
The images_panel key in HORIZON_CONFIG setting dict was once added
during Newton cycle but was removed when ANGULAR_FEATURES option was
added in the same cycle[1].

Because the parameter has have no effect for long, this deprecates
the parameter so that we can remove it in a future release instead of
fixing it.

[1] https://review.opendev.org/c/openstack/horizon/+/353377

Change-Id: I376af3b7c4525036bf1bb449cb71490495395f2c
2023-02-16 12:08:14 +09:00
Tobias Urdin 77dcef9b78 Add openstack_keystone_endpoint_type param
The new config option OPENSTACK_KEYSTONE_ENDPOINT_TYPE
is added in the [1] change and updated in change [2].

[1] https://review.opendev.org/c/openstack/horizon/+/844574
[2] https://review.opendev.org/c/openstack/horizon/+/868060

Depends-On: https://review.opendev.org/c/openstack/horizon/+/868060
Change-Id: I1be058ebf43f7f40d73ddf67c8356282a6acaacc
2023-01-16 16:03:55 +09:00
Takashi Kajinami ccc9227b12 Validate boolean values used in if-statement
This change ensures the parameters used in if-statement take boolean
values, because usage of a different type(eg. String) can cause
unexpected evaluation result.

[vagrant@localhost ~]$ cat foo.pp
$foo = false
$bar = 'False'
$baz = 'false'

if $foo { warning('foo') }
if $bar { warning('bar') }
if $baz { warning('baz') }
[vagrant@localhost ~]$ puppet apply foo.pp
Warning: Scope(Class[main]): bar
Warning: Scope(Class[main]): baz
Notice: Compiled catalog for localhost.localdomain in environment production in 0.02 seconds
Notice: Applied catalog in 0.01 seconds
[vagrant@localhost ~]$

Change-Id: I5c327c37e700829ffb80b9f58d15607aa883bdc1
2022-08-19 14:20:58 +09:00
Takashi Kajinami 6bf7abada9 Remove logic to handle quoted horizon_upload_mode
This is follow-up of 625275af36 and
removes the temporal logic to keep compatibility, because we have kept
the warning message for several cycles.

Related-Bug: #1946277
Change-Id: I1b11305df67dbe3127642a96bda429faae0059d5
2022-08-17 09:05:34 +09:00
Zuul 59a265a7e3 Merge "Add option websso_choices_hide_keystone" 2022-08-09 15:01:14 +00:00
Trygve Vea 6633269020 Add option websso_choices_hide_keystone
This change allows a cloud-deployer using WEBSSO to not expose a
form for attempting to log in using Keystone Credentials.

Closes-Bug: #1983855
Change-Id: Iae15a5dac8f3de0f70dad5af8837177f67857428
2022-08-09 10:01:31 +00:00
Takashi Kajinami 57905ff386 Drop default_dashboard
default_dashboard was deprecated a long ago in Horizon[1] and
Having that parameter in local_settings triggers the following warning
message.

```
WARNING:root:"dashboards" and "default_dashboard" in (local_)settings
is DEPRECATED now and may be unsupported in some future release.
The preferred way to specify the order of dashboards and the default
dashboard is the pluggable dashboard mechanism (in ...).
```

This change removes that parameter hard-coded in the template file to
get rid of the warning message. Currently the project dashboard is
shown first in Horizon by default so removing the parameter does not
cause any change in behavior.

This also removes these deprecated parameters from the template file
used in unit tests.

[1] 75bc2e6aa86d31f60288021694699302b3873af3

Closes-Bug: #1983390
Change-Id: I8cd5346a553db9ba9f6bdf8ffdd9e7d89d16c4be
2022-08-04 00:58:04 +09:00
Zuul aac496aa1b Merge "Accept array for cache_server_url" 2022-08-01 16:55:01 +00:00
Takashi Kajinami 8b268d75ce Accept array for cache_server_url
... so that we can specify multiple backend servers.

Change-Id: Iea01d1c5202890110c33341cedee4b5bc1ba324c
2022-07-31 14:11:07 +09:00
Takashi Kajinami db4a675203 Replace deprecated ugettext_lazy
The ugettext_lazy method has been deprecated since Django 3.0[1].

This was already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3
[2] cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee

Change-Id: Ic1859cd40826dfef7fe392121cb8f3401faaf593
2022-07-11 13:36:53 +09:00
Zuul 04ac02b8a8 Merge "Add support for independent designate-dashboard configurations" 2022-06-20 20:03:51 +00:00
Takashi Kajinami 7577a23c65 Add support for independent designate-dashboard configurations
This change introduces the new horizon::dashboards::designate class,
which allows users to manage the independent configuration file for
designate dashboard (_1799_dns_settings.py).

Depends-on: https://review.opendev.org/823238
Change-Id: Ie36d70b7b9fdde5f1ceb4be59cfb4f5c16981e7d
2022-06-17 09:02:46 +09:00
Takashi Kajinami a84514f5b7 Remove enable_user_pass from the base horizon class
... because the parameter was deprecated during Xena cycle in favor of
the separate classes for dashboard plugins.

Change-Id: I0105dca66abed6b4252df93d71c10d838dda1a7b
2022-05-12 09:13:24 +09:00
Takashi Kajinami 3f6b4b33a4 Support the SYSTEM_SCOPE_SERVICES parameter
The SYSTEM_SCOPE_SERVICES parameter was introduced during stable/yoga,
to enable usage of system scope tokens per service. This change adds
support for the parameter so that users can customize the parameter
using this module.

Change-Id: I921a913c51801083a2f799ab3d0d1debc62c8f2a
2022-05-05 03:17:00 +00:00
Takashi Kajinami af06fa976a Allow different log level for django.template
Debug log from the django.template is known to be too verbose. Recently
the sample local_settings.py in Horizon repo has been updated to
disable debug log from this module[1].

This change follows that decision and keep the default INFO log level
even when log_level='DEBUG' is set. Users are still able to enable
debug log from this module by setting the new django_template_log_level
parameter.

[1] 85e20a62e2b986f066484147d0a15446d2699559

Related-Bug: #1720893
Change-Id: I9c301db691da4adce1b9f6c40b7a3583e7e8a6f5
2022-04-10 14:20:25 +09:00
Zuul 3cc6acabd4 Merge "Allow different log level for django module" 2022-03-30 03:55:00 +00:00
Takashi Kajinami 38d7c1849c Allow different log level for django module
This change introduces a new parameter to determine log level of
the django module. Debug log from this module is known to be quite
verbose though most of them are warning caused by implementation and
not useful for operators. Adding a new parameter allows enabling debug
for all modules except for the django module.

Change-Id: Ice284786f9b34f328ff72e8d5a50dff03b827f73
2022-03-25 01:30:35 +09:00
Takashi Kajinami 2c33f9fb5e Fix syntax error in individual dashboard settings
Closes-Bug: #1965970
Change-Id: Ie866b35306cadb5e7dad53b0c05c84023c134c3b
2022-03-23 01:45:37 +09:00
Takashi Kajinami c777b11f68 Remove unused variable definition
Trivial-Fix

Change-Id: I1abae052352e46c2f40f07978c42b922b60222d6
2022-03-15 15:04:47 +09:00
Takashi Kajinami ca792e564f Put each WEBSSO_* option just after descriptions
... so that users can more easily understand how these parameters are
used.

Change-Id: I174651831b48c14b43fbd3fb869c5854b14488ff
2022-03-03 17:04:37 +09:00
Zuul 9369489001 Merge "Remove LAUNCH_INSTANCE_*_ENABLED from local_settings" 2022-03-02 12:51:58 +00:00
Takashi Kajinami b50aba3ff4 Remove redundant blank lines
... for better readability. This change also fixes the inconsistent
indents (2 spaces vs 4 spaces).

Change-Id: If324fc52c18f12a7ace2f6ee7a27a97e202b7f73
2022-03-01 10:25:16 +09:00