Commit Graph

14 Commits

Author SHA1 Message Date
Takashi Kajinami 95141e1806 Remove unused base provider class
The Puppet::Provider::Gnocchi class has never been used.

Change-Id: I5ab5759bd920d7b0160ece2b0d19b51e34207435
2023-11-21 23:12:55 +09:00
Takashi Kajinami 4ef5d0de45 Switch provider to manage paste.ini file
... so that we users can use '<SERVICE DEFAULT>' similarly to
the resource types to manage the <service>.conf files.

Closes-Bug: #1981118
Change-Id: Iefc9b16662603fd8fc410c9080cb13b603bd4cf5
2022-07-09 10:05:00 +00:00
Takashi Kajinami aca4626cb2 Allow customizing separator for api-paste.ini
The api-paste.ini accepts not only "=" but also ":" and some services
like Barbican have been using ":" for their default api-paste.ini
files.

[composite:main]
use = egg:Paste#urlmap
/: barbican_version
/v1: barbican-api-keystone

This change allows users to use ":" so that they can update the ini
files with keeping it consistent with the default fules

Depends-on: https://review.opendev.org/813614
Change-Id: Ibde258e605c827ef042ae7f4c32db15c816fd038
2021-10-15 12:00:29 +09:00
Takashi Kajinami f41c7d8e78 Add support for MultiStrOpt
This replaces the provider implementation of gnocchi_config type so
that MultiStrOpt, which is used by several options like
 - oslo_policy/policy_dirs
are handled correctly.

Change-Id: I6a99bd57ad8e3713e824e4394b6fc2125167a768
2021-07-13 18:02:47 +09:00
Thomas Goirand e986276b77 Debian api_uwsgi_config: Switch to :ini_setting
On each puppet run, I'm seeing:
value changed ['12'] to '12' (corrective)

Therefore, this patch switches from :openstackconfig to :ini_setting
to make the 2nd run not changing anything.

Change-Id: Ib674673edec143841aa88d754ea2e9b0cb13be1a
2021-04-22 15:19:42 +02:00
Thomas Goirand 8dcef88edb Add support for gnocchi_api_uwsgi_config in Debian
This patch is adding the configuration of the number of workers,
threads, and the size of the listen queue in Debian, which uses
uwsgi to run Gnocchi API. Therefore, this patch adds a new
gnocchi_api_uwsgi_config providers as well as a new
gnocchi::wsgi::uwsgi_api class.

Change-Id: Iea9a674be86902be46fdc124e6d0ecf0c1ec8961
2021-04-12 23:13:34 +02:00
Takashi Kajinami f8ff0d98b4 Use anchor to require necessary packages
... so that correct packages are required without re-defining them in
resource implementations.

Change-Id: I6ff6b8c77a37c85cb7b80d7b9b7dba78e9aa6668
2020-05-04 01:44:36 +09:00
Matthias Bastian 9c96f348b4 Make providers use auth_url for authentication
When reading credentials from the configuration's keystone_authtoken
section www_authenticate_uri was used as URL for Keystone.
As www_authenticate_uri is a public endpoint that is not necessarily
reachable for the Puppet agent, this change uses the more appropriate
auth_url as Keystone URL.

Change-Id: I9b2e85842fb9a6ec75158bc612b47a4b64f169f9
2018-08-03 11:52:06 +02:00
ZhongShengping 5526cda66f Deprecate auth_uri option
Option auth_uri from group keystone_authtoken is deprecated[1].
Use option www_authenticate_uri from group keystone_authtoken.

[1]https://review.openstack.org/#/c/508522/

Change-Id: Ie5ea4578879fc8aa21bb27e228b1eea52200cdb7
Depends-On: I4c82a63baabd6b9304b302c97cd751a0103d8316
Closes-Bug: #1759098
2018-04-05 10:04:32 +08:00
Matthew J. Black c79055bf22 Keystone authoken resource change
Create a new class to handle the keystone authtoken configuration
utilizing the keystone::resource::authtoken resource.

Some deprecations:
 - gnocchi::api::keystone_user is deprecated in favor of
   gnocchi::keystone::authtoken::username.
 - gnocchi::api::keystone_password is deprecated in favor of
   gnocchi::keystone::authtoken::password.
 - gnocchi::api::keystone_tenant is deprecated in favor of
   gnocchi::keystone::authtoken::project_name
 - gnocchi::api::keystone_identity_uri is deprecated in favor of
   gnocchi::keystone::authtoken::auth_url.
 - gnocchi::api::keystone_auth_uri is deprecated in favor of
   gnocchi::keystone::authtoken::auth_uri

Change-Id: I7be1c8f471472e74642e25508c6871d0f948d75b
Related-Bug: #1604463
2016-08-12 15:49:22 -03:00
Emilien Macchi 08c4a1de23 Add api_paste type/provider for Gnocchi
Add gnocchi_api_paste_ini type/provider for Gnocchi.
Also add the capability to configure api-paste.ini with config.pp.
Closes-bug: #1483371

Change-Id: Iae097c5cee3f43c5fb801550c9d038ccb652a1b5
2016-01-28 14:05:27 -05:00
Yanis Guenane eb5fe69efb Reflect provider change in puppet-openstacklib
With the creation of the new openstack_config provider, some processing
that was done in gnocchi_config has been centralized in
openstack_config.

Impacted methods are :

  * section
  * setting
  * separator

Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.

The use case is the following :

gnocchi_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual

gnocchi_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent

That means that all the current :

if $myvar {
  gnocchi_config { 'DEFAULT/foo' : value => $myvar }
} else {
  gnocchi_config { 'DEFAULT/foo' : ensure => absent }
}

can be removed in favor of :

gnocchi_config { 'DEFAULT/foo' : value => $myvar }

If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :

gnocchi_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }

Change-Id: Ie8dce6e9d4c1027bd1f7d8653a4fa6fe28b696d9
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
2015-08-19 11:00:21 +02:00
Yanis Guenane 46925dd147 Rely on autorequire for config resource ordering
Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.

Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.

Change-Id: I3b0df55fa4d827934185f8e213ad89d360fb56a0
2015-08-12 19:00:38 +02:00
Emilien Macchi 54b3b8487a Import first type & provider for gnocchi_config
gnocchi_config will be used to configure /etc/gnocchi/gnocchi.conf file.
2014-12-29 13:48:56 +01:00