301 Commits

Author SHA1 Message Date
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
Takashi Kajinami
3a15e126e2 Remove usage of deleted manifest_dir
Recent update in rspec-puppet removed some of the config interfaces for
old puppet versions[1]. This drops usage of these interfaces to resolve
the following error in unit tests.

```
An error occurred while loading ./spec/unit/provider/manila_spec.rb.
Failure/Error: c.manifest_dir = File.join(fixture_path, 'manifests')

NoMethodError:
  undefined method `manifest_dir='...
```

[1] 316d95923c

Change-Id: Ic74097dd92e23c6575284cbe61a605deac4f646c
2023-10-11 12:00:46 +09:00
Zuul
ba53673ea1 Merge "Simplify setting of urls" 2023-09-18 21:16:08 +00:00
Zuul
c4af4b3d35 Merge "CentOS: Skip redundant compress/cache clear" 2023-09-15 14:06:14 +00:00
Takashi Kajinami
d967012a7a CentOS: Skip redundant compress/cache clear
The horizon package in RDO provides the systemd drop-in[1] to execute
these commands before starting the httpd service, so we don't have to
execute these explicitly.

[1] https://github.com/rdo-packages/horizon-distgit/blob/rpm-master/python-django-horizon-systemd.conf

Change-Id: Ifb5cb45ce848345a8ca865443040830325686043
2023-09-12 16:36:32 +09:00
Takashi Kajinami
173cd6b8c5 Align default SESSION_TIMEOUT with horizon's default
The SESSION_TIMEOUT parameter in horizon defaults to 3600. This updates
the default in our module to use the consistent default.

Change-Id: Icb609fad8ce95f867fe467064995e665e42f253c
2023-09-12 13:47:13 +09:00
Takashi Kajinami
b9780547a9 Add support for TOKEN_TIMEOUT_MARGIN
Change-Id: Ia0ceb69a45680a29e7311da94676d026978c2caa
2023-09-12 13:46:06 +09: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
Takashi Kajinami
9554a40a63 Verify each line separately in fragment
Currently when any of the expected lines do not appear in the concat
fragment, the verify fails but shows only the truncated contents. This
makes it difficult to find out which line is wrong.

This split the evaluation to every single line so that more specific
error is shown.

Change-Id: I1f6233bd1fa7ec3557e622942397fe58e583e4c9
2023-08-31 15:13:15 +09: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
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
Tobias Urdin
7c0c3e4d45 Add per module policy service refresh
Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I94e1120013aa6e15bbf3aa48a9c29d9943985440
2023-06-22 22:09:24 +00: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
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
0e618ae9e7 Debian: Fix the wrong package name of manila-ui
Closes-Bug: #2009921
Change-Id: I0e01ff19c8271162f693ec1859160a8377aacb3c
2023-03-10 17:28:38 +09:00
Takashi Kajinami
17f9bd3fcf Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: I7a37d698eaf31fe51f656966cfcda44721648b17
2023-03-02 12:23:01 +09:00
Takashi Kajinami
ead7aabb85 Support customizing HORIZON_CONFIG['bug_url']
Change-Id: I912f7c7d9e7547e0d77b5af9b15492b439f1635c
2023-02-16 16:50:03 +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
5660159a6e Ensure pymemcache library is installed
The pymemcache library should be installed when pymemcache backend is
used but this library is not installed by the package dependencies and
should be installed additionally.

This also ensures the cache libraries are installed during package
installation phase, so that the libraries are available when horizon
is started.

Closes-Bug: #1988205
Change-Id: I90cd9d9e1276fae71fcb9cbc7ba95b8839690dbd
2022-08-31 10:53:13 +09:00
Zuul
dfb5c37f91 Merge "Validate boolean values used in if-statement" 2022-08-23 08:10:49 +00:00
Zuul
a90402f337 Merge "Do not show diff of local_settings(.py)" 2022-08-19 19:24:15 +00: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
a810ca2b4e Do not show diff of local_settings(.py)
... because the file contains a few sensitive values like SECRET_KEY.

Closes-Bug: #1987015
Change-Id: Ie96eb626148214270c5a3a041087fcc679c127ce
2022-08-19 13:56:11 +09:00
Zuul
d73e23c4bc Merge "Remove redundant include of apache::mod::*" 2022-08-18 17:34:54 +00:00
Zuul
be8bcfb5a2 Merge "Stop testing apache::mod::wsgi::wsgi_socket_prefix" 2022-08-18 17:34:52 +00:00
Zuul
97531bfc05 Merge "Remove logic for Puppet < 4" 2022-08-18 17:34:50 +00:00
Takashi Kajinami
5a5ef576be Remove redundant include of apache::mod::*
The puppetlabs-apache module includes the classes for required modules
automatically based on the parameters used in apache::vhost.

apache::mod::wsgi
https://github.com/puppetlabs/puppetlabs-apache/commit/efffa854f
(available since 1.1.0)

apache::mod::ssl
https://github.com/puppetlabs/puppetlabs-apache/commit/ee37f2146
(available since 0.3.0)

Change-Id: I44d49918b81325815d5d7a3770c2e8a7487eef74
2022-08-17 14:20:24 +00:00
Takashi Kajinami
ce67a64bbd Stop testing apache::mod::wsgi::wsgi_socket_prefix
The parameter is no longer set by this module since [1] was merged.

[1] 78bdbe683affc2b8d86861eb220120dba12b3628

Change-Id: Ic867d57363bee6d573db14a1efae89126b1c4b3c
2022-08-17 23:19:02 +09:00
Takashi Kajinami
586d4f3401 Remove logic for Puppet < 4
... because that old version is no longer supported.

Change-Id: I0a6507e82edcfb66b116ca505dba1ac84bb25eb7
2022-08-17 23:13:15 +09:00
Takashi Kajinami
6bf7abada9 Remove logic to handle quoted horizon_upload_mode
This is follow-up of 625275af36f6775e939334724f439c480d863d24 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
Takashi Kajinami
14b45e9987 Fix type validation error with puppetlabs-apache 8.0.0
This is follow-up of 3ae8f91ca4c11f06ae145907b2b6c0b5ea16cf2d and fixes
type validation error of apache::vhost::access_log_format, which no
longer accepts a boolean value.

Related-Bug: #1983300
Change-Id: Ic5bcbcd94bfe74b0ff7ea750780021daa772a196
2022-08-15 02:54:04 +09:00
Zuul
2d3d0244a5 Merge "Add inet6 prefix only when MemcacheCache is used" 2022-08-12 09:33:54 +00:00
Zuul
50980b9a1d Merge "Adapt to new type validation in puppetlabs-apache" 2022-08-11 18:31:10 +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
Takashi Kajinami
3ae8f91ca4 Adapt to new type validation in puppetlabs-apache
The puppetlabs-apache module is enforcing more strict data type
validation[1].

This change updates the default values to adapt to that change.

[1] f41251e336

Closes-Bug: #1983300
Change-Id: I5aabfbfd438bd4bc981f20b3f924a41ec963648c
2022-08-02 12:08:28 +09:00
Takashi Kajinami
94422e6dcc Add inet6 prefix only when MemcacheCache is used
inet6 prefix is required only by python-memcached and it should NOT be
added when a different backend like PyMemcacheCache is used.

Closes-Bug: #1983182
Change-Id: Iee260f8578ed6c473c651e0665a548c68e94c954
2022-08-02 08:08:07 +09: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
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
6236f39018 Remove hard-code of default identity api version
Current default matches the default value in Horizon, thus hard-coding
the default value is not necessary.

Change-Id: I03ef1e6e894322acf0a5177c155b04196999db22
2022-05-05 09:50:53 +09:00
Takashi Kajinami
fa7b8c6d4a Allow customizing apache::vhost parameters for SSL vhost
This change introduces the new ssl_extra_params parameter, which allows
overriding apache::vhost parameters for SSL vhost. This parameter
behaves like the existing extra_params parameter, but affects only
the SSL vhost. When this parameter is NOT set, then the extra_params
parameter affects both non-SSL vhost and SSL vhost.

Change-Id: I88fc341f6970006b03cc796117e2fb8f46e87a52
2022-04-05 08:56:13 +09:00
xuleibj
5c28ddec68 Correction of syntax errors.
Change-Id: I7375d964ea1d3332f04b2106eabaf0e3243887c7
2022-03-08 02:04:46 +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
Zuul
83ac80ed9d Merge "Allow customizing policy files" 2022-01-10 20:47:56 +00:00