From b590388a090d21cef4f5393a700c2cabf5125390 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 2 Oct 2025 14:37:46 +0900 Subject: [PATCH] coordination: Expose parameters for package management Change-Id: Ib5742116b15a1b7b170bbda75c9470a5e6429944 Signed-off-by: Takashi Kajinami --- manifests/coordination.pp | 16 ++++++++++++++-- ...dination-package-params-75e1b589d207f74e.yaml | 8 ++++++++ spec/classes/cinder_coordination_spec.rb | 12 +++++++++--- 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/coordination-package-params-75e1b589d207f74e.yaml diff --git a/manifests/coordination.pp b/manifests/coordination.pp index 994fd2fe..8d3a044d 100644 --- a/manifests/coordination.pp +++ b/manifests/coordination.pp @@ -8,13 +8,25 @@ # (Optional) Coordination backend URL. # Defaults to $facts['os_service_default'] # +# [*manage_backend_package*] +# (Optional) Whether to install the backend package. +# Defaults to true. +# +# [*package_ensure*] +# (Optional) ensure state for package. +# Defaults to 'present' +# class cinder::coordination ( - $backend_url = $facts['os_service_default'], + $backend_url = $facts['os_service_default'], + Boolean $manage_backend_package = true, + Stdlib::Ensure::Package $package_ensure = present, ) { include cinder::deps oslo::coordination { 'cinder_config': - backend_url => $backend_url, + backend_url => $backend_url, + manage_backend_package => $manage_backend_package, + package_ensure => $package_ensure, } # all coordination settings should be applied and all packages should be diff --git a/releasenotes/notes/coordination-package-params-75e1b589d207f74e.yaml b/releasenotes/notes/coordination-package-params-75e1b589d207f74e.yaml new file mode 100644 index 00000000..de2ee91f --- /dev/null +++ b/releasenotes/notes/coordination-package-params-75e1b589d207f74e.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + The following parameters have been added to the ``cinder::coordination`` + class. + + - ``manage_backend_package`` + - ``package_ensure`` diff --git a/spec/classes/cinder_coordination_spec.rb b/spec/classes/cinder_coordination_spec.rb index 25e0c039..4c2d7671 100644 --- a/spec/classes/cinder_coordination_spec.rb +++ b/spec/classes/cinder_coordination_spec.rb @@ -5,7 +5,9 @@ describe 'cinder::coordination' do context 'with default parameters' do it { is_expected.to contain_oslo__coordination('cinder_config').with( - :backend_url => '' + :backend_url => '', + :manage_backend_package => true, + :package_ensure => 'present', ) } end @@ -13,13 +15,17 @@ describe 'cinder::coordination' do context 'with specified parameters' do let :params do { - :backend_url => 'etcd3+http://127.0.0.1:2379', + :backend_url => 'etcd3+http://127.0.0.1:2379', + :manage_backend_package => false, + :package_ensure => 'latest', } end it { is_expected.to contain_oslo__coordination('cinder_config').with( - :backend_url => 'etcd3+http://127.0.0.1:2379' + :backend_url => 'etcd3+http://127.0.0.1:2379', + :manage_backend_package => false, + :package_ensure => 'latest', ) } end