Validate integer parameters
The following parameters accept only integers. This adds validation to enforce the proper type. - other_config:vlan-limit - other_config:n-revalidator-threads - other_config:n-handler-threads Change-Id: I359d6ef5eb24fe4d7cc1070aabc6ca5256d7f3b5
This commit is contained in:
@@ -127,6 +127,16 @@ class vswitch::dpdk (
|
||||
validate_legacy(Hash, 'validate_hash', $vs_config)
|
||||
validate_legacy(Boolean, 'validate_bool', $skip_restart)
|
||||
|
||||
if $vlan_limit != undef {
|
||||
validate_legacy(Integer, 'validate_integer', $vlan_limit)
|
||||
}
|
||||
if $revalidator_cores != undef {
|
||||
validate_legacy(Integer, 'validate_integer', $revalidator_cores)
|
||||
}
|
||||
if $handler_cores != undef {
|
||||
validate_legacy(Integer, 'validate_integer', $handler_cores)
|
||||
}
|
||||
|
||||
$restart = !$skip_restart
|
||||
|
||||
kmod::load { 'vfio-pci': }
|
||||
|
||||
@@ -51,6 +51,10 @@ class vswitch::ovs(
|
||||
validate_legacy(Hash, 'validate_hash', $vs_config)
|
||||
validate_legacy(Boolean, 'validate_bool', $skip_restart)
|
||||
|
||||
if $vlan_limit != undef {
|
||||
validate_legacy(Integer, 'validate_integer', $vlan_limit)
|
||||
}
|
||||
|
||||
$restart = !$skip_restart
|
||||
|
||||
if $enable_hw_offload {
|
||||
|
||||
Reference in New Issue
Block a user