Skip to content

Commit a35ed37

Browse files
sanjair-gitansrajpu-git
authored andcommitted
Fix for port channel names mismatch in global and asic minigraph template files sonic-net#18529
Description of PR Summary: Fixes # (issue) This PR fixes the issue Bug: Minigraph generation is broken for multi asic sonic-net#18507 caused by chore: change portchannel naming sonic-net#18161 Portchannel name changes are done in file ansible/templates/minigraph_dpg.j2 but we need corresponding change in ansible/templates/minigraph_dpg_asic.j2 file as well so the names are same in both global and asic configs. Type of change Bug fix Testbed and Framework(new/improvement) New Test case Skipped for non-supported platforms Test case improvement Back port request 202012 202205 202305 202311 202405 202411 Approach What is the motivation for this PR? To fix the minigraph template issues w.r.t Portchannel names for global and asic. How did you do it? Add corresponding changes on ansible/templates/minigraph_dpg_asic.j2 similar to ansible/templates/minigraph_dpg.j2 How did you verify/test it? Run gen-mg with the new template modifications. With the new minigraph, made sure tests are passing for multi-asics Co-authored-by: ansrajpu <[email protected]> Signed-off-by: Guy Shemesh <[email protected]>
1 parent 6309356 commit a35ed37

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ansible/templates/minigraph_dpg_asic.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %}
9797
{% set port_channel_intf=';'.join(vm_asic_ifnames[vms[index]]) %}
9898
<PortChannel>
99-
<Name>PortChannel{{ '10' + ((index+1)|string) }}</Name>
99+
<Name>PortChannel{{ (100 + index + 1)|string }}</Name>
100100
<AttachTo>{{ port_channel_intf }}</AttachTo>
101101
<SubInterface/>
102102
</PortChannel>
@@ -144,7 +144,7 @@
144144
<IPInterface>
145145
<Name i:nil="true"/>
146146
{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int][intf_index]|lower %}
147-
<AttachTo>PortChannel{{ '10' + ((index+1)|string) }}</AttachTo>
147+
<AttachTo>PortChannel{{ (100 + index + 1)|string }}</AttachTo>
148148
{% else %}
149149
<AttachTo>{{ front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }}</AttachTo>
150150
{% endif %}
@@ -153,7 +153,7 @@
153153
<IPInterface>
154154
<Name i:Name="true"/>
155155
{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int][intf_index]|lower %}
156-
<AttachTo>PortChannel{{ '10' + ((index+1)|string) }}</AttachTo>
156+
<AttachTo>PortChannel{{ (100 + index + 1)|string }}</AttachTo>
157157
{% else %}
158158
<AttachTo>{{ front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }}</AttachTo>
159159
{% endif %}
@@ -271,7 +271,7 @@
271271
{%- for index in range(vms_number) %}
272272
{% if vms[index] in vm_asic_ifnames and vm_asic_ids[vms[index]][0] == asic_name %}
273273
{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][0]|lower %}
274-
{% set a_intf = 'PortChannel' + '10' + ((index+1)|string) %}
274+
{% set a_intf = 'PortChannel' ~ (100 + index + 1)|string %}
275275
{{- acl_intfs.append(a_intf) -}}
276276
{% endif %}
277277
{% endif %}

0 commit comments

Comments
 (0)