sriov_vfs is undef by default in sriov_enable

During tests of version upgrade and patch applying it was observed that
FEC device is enabled considering the legacy contents of hieradata, and
this configuration does not contain (yet) the 'sriov_vfs' parameter.
However, the 'sriov_enable' resource has no default value for that pa-
rameter, causing the puppet manifest to fail.

This change sets the default value of 'sriov_vfs' to 'undef' for this
case when it is not found already in hieradata contents.

Closes-Bug: #1931458
Signed-off-by: Douglas Henrique Koerich <douglashenrique.koerich@windriver.com>
Change-Id: I50723f6c4e0de859b670378ff05beecda5d0a280
This commit is contained in:
Douglas Henrique Koerich 2021-09-09 16:04:30 -03:00
parent 6b64fc782a
commit 765cd43a1d

View File

@ -42,10 +42,10 @@ class platform::devices::qat (
define platform::devices::sriov_enable (
$num_vfs,
$sriov_vfs,
$addr,
$driver,
$device_id
$device_id,
$sriov_vfs = undef
) {
if ($driver == 'igb_uio') {
$vf_file = 'max_vfs'