Merge "Allow to provide mdev addresses as list"
This commit is contained in:
commit
e9f3c79832
@ -529,9 +529,11 @@ nova_api_os_compute_uwsgi_ini_overrides: {}
|
||||
# Example 2:
|
||||
# nova_enabled_mdev_types:
|
||||
# - type: nvidia-35
|
||||
# address: <device address>
|
||||
# address: "<device address.0>,<device address.1>"
|
||||
# - type: nvidia-36
|
||||
# address: <another device address>
|
||||
# address:
|
||||
# - "<another device address.0>"
|
||||
# - "<another device address.1>"
|
||||
nova_enabled_mdev_types: "{{ nova_enabled_vgpu_types | default({}) }}"
|
||||
|
||||
# PCI devices passthrough to nova
|
||||
|
@ -307,7 +307,7 @@ enabled_mdev_types = {{ nova_enabled_mdev_types | map(attribute='type') | list |
|
||||
|
||||
{% for record in nova_enabled_mdev_types | selectattr('address', 'defined') | list %}
|
||||
[mdev_{{ record.type }}]
|
||||
device_addresses = {{ record.address }}
|
||||
device_addresses = {{ (record.address is string) | ternary(record.address, record.address | join(',')) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user