add a separate datatype for servicedefault
Needed for non String types if they have a default that points to facts['os_service_default']. Otherwise we need to allow String for all parameters. Since the function is_service_default checks the string, I do not assume that the fact is overwritten in any deployment ! Change-Id: Ic2b969f9b99d1748c80edb691f38f4451e499a80
This commit is contained in:
parent
60f964b7a0
commit
a22990d4d5
33
spec/type_aliases/servicedefault_spec.rb
Normal file
33
spec/type_aliases/servicedefault_spec.rb
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'Openstacklib::ServiceDefault' do
|
||||||
|
describe 'valid types' do
|
||||||
|
context 'with valid types' do
|
||||||
|
[
|
||||||
|
'<SERVICE DEFAULT>',
|
||||||
|
].each do |value|
|
||||||
|
describe value.inspect do
|
||||||
|
it { is_expected.to allow_value(value) }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe 'invalid types' do
|
||||||
|
context 'with garbage inputs' do
|
||||||
|
[
|
||||||
|
'somethink',
|
||||||
|
true,
|
||||||
|
nil,
|
||||||
|
{},
|
||||||
|
'',
|
||||||
|
55555,
|
||||||
|
].each do |value|
|
||||||
|
describe value.inspect do
|
||||||
|
it { is_expected.not_to allow_value(value) }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
1
types/servicedefault.pp
Normal file
1
types/servicedefault.pp
Normal file
@ -0,0 +1 @@
|
|||||||
|
type Openstacklib::ServiceDefault = Enum['<SERVICE DEFAULT>']
|
Loading…
Reference in New Issue
Block a user