633 Commits

Author SHA1 Message Date
Takashi Kajinami
f451dbed3a Simplify policies definition
Currently the openstacklib::policy::policies parameter requires
the following format.

openstacklib::policy { 'foo':
  policies => {
    'title' => {
      'key'   => 'policy-key',
      'value' => 'policy-value'
    }
  },
  ...
}

However the top level key ('title') is used to determine resource
names and does not affect actual configuration. This is quite redundant
and sometimes confusing to users.

This allows using title strings to define policy keys. With this change
users can use a policies value like the following example. This is
similar to the existing config classes interface.

openstacklib::policy { 'foo':
  policies => {
    'policy-key' => {
      'value' => 'policy-value'
    }
  },
  ...
}

Change-Id: I7f8caa2b3e5cab852f64c5fdbb3452485d8aabab
2023-12-27 01:50:53 +09:00
Zuul
04e35709a7 Merge "Bump upper version of puppetlabs-mysql" 2023-11-20 09:45:43 +00:00
Takashi Kajinami
9ff464ca40 Bump supported Debian version to 12 (Bookworm)
Debian 12 was released in June 2023. Recent versions of OpenStack
(actually, 2023.1 and later) no longer support Debian 11.

Change-Id: I3762a0c9d2bd6f4a11c147e40a3140613ec8c3cf
2023-11-18 09:20:33 +00:00
Takashi Kajinami
0a723b1183 Bump upper version of puppetlabs-mysql
... because now v15.0.0 is used in CI.

Change-Id: Ia9c0595f84628998e3424c15fe382d36d33c252b
2023-11-16 16:38:35 +09:00
Takashi Kajinami
44a54f4f41 Fix unit tests with Debian 12
Debian 12 has PostgreSQL 15, and uses scram-sha-256 by default. So
we need a fix similar to the one[1] made for Ubuntu earlier.

[1] 6adbd49b9f2ae8d52f021c0fdb67760695483f85

Change-Id: I6e6e88951caa3aea0b7a1e13238e22ae4cb1c3dd
2023-11-15 13:52:50 +00:00
Zuul
4552c7d2de Merge "Import functions from stdlib" 2023-11-02 15:34:46 +00:00
Zuul
4a7f395dd9 Merge "Replace deprecated should" 2023-11-02 15:34:31 +00:00
Takashi Kajinami
3f0bda3f6c Introduce new 'openstackclient' tag
... so that we can define dependencies on client packages.

Change-Id: If6f54d9b63ebe0dbc7e82795d0ba3fb88551086e
2023-10-31 13:14:58 +00:00
Takashi Kajinami
22a9bd19ca Revert "Remove 'openstack' tag from iscsi service"
This reverts commit 0f3357a209dd9ed0b7e8ba23a83b9dc33475df1b.

Reason for revert:
The openstack tag is used by variety of package resources, so it's not
specific to client packages.

Change-Id: If171ff72b2f4d74cf520c2b1b48a3526b1b0929e
2023-10-31 13:14:53 +00:00
Takashi Kajinami
4ce49e9f74 Import functions from stdlib
... instead of copying the implementations into our modules. The issue
with unit tests, which is described in the comment, is no longer seen.

Change-Id: If5dd1a7d8987010f35e164861c807869128f690c
2023-10-31 22:13:42 +09:00
Takashi Kajinami
2f27c84684 Replace deprecated should
This replaces usage of `should` by `expect` according to the following
deprecation warning.

Using `should` from rspec-expectations' old `:should` syntax without
explicitly enabling the syntax is deprecated. Use the new `:expect`
syntax or explicitly enable `:should` with
`config.expect_with(:rspec) { |c| c.syntax = :should }`
instead.

Change-Id: Ifaac60ea93a5f854cd70929d7f3f5308a9b9911e
2023-10-31 13:12:11 +00:00
Takashi Kajinami
6adbd49b9f Fix broken unit tests with puppetlabs-postgresql >= v9.2.0
The default password encryption in Ubuntu 22.04 has been changed from
md5 to scram-sha-256 by [1].

[1] 985309e2df

Change-Id: I7f1218a3dc1377305b5eb7296b3ef03645f6a085
2023-10-31 14:51:00 +09:00
Zuul
4dc548c81b Merge "Bump upper version of puppetlabs-apache" 2023-10-17 14:46:34 +00:00
Zuul
e02d866bbc Merge "Bump upper version of puppetlabs-postgresql" 2023-10-17 14:46:33 +00:00
Takashi Kajinami
79861c52df Bump upper version of puppetlabs-apache
... because now we are using v11.x.x in CI.

Change-Id: I7fb5d002d2421c272ece8d357b5cd6f4e22f6c2e
2023-10-17 13:55:46 +09:00
Takashi Kajinami
541b30f8fc Bump upper version of puppetlabs-postgresql
... because now we have v10.x.x used in CI.

Change-Id: Id25bbe62b6882d934f2abea3c7ee929885669bb3
2023-10-17 10:41:11 +09:00
Zuul
885894610b Merge "Update master for stable/2023.2" 2023-10-16 18:24:52 +00:00
c507aa8032 Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.

Sem-Ver: feature
Change-Id: I6d09b765c2e6d238b270349672d60c1c9e51cf62
2023-10-16 15:19:11 +00:00
Takashi Kajinami
0f3357a209 Remove 'openstack' tag from iscsi service
... because this tag is commonly used for client packages.

Change-Id: Ic709f978beca3371ad6b4cfc60c15cc8dc71e5d6
2023-10-15 04:41:27 +09:00
Takashi Kajinami
4c7fa922be 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='...
```

This also removes explicit setting of mock module. The definition is
no longer required since we bumped puppetlabs_spec_helper to v 5.0.0.

[1] 316d95923c

Change-Id: If94493ff448e4c634d65dbbd5259722b3ad6448f
23.0.0
2023-10-11 12:07:05 +09:00
Zuul
fa454f62c2 Merge "Prepare 2023.2 release" 2023-10-03 17:18:04 +00:00
Takashi Kajinami
7f1cb77eab Prepare 2023.2 release
Change-Id: I9838d12364a8f5dc188796c445124831c8f28612
2023-10-03 16:32:29 +09:00
Takashi Kajinami
4c21a53fcf Bump upper version of stdlib
... because we are currently using v9.0.0 in CI. Lower version may be
bumped after 2023.2 release.

Change-Id: I603d8da53a962816ec22242901720e0ce496ee4e
2023-10-03 13:19:28 +09:00
Zuul
077d727727 Merge "replace validate_legacy with proper data types" 2023-09-14 07:46:13 +00:00
Takashi Kajinami
5cb78b4d25 Add utility function to compose URL from elements
This change introduces the generic function to compose URL from
elements. This can be used to compose endpoint url or coordination
backend url.

Change-Id: I77469f9dca817c4ab2af939de9bd74dce122c3d8
2023-08-15 06:00:29 +00:00
Takashi Kajinami
cf3f23fc09 Exclude release note files
The directory contains the source files to generate the release note
document, so is not required.

Change-Id: I85f4c6d974cacf88d3a9dd483ab82daa7c09f88b
2023-08-11 17:57:44 +09:00
Zuul
9392a0cda1 Merge "Add .pdkignore to exclude some files from tar ball" 2023-08-10 16:03:28 +00:00
Takashi Kajinami
b11247f139 Add .pdkignore to exclude some files from tar ball
We've seen release job failures caused by too large tarball, which
contains irrelevant files like git history.

Let's exclude these files to reduce size of the archive.

The file is copied from the puppetlabs repositories with some files
specific to OpenStack projects added.

Change-Id: Ia6245847ee40654663d24e64eaccef583fdc3828
2023-08-11 00:49:58 +09:00
Takashi Kajinami
2741e73785 Disable MultiViews in apache vhost
MultiView is used to switch the content according to the type map.
However this feature is not really used by the wsgi application of
OpenStack services.

This removes the option because this is sometimes regarded as
a security concern.

Change-Id: I41a8b242e6dfa4061fa0dc6912bda72e892e3da1
2023-08-03 17:01:55 +09:00
Takashi Kajinami
d1c23f0fb4 replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

This also adds a few strict validations to the db classes based on
the validations implemented in the underlying resources.

Change-Id: I9e809415a532a694a50492a5600863d7d3d18a20
2023-07-25 13:55:26 +00:00
Benedikt Trefzer
a22990d4d5 add a separate datatype for servicedefault
Needed for non String types if they have a default
that points to facts['os_service_default'].
Otherwise we need to allow String for all parameters.

Since the function is_service_default checks the string,
I do not assume that the fact is overwritten in
any deployment !

Change-Id: Ic2b969f9b99d1748c80edb691f38f4451e499a80
2023-06-20 09:41:18 +09:00
Zuul
60f964b7a0 Merge "Revert "Replace Stdlib::Absolutepath by Stdlib::Compat::Absolute_path"" 2023-05-31 15:32:56 +00:00
Takashi Kajinami
b6478cb103 Revert "Replace Stdlib::Absolutepath by Stdlib::Compat::Absolute_path"
This reverts commit 0861e31cf9e3d4cb6022038f46caf3cdc5f83873.

Reason for revert:
Stdlib::Absolutepath has never been deprecated, but
Stdlib::Compat::Absolute_path was deprecated. The latest stdlib
removed all Stdlib::Compat::* types[1].

[1] fcbd4267fd

Change-Id: I560dbe312a5833f1d6705768bfbf79c06a9ce734
2023-05-31 03:39:34 +00:00
Zuul
804958c8c3 Merge "Remove support for Puppet 6" 2023-05-22 14:33:35 +00:00
Takashi Kajinami
873ab8dfd8 Remove support for Puppet 6
... because Puppet 6 reached its EOL in February 2023.

Change-Id: I3a733d20ccfadde8f2b691d57b3ace318224c3cd
2023-05-22 12:27:32 +09:00
Takashi Kajinami
524e5b0995 Bump upper version of puppetlabs-rabbitmq
... because now we use v13.0.0 in CI.

Change-Id: I6a198ed4cf7cbf7e673e8931a121dacb03655a96
2023-05-18 10:47:43 +09:00
Joel Capitao
0861e31cf9 Replace Stdlib::Absolutepath by Stdlib::Compat::Absolute_path
The Stdlib::Absolutepath which was deprecated 4 years ago is
now removed since [1]. We replace it by the
Stdlib::Compat::Absolute_path [2] data type which contains the
same functions "is_absolute_path" and "validate_absolute_path".

[1] https://github.com/puppetlabs/puppetlabs-stdlib/pull/1324
[2] https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/REFERENCE.md#Stdlib--Compat--Absolute_path

Change-Id: I57108b7e4a0525444dbbd36d6a9086e374a45539
2023-05-05 10:10:13 +02:00
Joel Capitao
e05c8e739b Replace stdlib hash function by the built-in Puppet one
The upstream patch [1] removed the hash stdlib function which was
deprecated since a while. We should now use the Puppet built-in
function Hash().

[1] https://github.com/puppetlabs/puppetlabs-stdlib/pull/1320

Change-Id: Id6e2b70cd1a4472caee324e94a674cfe24cd6a9e
2023-05-03 10:31:06 +02:00
Zuul
ba4ecaea82 Merge "Bump upper version of puppetlabs-apache" 2023-04-27 14:19:58 +00:00
Takashi Kajinami
16a496c6b0 Bump upper version of puppetlabs-apache
... because now we used v10.0.0 in our CI jobs.

Depends-on: https://review.opendev.org/881289
Change-Id: I60b3dc77957737b0a7ca1d5a5e5ae40d71a124a1
2023-04-25 11:29:27 +09:00
Takashi Kajinami
9a7cc37655 Bump upper version of puppetlabs-postgresql
... because now we have v9.0.0 used in our CI jobs.

Depends-on: https://review.opendev.org/881289
Change-Id: I3495c08303dfe8ac05547e39ea2d376676aef5f4
2023-04-25 11:28:42 +09:00
Takashi Kajinami
fde06c6426 Bump upper version of puppetlabs-mysql
... because now we are using v14.0.0 in CI jobs.

Depends-on: https://review.opendev.org/880699
Change-Id: I198da6fbb0d8bc9c200366b17f78db2edcf87cf9
2023-04-18 15:40:13 +09:00
Takashi Kajinami
f07650e88d Bump upper version of puppetlabs-inifile
... because now we use v6.0.0 in CI jobs.

Depends-on: https://review.opendev.org/880118
Change-Id: I6e82a0fa4e4fa63418c21257a9e36a76464f873b
2023-04-14 11:53:29 +09:00
98d111dde5 Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.

Sem-Ver: feature
Change-Id: Ia6e053a6d45db122b8bdeb5e08886ca3e454cedc
2023-04-05 15:34:41 +00:00
Takashi Kajinami
51c191ab4a Prepare 2023.1 release
Change-Id: I3236dae4aa42bfd8d285e052fb3e0de0f3421546
22.0.0
2023-03-23 21:35:37 +09:00
Takashi Kajinami
43a05b5446 Remove TripleO job
... because TripleO is being retired.

Change-Id: Ifc9bbd22c6291cf7691c07d1f457d6d9c7c891b4
2023-03-13 11:19:38 +09:00
Takashi Kajinami
a1dfd6861f Add strict validation about boolean parameters
This ensures the parameters used by if-else logic accept only boolean
values because non-boolean can result in unexpected behavior.

Change-Id: Ie9214b3324166a795b2d3aaf098852c8706bc8a0
2023-03-03 13:36:04 +09:00
Takashi Kajinami
62439012bd Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: If81712ed2129684d887668f6320e88a206fdad4b
2023-03-01 16:50:04 +09:00
Zuul
66dc9289fc Merge "Remove logic for CentOS < 9" 2023-02-23 23:23:46 +00:00
Takashi Kajinami
8cdf9a9e5d Bump upper version of puppetlabs-apache
... because now we are using 9.x in our testing and it is known to
work.

Change-Id: Ia8b7f075629edf329486882f0fec6333363bbad0
2023-02-15 16:57:13 +09:00