From 51b49ea18f698ee83f8acde4913998c82920559c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 26 Oct 2024 21:52:57 +0900 Subject: [PATCH] Add support for [task_flow] jobboard_redis_backend_db ... which was added during the Epoxy cycle. Depends-on: https://review.opendev.org/923702 Change-Id: Ib7bcf34cb74135f5ff5f9ad8ba77d707e493f24a --- manifests/task_flow.pp | 6 ++++++ .../notes/jobboard_redis_backend_db-f80010244e87b2c9.yaml | 5 +++++ spec/classes/octavia_task_flow_spec.rb | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/jobboard_redis_backend_db-f80010244e87b2c9.yaml diff --git a/manifests/task_flow.pp b/manifests/task_flow.pp index 0adfdc6c..37bf724c 100644 --- a/manifests/task_flow.pp +++ b/manifests/task_flow.pp @@ -45,6 +45,10 @@ # (optional) The name used for the job id on the backend server. # Defaults to $facts['os_service_default'] # +# [*jobboard_redis_backend_db*] +# (optional) Database ID in redis server. +# Defaults to $facts['os_service_default'] +# # [*jobboard_redis_sentinel*] # (optional) Sentinel name if it is used for Redis. # Defaults to $facts['os_service_default'] @@ -100,6 +104,7 @@ class octavia::task_flow ( $jobboard_backend_username = $facts['os_service_default'], $jobboard_backend_password = $facts['os_service_default'], $jobboard_backend_namespace = $facts['os_service_default'], + $jobboard_redis_backend_db = $facts['os_service_default'], $jobboard_redis_sentinel = $facts['os_service_default'], $jobboard_redis_sentinel_username = $facts['os_service_default'], $jobboard_redis_sentinel_password = $facts['os_service_default'], @@ -173,6 +178,7 @@ class octavia::task_flow ( 'task_flow/jobboard_backend_username' : value => $jobboard_backend_username; 'task_flow/jobboard_backend_password' : value => $jobboard_backend_password, secret => true; 'task_flow/jobboard_backend_namespace' : value => $jobboard_backend_namespace; + 'task_flow/jobboard_redis_backend_db' : value => $jobboard_redis_backend_db; 'task_flow/jobboard_redis_sentinel' : value => $jobboard_redis_sentinel; 'task_flow/jobboard_redis_sentinel_username' : value => $jobboard_redis_sentinel_username; 'task_flow/jobboard_redis_sentinel_password' : value => $jobboard_redis_sentinel_password, secret => true; diff --git a/releasenotes/notes/jobboard_redis_backend_db-f80010244e87b2c9.yaml b/releasenotes/notes/jobboard_redis_backend_db-f80010244e87b2c9.yaml new file mode 100644 index 00000000..98554af3 --- /dev/null +++ b/releasenotes/notes/jobboard_redis_backend_db-f80010244e87b2c9.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``octavia::task_flow::jobboard_redis_backend_db`` parameter has + been added. diff --git a/spec/classes/octavia_task_flow_spec.rb b/spec/classes/octavia_task_flow_spec.rb index c7a4a5dc..ba1f7db5 100644 --- a/spec/classes/octavia_task_flow_spec.rb +++ b/spec/classes/octavia_task_flow_spec.rb @@ -14,6 +14,7 @@ describe 'octavia::task_flow' do should contain_octavia_config('task_flow/jobboard_backend_username').with_value('') should contain_octavia_config('task_flow/jobboard_backend_password').with_value('').with_secret(true) should contain_octavia_config('task_flow/jobboard_backend_namespace').with_value('') + should contain_octavia_config('task_flow/jobboard_redis_backend_db').with_value('') should contain_octavia_config('task_flow/jobboard_redis_sentinel').with_value('') should contain_octavia_config('task_flow/jobboard_redis_sentinel_username').with_value('') should contain_octavia_config('task_flow/jobboard_redis_sentinel_password').with_value('').with_secret(true) @@ -51,6 +52,7 @@ describe 'octavia::task_flow' do :jobboard_backend_username => 'user', :jobboard_backend_password => 'secret', :jobboard_backend_namespace => 'octavia_jobboard', + :jobboard_redis_backend_db => 0, :jobboard_redis_sentinel => 'sentinel', :jobboard_redis_sentinel_username => 'sentinel_user', :jobboard_redis_sentinel_password => 'sentinel_secret', @@ -74,6 +76,7 @@ describe 'octavia::task_flow' do should contain_octavia_config('task_flow/jobboard_backend_username').with_value('user') should contain_octavia_config('task_flow/jobboard_backend_password').with_value('secret').with_secret(true) should contain_octavia_config('task_flow/jobboard_backend_namespace').with_value('octavia_jobboard') + should contain_octavia_config('task_flow/jobboard_redis_backend_db').with_value(0) should contain_octavia_config('task_flow/jobboard_redis_sentinel').with_value('sentinel') should contain_octavia_config('task_flow/jobboard_redis_sentinel_username').with_value('sentinel_user') should contain_octavia_config('task_flow/jobboard_redis_sentinel_password').with_value('sentinel_secret').with_secret(true)