Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

deprecations warnings removed #331

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions manifests/interface.pp
Original file line number Diff line number Diff line change
Expand Up @@ -504,23 +504,24 @@

include ::network

validate_re($ensure, '^(present|absent)$', "Ensure can only be present or absent (to add or remove an interface). Current value: ${ensure}")
validate_bool($auto)
validate_bool($enable)
validate_bool($restart_all_nic)

validate_array($up)
validate_array($pre_up)
validate_array($down)
validate_array($pre_down)
validate_array($slaves)
validate_array($bond_slaves)
validate_array($bridge_ports)
validate_array($wpa_key_mgmt)
validate_array($wpa_group)
validate_array($wpa_pairwise)
validate_array($wpa_auth_alg)
validate_array($wpa_proto)
validate_legacy(Enum['present', 'absent'], 'validate_re', $ensure, [['^present$', '^absent$'], "Ensure can only be present or absent (to add or remove an interface). Current value: ${ensure}"])

validate_legacy(Boolean, 'validate_bool',$auto)
validate_legacy(Boolean, 'validate_bool',$enable)
validate_legacy(Boolean, 'validate_bool',$restart_all_nic)

validate_legacy(Array, 'validate_array', $up)
validate_legacy(Array, 'validate_array', $pre_up)
validate_legacy(Array, 'validate_array', $down)
validate_legacy(Array, 'validate_array', $pre_down)
validate_legacy(Array, 'validate_array', $slaves)
validate_legacy(Array, 'validate_array', $bond_slaves)
validate_legacy(Array, 'validate_array', $bridge_ports)
validate_legacy(Array, 'validate_array', $wpa_key_mgmt)
validate_legacy(Array, 'validate_array', $wpa_group)
validate_legacy(Array, 'validate_array', $wpa_pairwise)
validate_legacy(Array, 'validate_array', $wpa_auth_alg)
validate_legacy(Array, 'validate_array', $wpa_proto)

# $subchannels is only valid for zLinux/SystemZ/s390x.
if $::architecture == 's390x' {
Expand Down