Skip to content

Commit

Permalink
Add secondary subnets field to minigraph (sonic-net#10828)
Browse files Browse the repository at this point in the history
  • Loading branch information
shbalaku-microsoft authored Mar 4, 2024
1 parent c13c941 commit c8c7a4e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ansible/templates/minigraph_dpg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@
<VlanID>{{ vlan_param['id'] }}</VlanID>
<Tag>{{ vlan_param['tag'] }}</Tag>
<Subnets>{{ vlan_param['prefix'] | ipaddr('network') }}/{{ vlan_param['prefix'] | ipaddr('prefix') }}</Subnets>
{% if 'secondary_subnet' in vlan_param %}
<SecondarySubnets>{{ vlan_param['secondary_subnet'] | ipaddr('network') }}/{{ vlan_param['secondary_subnet'] | ipaddr('secondary_subnet') }}<SecondarySubnets>
{% endif %}
{% if 'mac' in vlan_param %}
<MacAddress>{{ vlan_param['mac'] }}</MacAddress>
{% endif %}
Expand Down Expand Up @@ -208,6 +211,13 @@
<AttachTo>{{ vlan }}</AttachTo>
<Prefix>{{ vlan_param['prefix'] }}</Prefix>
</IPInterface>
{%if 'secondary_subnet' in vlan_param %}
<IPInterface>
<Name i:nil="true"/>
<AttachTo>{{ vlan }}</AttachTo>
<Prefix>{{ vlan_param['secondary_subnet'] }}</Prefix>
</IPInterface>
{% endif %}
{% endfor %}
{% for vlan, vlan_param in vlan_configs.items() %}
{% if 'prefix_v6' in vlan_param %}
Expand Down
1 change: 1 addition & 0 deletions ansible/vars/topo_t0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ topology:
id: 100
intfs: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
prefix: 192.168.0.1/22
secondary_subnet: 192.169.0.1/22
prefix_v6: fc02:100::1/64
tag: 100
Vlan200:
Expand Down

0 comments on commit c8c7a4e

Please sign in to comment.