Support [os_brick] lock_path
Recent os-brick supports supports configuration os-brick specific lock_path. This adds the new class to manage the [os_brick] lock_path option. Depends-on: https://review.opendev.org/865771 Change-Id: Ib3b914b83bb61de1592553f7b43d0eace7c26903
This commit is contained in:
parent
3f705c3921
commit
5218e2ff86
18
manifests/os_brick.pp
Normal file
18
manifests/os_brick.pp
Normal 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
|
||||
}
|
||||
}
|
5
releasenotes/notes/os_brick-d7164dfcb0319654.yaml
Normal file
5
releasenotes/notes/os_brick-d7164dfcb0319654.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``nova::os_brick`` class has been added. This class manages
|
||||
the ``[os_brick]`` options.
|
41
spec/classes/nova_os_brick_spec.rb
Normal file
41
spec/classes/nova_os_brick_spec.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user