Files
puppet-nova/manifests/compute/pci.pp
Takashi Kajinami 502aec2406 Adapt to the new [pci] device_spec parameter
and replaces the deprecated [pci] passthrough_whitelist parameter.

Depends-on: https://review.opendev.org/c/openstack/nova/+/843834
Change-Id: Ia534d2acd8f5488b1358376bb5bd1f0f7302fbaa
2022-08-18 01:27:26 +09:00

35 lines
867 B
Puppet

# Class nova::compute::pci
#
# Configures nova compute pci options
#
# === Parameters:
#
# [*passthrough*]
# (optional) Pci passthrough list of hash.
# Defaults to $::os_service_default
# Example of format:
# [ { "vendor_id" => "1234","product_id" => "5678" },
# { "vendor_id" => "4321","product_id" => "8765", "physical_network" => "default" } ]
class nova::compute::pci(
$passthrough = $::os_service_default
) {
include nova::deps
if $passthrough and
!is_service_default($passthrough) and
!empty($passthrough) {
$passthrough_real = to_array_of_json_strings($passthrough)
} else {
$passthrough_real = $::os_service_default
}
nova_config {
'pci/device_spec': value => $passthrough_real;
}
# TODO(tkajinam): Remove this after Zed release.
nova_config {
'pci/passthrough_whitelist': ensure => absent;
}
}