Support [os_brick] options
Cinder now supports configuration os-brick specific lock_path. This adds the new class to manage the [os_brick] option. Depends-on: https://review.opendev.org/849325 Depends-on: https://review.opendev.org/865771 Change-Id: I72a1cf7b982e96665b1d05170da223ebc4148281
This commit is contained in:
parent
3a63b7145b
commit
7ff34516ee
18
manifests/os_brick.pp
Normal file
18
manifests/os_brick.pp
Normal file
@ -0,0 +1,18 @@
|
||||
# == Class: cinder::os_brick
|
||||
#
|
||||
# Configure os_brick options
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*lock_path*]
|
||||
# (Optional) Directory to use for os-brick lock files.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class cinder::os_brick(
|
||||
$lock_path = $::os_service_default,
|
||||
) {
|
||||
|
||||
oslo::os_brick { 'cinder_config':
|
||||
lock_path => $lock_path
|
||||
}
|
||||
}
|
5
releasenotes/notes/os_brick-cbe9075c663bb2a8.yaml
Normal file
5
releasenotes/notes/os_brick-cbe9075c663bb2a8.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``cinder::os_brick`` class has been added. This class manages
|
||||
the ``[os_brick]`` options.
|
41
spec/classes/cinder_os_brick_spec.rb
Normal file
41
spec/classes/cinder_os_brick_spec.rb
Normal file
@ -0,0 +1,41 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cinder::os_brick' do
|
||||
|
||||
shared_examples 'cinder::os_brick' do
|
||||
|
||||
context 'with defaults' do
|
||||
it 'configures the default values' do
|
||||
is_expected.to contain_oslo__os_brick('cinder_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('cinder_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 'cinder::os_brick'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user