From 25b74b3ef00c43941baf4316271bc8a369f68d64 Mon Sep 17 00:00:00 2001 From: REDMONDmasun Date: Fri, 28 Jul 2017 00:50:49 +0000 Subject: [PATCH] [minigraph] add t0-64 port minigraph tempalte --- ansible/templates/topo/dev_metadata.j2 | 4 +- ansible/templates/topo/t0-64.j2 | 243 +++++++++++++++++++++++++ 2 files changed, 245 insertions(+), 2 deletions(-) create mode 100644 ansible/templates/topo/t0-64.j2 diff --git a/ansible/templates/topo/dev_metadata.j2 b/ansible/templates/topo/dev_metadata.j2 index 6f8b8b75e19..9aab31465c1 100644 --- a/ansible/templates/topo/dev_metadata.j2 +++ b/ansible/templates/topo/dev_metadata.j2 @@ -2,8 +2,8 @@ true -{% for index in range(32) %} -{% set sonic_if_name='Ethernet'+((index*4)|string) %} +{% set num_of_intf = port_alias | length %} +{% for index in range(num_of_intf) %} DeviceInterface diff --git a/ansible/templates/topo/t0-64.j2 b/ansible/templates/topo/t0-64.j2 new file mode 100644 index 00000000000..49c2002f153 --- /dev/null +++ b/ansible/templates/topo/t0-64.j2 @@ -0,0 +1,243 @@ + + + + +{% for index in range(4) %} + + false + {{ inventory_hostname }} + 10.0.0.{{ index*4 }} + ARISTA0{{ index+1 }}T1 + 10.0.0.{{ index*4 +1 }} + 1 + 10 + 3 + + + {{ inventory_hostname }} + FC00::{{ ('%0x' % (index*8+1)) | upper }} + ARISTA0{{ index+1 }}T1 + FC00::{{ ('%0x' % (index*8+2)) | upper }} + 1 + 10 + 3 + +{% endfor %} + + + + 64601 + {{ inventory_hostname }} + +{% for index in range(4) %} + + BGPPeer +
10.0.0.{{ index*4+1 }}
+ + + +
+ + BGPPeer +
FC00::{{ ('%0x' % (index*8+2)) | upper }}
+ + + +
+{% endfor %} + + BGPPeer +
10.1.0.32
+ + + + BGPSLBPassive + 10.255.0.0/27 +
+ + BGPPeer +
10.1.0.32
+ + + + BGPVac + 192.168.0.0/27 +
+
+ +
+{% for index in range(4) %} + + 64802 + ARISTA0{{ index+1 }}T1 + + +{% endfor %} +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + + + HostIP + eth0 + + {{ ansible_host }}/{{ mgmt_subnet_mask_length }} + + {{ ansible_host }}/{{ mgmt_subnet_mask_length }} + + + V6HostIP + eth0 + + FC00:2::32/64 + + FC00:2::32/64 + + + + + + + {{ inventory_hostname }} + +{% for index in range(0,32,16) %} + + PortChannelInterface + PortChannel{{ index }} + {{ port_alias[index] }};{{ port_alias[index+1] }} + + + + PortChannelInterface + PortChannel{{ index+4 }} + {{ port_alias[index+4] }};{{ port_alias[index+5] }} + + +{% endfor %} + + + + VlanInterface + Vlan1000 + {{ port_alias[6] }};{{ port_alias[7] }};{{ port_alias[8] }};{{ port_alias[9] }};{{ port_alias[10] }};{{ port_alias[11] }};{{ port_alias[12] }};{{ port_alias[13] }};{{ port_alias[14] }};{{ port_alias[15] }};{{ port_alias[22] }};{{ port_alias[23] }};{{ port_alias[24] }};{{ port_alias[25] }};{{ port_alias[26] }};{{ port_alias[27] }};{{ port_alias[28] }};{{ port_alias[29] }};{{ port_alias[30] }};{{ port_alias[31] }};{{ port_alias[32] }};{{ port_alias[36] }};{{ port_alias[37] }};{{ port_alias[38] }};{{ port_alias[39] }};{{ port_alias[40] }};{{ port_alias[41] }};{{ port_alias[42] }};{{ port_alias[48] }};{{ port_alias[52] }};{{ port_alias[53] }};{{ port_alias[54] }};{{ port_alias[55] }};{{ port_alias[56] }};{{ port_alias[57] }};{{ port_alias[58] }} + False + 0.0.0.0/0 + + 1000 + 1000 + 192.168.0.0/27 + + + +{% for index in range(4) %} +{% set po_index=index*4 if index < 2 else index*4+8 %} + + + PortChannel{{ po_index }} + 10.0.0.{{ index*4 }}/31 + + + + PortChannel{{ po_index }} + FC00::{{ ('%0x' % (index*8+1)) | upper }}/126 + +{% endfor %} + + + Vlan1000 + 192.168.0.1/27 + + + + + + + + + + +{% for index in range(2) %} + + DeviceInterfaceLink + ARISTA0{{ index*2+1 }}T1 + Ethernet1 + {{ inventory_hostname }} + {{ port_alias[index*16] }} + + + DeviceInterfaceLink + ARISTA0{{ index*2+1 }}T1 + Ethernet2 + {{ inventory_hostname }} + {{ port_alias[index*16+1] }} + + + DeviceInterfaceLink + ARISTA0{{ index*2+2 }}T1 + Ethernet1 + {{ inventory_hostname }} + {{ port_alias[index*16+4] }} + + + DeviceInterfaceLink + ARISTA0{{ index*2+2 }}T1 + Ethernet2 + {{ inventory_hostname }} + {{ port_alias[index*16+5] }} + +{% endfor %} + + + + {{ inventory_hostname }} + {{ hwsku }} + + {{ ansible_host }} + + +{% if VM_topo %} +{% for dev in neighbor_eosvm_mgmt %} +{% if 'T1' in dev %} +{% set dev_type = 'LeafRouter' %} +{% elif 'T2' in dev %} +{% set dev_type = 'SpineRouter' %} +{% elif 'T0' in dev %} +{% set dev_type = 'TorRouter' %} +{% else %} +{% set dev_ytpe = 'Unknown' %} +{% endif %} + + "{{ dev }}" + + {{ neighbor_eosvm_mgmt[dev] }} + + Arista-VM + +{% endfor %} +{% endif %} + + +{% include 'dev_metadata.j2' %} + {{ inventory_hostname }} + {{ hwsku }} +