Prepare config.json for SRIOV DP v3.0.0+
[ta/infra-ansible.git] / roles / sriovdp_config / templates / sriovdp_config.yaml.j2
1 resourceList:
2 {% for nprof in network_profiles %}
3 {%   if nprof in hosts[ansible_hostname].network_profiles %}
4 {%     if network_profiles[nprof].sriov_provider_networks is defined %}
5 {%       for pool in network_profiles[nprof].sriov_provider_networks %}
6 {%         for iface in network_profiles[nprof].sriov_provider_networks[pool].interfaces %}
7 - resourceName: "sriov_{{ iface }}"
8   selectors:
9     pfNames: [ "{{ iface }}" ]
10   rootDevices: [ "{{ ifacepcimap[iface] }}" ]
11   sriovMode: true
12   deviceType: netdevice
13 {%         endfor %}
14 {%       endfor %}
15 {%     endif %}
16 {%   endif %}
17 {% endfor %}