diff --git a/manifests/plugins/ml2/arista/l3.pp b/manifests/plugins/ml2/arista/l3.pp index 7e06b6df9..81e738a28 100644 --- a/manifests/plugins/ml2/arista/l3.pp +++ b/manifests/plugins/ml2/arista/l3.pp @@ -64,12 +64,14 @@ class neutron::plugins::ml2::arista::l3( include neutron::deps require neutron::plugins::ml2 - if !is_service_default($mlag_config) { - validate_legacy(Boolean, 'validate_bool', $mlag_config) - if $mlag_config and is_service_default($secondary_l3_host) { - fail('Must set secondary_l3_host when mlag_config is true.') - } - } + # TODO(tkajinam): Reconsider how we implement this. We probably should allow + # more flexible values like 'on' supported by oslo.config. + # if !is_service_default($mlag_config) { + # validate_legacy(Boolean, 'validate_bool', $mlag_config) + # if $mlag_config and is_service_default($secondary_l3_host) { + # fail('Must set secondary_l3_host when mlag_config is true.') + # } + # } neutron_plugin_ml2 { 'l3_arista/primary_l3_host' : value => $primary_l3_host; diff --git a/manifests/server.pp b/manifests/server.pp index 0d14bb2f5..5ceac9347 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -282,12 +282,9 @@ class neutron::server ( include neutron::policy if !is_service_default($dhcp_load_type) { - validate_legacy(Enum['networks', 'subnets', 'ports'], 'validate_re', $dhcp_load_type, - [['^networks$', '^subnets$', '^ports$']]) - } - - if !is_service_default($service_providers) { - validate_legacy(Array, 'validate_array', $service_providers) + if ! ($dhcp_load_type in ['networks', 'subnets', 'ports'] ) { + fail('Unsupported dhcp_load_type. It should be one of networks, subnets and ports.') + } } if $ensure_vpnaas_package { diff --git a/manifests/services/l2gw.pp b/manifests/services/l2gw.pp index bdf5a8942..7b6059097 100644 --- a/manifests/services/l2gw.pp +++ b/manifests/services/l2gw.pp @@ -56,10 +56,6 @@ class neutron::services::l2gw ( include neutron::deps include neutron::params - if !is_service_default($service_providers) { - validate_legacy(Array, 'validate_array', $service_providers) - } - ensure_resource( 'package', 'python-networking-l2gw', { 'ensure' => $package_ensure, 'name' => $::neutron::params::l2gw_package, diff --git a/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb b/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb index 47191249c..704a9c15f 100644 --- a/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb +++ b/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb @@ -61,18 +61,6 @@ describe 'neutron::plugins::ml2::arista::l3' do should contain_neutron_plugin_ml2('l3_arista/conn_timeout').with_value(p[:conn_timeout]) should contain_neutron_plugin_ml2('l3_arista/use_vrf').with_value(p[:use_vrf]) end - - context 'with mlag enabled but secondary l3 host missing' do - before :each do - params.merge!({ - :mlag_config => true - }) - end - - it 'should fail' do - should raise_error(Puppet::Error, /Must set secondary_l3_host when mlag_config is true./) - end - end end on_supported_os({