diff --git a/defaults/main.yml b/defaults/main.yml index 525d7004..aaf6a065 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -591,10 +591,11 @@ nova_enabled_mdev_types: "{{ nova_enabled_vgpu_types | default({}) }}" # PCI devices passthrough to nova # For SR-IOV please use: -# nova_pci_passthrough_whitelist: '{ "physical_network": "", "devname": "" }' +# nova_device_spec: '{ "physical_network": "", "devname": "" }' # Example: -# nova_pci_passthrough_whitelist: '{ "physical_network": "physnet1", "devname": "p1p1" }' -nova_pci_passthrough_whitelist: {} +# nova_device_spec: '{ "physical_network": "physnet1", "devname": "p1p1" }' +nova_device_spec: "{{ nova_pci_passthrough_whitelist | default({}) }}" + # PCI alias, # Example: # nova_pci_alias: diff --git a/releasenotes/notes/nova_device_spec-0175a30b2295b768.yaml b/releasenotes/notes/nova_device_spec-0175a30b2295b768.yaml new file mode 100644 index 00000000..ffa93fab --- /dev/null +++ b/releasenotes/notes/nova_device_spec-0175a30b2295b768.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - | + `nova_pci_passthrough_whitelist` is now deprecated in favor of `nova_device_spec`. diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index 3ccd5786..62f6b999 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -330,11 +330,11 @@ device_addresses = {{ (record.address is string) | ternary(record.address, recor {% endfor %} {% endif %} -{% if nova_pci_passthrough_whitelist or nova_pci_alias %} +{% if nova_device_spec or nova_pci_alias %} [pci] -{% if nova_pci_passthrough_whitelist %} +{% if nova_device_spec %} # White list of PCI devices available to VMs. -passthrough_whitelist = {{ nova_pci_passthrough_whitelist }} +device_spec = {{ nova_device_spec }} {% endif %} {% if nova_pci_alias %} # PCI Alias