Merge "Support [os_brick] lock_path"

This commit is contained in:
Zuul 2024-09-30 08:40:53 +00:00 committed by Gerrit Code Review
commit ce01a41d2f
3 changed files with 64 additions and 0 deletions

18
manifests/os_brick.pp Normal file
View File

@ -0,0 +1,18 @@
# == Class: nova::os_brick
#
# Configure os_brick options
#
# === Parameters:
#
# [*lock_path*]
# (Optional) Directory to use for os-brick lock files.
# Defaults to $facts['os_service_default']
#
class nova::os_brick(
$lock_path = $facts['os_service_default'],
) {
oslo::os_brick { 'nova_config':
lock_path => $lock_path
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``nova::os_brick`` class has been added. This class manages
the ``[os_brick]`` options.

View File

@ -0,0 +1,41 @@
require 'spec_helper'
describe 'nova::os_brick' do
shared_examples 'nova::os_brick' do
context 'with defaults' do
it 'configures the default values' do
is_expected.to contain_oslo__os_brick('nova_config').with(
:lock_path => '<SERVICE DEFAULT>',
)
end
end
context 'with parameters overridden' do
let :params do
{
:lock_path => '/var/lib/openstack/lock'
}
end
it 'configures the overridden values' do
is_expected.to contain_oslo__os_brick('nova_config').with(
:lock_path => '/var/lib/openstack/lock',
)
end
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
include_examples 'nova::os_brick'
end
end
end