Prepare for voxpupuli-puppet-lint-plugins

Fix new lint errors detected when full of the voxpupili lint plugins
are enabled.

Change-Id: If7634f12d8cd965784791f60515e8b16532ec1e3
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-08-19 21:56:02 +09:00
parent e4a4348d01
commit c46b0710a6
4 changed files with 8 additions and 14 deletions

View File

@@ -125,7 +125,6 @@ class vswitch::dpdk (
Hash $vs_config = {}, Hash $vs_config = {},
Boolean $skip_restart = false, Boolean $skip_restart = false,
) { ) {
$restart = !$skip_restart $restart = !$skip_restart
kmod::load { 'vfio-pci': } kmod::load { 'vfio-pci': }
@@ -147,12 +146,12 @@ class vswitch::dpdk (
$dpdk_configs = { $dpdk_configs = {
'other_config:dpdk-extra' => { value => $memory_channels_conf, restart => $restart }, 'other_config:dpdk-extra' => { value => $memory_channels_conf, restart => $restart },
'other_config:dpdk-socket-mem' => { value => join(any2array($socket_mem), ','), restart => $restart}, 'other_config:dpdk-socket-mem' => { value => join(any2array($socket_mem), ','), restart => $restart },
'other_config:dpdk-socket-limit' => { value => join(any2array($socket_limit), ','), restart => $restart}, 'other_config:dpdk-socket-limit' => { value => join(any2array($socket_limit), ','), restart => $restart },
'other_config:dpdk-lcore-mask' => { value => $dpdk_lcore_mask, restart => $restart}, 'other_config:dpdk-lcore-mask' => { value => $dpdk_lcore_mask, restart => $restart },
'other_config:pmd-cpu-mask' => { value => $pmd_core_mask, restart => $restart}, 'other_config:pmd-cpu-mask' => { value => $pmd_core_mask, restart => $restart },
'other_config:n-revalidator-threads' => { value => $revalidator_cores}, 'other_config:n-revalidator-threads' => { value => $revalidator_cores },
'other_config:n-handler-threads' => { value => $handler_cores}, 'other_config:n-handler-threads' => { value => $handler_cores },
} }
$dpdk_dependencies = { $dpdk_dependencies = {
@@ -258,7 +257,6 @@ class vswitch::dpdk (
wait => false, wait => false,
} }
} }
} else { } else {
vs_config { vs_config {
'other_config:pmd-auto-lb': ensure => absent, wait => false; 'other_config:pmd-auto-lb': ensure => absent, wait => false;
@@ -291,5 +289,4 @@ class vswitch::dpdk (
create_resources('vs_config', $dpdk_configs, $dpdk_dependencies) create_resources('vs_config', $dpdk_configs, $dpdk_dependencies)
create_resources('vs_config', $vs_config) create_resources('vs_config', $vs_config)
} }

View File

@@ -42,7 +42,7 @@
# immedicate network distuption caused by restarting the ovs daemon. # immedicate network distuption caused by restarting the ovs daemon.
# Defaults to false. # Defaults to false.
# #
class vswitch::ovs( class vswitch::ovs (
String[1] $package_name, String[1] $package_name,
String[1] $service_name, String[1] $service_name,
String $package_ensure = 'present', String $package_ensure = 'present',
@@ -52,7 +52,6 @@ class vswitch::ovs(
Hash $vs_config = {}, Hash $vs_config = {},
Boolean $skip_restart = false, Boolean $skip_restart = false,
) { ) {
$restart = !$skip_restart $restart = !$skip_restart
if $enable_hw_offload { if $enable_hw_offload {

View File

@@ -3,7 +3,6 @@
# Initialize CA authority # Initialize CA authority
# #
class vswitch::pki::cacert { class vswitch::pki::cacert {
exec { 'ovs-pki-init-ca-authority': exec { 'ovs-pki-init-ca-authority':
command => ['ovs-pki', 'init', '--force'], command => ['ovs-pki', 'init', '--force'],
creates => '/var/lib/openvswitch/pki/switchca', creates => '/var/lib/openvswitch/pki/switchca',

View File

@@ -8,10 +8,9 @@
# (Optional) The directory in which the cert files are generated. # (Optional) The directory in which the cert files are generated.
# Defaults to '/etc/openvswitch' # Defaults to '/etc/openvswitch'
# #
define vswitch::pki::cert( define vswitch::pki::cert (
Stdlib::Absolutepath $cert_dir = '/etc/openvswitch', Stdlib::Absolutepath $cert_dir = '/etc/openvswitch',
) { ) {
exec { "ovs-req-and-sign-cert-${name}": exec { "ovs-req-and-sign-cert-${name}":
command => ['ovs-pki', 'req+sign', $name], command => ['ovs-pki', 'req+sign', $name],
cwd => $cert_dir, cwd => $cert_dir,