charm-neutron-openvswitch/templates/kilo/neutron-openvswitch-networking-sriov
Nicolas Pochet d02fad482d
Replace SR-IOV systemd unit script
* The goal of this change is to enable the ability to configure only the
VFs that are configured through the charm and not fallback to the
blanket configuration.
* This python version of the script brings unit-tests that fully covers
it.
* Move the the template files to `files` and modify `neutron_ovs_utils`
accordingly.

Closes-Bug: 1832379
Depends-On: https://review.opendev.org/#/c/664837/

Change-Id: I7ad1ebc16883bda23cbad89a852e7e8f88f49c49
2019-06-28 17:37:51 +02:00

27 lines
721 B
Plaintext

# Set to 1 to configure Virtual Functions on system startup.
{% if enable_sriov -%}
ENABLE=1
{% else -%}
ENABLE=0
{% endif -%}
# Blanket configuration for number of Virtual Functions across all NICs
#
# Possible configurations:
# auto - Set sriov_numvfs to value of sriov_totalvfs for each interface
# N - Set sriov_numvfs on all interfaces to N or value of sriov_totalvfs
# if sriov_totalvfs is less than N for that interface
#
{% if sriov_vfs_blanket -%}
VFS_BLANKET={{ sriov_vfs_blanket }}
{% else -%}
VFS_BLANKET=auto
{% endif -%}
# List of <device>:<numvfs> tuples for configuration of specific NICs
#
#VFS_LIST="ens3p0:16 ens4p0:16"
{% if sriov_vfs_list -%}
VFS_LIST="{{ sriov_vfs_list }}"
{% endif -%}