Warn instead of fail with wrong type_driver

Some of us are using custom type_drivers. Puppet code should allow
unexpected values for type_drivers.

Change-Id: I4a308ad379dee61260e3d27da2da00d7fce14e56
Signed-off-by: Arnaud Morin <arnaud.morin@corp.ovh.com>
This commit is contained in:
Arnaud Morin 2017-05-23 11:12:37 +02:00
parent 0440533a3a
commit 4950563c8d
2 changed files with 2 additions and 3 deletions

View File

@ -130,6 +130,6 @@ define neutron::plugins::ml2::type_driver (
}
else {
# detect an invalid type_drivers value
fail('type_driver unknown.')
warning('type_driver unknown.')
}
}

View File

@ -154,10 +154,9 @@ describe 'neutron::plugins::ml2' do
context 'configure ml2 with bad driver value' do
before :each do
scope.expects(:warning).with('type_driver unknown.')
params.merge!(:type_drivers => ['foobar'])
end
it_raises 'a Puppet::Error', /type_driver unknown./
end
context 'when using flat driver' do