Merge "Support [os-brick] wait_mpath_device_* options"
This commit is contained in:
commit
892520295e
@ -8,12 +8,25 @@
|
|||||||
# (Optional) Directory to use for os-brick lock files.
|
# (Optional) Directory to use for os-brick lock files.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*wait_mpath_device_attempts*]
|
||||||
|
# (Optional) Number of attempts for the multipath device to be ready for I/O
|
||||||
|
# after it was created.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
|
# [*wait_mpath_device_interval*]
|
||||||
|
# (Optional) Interval value to wait for multipath device to be ready for I/O.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
define oslo::os_brick(
|
define oslo::os_brick(
|
||||||
$lock_path = $facts['os_service_default'],
|
$lock_path = $facts['os_service_default'],
|
||||||
|
$wait_mpath_device_attempts = $facts['os_service_default'],
|
||||||
|
$wait_mpath_device_interval = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$os_brick_options = {
|
$os_brick_options = {
|
||||||
'os_brick/lock_path' => { value => $lock_path },
|
'os_brick/lock_path' => { value => $lock_path },
|
||||||
|
'os_brick/wait_mpath_device_attempts' => { value => $wait_mpath_device_attempts },
|
||||||
|
'os_brick/wait_mpath_device_interval' => { value => $wait_mpath_device_interval },
|
||||||
}
|
}
|
||||||
create_resources($name, $os_brick_options)
|
create_resources($name, $os_brick_options)
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The following parameters have been added to the ``oslo::os_brick`` defined
|
||||||
|
resource type.
|
||||||
|
|
||||||
|
- ``wait_mpath_device_attempts``
|
||||||
|
- ``wait_mpath_device_interval``
|
@ -9,18 +9,24 @@ describe 'oslo::os_brick' do
|
|||||||
context 'with defaults' do
|
context 'with defaults' do
|
||||||
it 'configures the default values' do
|
it 'configures the default values' do
|
||||||
is_expected.to contain_keystone_config('os_brick/lock_path').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('os_brick/lock_path').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_keystone_config('os_brick/wait_mpath_device_attempts').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_keystone_config('os_brick/wait_mpath_device_interval').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with parameters overridden' do
|
context 'with parameters overridden' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:lock_path => '/var/lib/openstack/lock'
|
:lock_path => '/var/lib/openstack/lock',
|
||||||
|
:wait_mpath_device_attempts => 4,
|
||||||
|
:wait_mpath_device_interval => 1,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures the overridden values' do
|
it 'configures the overridden values' do
|
||||||
is_expected.to contain_keystone_config('os_brick/lock_path').with_value('/var/lib/openstack/lock')
|
is_expected.to contain_keystone_config('os_brick/lock_path').with_value('/var/lib/openstack/lock')
|
||||||
|
is_expected.to contain_keystone_config('os_brick/wait_mpath_device_attempts').with_value(4)
|
||||||
|
is_expected.to contain_keystone_config('os_brick/wait_mpath_device_interval').with_value(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user