Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ansible/config_sonic_basedon_testbed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,16 @@
with_items: "{{ host_if_indexes }}"
when: ("'host_interfaces' in vm_topo_config") and ("'tor' in vm_topo_config['dut_type'] | lower")

- name: find all interface indexes connecting to VM
- name: find all interface indexes mapping connecting to VM
set_fact:
interface_to_vms: "{{ interface_to_vms|default({}) | combine({ item.key: item.value['interface_indexes'] }) }}"
with_dict: vm_topo_config['vm']

- name: find all interface indexes connecting to VM
set_fact:
ifindex_to_vms: "{{ ifindex_to_vms|default([]) }} + {{ item.value['interface_indexes']}}"
with_dict: vm_topo_config['vm']

- name: find all interface names
set_fact:
intf_names: "{{ intf_names | default({}) | combine({item.key: port_alias[item.value[0]|int:item.value[-1]|int+1] }) }}"
Expand Down
403 changes: 204 additions & 199 deletions ansible/minigraph/lab-a7260-01.t0-116.xml

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions ansible/minigraph/lab-s6000-01.t0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
<VlanInterfaces>
<VlanInterface>
<Name>Vlan1000</Name>
<AttachTo>fortyGigE0/4;fortyGigE0/8;fortyGigE0/12;fortyGigE0/16;fortyGigE0/20;fortyGigE0/24;fortyGigE0/28;fortyGigE0/32;fortyGigE0/36;fortyGigE0/40;fortyGigE0/44;fortyGigE0/48;fortyGigE0/52;fortyGigE0/56;fortyGigE0/60;fortyGigE0/64;fortyGigE0/68;fortyGigE0/72;fortyGigE0/76;fortyGigE0/80;fortyGigE0/84;fortyGigE0/88;fortyGigE0/92;fortyGigE0/96</AttachTo>
<AttachTo>fortyGigE0/4;fortyGigE0/8;fortyGigE0/12;fortyGigE0/16;fortyGigE0/20;fortyGigE0/24;fortyGigE0/28;fortyGigE0/32;fortyGigE0/36;fortyGigE0/40;fortyGigE0/44;fortyGigE0/48;fortyGigE0/52;fortyGigE0/56;fortyGigE0/60;fortyGigE0/64;fortyGigE0/68;fortyGigE0/72;fortyGigE0/76;fortyGigE0/80;fortyGigE0/84;fortyGigE0/88;fortyGigE0/92;fortyGigE0/96</AttachTo>
<NoDhcpRelay>False</NoDhcpRelay>
<StaticDHCPRelay>0.0.0.0/0</StaticDHCPRelay>
<Type i:nil="true"/>
Expand Down Expand Up @@ -283,8 +283,8 @@
<InAcl>SNMP_ACL</InAcl>
<AttachTo>SNMP</AttachTo>
<Type>SNMP</Type>
</AclInterface>
<AclInterface>
</AclInterface>
<AclInterface>
<AttachTo>ERSPAN</AttachTo>
<InAcl>Everflow</InAcl>
<Type>Everflow</Type>
Expand All @@ -294,6 +294,11 @@
<InAcl>ssh-only</InAcl>
<Type>SSH</Type>
</AclInterface>
<AclInterface>
<AttachTo>fortyGigE0/4;fortyGigE0/8;fortyGigE0/12;fortyGigE0/16;fortyGigE0/20;fortyGigE0/24;fortyGigE0/28;fortyGigE0/32;fortyGigE0/36;fortyGigE0/40;fortyGigE0/44;fortyGigE0/48;fortyGigE0/52;fortyGigE0/56;fortyGigE0/60;fortyGigE0/64;fortyGigE0/68;fortyGigE0/72;fortyGigE0/76;fortyGigE0/80;fortyGigE0/84;fortyGigE0/88;fortyGigE0/92;fortyGigE0/96fortyGigE0/124;fortyGigE0/120;fortyGigE0/116;fortyGigE0/112</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
</AclInterfaces>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
Expand Down
11 changes: 8 additions & 3 deletions ansible/minigraph/lab-s6100-01.t0-64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
<VlanInterfaces>
<VlanInterface>
<Name>Vlan1000</Name>
<AttachTo>fortyGigE1/1/7;fortyGigE1/1/8;fortyGigE1/1/9;fortyGigE1/1/10;fortyGigE1/1/11;fortyGigE1/1/12;fortyGigE1/1/13;fortyGigE1/1/14;fortyGigE1/1/15;fortyGigE1/1/16;fortyGigE1/2/7;fortyGigE1/2/8;fortyGigE1/2/9;fortyGigE1/2/10;fortyGigE1/2/11;fortyGigE1/2/12;fortyGigE1/2/13;fortyGigE1/2/14;fortyGigE1/2/15;fortyGigE1/2/16;fortyGigE1/3/1;fortyGigE1/3/5;fortyGigE1/3/6;fortyGigE1/3/7;fortyGigE1/3/8;fortyGigE1/3/9;fortyGigE1/3/10;fortyGigE1/3/11;fortyGigE1/4/1;fortyGigE1/4/5;fortyGigE1/4/6;fortyGigE1/4/7;fortyGigE1/4/8;fortyGigE1/4/9;fortyGigE1/4/10;fortyGigE1/4/11</AttachTo>
<AttachTo>fortyGigE1/1/7;fortyGigE1/1/8;fortyGigE1/1/9;fortyGigE1/1/10;fortyGigE1/1/11;fortyGigE1/1/12;fortyGigE1/1/13;fortyGigE1/1/14;fortyGigE1/1/15;fortyGigE1/1/16;fortyGigE1/2/7;fortyGigE1/2/8;fortyGigE1/2/9;fortyGigE1/2/10;fortyGigE1/2/11;fortyGigE1/2/12;fortyGigE1/2/13;fortyGigE1/2/14;fortyGigE1/2/15;fortyGigE1/2/16;fortyGigE1/3/1;fortyGigE1/3/5;fortyGigE1/3/6;fortyGigE1/3/7;fortyGigE1/3/8;fortyGigE1/3/9;fortyGigE1/3/10;fortyGigE1/3/11;fortyGigE1/4/1;fortyGigE1/4/5;fortyGigE1/4/6;fortyGigE1/4/7;fortyGigE1/4/8;fortyGigE1/4/9;fortyGigE1/4/10;fortyGigE1/4/11</AttachTo>
<NoDhcpRelay>False</NoDhcpRelay>
<StaticDHCPRelay>0.0.0.0/0</StaticDHCPRelay>
<Type i:nil="true"/>
Expand Down Expand Up @@ -283,8 +283,8 @@
<InAcl>SNMP_ACL</InAcl>
<AttachTo>SNMP</AttachTo>
<Type>SNMP</Type>
</AclInterface>
<AclInterface>
</AclInterface>
<AclInterface>
<AttachTo>ERSPAN</AttachTo>
<InAcl>Everflow</InAcl>
<Type>Everflow</Type>
Expand All @@ -294,6 +294,11 @@
<InAcl>ssh-only</InAcl>
<Type>SSH</Type>
</AclInterface>
<AclInterface>
<AttachTo>fortyGigE1/1/7;fortyGigE1/1/8;fortyGigE1/1/9;fortyGigE1/1/10;fortyGigE1/1/11;fortyGigE1/1/12;fortyGigE1/1/13;fortyGigE1/1/14;fortyGigE1/1/15;fortyGigE1/1/16;fortyGigE1/2/7;fortyGigE1/2/8;fortyGigE1/2/9;fortyGigE1/2/10;fortyGigE1/2/11;fortyGigE1/2/12;fortyGigE1/2/13;fortyGigE1/2/14;fortyGigE1/2/15;fortyGigE1/2/16;fortyGigE1/3/1;fortyGigE1/3/5;fortyGigE1/3/6;fortyGigE1/3/7;fortyGigE1/3/8;fortyGigE1/3/9;fortyGigE1/3/10;fortyGigE1/3/11;fortyGigE1/4/1;fortyGigE1/4/5;fortyGigE1/4/6;fortyGigE1/4/7;fortyGigE1/4/8;fortyGigE1/4/9;fortyGigE1/4/10;fortyGigE1/4/11fortyGigE1/2/5;fortyGigE1/2/6;fortyGigE1/2/1;fortyGigE1/2/2;fortyGigE1/1/5;fortyGigE1/1/6;fortyGigE1/1/1;fortyGigE1/1/2</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
</AclInterfaces>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
Expand Down
9 changes: 7 additions & 2 deletions ansible/minigraph/lab-s6100-01.t1-64-lag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,8 @@
<InAcl>SNMP_ACL</InAcl>
<AttachTo>SNMP</AttachTo>
<Type>SNMP</Type>
</AclInterface>
<AclInterface>
</AclInterface>
<AclInterface>
<AttachTo>ERSPAN</AttachTo>
<InAcl>Everflow</InAcl>
<Type>Everflow</Type>
Expand All @@ -1160,6 +1160,11 @@
<InAcl>ssh-only</InAcl>
<Type>SSH</Type>
</AclInterface>
<AclInterface>
<AttachTo>fortyGigE1/4/11;fortyGigE1/4/3;fortyGigE1/3/16;fortyGigE1/4/13;fortyGigE1/3/8;fortyGigE1/3/15;fortyGigE1/3/11;fortyGigE1/3/14;fortyGigE1/3/13;fortyGigE1/2/5;fortyGigE1/2/6;fortyGigE1/1/1;fortyGigE1/1/2;fortyGigE1/3/3;fortyGigE1/2/1;fortyGigE1/2/2;fortyGigE1/4/16;fortyGigE1/3/5;fortyGigE1/3/6;fortyGigE1/1/5;fortyGigE1/1/6;fortyGigE1/3/7;fortyGigE1/4/14;fortyGigE1/4/8;fortyGigE1/4/15;fortyGigE1/4/7;fortyGigE1/4/5;fortyGigE1/4/6</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
</AclInterfaces>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
Expand Down
11 changes: 8 additions & 3 deletions ansible/minigraph/str-msn2700-01.t0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
<VlanInterfaces>
<VlanInterface>
<Name>Vlan1000</Name>
<AttachTo>Ethernet4;Ethernet8;Ethernet12;Ethernet16;Ethernet20;Ethernet24;Ethernet28;Ethernet32;Ethernet36;Ethernet40;Ethernet44;Ethernet48;Ethernet52;Ethernet56;Ethernet60;Ethernet64;Ethernet68;Ethernet72;Ethernet76;Ethernet80;Ethernet84;Ethernet88;Ethernet92;Ethernet96</AttachTo>
<AttachTo>Ethernet4;Ethernet8;Ethernet12;Ethernet16;Ethernet20;Ethernet24;Ethernet28;Ethernet32;Ethernet36;Ethernet40;Ethernet44;Ethernet48;Ethernet52;Ethernet56;Ethernet60;Ethernet64;Ethernet68;Ethernet72;Ethernet76;Ethernet80;Ethernet84;Ethernet88;Ethernet92;Ethernet96</AttachTo>
<NoDhcpRelay>False</NoDhcpRelay>
<StaticDHCPRelay>0.0.0.0/0</StaticDHCPRelay>
<Type i:nil="true"/>
Expand Down Expand Up @@ -283,8 +283,8 @@
<InAcl>SNMP_ACL</InAcl>
<AttachTo>SNMP</AttachTo>
<Type>SNMP</Type>
</AclInterface>
<AclInterface>
</AclInterface>
<AclInterface>
<AttachTo>ERSPAN</AttachTo>
<InAcl>Everflow</InAcl>
<Type>Everflow</Type>
Expand All @@ -294,6 +294,11 @@
<InAcl>ssh-only</InAcl>
<Type>SSH</Type>
</AclInterface>
<AclInterface>
<AttachTo>Ethernet4;Ethernet8;Ethernet12;Ethernet16;Ethernet20;Ethernet24;Ethernet28;Ethernet32;Ethernet36;Ethernet40;Ethernet44;Ethernet48;Ethernet52;Ethernet56;Ethernet60;Ethernet64;Ethernet68;Ethernet72;Ethernet76;Ethernet80;Ethernet84;Ethernet88;Ethernet92;Ethernet96Ethernet124;Ethernet120;Ethernet116;Ethernet112</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
</AclInterfaces>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
Expand Down
9 changes: 7 additions & 2 deletions ansible/minigraph/str-msn2700-01.t1-lag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,8 @@
<InAcl>SNMP_ACL</InAcl>
<AttachTo>SNMP</AttachTo>
<Type>SNMP</Type>
</AclInterface>
<AclInterface>
</AclInterface>
<AclInterface>
<AttachTo>ERSPAN</AttachTo>
<InAcl>Everflow</InAcl>
<Type>Everflow</Type>
Expand All @@ -1080,6 +1080,11 @@
<InAcl>ssh-only</InAcl>
<Type>SSH</Type>
</AclInterface>
<AclInterface>
<AttachTo>Ethernet124;Ethernet104;Ethernet100;Ethernet40;Ethernet44;Ethernet32;Ethernet36;Ethernet96;Ethernet84;Ethernet92;Ethernet88;Ethernet24;Ethernet28;Ethernet0;Ethernet4;Ethernet64;Ethernet16;Ethernet20;Ethernet80;Ethernet68;Ethernet72;Ethernet8;Ethernet12;Ethernet76;Ethernet120;Ethernet56;Ethernet60;Ethernet116;Ethernet108;Ethernet48;Ethernet52;Ethernet112</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
</AclInterfaces>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
Expand Down
9 changes: 7 additions & 2 deletions ansible/minigraph/str-msn2700-01.t1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1349,8 +1349,8 @@
<InAcl>SNMP_ACL</InAcl>
<AttachTo>SNMP</AttachTo>
<Type>SNMP</Type>
</AclInterface>
<AclInterface>
</AclInterface>
<AclInterface>
<AttachTo>ERSPAN</AttachTo>
<InAcl>Everflow</InAcl>
<Type>Everflow</Type>
Expand All @@ -1360,6 +1360,11 @@
<InAcl>ssh-only</InAcl>
<Type>SSH</Type>
</AclInterface>
<AclInterface>
<AttachTo>Ethernet60;Ethernet72;Ethernet124;Ethernet104;Ethernet100;Ethernet40;Ethernet36;Ethernet12;Ethernet76;Ethernet108;Ethernet56;Ethernet16;Ethernet80;Ethernet120;Ethernet68;Ethernet32;Ethernet96;Ethernet84;Ethernet20;Ethernet28;Ethernet4;Ethernet92;Ethernet116;Ethernet8;Ethernet88;Ethernet24;Ethernet0;Ethernet64;Ethernet52;Ethernet48;Ethernet112;Ethernet44</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
</AclInterfaces>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
Expand Down
18 changes: 15 additions & 3 deletions ansible/templates/minigraph_dpg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{% set vlan_intf_str=';'.join(vlan_intfs) %}
<VlanInterface>
<Name>Vlan1000</Name>
<AttachTo>{{ vlan_intf_str }}</AttachTo>
<AttachTo>{{ vlan_intf_str }}</AttachTo>
<NoDhcpRelay>False</NoDhcpRelay>
<StaticDHCPRelay>0.0.0.0/0</StaticDHCPRelay>
<Type i:nil="true"/>
Expand Down Expand Up @@ -106,8 +106,8 @@
<InAcl>SNMP_ACL</InAcl>
<AttachTo>SNMP</AttachTo>
<Type>SNMP</Type>
</AclInterface>
<AclInterface>
</AclInterface>
<AclInterface>
<AttachTo>ERSPAN</AttachTo>
<InAcl>Everflow</InAcl>
<Type>Everflow</Type>
Expand All @@ -117,6 +117,18 @@
<InAcl>ssh-only</InAcl>
<Type>SSH</Type>
</AclInterface>
<AclInterface>
<AttachTo>
{%- for index in host_if_indexes %}
{{ port_alias[index] }}{% if not loop.last %};{% endif %}
{% endfor %}
{% for index in ifindex_to_vms %}
{{ port_alias[index] }}{% if not loop.last %};{% endif %}
{% endfor -%}
</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
</AclInterfaces>
<DownstreamSummaries/>
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
Expand Down