Merge "Fix nova device_spec to support multiple values"
This commit is contained in:
commit
bfa8e12fcc
@ -599,11 +599,10 @@ nova_api_os_compute_uwsgi_ini_overrides: {}
|
|||||||
nova_enabled_mdev_types: "{{ nova_enabled_vgpu_types | default({}) }}"
|
nova_enabled_mdev_types: "{{ nova_enabled_vgpu_types | default({}) }}"
|
||||||
|
|
||||||
# PCI devices passthrough to nova
|
# PCI devices passthrough to nova
|
||||||
# For SR-IOV please use:
|
# Example:
|
||||||
# nova_device_spec: '{ "physical_network": "<ml2 network name>", "devname": "<physical nic>" }'
|
# nova_device_spec:
|
||||||
# Example:
|
# - '{ "physical_network": "physnet1", "devname": "p1p1" }'
|
||||||
# nova_device_spec: '{ "physical_network": "physnet1", "devname": "p1p1" }'
|
nova_device_spec: "{{ nova_pci_passthrough_whitelist | default([]) }}"
|
||||||
nova_device_spec: "{{ nova_pci_passthrough_whitelist | default({}) }}"
|
|
||||||
|
|
||||||
# PCI alias,
|
# PCI alias,
|
||||||
# Example:
|
# Example:
|
||||||
|
@ -341,8 +341,14 @@ device_addresses = {{ (record.address is string) | ternary(record.address, recor
|
|||||||
{% if nova_device_spec or nova_pci_alias %}
|
{% if nova_device_spec or nova_pci_alias %}
|
||||||
[pci]
|
[pci]
|
||||||
{% if nova_device_spec %}
|
{% if nova_device_spec %}
|
||||||
# White list of PCI devices available to VMs.
|
# PCI devices available to VMs
|
||||||
|
{% if nova_device_spec is mapping %}
|
||||||
device_spec = {{ nova_device_spec }}
|
device_spec = {{ nova_device_spec }}
|
||||||
|
{% else %}
|
||||||
|
{% for item in nova_device_spec %}
|
||||||
|
device_spec = {{ item }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if nova_pci_alias %}
|
{% if nova_pci_alias %}
|
||||||
# PCI Alias
|
# PCI Alias
|
||||||
|
Loading…
Reference in New Issue
Block a user