diff --git a/ansible/config_sonic_basedon_testbed.yml b/ansible/config_sonic_basedon_testbed.yml index 6154b43c65a..0948a47420c 100644 --- a/ansible/config_sonic_basedon_testbed.yml +++ b/ansible/config_sonic_basedon_testbed.yml @@ -93,6 +93,7 @@ card_type: "{{ card_type | default('fixed') }}" hostname: "{{ inventory_hostname | default('') }}" switchids: "{{ switchids | default([]) }}" + slotid: "{{ slot_num | default(None) }}" delegate_to: localhost when: deploy is not defined or deploy|bool == false @@ -101,6 +102,7 @@ num_fabric_asic: "{{ num_fabric_asics | default(0) }}" asics_host_basepfx: "{{ asics_host_ip | default(None) }}" asics_host_basepfx6: "{{ asics_host_ipv6 | default(None) }}" + delegate_to: localhost - name: set all VoQ system ports information set_fact: @@ -108,12 +110,36 @@ when: hostvars[item]['sysports'] is defined loop: "{{ ansible_play_batch }}" - - name: set all VoQ information for iBGP + - name: set all v4 Inband Ip information for iBGP chassis voq set_fact: all_inbands: "{{ all_inbands | default( {} ) | combine( { item : hostvars[item]['voq_inband_ip']}) }}" when: hostvars[item]['voq_inband_ip'] is defined loop: "{{ ansible_play_batch }}" + - name: set all v6 Inband Ip information for iBGP chassis voq + set_fact: + all_inbands_ipv6: "{{ all_inbands_ipv6 | default( {} ) | combine( { item : hostvars[item]['voq_inband_ipv6']}) }}" + when: hostvars[item]['voq_inband_ipv6'] is defined + loop: "{{ ansible_play_batch }}" + + - name: set all Loopback4096 information for iBGP chassis + set_fact: + all_loopback4096: "{{ all_loopback4096 | default( {} ) | combine( { item : hostvars[item]['loopback4096_ip']}) }}" + when: hostvars[item]['loopback4096_ip'] is defined + loop: "{{ ansible_play_batch }}" + + - name: set all Loopback4096 ipv6 information for iBGP chassis + set_fact: + all_loopback4096_ipv6: "{{ all_loopback4096_ipv6 | default( {} ) | combine( { item : hostvars[item]['loopback4096_ipv6']}) }}" + when: hostvars[item]['loopback4096_ipv6'] is defined + loop: "{{ ansible_play_batch }}" + + - name: set all slot information for chassis + set_fact: + all_slots: "{{ all_slots | default( {} ) | combine( { item : hostvars[item]['slot_num']}) }}" + when: hostvars[item]['slot_num'] is defined + loop: "{{ ansible_play_batch }}" + - name: find all enabled host_interfaces set_fact: host_if_indexes: "{{ vm_topo_config['host_interfaces_by_dut'][dut_index|int] | difference(vm_topo_config['disabled_host_interfaces_by_dut'][dut_index|int]) }}" diff --git a/ansible/lab b/ansible/lab index aded3d6508d..6dd26311318 100644 --- a/ansible/lab +++ b/ansible/lab @@ -12,6 +12,8 @@ all: sonic_a7260: sonic_multi_asic: sonic_multi_asic_2: + sonic_msft_sup: + sonic_msft_lc_100G: fanout: hosts: str-7260-10: @@ -148,3 +150,39 @@ sonic_multi_asic_2: vlab-08: ansible_host: 10.250.0.112 ansible_hostv6: fec0::ffff:afa:c + +sonic_msft_sup: + vars: + HwSku: msft-RP-O + slot_num: slot0 + card_type: supervisor + hosts: + lab-msft-sup-1: + ansible_host: 2.2.2.2 + hwsku: msft-RP-O + num_asics: 2 + +sonic_msft_lc_100G: + vars: + switch_type: chassis-packet + num_asics: 2 + frontend_asics: [0,1] + hosts: + lab-msft-lc0-1: + hwsku: msft-LC-48H-O + slot_num: slot1 + loopback4096_ip: [3.3.3.3/32,3.3.3.4/32] + loopback4096_ipv6: [2603:10e2:400::3/128,2603:10e2:400::4/128] + ansible_host: 2.2.2.3 + lab-msft-lc1-1: + hwsku: msft-LC-48H-O + slot_num: slot2 + loopback4096_ip: [3.3.3.5/32,3.3.3.6/32] + loopback4096_ipv6: [2603:10e2:400::5/128,2603:10e2:400::6/128] + ansible_host: 2.2.2.4 + lab-msft-lc2-1: + hwsku: msft-LC-48H-O + slot_num: slot3 + loopback4096_ip: [3.3.3.7/32,3.3.3.8/32] + loopback4096_ipv6: [2603:10e2:400::7/128,2603:10e2:400::8/128] + ansible_host: 2.2.2.5 diff --git a/ansible/library/port_alias.py b/ansible/library/port_alias.py index 3c4bfc91c6f..f469670b43d 100755 --- a/ansible/library/port_alias.py +++ b/ansible/library/port_alias.py @@ -78,20 +78,22 @@ def get_platform_type(self): return value return None - def get_portconfig_path(self, asic_id=None): + def get_portconfig_path(self, slotid=None, asic_id=None): platform = self.get_platform_type() if platform is None: return None - if asic_id is None: + if asic_id is None or asic_id == '': portconfig = os.path.join(FILE_PATH, platform, self.hwsku, PORTMAP_FILE) - else: + elif slotid is None or slotid == '': portconfig = os.path.join(FILE_PATH, platform, self.hwsku, str(asic_id), PORTMAP_FILE) + else: + portconfig = os.path.join(FILE_PATH, platform, self.hwsku, str(slotid), str(asic_id), PORTMAP_FILE) if os.path.exists(portconfig): return portconfig return None def get_portmap(self, asic_id=None, include_internal=False, - hostname=None, switchid=None): + hostname=None, switchid=None, slotid=None): aliases = [] portmap = {} aliasmap = {} @@ -107,7 +109,7 @@ def get_portmap(self, asic_id=None, include_internal=False, # default to Asic0 as minigraph.py parsing code has that assumption. asic_name = "Asic0" if asic_id is None else "asic" + str(asic_id) - filename = self.get_portconfig_path(asic_id) + filename = self.get_portconfig_path(slotid, asic_id) if filename is None: raise Exception("Something wrong when trying to find the portmap file, either the hwsku is not available or file location is not correct") with open(filename) as f: @@ -209,7 +211,8 @@ def main(): include_internal=dict(required=False, type='bool', default=False), card_type=dict(type='str', required=False), hostname=dict(type='str', required=False), - switchids=dict(type='list', required=False) + switchids=dict(type='list', required=False), + slotid=dict(type='str', required=False) ), supports_check_mode=True ) @@ -236,8 +239,12 @@ def main(): return allmap = SonicPortAliasMap(m_args['hwsku']) switchids = None + slotid = None if 'switchids' in m_args and m_args['switchids'] != None and len(m_args['switchids']): switchids = m_args['switchids'] + + if 'slotid' in m_args and m_args['slotid'] != None: + slotid = m_args['slotid'] # When this script is invoked on sonic-mgmt docker, num_asic # parameter is passed. if m_args['num_asic'] is not None: @@ -269,7 +276,7 @@ def main(): if num_asic == 1: asic_id = None (aliases_asic, portmap_asic, aliasmap_asic, portspeed_asic, front_panel_asic, asicifnames_asic, - sysport_asic) = allmap.get_portmap(asic_id, include_internal, hostname, switchid) + sysport_asic) = allmap.get_portmap(asic_id, include_internal, hostname, switchid, slotid) if aliases_asic is not None: aliases.extend(aliases_asic) if portmap_asic is not None: diff --git a/ansible/library/topo_facts.py b/ansible/library/topo_facts.py index 61e351f949c..00462542b65 100644 --- a/ansible/library/topo_facts.py +++ b/ansible/library/topo_facts.py @@ -83,7 +83,6 @@ def __init__(self): self.asic_topo_config = {} def parse_topo_defintion(self, topo_definition, po_map, dut_num, neigh_type='VMs'): - dut_asn = topo_definition['configuration_properties']['common']['dut_asn'] vmconfig = dict() for vm in topo_definition['topology'][neigh_type]: vmconfig[vm] = dict() @@ -106,17 +105,20 @@ def parse_topo_defintion(self, topo_definition, po_map, dut_num, neigh_type='VMs for asic_intf in topo_definition['topology'][neigh_type][vm]['asic_intfs']: vmconfig[vm]['asic_intfs'][dut_index].append(asic_intf) + # physical interface - for intf in topo_definition['configuration'][vm]['interfaces']: - if (neigh_type == 'VMs' and 'Ethernet' in intf) or \ - (neigh_type == 'NEIGH_ASIC' and re.match("Eth(\d+)-", intf)): - dut_index = 0 - if 'dut_index' in topo_definition['configuration'][vm]['interfaces'][intf]: - dut_index = topo_definition['configuration'][vm]['interfaces'][intf]['dut_index'] - if 'lacp' in topo_definition['configuration'][vm]['interfaces'][intf]: - po_map[topo_definition['configuration'][vm]['interfaces'][intf]['lacp']] = dut_index - - vmconfig[vm]['intfs'][dut_index].append(intf) + if 'configuration' in topo_definition: + if 'interfaces' in topo_definition['configuration'][vm]: + for intf in topo_definition['configuration'][vm]['interfaces']: + dut_index = 0 + if neigh_type == 'NEIGH_ASIC' and re.match("Eth(\d+)-", intf): + vmconfig[vm]['intfs'][dut_index].append(intf) + elif 'Ethernet' in intf: + if 'dut_index' in topo_definition['configuration'][vm]['interfaces'][intf]: + dut_index = topo_definition['configuration'][vm]['interfaces'][intf]['dut_index'] + if 'lacp' in topo_definition['configuration'][vm]['interfaces'][intf]: + po_map[topo_definition['configuration'][vm]['interfaces'][intf]['lacp']] = dut_index + vmconfig[vm]['intfs'][dut_index].append(intf) # ip interface vmconfig[vm]['ip_intf'] = [None] * dut_num @@ -124,59 +126,72 @@ def parse_topo_defintion(self, topo_definition, po_map, dut_num, neigh_type='VMs vmconfig[vm]['ipv4mask'] = [None] * dut_num vmconfig[vm]['peer_ipv6'] = [None] * dut_num vmconfig[vm]['ipv6mask'] = [None] * dut_num - - - for intf in topo_definition['configuration'][vm]['interfaces']: - dut_index = 0 - if (neigh_type == 'VMs' and 'Ethernet' in intf) or \ - (neigh_type == 'NEIGH_ASIC' and re.match("Eth(\d+)-", intf)): - if 'dut_index' in topo_definition['configuration'][vm]['interfaces'][intf]: - dut_index = topo_definition['configuration'][vm]['interfaces'][intf]['dut_index'] - elif 'Port-Channel' in intf: - m = re.search("(\d+)", intf) - dut_index = po_map[int(m.group(1))] - - if 'ipv4' in topo_definition['configuration'][vm]['interfaces'][intf] and ('loopback' not in intf.lower()): - (peer_ipv4, ipv4_mask) = topo_definition['configuration'][vm]['interfaces'][intf]['ipv4'].split('/') - vmconfig[vm]['peer_ipv4'][dut_index] = peer_ipv4 - vmconfig[vm]['ipv4mask'][dut_index] = ipv4_mask - vmconfig[vm]['ip_intf'][dut_index] = intf - if 'ipv6' in topo_definition['configuration'][vm]['interfaces'][intf] and ('loopback' not in intf.lower()): - (ipv6_addr, ipv6_mask) = topo_definition['configuration'][vm]['interfaces'][intf]['ipv6'].split('/') - vmconfig[vm]['peer_ipv6'][dut_index] = ipv6_addr.upper() - vmconfig[vm]['ipv6mask'][dut_index] = ipv6_mask - vmconfig[vm]['ip_intf'][dut_index] = intf - - # bgp vmconfig[vm]['bgp_ipv4'] = [None] * dut_num vmconfig[vm]['bgp_ipv6'] = [None] * dut_num - vmconfig[vm]['bgp_asn'] = topo_definition['configuration'][vm]['bgp']['asn'] - for ipstr in topo_definition['configuration'][vm]['bgp']['peers'][dut_asn]: - if sys.version_info < (3, 0): - ip = ipaddress.ip_address(ipstr.decode('utf8')) - else: - ip = ipaddress.ip_address(ipstr) - for dut_index in range(0, dut_num): - if ip.version == 4: - # Each VM might not be connected to all the DUT's, so check if this VM is a peer to DUT at dut_index - if vmconfig[vm]['peer_ipv4'][dut_index]: - ipsubnet_str = vmconfig[vm]['peer_ipv4'][dut_index]+'/'+vmconfig[vm]['ipv4mask'][dut_index] - if sys.version_info < (3, 0): - ipsubnet = ipaddress.ip_interface(ipsubnet_str.decode('utf8')) - else: - ipsubnet = ipaddress.ip_interface(ipsubnet_str) - if ip in ipsubnet.network: + vmconfig[vm]['bgp_asn'] = None + + + if 'configuration' in topo_definition: + if 'interfaces' in topo_definition['configuration'][vm]: + for intf in topo_definition['configuration'][vm]['interfaces']: + dut_index = 0 + if neigh_type == 'NEIGH_ASIC': + pass + elif 'Ethernet' in intf: + if 'dut_index' in topo_definition['configuration'][vm]['interfaces'][intf]: + dut_index = topo_definition['configuration'][vm]['interfaces'][intf]['dut_index'] + elif 'Port-Channel' in intf: + m = re.search("(\d+)", intf) + dut_index = po_map[int(m.group(1))] + + if isinstance(topo_definition['configuration'][vm]['interfaces'],dict) and 'ipv4' in topo_definition['configuration'][vm]['interfaces'][intf] and ('loopback' not in intf.lower()): + (peer_ipv4, ipv4_mask) = topo_definition['configuration'][vm]['interfaces'][intf]['ipv4'].split('/') + vmconfig[vm]['peer_ipv4'][dut_index] = peer_ipv4 + vmconfig[vm]['ipv4mask'][dut_index] = ipv4_mask + vmconfig[vm]['ip_intf'][dut_index] = intf + if isinstance(topo_definition['configuration'][vm]['interfaces'],dict) and 'ipv6' in topo_definition['configuration'][vm]['interfaces'][intf] and ('loopback' not in intf.lower()): + (ipv6_addr, ipv6_mask) = topo_definition['configuration'][vm]['interfaces'][intf]['ipv6'].split('/') + vmconfig[vm]['peer_ipv6'][dut_index] = ipv6_addr.upper() + vmconfig[vm]['ipv6mask'][dut_index] = ipv6_mask + vmconfig[vm]['ip_intf'][dut_index] = intf + # bgp + vmconfig[vm]['bgp_asn'] = topo_definition['configuration'][vm]['bgp']['asn'] + dut_asn = topo_definition['configuration_properties']['common']['dut_asn'] + for ipstr in topo_definition['configuration'][vm]['bgp']['peers'][dut_asn]: + ip_mask = None + if '/' in ipstr: + (ipstr, ip_mask) = ipstr.split('/') + if sys.version_info < (3, 0): + ip = ipaddress.ip_address(ipstr.decode('utf8')) + else: + ip = ipaddress.ip_address(ipstr) + for dut_index in range(0, dut_num): + if ip.version == 4: + # Each VM might not be connected to all the DUT's, so check if this VM is a peer to DUT at dut_index + if vmconfig[vm]['peer_ipv4'][dut_index]: + ipsubnet_str = vmconfig[vm]['peer_ipv4'][dut_index]+'/'+vmconfig[vm]['ipv4mask'][dut_index] + if sys.version_info < (3, 0): + ipsubnet = ipaddress.ip_interface(ipsubnet_str.decode('utf8')) + else: + ipsubnet = ipaddress.ip_interface(ipsubnet_str) + if ip in ipsubnet.network: + vmconfig[vm]['bgp_ipv4'][dut_index] = ipstr.upper() + elif neigh_type == "NEIGH_ASIC": vmconfig[vm]['bgp_ipv4'][dut_index] = ipstr.upper() - elif ip.version == 6: - # Each VM might not be connected to all the DUT's, so check if this VM is a peer to DUT at dut_index - if vmconfig[vm]['peer_ipv6'][dut_index]: - ipsubnet_str = vmconfig[vm]['peer_ipv6'][dut_index]+'/'+vmconfig[vm]['ipv6mask'][dut_index] - if sys.version_info < (3, 0): - ipsubnet = ipaddress.ip_interface(ipsubnet_str.decode('utf8')) - else: - ipsubnet = ipaddress.ip_interface(ipsubnet_str) - if ip in ipsubnet.network: + vmconfig[vm]['ipv4mask'][dut_index] = ip_mask if ip_mask else '32' + elif ip.version == 6: + # Each VM might not be connected to all the DUT's, so check if this VM is a peer to DUT at dut_index + if vmconfig[vm]['peer_ipv6'][dut_index]: + ipsubnet_str = vmconfig[vm]['peer_ipv6'][dut_index]+'/'+vmconfig[vm]['ipv6mask'][dut_index] + if sys.version_info < (3, 0): + ipsubnet = ipaddress.ip_interface(ipsubnet_str.decode('utf8')) + else: + ipsubnet = ipaddress.ip_interface(ipsubnet_str) + if ip in ipsubnet.network: + vmconfig[vm]['bgp_ipv6'][dut_index] = ipstr.upper() + elif neigh_type == "NEIGH_ASIC": vmconfig[vm]['bgp_ipv6'][dut_index] = ipstr.upper() + vmconfig[vm]['ipv6mask'][dut_index] = ip_mask if ip_mask else '128' return vmconfig def get_topo_config(self, topo_name, hwsku): @@ -201,10 +216,10 @@ def get_topo_config(self, topo_name, hwsku): topo_definition = yaml.load(f) if not os.path.isfile(asic_topo_filename): - asic_definition = {} + slot_definition = {} else: with open(asic_topo_filename) as f: - asic_definition = yaml.load(f) + slot_definition = yaml.load(f) ### parse topo file specified in vars/ to reverse as dut config dut_num = 1 @@ -225,17 +240,13 @@ def get_topo_config(self, topo_name, hwsku): vm_topo_config['dut_type'] = topo_definition['configuration_properties']['common']['dut_type'] vm_topo_config['dut_asn'] = dut_asn - - for asic in asic_definition: - po_map_asic = [None] * 16 # maximum 16 port channel interfaces - asic_topo_config[asic] = dict() - asic_topo_config[asic]['dut_asn'] = asic_definition[asic]['configuration_properties']['common']['dut_asn'] - asic_topo_config[asic]['asic_type'] = asic_definition[asic]['configuration_properties']['common']['asic_type'] - asic_topo_config[asic]['Loopback4096'] = [] - for lo4096 in asic_definition[asic]['configuration_properties']['common']['Loopback4096']: - asic_topo_config[asic]['Loopback4096'].append(lo4096) - - asic_topo_config[asic]['neigh_asic'] = self.parse_topo_defintion(asic_definition[asic], po_map_asic, 1, 'NEIGH_ASIC') + for slot,asic_definition in slot_definition.items(): + asic_topo_config[slot] = dict() + for asic in asic_definition: + po_map_asic = [None] * 16 # maximum 16 port channel interfaces + asic_topo_config[slot][asic] = dict() + asic_topo_config[slot][asic]['asic_type'] = asic_definition[asic]['configuration_properties']['common']['asic_type'] + asic_topo_config[slot][asic]['neigh_asic'] = self.parse_topo_defintion(asic_definition[asic], po_map_asic, 1, 'NEIGH_ASIC') vm_topo_config['host_interfaces_by_dut'] = [[] for i in range(dut_num)] if 'host_interfaces' in topo_definition['topology']: diff --git a/ansible/templates/minigraph_cpg.j2 b/ansible/templates/minigraph_cpg.j2 index 0ef9883216a..ac5857e74f1 100644 --- a/ansible/templates/minigraph_cpg.j2 +++ b/ansible/templates/minigraph_cpg.j2 @@ -1,7 +1,7 @@ - + +{% if card_type is not defined or card_type != 'supervisor' %} -{% if card_type is not defined or card_type != 'supervisor' %} {% for index in range(vms_number) %} {% set vm=vms[index] %} {% if vm_topo_config['vm'][vm]['peer_ipv4'][dut_index|int] %} @@ -51,26 +51,27 @@ {% endif %} {% endif %} {% endfor %} -{% for asic in asic_topo_config %} -{% for neigh_asic in asic_topo_config[asic]['neigh_asic'] %} -{% if asic_topo_config[asic]['neigh_asic'][neigh_asic]['peer_ipv4'][0] %} +{% if (asic_topo_config and slot_num is defined and slot_num in asic_topo_config) or (asic_topo_config and slot_num is not defined) %} +{% for asic,asic_config in asic_topo_config[slot_num|default('slot0')].items() %} +{% for neigh_asic in asic_config['neigh_asic'] %} +{% if asic_config['neigh_asic'][neigh_asic]['peer_ipv4'][0] %} false {{ asic }} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['bgp_ipv4'][0] }} + {{ asic_config['neigh_asic'][neigh_asic]['bgp_ipv4'][0] }} {{ neigh_asic }} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['peer_ipv4'][0] }} + {{ asic_config['neigh_asic'][neigh_asic]['peer_ipv4'][0] }} 1 0 0 {% endif %} -{% if asic_topo_config[asic]['neigh_asic'][neigh_asic]['peer_ipv6'][0] %} +{% if asic_config['neigh_asic'][neigh_asic]['peer_ipv6'][0] %} {{ asic }} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['bgp_ipv6'][0] }} + {{ asic_config['neigh_asic'][neigh_asic]['bgp_ipv6'][0] }} {{ neigh_asic }} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['peer_ipv6'][0] }} + {{ asic_config['neigh_asic'][neigh_asic]['peer_ipv6'][0] }} 1 0 0 @@ -79,21 +80,18 @@ {% endfor %} {% endfor %} {% endif %} -{% if switch_type is defined and switch_type == 'voq' %} -{% set voq_peers = dict() %} +{% if switch_type is defined and (switch_type == 'voq' or switch_type == 'chassis-packet') %} +{% set chassis_ibgp_peers = dict() %} {% for asic_id in range(num_asics) %} {% if num_asics == 1 %} -{% set start_rtr = inventory_hostname %} +{% set start_rtr = inventory_hostname %} {% else %} {% set start_rtr = "ASIC" + asic_id|string %} {% endif %} -{% for a_linecard in all_inbands %} -{% for idx in range(all_inbands[a_linecard]|length) %} -{% if voq_inband_ip[asic_id] != all_inbands[a_linecard][idx] %} - - {{ start_rtr }} - {{ voq_inband_ip[asic_id].split('/')[0] }} -{% if all_inbands[a_linecard]|length == 1 %} +{% for a_linecard in all_loopback4096 %} +{% for idx in range(all_loopback4096[a_linecard]|length) %} +{% if loopback4096_ip[asic_id] != all_loopback4096[a_linecard][idx] %} +{% if all_loopback4096[a_linecard]|length == 1 %} {% set end_rtr = a_linecard %} {% else %} {% if a_linecard == inventory_hostname %} @@ -102,13 +100,40 @@ {% set end_rtr = a_linecard + "-ASIC" + idx|string %} {% endif %} {% endif %} -{% set _ = voq_peers.update({ all_inbands[a_linecard][idx].split('/')[0] : end_rtr }) %} +{% if switch_type == 'voq' %} +{% set _ = chassis_ibgp_peers.update({ all_inbands[a_linecard][idx].split('/')[0] : end_rtr }) %} +{% else %} +{% set _ = chassis_ibgp_peers.update({ all_loopback4096[a_linecard][idx].split('/')[0] : end_rtr }) %} +{% endif %} + + {{ start_rtr }} {{ end_rtr }} +{% if switch_type == 'voq' %} + {{ voq_inband_ip[asic_id].split('/')[0] }} {{ all_inbands[a_linecard][idx].split('/')[0] }} +{% else %} + {{ loopback4096_ip[asic_id].split('/')[0] }} + {{ all_loopback4096[a_linecard][idx].split('/')[0] }} +{% endif %} 1 0 0 - true + {{ switch_type }} + + + {{ start_rtr }} + {{ end_rtr }} +{% if switch_type == 'voq' %} + {{ voq_inband_ipv6[asic_id].split('/')[0] }} + {{ all_inbands_ipv6[a_linecard][idx].split('/')[0] }} +{% else %} + {{ loopback4096_ipv6[asic_id].split('/')[0] }} + {{ all_loopback4096_ipv6[a_linecard][idx].split('/')[0] }} +{% endif %} + 1 + 0 + 0 + {{ switch_type }} {% endif %} {% endfor %} @@ -132,10 +157,10 @@ {% endif %} {% endfor %} -{% if num_asics == 1 and switch_type is defined and switch_type == 'voq' %} -{% for a_voq_peer in voq_peers %} +{% if num_asics == 1 and switch_type is defined and (switch_type == 'voq' or switch_type == 'chassis-packet') %} +{% for a_chassis_ibgp_peer in chassis_ibgp_peers %} -
{{ a_voq_peer }}
+
{{ a_chassis_ibgp_peer }}
@@ -175,7 +200,8 @@ {% endif %} {% endfor %} {% endif %} -{% for asic in asic_topo_config %} +{% if (asic_topo_config and slot_num is defined and slot_num in asic_topo_config) or (asic_topo_config and slot_num is not defined) %} +{% for asic,asic_config in asic_topo_config[slot_num|default('slot0')].items() %} {{ vm_topo_config['dut_asn'] }} {{ asic }} @@ -190,10 +216,10 @@
{% endif %} {% endfor %} -{% for neigh_asic in asic_topo_config %} -{% if neigh_asic in asic_topo_config[asic]['neigh_asic'] and asic_topo_config[asic]['neigh_asic'][neigh_asic]['peer_ipv4'][0] %} +{% for neigh_asic in asic_config['neigh_asic'] %} +{% if neigh_asic in asic_config['neigh_asic'] and asic_config['neigh_asic'][neigh_asic]['peer_ipv4'][0] %} -
{{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['peer_ipv4'][0] }}
+
{{ asic_config['neigh_asic'][neigh_asic]['peer_ipv4'][0] }}
@@ -204,13 +230,13 @@ {% endfor %} -{% if switch_type is defined and switch_type == 'voq' %} -{% for a_linecard in all_inbands %} +{% if switch_type is defined and (switch_type == 'voq' or switch_type == 'chassis-packet') %} +{% for a_linecard in all_loopback4096 %} {% if a_linecard != inventory_hostname %} -{% for idx in range(all_inbands[a_linecard]|length) %} +{% for idx in range(all_loopback4096[a_linecard]|length) %} {{ vm_topo_config['dut_asn'] }} - {{ voq_peers[all_inbands[a_linecard][idx].split('/')[0]] }} + {{ chassis_ibgp_peers[all_loopback4096[a_linecard][idx].split('/')[0]] }} {% endfor %} @@ -233,11 +259,11 @@
{% endif %} {% endfor %} -{% for a_linecard in all_inbands %} -{% for idx in range(all_inbands[a_linecard]|length) %} -{% if voq_inband_ip[asic_id] != all_inbands[a_linecard][idx] %} +{% for a_linecard in all_loopback4096 %} +{% for idx in range(all_loopback4096[a_linecard]|length) %} +{% if loopback4096_ip[asic_id] != all_loopback4096[a_linecard][idx] %} -
{{ all_inbands[a_linecard][idx] }}
+
{{ all_loopback4096[a_linecard][idx] }}
@@ -249,7 +275,9 @@ {% endfor %} {% endif %} +{% endif %} {% endif %} +{% endif %}
diff --git a/ansible/templates/minigraph_device.j2 b/ansible/templates/minigraph_device.j2 index d4f34ab05d4..e743123bfc1 100644 --- a/ansible/templates/minigraph_device.j2 +++ b/ansible/templates/minigraph_device.j2 @@ -2,7 +2,7 @@ true -{% if card_type is not defined or card_type != 'supervisor' %} +{% if switch_type is not defined or switch_type != 'fabric' %} {% set num_of_intf = port_alias | length %} {% for index in range(num_of_intf) %} diff --git a/ansible/templates/minigraph_dpg.j2 b/ansible/templates/minigraph_dpg.j2 index c4e0a7d5467..1354f719c61 100644 --- a/ansible/templates/minigraph_dpg.j2 +++ b/ansible/templates/minigraph_dpg.j2 @@ -19,7 +19,7 @@ {{ lp_ipv6 }} - {% if num_asics == 1 and switch_type is defined and switch_type == 'voq' %} + {% if num_asics == 1 and switch_type is defined and (switch_type == 'voq' or switch_type == 'chassis-packet') %} {% if loopback4096_ip is defined %} HostIP1 @@ -266,6 +266,5 @@ {% include 'minigraph_dpg_asic.j2' %} -{% include 'minigraph_dpg_voq_asic.j2' %} diff --git a/ansible/templates/minigraph_dpg_asic.j2 b/ansible/templates/minigraph_dpg_asic.j2 index c20bce69aed..ceca239598e 100644 --- a/ansible/templates/minigraph_dpg_asic.j2 +++ b/ansible/templates/minigraph_dpg_asic.j2 @@ -1,11 +1,16 @@ +{# Note max of 10 Backend Portchannel from one asic #} {% macro port_channel_id(asic_idx, neigh_asic_idx) -%} -{{ ((4000 + asic_idx + (10*neigh_asic_idx))|string) }} +{{ ((40 + 10 * asic_idx + neigh_asic_idx)|string) }} {%- endmacro -%} -{% for asic in asic_topo_config %} +{% if num_asics > 1 %} +{% if (asic_topo_config and slot_num is defined and slot_num in asic_topo_config) or (asic_topo_config and slot_num is not defined) %} +{% for asic,asic_config in asic_topo_config[slot_num|default('slot0')].items() %} {% set asic_index = asic.split('ASIC')[1]|int %} +{% set asic_name = "ASIC" + asic_index|string %} +{% if card_type is not defined or card_type != 'supervisor' %} HostIP Loopback0 @@ -22,16 +27,25 @@ {{ lp_ipv6 }} -{% for lo4096 in asic_topo_config[asic]['Loopback4096'] %} +{% if loopback4096_ip is defined %} HostIP1 Loopback4096 - {{ lo4096 }} + {{ loopback4096_ip[asic_index] }} - {{ lo4096 }} + {{ loopback4096_ip[asic_index] }} -{% endfor %} + + HostIP1 + Loopback4096 + + {{ loopback4096_ipv6[asic_index] }} + + {{ loopback4096_ipv6[asic_index] }} + +{% endif %} +{% endif %} @@ -52,52 +66,83 @@ +{% if voq_inband_ip is defined or voq_inband_ipv6 is defined %} + +{% if voq_inband_ip is defined %} + + {{ voq_inband_intf[asic_index] }} + {{ voq_inband_type }} + {{ voq_inband_ip[asic_index] }} + +{% endif %} +{% if voq_inband_ipv6 is defined %} + + {{ voq_inband_intf[asic_index] }} + {{ voq_inband_type }} + {{ voq_inband_ipv6[asic_index] }} + +{% endif %} + +{% endif %} - {{ asic }} + {{ asic_name }} {% if card_type is not defined or card_type != 'supervisor' %} {% for index in range(vms_number) %} -{% if vm_asic_ifnames[vms[index]][0].split('-')[1] == asic %} +{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} {% set port_channel_intf=';'.join(vm_asic_ifnames[vms[index]]) %} - PortChannel{{ ((index+1)|string).zfill(4) }} + PortChannel{{ ((index+1)|string).zfill(2) }} {{ port_channel_intf }} {% endif %} {% endif %} {% endfor %} -{% for neigh_asic in asic_topo_config %} +{% endif %} +{%- set vlan_intfs = [] -%} +{% for neigh_asic in asic_config['neigh_asic'] %} {%- set pc_intfs = [] -%} -{%- if neigh_asic in asic_topo_config[asic]['neigh_asic'] and 'port-channel' in asic_topo_config[asic]['neigh_asic'][neigh_asic]['ip_intf'][0]|lower -%} -{%- for intf in asic_topo_config[asic]['neigh_asic'][neigh_asic]['asic_intfs'][0] %} +{# Assumption - Backed ASIC always have port-channel connectivity #} +{%- for intf in asic_config['neigh_asic'][neigh_asic]['asic_intfs'][0] %} {{- pc_intfs.append(intf) }} {%- endfor -%} {%- set port_channel_intf=pc_intfs|join(';') -%} {% set neigh_asic_index = neigh_asic.split('ASIC')[1]|int %} - PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(4) }} + PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(2) }} {{ port_channel_intf }} -{% endif %} +{% set vlan_intf = 'PortChannel' + port_channel_id(asic_index, neigh_asic_index).zfill(2) %} +{{- vlan_intfs.append(vlan_intf) -}} {% endfor %} -{% endif %} - +{% if card_type is defined and card_type == 'supervisor' and vlan_intfs %} + + + Vlan2 +{% set vlan_intf_str=';'.join(vlan_intfs) %} + {{ vlan_intf_str }} + Tagged + 2 + + +{% else %} +{% endif %} {% if card_type is not defined or card_type != 'supervisor' %} {% for index in range(vms_number) %} -{% if vm_asic_ifnames[vms[index]][0].split('-')[1] == asic %} +{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} {% if vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int] is not none %} {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} - PortChannel{{ ((index+1) |string).zfill(4) }} + PortChannel{{ ((index+1) |string).zfill(2) }} {% else %} {{ front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }} {% endif %} @@ -106,7 +151,7 @@ {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} - PortChannel{{ ((index+1) |string).zfill(4) }} + PortChannel{{ ((index+1) |string).zfill(2) }} {% else %} {{ front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }} {% endif %} @@ -115,30 +160,84 @@ {% endif %} {% endif %} {% endfor %} -{% for neigh_asic in asic_topo_config[asic]['neigh_asic'] %} - - -{%- if 'port-channel' in asic_topo_config[asic]['neigh_asic'][neigh_asic]['ip_intf'][0]|lower %} +{% if switch_type is defined and switch_type == 'chassis-packet' %} + + +{% for neigh_asic in asic_config['neigh_asic'] %} {%- set neigh_asic_index = neigh_asic.split('ASIC')[1]|int %} - PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(4) }} -{% else %} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['asic_intfs'][0][0] }} + + + PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(2) }} + 2 + dot1q + {{ asic_config['neigh_asic'][neigh_asic]['bgp_ipv4'][0] }}/{{ asic_config['neigh_asic'][neigh_asic]['ipv4mask'][0] }} + + + + PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(2) }} + 2 + dot1q + {{ asic_config['neigh_asic'][neigh_asic]['bgp_ipv6'][0] }}/{{ asic_config['neigh_asic'][neigh_asic]['ipv6mask'][0] }} + +{% endfor %} + + +{% for a_linecard in all_loopback4096 %} +{% for idx in range(all_loopback4096[a_linecard]|length) %} +{% set remote_asic_name = "ASIC" + idx|string %} +{% if a_linecard != inventory_hostname or idx != asic_index %} +{%- set nexthop_intfs = [] -%} +{%- set nexthop_v6_intfs = [] -%} +{% for asic,asic_config in asic_topo_config[all_slots[a_linecard]].items() %} +{% if (a_linecard != inventory_hostname and asic == remote_asic_name) or (a_linecard == inventory_hostname and asic != asic_name) %} +{% for neigh_asic in asic_config['neigh_asic'] %} +{% set _ = nexthop_intfs.append(asic_config['neigh_asic'][neigh_asic]['bgp_ipv4'][0]) %} +{% set _ = nexthop_v6_intfs.append(asic_config['neigh_asic'][neigh_asic]['bgp_ipv6'][0]) %} +{% endfor %} +{% endif %} +{% endfor %} + + IPNextHop + + {{ all_loopback4096[a_linecard][idx] }} + StaticRoute +
+{{- nexthop_intfs|join(',') -}} +
+
+ + IPNextHop + + {{ all_loopback4096_ipv6[a_linecard][idx] }} + StaticRoute +
+{{- nexthop_v6_intfs|join(',') -}} +
+
{% endif %} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['bgp_ipv4'][0] }}/{{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['ipv4mask'][0] }} +{% endfor %} +{% endfor %} +
+{% else %} +{% for neigh_asic in asic_config['neigh_asic'] %} +{%- set neigh_asic_index = neigh_asic.split('ASIC')[1]|int %} + + + PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(2) }} + {{ asic_config['neigh_asic'][neigh_asic]['bgp_ipv4'][0] }}/{{ asic_config['neigh_asic'][neigh_asic]['ipv4mask'][0] }} -{%- if 'port-channel' in asic_topo_config[asic]['neigh_asic'][neigh_asic]['ip_intf'][0]|lower %} -{%- set neigh_asic_index = neigh_asic.split('ASIC')[1]|int %} - PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(4) }} -{% else %} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['asic_intfs'][0][0] }} -{% endif %} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['bgp_ipv6'][0] }}/{{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['ipv6mask'][0] }} + PortChannel{{ port_channel_id(asic_index, neigh_asic_index).zfill(2) }} + {{ asic_config['neigh_asic'][neigh_asic]['bgp_ipv6'][0] }}/{{ asic_config['neigh_asic'][neigh_asic]['ipv6mask'][0] }} {% endfor %} + {% endif %} +{% else %} + +{% endif %} @@ -166,41 +265,33 @@ {%- set acl_intfs = [] -%} {% if card_type is not defined or card_type != 'supervisor' %} {%- for index in range(vms_number) %} -{% if vm_asic_ifnames[vms[index]][0].split('-')[1] == asic %} +{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][0]|lower %} -{% set a_intf = 'PortChannel' + ((index+1) |string).zfill(4) %} +{% set a_intf = 'PortChannel' + ((index+1) |string).zfill(2) %} {{- acl_intfs.append(a_intf) -}} {% endif %} {% endif %} {% endfor %} -{% for neigh_asic in asic_topo_config %} +{% for neigh_asic in asic_config['neigh_asic'] %} {% set neigh_asic_index = neigh_asic.split('ASIC')[1]|int %} -{%- if neigh_asic in asic_topo_config[asic]['neigh_asic'] and 'port-channel' in asic_topo_config[asic]['neigh_asic'][neigh_asic]['ip_intf'][0]|lower -%} -{% set a_intf = 'PortChannel' + port_channel_id(asic_index, neigh_asic_index).zfill(4) %} +{% set a_intf = 'PortChannel' + port_channel_id(asic_index, neigh_asic_index).zfill(2) %} {{- acl_intfs.append(a_intf) -}} -{% endif %} {% endfor %} - {%- for index in range(vms_number) -%} -{% if vm_asic_ifnames[vms[index]][0].split('-')[1] == asic %} -{% if 'port-channel' not in vm_topo_config['vm'][vms[index]]['ip_intf'][0]|lower %} +{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} {% if vm_topo_config['vm'][vms[index]]['intfs'][dut_index|int]|length %} {% set a_intf = front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] %} {{- acl_intfs.append(a_intf) -}} {% endif %} {% endif %} -{% endif %} {% endfor -%} -{%- for neigh_asic in asic_topo_config -%} -{%- if neigh_asic in asic_topo_config[asic]['neigh_asic'] and 'port-channel' not in asic_topo_config[asic]['neigh_asic'][neigh_asic]['ip_intf'][0]|lower -%} -{% if asic_topo_config[asic]['neigh_asic'][neigh_asic]['intfs'][0]|length %} -{% set a_intf = asic_topo_config[asic]['neigh_asic'][neigh_asic]['asic_intfs'][0][0] %} +{% for neigh_asic in asic_config['neigh_asic'] %} +{% if asic_config['neigh_asic'][neigh_asic]['intfs'][0]|length %} +{% set a_intf = asic_config['neigh_asic'][neigh_asic]['asic_intfs'][0][0] %} {{- acl_intfs.append(a_intf) -}} {% endif %} -{% endif %} {% endfor %} {% endif %} - {{- acl_intfs|join(';') -}} DataAcl @@ -210,6 +301,10 @@
+{% endfor %} +{% endif %} +{% endif %} +{% if switch_type is defined and switch_type == 'fabric' %} {% for asic in fabric_info %} @@ -246,5 +341,4 @@ {% endfor %} -{% endfor %} - +{% endif %} diff --git a/ansible/templates/minigraph_dpg_voq_asic.j2 b/ansible/templates/minigraph_dpg_voq_asic.j2 deleted file mode 100644 index 35bd6e8e335..00000000000 --- a/ansible/templates/minigraph_dpg_voq_asic.j2 +++ /dev/null @@ -1,218 +0,0 @@ -{% if num_asics > 1 and switch_type is defined and switch_type == 'voq' %} -{% for asic_index in range(num_asics) %} -{% set asic_name = "ASIC" + asic_index|string %} - - - - - HostIP - Loopback0 - - {{ lp_ipv4 }} - - {{ lp_ipv4 }} - - - HostIP1 - Loopback0 - - {{ lp_ipv6 }} - - {{ lp_ipv6 }} - -{% if loopback4096_ip is defined %} - - HostIP1 - Loopback4096 - - {{ loopback4096_ip[asic_index] }} - - {{ loopback4096_ip[asic_index] }} - - - HostIP1 - Loopback4096 - - {{ loopback4096_ipv6[asic_index] }} - - {{ loopback4096_ipv6[asic_index] }} - -{% endif %} - - - - HostIP - eth0 - - {{ ansible_host }}/{{ mgmt_subnet_mask_length }} - - {{ ansible_host }}/{{ mgmt_subnet_mask_length }} - - - V6HostIP - eth0 - - {{ ansible_hostv6 if ansible_hostv6 is defined else 'FC00:2::32' }}/64 - - {{ ansible_hostv6 if ansible_hostv6 is defined else 'FC00:2::32' }}/64 - - - -{% if voq_inband_ip is defined or voq_inband_ipv6 is defined %} - -{% if voq_inband_ip is defined %} - - {{ voq_inband_intf[asic_index] }} - {{ voq_inband_type }} - {{ voq_inband_ip[asic_index] }} - -{% endif %} -{% if voq_inband_ipv6 is defined %} - - {{ voq_inband_intf[asic_index] }} - {{ voq_inband_type }} - {{ voq_inband_ipv6[asic_index] }} - -{% endif %} - -{% endif %} - - - - {{ asic_name }} - -{% for index in range(vms_number) %} -{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} -{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} -{% set port_channel_intf=';'.join(vm_asic_ifnames[vms[index]]) %} - - PortChannel{{ ((index+1)|string).zfill(4) }} - {{ port_channel_intf }} - - -{% endif %} -{% endif %} -{% endfor %} - - - - -{% for index in range(vms_number) %} -{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} -{% if vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int] is not none %} - - -{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} - PortChannel{{ ((index+1) |string).zfill(4) }} -{% else %} - {{ front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }} -{% endif %} - {{ vm_topo_config['vm'][vms[index]]['bgp_ipv4'][dut_index|int] }}/{{ vm_topo_config['vm'][vms[index]]['ipv4mask'][dut_index|int] }} - - - -{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} - PortChannel{{ ((index+1) |string).zfill(4) }} -{% else %} - {{ front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }} -{% endif %} - {{ vm_topo_config['vm'][vms[index]]['bgp_ipv6'][dut_index|int] }}/{{ vm_topo_config['vm'][vms[index]]['ipv6mask'][dut_index|int] }} - -{% endif %} -{% endif %} -{% endfor %} - - - - - SNMP_ACL - SNMP - SNMP - - - ERSPAN - Everflow - Everflow - - - ERSPANV6 - EverflowV6 - EverflowV6 - - - VTY_LINE - ssh-only - SSH - - - -{%- set acl_intfs = [] -%} -{%- for index in range(vms_number) %} -{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} -{% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][0]|lower %} -{% set a_intf = 'PortChannel' + ((index+1) |string).zfill(4) %} -{{- acl_intfs.append(a_intf) -}} -{% endif %} -{% endif %} -{% endfor %} -{%- for index in range(vms_number) -%} -{% if vms[index] in vm_asic_ifnames and vm_asic_ifnames[vms[index]][0].split('-')[1] == asic_name %} -{% if 'port-channel' not in vm_topo_config['vm'][vms[index]]['ip_intf'][0]|lower %} -{% if vm_topo_config['vm'][vms[index]]['intfs'][dut_index|int]|length %} -{% set a_intf = front_panel_asic_ifnames[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] %} -{{- acl_intfs.append(a_intf) -}} -{% endif %} -{% endif %} -{% endif %} -{% endfor -%} -{{- acl_intfs|join(';') -}} - - DataAcl - DataPlane - - - - - -{% endfor %} -{% endif %} -{% if switch_type is defined and switch_type == 'fabric' %} -{% for asic in fabric_info %} - - - - - HostIP - Loopback0 - - {{ asic['ip_prefix'] }} - - {{ asic['ip_prefix'] }} - - - HostIP - Loopback0 - - {{ asic['ip6_prefix'] }} - - {{ asic['ip6_prefix'] }} - - - - - - - - {{ asic['asicname'] }} - - - - - - - - -{% endfor %} -{% endif %} - - diff --git a/ansible/templates/minigraph_meta.j2 b/ansible/templates/minigraph_meta.j2 index 3fe782e7fb0..3f459d61da8 100644 --- a/ansible/templates/minigraph_meta.j2 +++ b/ansible/templates/minigraph_meta.j2 @@ -91,12 +91,14 @@ {{ erspan_dest_str }} {% endif %} -{% if num_asics == 1 and switch_type is defined and switch_type == 'voq' %} +{% if switch_type is defined %} SwitchType {{ switch_type }} +{% endif %} +{% if num_asics == 1 and switch_type is defined and switch_type == 'voq' %} SwitchId @@ -144,38 +146,27 @@ {% endfor %} {% endif %} -{% for asic in asic_topo_config %} +{% if (asic_topo_config and slot_num is defined and slot_num in asic_topo_config) or (asic_topo_config and slot_num is not defined) %} +{% for asic,asic_config in asic_topo_config[slot_num|default('slot0')].items() %} {{ asic }} SubRole - {{ asic_topo_config[asic]['asic_type'] }} + {{ asic_config['asic_type'] }} - -{% if switch_type is defined and switch_type == 'voq' %} +{% if switch_type is defined %} SwitchType {{ switch_type }} - - SwitchId - - {{ start_switchid + idx }} -{% set idx = idx + 1 %} - -{% endif %} -{% if max_cores is defined %} - - MaxCores - - {{ max_cores }} - {% endif %} + {% endfor %} +{% endif %} {% for asic in fabric_info %} {{ asic['asicname'] }} diff --git a/ansible/templates/minigraph_png.j2 b/ansible/templates/minigraph_png.j2 index e694a7fafee..46f1af2b483 100644 --- a/ansible/templates/minigraph_png.j2 +++ b/ansible/templates/minigraph_png.j2 @@ -55,32 +55,28 @@ {% endfor %} {% endif %} {% endif %} -{% for asic in asic_topo_config %} -{% for neigh_asic in asic_topo_config[asic]['neigh_asic'] %} -{% for intf in asic_topo_config[asic]['neigh_asic'][neigh_asic]['intfs'][0] | sort %} +{% if ((asic_topo_config and slot_num is defined and slot_num in asic_topo_config) or (asic_topo_config and slot_num is not defined)) %} +{% for asic,asic_config in asic_topo_config[slot_num|default('slot0')].items() %} +{% for neigh_asic in asic_config['neigh_asic'] %} +{% for intf in asic_config['neigh_asic'][neigh_asic]['intfs'][0] | sort %} DeviceInterfaceLink - 40000 true {{ neigh_asic }} {{ intf }} true {{ asic }} - {{ asic_topo_config[asic]['neigh_asic'][neigh_asic]['asic_intfs'][0][loop.index-1] }} + {{ asic_config['neigh_asic'][neigh_asic]['asic_intfs'][0][loop.index-1] }} true {% endfor %} {% endfor %} {% endfor %} +{% endif %} {% for asic_intf in front_panel_asic_ifnames %} {% if inventory_hostname not in device_conn or port_alias[loop.index - 1] in device_conn[inventory_hostname] %} DeviceInterfaceLink -{% if port_alias[loop.index - 1] in port_speed %} - {{ port_speed[port_alias[loop.index - 1]] }} -{% else %} - 40000 -{% endif %} true {{ asic_intf.split('-')[1] }} {{ asic_intf }} @@ -196,7 +192,9 @@ {% endif %} {% endfor %} {% endif %} -{% for asic in asic_topo_config %} +{% if num_asics > 1 %} +{% for asic_index in range(num_asics) %} +{% set asic_name = "ASIC" + asic_index|string %} Asic
@@ -219,16 +217,8 @@ ::/0 - {{ asic }} - Broadcom-Trident2 - -{% endfor %} -{% if num_asics > 1 and switch_type is defined and switch_type == 'voq' %} -{% for asic_index in range(num_asics) %} -{% set asic_name = "ASIC" + asic_index|string %} - - Asic {{ asic_name }} + Broadcom-Trident2 {% endfor %} {% endif %} diff --git a/ansible/testbed.yaml b/ansible/testbed.yaml index c6278a07ec6..46ee0c1edf6 100644 --- a/ansible/testbed.yaml +++ b/ansible/testbed.yaml @@ -169,3 +169,19 @@ dut: - vlab-01 comment: Test ptf ANVL SONIC VM + +- conf-name: vms-chassis-packet-dut + group-name: vms-dummy-dut + topo: t2 + ptf_image_name: docker-ptf + ptf: ptf-unknown + ptf_ip: 1.1.1.1/23 + ptf_ipv6: + server: dummy_1 + vm_base: DUMMY0001 + dut: + - lab-msft-lc0-1 + - lab-msft-lc1-1 + - lab-msft-lc2-1 + - lab-msft-sup-1 + comment: Chasiss Testbed diff --git a/ansible/vars/topo_msft-LC-48H-O.yml b/ansible/vars/topo_msft-LC-48H-O.yml new file mode 100644 index 00000000000..33077896a35 --- /dev/null +++ b/ansible/vars/topo_msft-LC-48H-O.yml @@ -0,0 +1,134 @@ +slot1: + ASIC0: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth2250-ASIC0 + - Eth2252-ASIC0 + - Eth2254-ASIC0 + ASIC1: + asic_intfs: + - Eth2064-ASIC0 + - Eth2246-ASIC0 + - Eth2248-ASIC0 + - Eth2262-ASIC0 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.1.1/24 + - 2603:10e2:400:1::1/64 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.2.1/24 + - 2603:10e2:400:2::1/64 + ASIC1: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth2504-ASIC1 + - Eth2508-ASIC1 + - Eth2510-ASIC1 + ASIC1: + asic_intfs: + - Eth2320-ASIC1 + - Eth2502-ASIC1 + - Eth2506-ASIC1 + - Eth2518-ASIC1 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.1.2/24 + - 2603:10e2:400:1::2/64 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.2.2/24 + - 2603:10e2:400:2::2/64 +slot2: + ASIC0: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth2250-ASIC0 + - Eth2252-ASIC0 + - Eth2254-ASIC0 + ASIC1: + asic_intfs: + - Eth2064-ASIC0 + - Eth2246-ASIC0 + - Eth2248-ASIC0 + - Eth2262-ASIC0 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.1.3/24 + - 2603:10e2:400:1::3/64 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.2.3/24 + - 2603:10e2:400:2::3/64 + ASIC1: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth2504-ASIC1 + - Eth2508-ASIC1 + - Eth2510-ASIC1 + ASIC1: + asic_intfs: + - Eth2320-ASIC1 + - Eth2502-ASIC1 + - Eth2506-ASIC1 + - Eth2518-ASIC1 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.1.4/24 + - 2603:10e2:400:1::4/64 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.0.2.4/24 + - 2603:10e2:400:2::4/64 diff --git a/ansible/vars/topo_msft-RP-O.yml b/ansible/vars/topo_msft-RP-O.yml new file mode 100644 index 00000000000..a065e677f69 --- /dev/null +++ b/ansible/vars/topo_msft-RP-O.yml @@ -0,0 +1,57 @@ +slot0: + ASIC0: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth0194-ASIC0 + - Eth0170-ASIC0 + - Eth0162-ASIC0 + ASIC1: + asic_intfs: + - Eth0164-ASIC0 + - Eth0172-ASIC0 + - Eth0192-ASIC0 + ASIC2: + asic_intfs: + - Eth0126-ASIC0 + - Eth0144-ASIC0 + - Eth0152-ASIC0 + ASIC3: + asic_intfs: + - Eth0128-ASIC0 + - Eth0146-ASIC0 + - Eth0154-ASIC0 + configuration_properties: + common: + asic_type: BackEnd + ASIC1: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth0438-ASIC1 + - Eth0454-ASIC1 + - Eth0462-ASIC1 + - Eth0464-ASIC1 + ASIC1: + asic_intfs: + - Eth0440-ASIC1 + - Eth0456-ASIC1 + - Eth0466-ASIC1 + - Eth0468-ASIC1 + ASIC2: + asic_intfs: + - Eth0424-ASIC1 + - Eth0432-ASIC1 + - Eth0444-ASIC1 + - Eth0448-ASIC1 + ASIC3: + asic_intfs: + - Eth0422-ASIC1 + - Eth0430-ASIC1 + - Eth0446-ASIC1 + - Eth0450-ASIC1 + configuration_properties: + common: + asic_type: BackEnd diff --git a/ansible/vars/topo_msft_four_asic_vs.yml b/ansible/vars/topo_msft_four_asic_vs.yml index ee5bc27cb21..bf68d65e4c9 100644 --- a/ansible/vars/topo_msft_four_asic_vs.yml +++ b/ansible/vars/topo_msft_four_asic_vs.yml @@ -1,197 +1,185 @@ -ASIC0: - topology: - NEIGH_ASIC: - ASIC2: - asic_intfs: - - Eth4-ASIC0 - - Eth5-ASIC0 - ASIC3: - asic_intfs: - - Eth6-ASIC0 - - Eth7-ASIC0 - configuration_properties: - common: - dut_asn: 65100 - asic_type: FrontEnd - Loopback4096: - - 8.0.0.0/32 - - 2603:10e2:400::/128 - configuration: - ASIC2: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.1 - - 2603:10e2:400:1::2 - interfaces: - Eth0-ASIC2: - lacp: 1 - Eth1-ASIC2: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.0/31 - ipv6: 2603:10e2:400:1::1/126 - ASIC3: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.3 - - 2603:10e2:400:1::6 - interfaces: - Eth0-ASIC3: - lacp: 2 - Eth1-ASIC3: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.2/31 - ipv6: 2603:10e2:400:1::5/126 -ASIC1: - topology: - NEIGH_ASIC: - ASIC2: - asic_intfs: - - Eth4-ASIC1 - - Eth5-ASIC1 - ASIC3: - asic_intfs: - - Eth6-ASIC1 - - Eth7-ASIC1 - configuration_properties: - common: - dut_asn: 65100 - asic_type: FrontEnd - Loopback4096: - - 8.0.0.1/32 - - 2603:10e2:400::1/128 - configuration: - ASIC2: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.5 - - 2603:10e2:400:1::a - interfaces: - Eth2-ASIC2: - lacp: 1 - Eth3-ASIC2: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.4/31 - ipv6: 2603:10e2:400:1::9/126 - ASIC3: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.7 - - 2603:10e2:400:1::e - interfaces: - Eth2-ASIC3: - lacp: 2 - Eth3-ASIC3: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.6/31 - ipv6: 2603:10e2:400:1::d/126 -ASIC2: - topology: - NEIGH_ASIC: - ASIC0: - asic_intfs: - - Eth0-ASIC2 - - Eth1-ASIC2 - ASIC1: - asic_intfs: - - Eth2-ASIC2 - - Eth3-ASIC2 - configuration_properties: - common: - dut_asn: 65100 - asic_type: BackEnd - Loopback4096: - - 8.0.0.2/32 - - 2603:10e2:400::2/128 - configuration: +slot0: ASIC0: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.0 - - 2603:10e2:400:1::1 - interfaces: - Eth4-ASIC0: - lacp: 1 - Eth5-ASIC0: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.1/31 - ipv6: 2603:10e2:400:1::2/126 + topology: + NEIGH_ASIC: + ASIC2: + asic_intfs: + - Eth4-ASIC0 + - Eth5-ASIC0 + ASIC3: + asic_intfs: + - Eth6-ASIC0 + - Eth7-ASIC0 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC2: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.1 + - 2603:10e2:400:1::2 + interfaces: + Eth0-ASIC2: + lacp: 1 + Eth1-ASIC2: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.0/31 + ipv6: 2603:10e2:400:1::1/126 + ASIC3: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.3 + - 2603:10e2:400:1::6 + interfaces: + Eth0-ASIC3: + lacp: 2 + Eth1-ASIC3: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.2/31 + ipv6: 2603:10e2:400:1::5/126 ASIC1: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.4 - - 2603:10e2:400:1::9 - interfaces: - Eth4-ASIC1: - lacp: 2 - Eth5-ASIC1: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.5/31 - ipv6: 2603:10e2:400:1::a/126 -ASIC3: - topology: - NEIGH_ASIC: - ASIC0: - asic_intfs: - - Eth0-ASIC3 - - Eth1-ASIC3 - ASIC1: - asic_intfs: - - Eth2-ASIC3 - - Eth3-ASIC3 - configuration_properties: - common: - dut_asn: 65100 - asic_type: BackEnd - Loopback4096: - - 8.0.0.3/32 - - 2603:10e2:400::3/128 - - configuration: - ASIC0: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.2 - - 2603:10e2:400:1::5 - interfaces: - Eth6-ASIC0: - lacp: 1 - Eth7-ASIC0: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.3/31 - ipv6: 2603:10e2:400:1::6/126 - ASIC1: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.6 - - 2603:10e2:400:1::d - interfaces: - Eth6-ASIC1: - lacp: 2 - Eth7-ASIC1: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.7/31 - ipv6: 2603:10e2:400:1::e/126 + topology: + NEIGH_ASIC: + ASIC2: + asic_intfs: + - Eth4-ASIC1 + - Eth5-ASIC1 + ASIC3: + asic_intfs: + - Eth6-ASIC1 + - Eth7-ASIC1 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC2: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.5 + - 2603:10e2:400:1::a + interfaces: + Eth2-ASIC2: + lacp: 1 + Eth3-ASIC2: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.4/31 + ipv6: 2603:10e2:400:1::9/126 + ASIC3: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.7 + - 2603:10e2:400:1::e + interfaces: + Eth2-ASIC3: + lacp: 2 + Eth3-ASIC3: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.6/31 + ipv6: 2603:10e2:400:1::d/126 + ASIC2: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth0-ASIC2 + - Eth1-ASIC2 + ASIC1: + asic_intfs: + - Eth2-ASIC2 + - Eth3-ASIC2 + configuration_properties: + common: + dut_asn: 65100 + asic_type: BackEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.0 + - 2603:10e2:400:1::1 + interfaces: + Eth4-ASIC0: + lacp: 1 + Eth5-ASIC0: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.1/31 + ipv6: 2603:10e2:400:1::2/126 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.4 + - 2603:10e2:400:1::9 + interfaces: + Eth4-ASIC1: + lacp: 2 + Eth5-ASIC1: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.5/31 + ipv6: 2603:10e2:400:1::a/126 + ASIC3: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth0-ASIC3 + - Eth1-ASIC3 + ASIC1: + asic_intfs: + - Eth2-ASIC3 + - Eth3-ASIC3 + configuration_properties: + common: + dut_asn: 65100 + asic_type: BackEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.2 + - 2603:10e2:400:1::5 + interfaces: + Eth6-ASIC0: + lacp: 1 + Eth7-ASIC0: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.3/31 + ipv6: 2603:10e2:400:1::6/126 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.6 + - 2603:10e2:400:1::d + interfaces: + Eth6-ASIC1: + lacp: 2 + Eth7-ASIC1: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.7/31 + ipv6: 2603:10e2:400:1::e/126 diff --git a/ansible/vars/topo_msft_multi_asic_vs.yml b/ansible/vars/topo_msft_multi_asic_vs.yml index 7c2fb0c7add..85ca47e0011 100644 --- a/ansible/vars/topo_msft_multi_asic_vs.yml +++ b/ansible/vars/topo_msft_multi_asic_vs.yml @@ -1,659 +1,641 @@ -ASIC0: - topology: - NEIGH_ASIC: - ASIC4: - asic_intfs: - - Eth16-ASIC0 - - Eth17-ASIC0 - - Eth18-ASIC0 - - Eth19-ASIC0 - - Eth20-ASIC0 - - Eth21-ASIC0 - - Eth22-ASIC0 - - Eth23-ASIC0 - ASIC5: - asic_intfs: - - Eth24-ASIC0 - - Eth25-ASIC0 - - Eth26-ASIC0 - - Eth27-ASIC0 - - Eth28-ASIC0 - - Eth29-ASIC0 - - Eth30-ASIC0 - - Eth31-ASIC0 - configuration_properties: - common: - dut_asn: 65100 - asic_type: FrontEnd - Loopback4096: - - 8.0.0.0/32 - - 2603:10e2:400::/128 - configuration: - ASIC4: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.1 - - 2603:10e2:400:1::2 - interfaces: - Eth0-ASIC4: - lacp: 1 - Eth1-ASIC4: - lacp: 1 - Eth2-ASIC4: - lacp: 1 - Eth3-ASIC4: - lacp: 1 - Eth4-ASIC4: - lacp: 1 - Eth5-ASIC4: - lacp: 1 - Eth6-ASIC4: - lacp: 1 - Eth7-ASIC4: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.0/31 - ipv6: 2603:10e2:400:1::1/126 - ASIC5: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.3 - - 2603:10e2:400:1::6 - interfaces: - Eth0-ASIC5: - lacp: 2 - Eth1-ASIC5: - lacp: 2 - Eth2-ASIC5: - lacp: 2 - Eth3-ASIC5: - lacp: 2 - Eth4-ASIC5: - lacp: 2 - Eth5-ASIC5: - lacp: 2 - Eth6-ASIC5: - lacp: 2 - Eth7-ASIC5: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.2/31 - ipv6: 2603:10e2:400:1::5/126 -ASIC1: - topology: - NEIGH_ASIC: - ASIC4: - asic_intfs: - - Eth16-ASIC1 - - Eth17-ASIC1 - - Eth18-ASIC1 - - Eth19-ASIC1 - - Eth20-ASIC1 - - Eth21-ASIC1 - - Eth22-ASIC1 - - Eth23-ASIC1 - ASIC5: - asic_intfs: - - Eth24-ASIC1 - - Eth25-ASIC1 - - Eth26-ASIC1 - - Eth27-ASIC1 - - Eth28-ASIC1 - - Eth29-ASIC1 - - Eth30-ASIC1 - - Eth31-ASIC1 - configuration_properties: - common: - dut_asn: 65100 - asic_type: FrontEnd - Loopback4096: - - 8.0.0.1/32 - - 2603:10e2:400::1/128 - configuration: - ASIC4: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.5 - - 2603:10e2:400:1::a - interfaces: - Eth8-ASIC4: - lacp: 1 - Eth9-ASIC4: - lacp: 1 - Eth10-ASIC4: - lacp: 1 - Eth11-ASIC4: - lacp: 1 - Eth12-ASIC4: - lacp: 1 - Eth13-ASIC4: - lacp: 1 - Eth14-ASIC4: - lacp: 1 - Eth15-ASIC4: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.4/31 - ipv6: 2603:10e2:400:1::9/126 - ASIC5: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.7 - - 2603:10e2:400:1::e - interfaces: - Eth8-ASIC5: - lacp: 2 - Eth9-ASIC5: - lacp: 2 - Eth10-ASIC5: - lacp: 2 - Eth11-ASIC5: - lacp: 2 - Eth12-ASIC5: - lacp: 2 - Eth13-ASIC5: - lacp: 2 - Eth14-ASIC5: - lacp: 2 - Eth15-ASIC5: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.6/31 - ipv6: 2603:10e2:400:1::d/126 -ASIC2: - topology: - NEIGH_ASIC: - ASIC4: - asic_intfs: - - Eth16-ASIC2 - - Eth17-ASIC2 - - Eth18-ASIC2 - - Eth19-ASIC2 - - Eth20-ASIC2 - - Eth21-ASIC2 - - Eth22-ASIC2 - - Eth23-ASIC2 - ASIC5: - asic_intfs: - - Eth24-ASIC2 - - Eth25-ASIC2 - - Eth26-ASIC2 - - Eth27-ASIC2 - - Eth28-ASIC2 - - Eth29-ASIC2 - - Eth30-ASIC2 - - Eth31-ASIC2 - configuration_properties: - common: - dut_asn: 65100 - asic_type: FrontEnd - Loopback4096: - - 8.0.0.2/32 - - 2603:10e2:400::2/128 - configuration: - ASIC4: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.9 - - 2603:10e2:400:1::11 - interfaces: - Eth24-ASIC4: - lacp: 1 - Eth25-ASIC4: - lacp: 1 - Eth26-ASIC4: - lacp: 1 - Eth27-ASIC4: - lacp: 1 - Eth28-ASIC4: - lacp: 1 - Eth29-ASIC4: - lacp: 1 - Eth30-ASIC4: - lacp: 1 - Eth31-ASIC4: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.8/31 - ipv6: 2603:10e2:400:1::12/126 - ASIC5: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.11 - - 2603:10e2:400:1::16 - interfaces: - Eth24-ASIC5: - lacp: 2 - Eth25-ASIC5: - lacp: 2 - Eth26-ASIC5: - lacp: 2 - Eth27-ASIC5: - lacp: 2 - Eth28-ASIC5: - lacp: 2 - Eth29-ASIC5: - lacp: 2 - Eth30-ASIC5: - lacp: 2 - Eth31-ASIC5: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.10/31 - ipv6: 2603:10e2:400:1::15/126 -ASIC3: - topology: - NEIGH_ASIC: - ASIC4: - asic_intfs: - - Eth16-ASIC3 - - Eth17-ASIC3 - - Eth18-ASIC3 - - Eth19-ASIC3 - - Eth20-ASIC3 - - Eth21-ASIC3 - - Eth22-ASIC3 - - Eth23-ASIC3 - ASIC5: - asic_intfs: - - Eth24-ASIC3 - - Eth25-ASIC3 - - Eth26-ASIC3 - - Eth27-ASIC3 - - Eth28-ASIC3 - - Eth29-ASIC3 - - Eth30-ASIC3 - - Eth31-ASIC3 - configuration_properties: - common: - dut_asn: 65100 - asic_type: FrontEnd - Loopback4096: - - 8.0.0.3/32 - - 2603:10e2:400::3/128 - configuration: - ASIC4: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.13 - - 2603:10e2:400:1::1a - interfaces: - Eth24-ASIC4: - lacp: 1 - Eth25-ASIC4: - lacp: 1 - Eth26-ASIC4: - lacp: 1 - Eth27-ASIC4: - lacp: 1 - Eth28-ASIC4: - lacp: 1 - Eth29-ASIC4: - lacp: 1 - Eth30-ASIC4: - lacp: 1 - Eth31-ASIC4: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.12/31 - ipv6: 2603:10e2:400:1::19/126 - ASIC5: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.15 - - 2603:10e2:400:1::1e - interfaces: - Eth24-ASIC5: - lacp: 2 - Eth25-ASIC5: - lacp: 2 - Eth26-ASIC5: - lacp: 2 - Eth27-ASIC5: - lacp: 2 - Eth28-ASIC5: - lacp: 2 - Eth29-ASIC5: - lacp: 2 - Eth30-ASIC5: - lacp: 2 - Eth31-ASIC5: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.14/31 - ipv6: 2603:10e2:400:1::1d/126 -ASIC4: - topology: - NEIGH_ASIC: - ASIC0: - asic_intfs: - - Eth0-ASIC4 - - Eth1-ASIC4 - - Eth2-ASIC4 - - Eth3-ASIC4 - - Eth4-ASIC4 - - Eth5-ASIC4 - - Eth6-ASIC4 - - Eth7-ASIC4 - ASIC1: - asic_intfs: - - Eth8-ASIC4 - - Eth9-ASIC4 - - Eth10-ASIC4 - - Eth11-ASIC4 - - Eth12-ASIC4 - - Eth13-ASIC4 - - Eth14-ASIC4 - - Eth15-ASIC4 - ASIC2: - asic_intfs: - - Eth16-ASIC4 - - Eth17-ASIC4 - - Eth18-ASIC4 - - Eth19-ASIC4 - - Eth20-ASIC4 - - Eth21-ASIC4 - - Eth22-ASIC4 - - Eth23-ASIC4 - ASIC3: - asic_intfs: - - Eth24-ASIC4 - - Eth25-ASIC4 - - Eth26-ASIC4 - - Eth27-ASIC4 - - Eth28-ASIC4 - - Eth29-ASIC4 - - Eth30-ASIC4 - - Eth31-ASIC4 - configuration_properties: - common: - dut_asn: 65100 - asic_type: BackEnd - Loopback4096: - - 8.0.0.4/32 - - 2603:10e2:400::4/128 - configuration: +slot0: ASIC0: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.0 - - 2603:10e2:400:1::1 - interfaces: - Eth16-ASIC0: - lacp: 1 - Eth17-ASIC0: - lacp: 1 - Eth18-ASIC0: - lacp: 1 - Eth19-ASIC0: - lacp: 1 - Eth20-ASIC0: - lacp: 1 - Eth21-ASIC0: - lacp: 1 - Eth22-ASIC0: - lacp: 1 - Eth23-ASIC0: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.1/31 - ipv6: 2603:10e2:400:1::2/126 + topology: + NEIGH_ASIC: + ASIC4: + asic_intfs: + - Eth16-ASIC0 + - Eth17-ASIC0 + - Eth18-ASIC0 + - Eth19-ASIC0 + - Eth20-ASIC0 + - Eth21-ASIC0 + - Eth22-ASIC0 + - Eth23-ASIC0 + ASIC5: + asic_intfs: + - Eth24-ASIC0 + - Eth25-ASIC0 + - Eth26-ASIC0 + - Eth27-ASIC0 + - Eth28-ASIC0 + - Eth29-ASIC0 + - Eth30-ASIC0 + - Eth31-ASIC0 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC4: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.1 + - 2603:10e2:400:1::2 + interfaces: + Eth0-ASIC4: + lacp: 1 + Eth1-ASIC4: + lacp: 1 + Eth2-ASIC4: + lacp: 1 + Eth3-ASIC4: + lacp: 1 + Eth4-ASIC4: + lacp: 1 + Eth5-ASIC4: + lacp: 1 + Eth6-ASIC4: + lacp: 1 + Eth7-ASIC4: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.0/31 + ipv6: 2603:10e2:400:1::1/126 + ASIC5: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.3 + - 2603:10e2:400:1::6 + interfaces: + Eth0-ASIC5: + lacp: 2 + Eth1-ASIC5: + lacp: 2 + Eth2-ASIC5: + lacp: 2 + Eth3-ASIC5: + lacp: 2 + Eth4-ASIC5: + lacp: 2 + Eth5-ASIC5: + lacp: 2 + Eth6-ASIC5: + lacp: 2 + Eth7-ASIC5: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.2/31 + ipv6: 2603:10e2:400:1::5/126 ASIC1: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.4 - - 2603:10e2:400:1::9 - interfaces: - Eth16-ASIC1: - lacp: 2 - Eth17-ASIC1: - lacp: 2 - Eth18-ASIC1: - lacp: 2 - Eth19-ASIC1: - lacp: 2 - Eth20-ASIC1: - lacp: 2 - Eth21-ASIC1: - lacp: 2 - Eth22-ASIC1: - lacp: 2 - Eth23-ASIC1: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.5/31 - ipv6: 2603:10e2:400:1::a/126 + topology: + NEIGH_ASIC: + ASIC4: + asic_intfs: + - Eth16-ASIC1 + - Eth17-ASIC1 + - Eth18-ASIC1 + - Eth19-ASIC1 + - Eth20-ASIC1 + - Eth21-ASIC1 + - Eth22-ASIC1 + - Eth23-ASIC1 + ASIC5: + asic_intfs: + - Eth24-ASIC1 + - Eth25-ASIC1 + - Eth26-ASIC1 + - Eth27-ASIC1 + - Eth28-ASIC1 + - Eth29-ASIC1 + - Eth30-ASIC1 + - Eth31-ASIC1 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC4: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.5 + - 2603:10e2:400:1::a + interfaces: + Eth8-ASIC4: + lacp: 1 + Eth9-ASIC4: + lacp: 1 + Eth10-ASIC4: + lacp: 1 + Eth11-ASIC4: + lacp: 1 + Eth12-ASIC4: + lacp: 1 + Eth13-ASIC4: + lacp: 1 + Eth14-ASIC4: + lacp: 1 + Eth15-ASIC4: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.4/31 + ipv6: 2603:10e2:400:1::9/126 + ASIC5: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.7 + - 2603:10e2:400:1::e + interfaces: + Eth8-ASIC5: + lacp: 2 + Eth9-ASIC5: + lacp: 2 + Eth10-ASIC5: + lacp: 2 + Eth11-ASIC5: + lacp: 2 + Eth12-ASIC5: + lacp: 2 + Eth13-ASIC5: + lacp: 2 + Eth14-ASIC5: + lacp: 2 + Eth15-ASIC5: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.6/31 + ipv6: 2603:10e2:400:1::d/126 ASIC2: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.8 - - 2603:10e2:400:1::11 - interfaces: - Eth16-ASIC2: - lacp: 3 - Eth17-ASIC2: - lacp: 3 - Eth18-ASIC2: - lacp: 3 - Eth19-ASIC2: - lacp: 3 - Eth20-ASIC2: - lacp: 3 - Eth21-ASIC2: - lacp: 3 - Eth22-ASIC2: - lacp: 3 - Eth23-ASIC2: - lacp: 3 - Port-Channel3: - ipv4: 10.1.0.9/31 - ipv6: 2603:10e2:400:1::12/126 + topology: + NEIGH_ASIC: + ASIC4: + asic_intfs: + - Eth16-ASIC2 + - Eth17-ASIC2 + - Eth18-ASIC2 + - Eth19-ASIC2 + - Eth20-ASIC2 + - Eth21-ASIC2 + - Eth22-ASIC2 + - Eth23-ASIC2 + ASIC5: + asic_intfs: + - Eth24-ASIC2 + - Eth25-ASIC2 + - Eth26-ASIC2 + - Eth27-ASIC2 + - Eth28-ASIC2 + - Eth29-ASIC2 + - Eth30-ASIC2 + - Eth31-ASIC2 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC4: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.9 + - 2603:10e2:400:1::11 + interfaces: + Eth24-ASIC4: + lacp: 1 + Eth25-ASIC4: + lacp: 1 + Eth26-ASIC4: + lacp: 1 + Eth27-ASIC4: + lacp: 1 + Eth28-ASIC4: + lacp: 1 + Eth29-ASIC4: + lacp: 1 + Eth30-ASIC4: + lacp: 1 + Eth31-ASIC4: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.8/31 + ipv6: 2603:10e2:400:1::12/126 + ASIC5: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.11 + - 2603:10e2:400:1::16 + interfaces: + Eth24-ASIC5: + lacp: 2 + Eth25-ASIC5: + lacp: 2 + Eth26-ASIC5: + lacp: 2 + Eth27-ASIC5: + lacp: 2 + Eth28-ASIC5: + lacp: 2 + Eth29-ASIC5: + lacp: 2 + Eth30-ASIC5: + lacp: 2 + Eth31-ASIC5: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.10/31 + ipv6: 2603:10e2:400:1::15/126 ASIC3: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.12 - - 2603:10e2:400:1::19 - interfaces: - Eth16-ASIC3: - lacp: 4 - Eth17-ASIC3: - lacp: 4 - Eth18-ASIC3: - lacp: 4 - Eth19-ASIC3: - lacp: 4 - Eth20-ASIC3: - lacp: 4 - Eth21-ASIC3: - lacp: 4 - Eth22-ASIC3: - lacp: 4 - Eth23-ASIC3: - lacp: 4 - Port-Channel4: - ipv4: 10.1.0.13/31 - ipv6: 2603:10e2:400:1::1a/126 -ASIC5: - topology: - NEIGH_ASIC: - ASIC0: - asic_intfs: - - Eth0-ASIC5 - - Eth1-ASIC5 - - Eth2-ASIC5 - - Eth3-ASIC5 - - Eth4-ASIC5 - - Eth5-ASIC5 - - Eth6-ASIC5 - - Eth7-ASIC5 - ASIC1: - asic_intfs: - - Eth8-ASIC5 - - Eth9-ASIC5 - - Eth10-ASIC5 - - Eth11-ASIC5 - - Eth12-ASIC5 - - Eth13-ASIC5 - - Eth14-ASIC5 - - Eth15-ASIC5 - ASIC2: - asic_intfs: - - Eth16-ASIC5 - - Eth17-ASIC5 - - Eth18-ASIC5 - - Eth19-ASIC5 - - Eth20-ASIC5 - - Eth21-ASIC5 - - Eth22-ASIC5 - - Eth23-ASIC5 - ASIC3: - asic_intfs: - - Eth24-ASIC5 - - Eth25-ASIC5 - - Eth26-ASIC5 - - Eth27-ASIC5 - - Eth28-ASIC5 - - Eth29-ASIC5 - - Eth30-ASIC5 - - Eth31-ASIC5 - configuration_properties: - common: - dut_asn: 65100 - asic_type: BackEnd - Loopback4096: - - 8.0.0.5/32 - - 2603:10e2:400::5/128 - - configuration: - ASIC0: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.2 - - 2603:10e2:400:1::5 - interfaces: - Eth24-ASIC0: - lacp: 1 - Eth25-ASIC0: - lacp: 1 - Eth26-ASIC0: - lacp: 1 - Eth27-ASIC0: - lacp: 1 - Eth28-ASIC0: - lacp: 1 - Eth29-ASIC0: - lacp: 1 - Eth30-ASIC0: - lacp: 1 - Eth31-ASIC0: - lacp: 1 - Port-Channel1: - ipv4: 10.1.0.3/31 - ipv6: 2603:10e2:400:1::6/126 - ASIC1: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.6 - - 2603:10e2:400:1::d - interfaces: - Eth24-ASIC1: - lacp: 2 - Eth25-ASIC1: - lacp: 2 - Eth26-ASIC1: - lacp: 2 - Eth27-ASIC1: - lacp: 2 - Eth28-ASIC1: - lacp: 2 - Eth29-ASIC1: - lacp: 2 - Eth30-ASIC1: - lacp: 2 - Eth31-ASIC1: - lacp: 2 - Port-Channel2: - ipv4: 10.1.0.7/31 - ipv6: 2603:10e2:400:1::e/126 - ASIC2: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.10 - - 2603:10e2:400:1::15 - interfaces: - Eth24-ASIC2: - lacp: 3 - Eth25-ASIC2: - lacp: 3 - Eth26-ASIC2: - lacp: 3 - Eth27-ASIC2: - lacp: 3 - Eth28-ASIC2: - lacp: 3 - Eth29-ASIC2: - lacp: 3 - Eth30-ASIC2: - lacp: 3 - Eth31-ASIC2: - lacp: 3 - Port-Channel3: - ipv4: 10.1.0.11/31 - ipv6: 2603:10e2:400:1::16/126 - ASIC3: - bgp: - asn: 65100 - peers: - 65100: - - 10.1.0.14 - - 2603:10e2:400:1::1d - interfaces: - Eth24-ASIC3: - lacp: 4 - Eth25-ASIC3: - lacp: 4 - Eth26-ASIC3: - lacp: 4 - Eth27-ASIC3: - lacp: 4 - Eth28-ASIC3: - lacp: 4 - Eth29-ASIC3: - lacp: 4 - Eth30-ASIC3: - lacp: 4 - Eth31-ASIC3: - lacp: 4 - Port-Channel4: - ipv4: 10.1.0.15/31 - ipv6: 2603:10e2:400:1::1e/126 + topology: + NEIGH_ASIC: + ASIC4: + asic_intfs: + - Eth16-ASIC3 + - Eth17-ASIC3 + - Eth18-ASIC3 + - Eth19-ASIC3 + - Eth20-ASIC3 + - Eth21-ASIC3 + - Eth22-ASIC3 + - Eth23-ASIC3 + ASIC5: + asic_intfs: + - Eth24-ASIC3 + - Eth25-ASIC3 + - Eth26-ASIC3 + - Eth27-ASIC3 + - Eth28-ASIC3 + - Eth29-ASIC3 + - Eth30-ASIC3 + - Eth31-ASIC3 + configuration_properties: + common: + dut_asn: 65100 + asic_type: FrontEnd + configuration: + ASIC4: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.13 + - 2603:10e2:400:1::1a + interfaces: + Eth24-ASIC4: + lacp: 1 + Eth25-ASIC4: + lacp: 1 + Eth26-ASIC4: + lacp: 1 + Eth27-ASIC4: + lacp: 1 + Eth28-ASIC4: + lacp: 1 + Eth29-ASIC4: + lacp: 1 + Eth30-ASIC4: + lacp: 1 + Eth31-ASIC4: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.12/31 + ipv6: 2603:10e2:400:1::19/126 + ASIC5: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.15 + - 2603:10e2:400:1::1e + interfaces: + Eth24-ASIC5: + lacp: 2 + Eth25-ASIC5: + lacp: 2 + Eth26-ASIC5: + lacp: 2 + Eth27-ASIC5: + lacp: 2 + Eth28-ASIC5: + lacp: 2 + Eth29-ASIC5: + lacp: 2 + Eth30-ASIC5: + lacp: 2 + Eth31-ASIC5: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.14/31 + ipv6: 2603:10e2:400:1::1d/126 + ASIC4: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth0-ASIC4 + - Eth1-ASIC4 + - Eth2-ASIC4 + - Eth3-ASIC4 + - Eth4-ASIC4 + - Eth5-ASIC4 + - Eth6-ASIC4 + - Eth7-ASIC4 + ASIC1: + asic_intfs: + - Eth8-ASIC4 + - Eth9-ASIC4 + - Eth10-ASIC4 + - Eth11-ASIC4 + - Eth12-ASIC4 + - Eth13-ASIC4 + - Eth14-ASIC4 + - Eth15-ASIC4 + ASIC2: + asic_intfs: + - Eth16-ASIC4 + - Eth17-ASIC4 + - Eth18-ASIC4 + - Eth19-ASIC4 + - Eth20-ASIC4 + - Eth21-ASIC4 + - Eth22-ASIC4 + - Eth23-ASIC4 + ASIC3: + asic_intfs: + - Eth24-ASIC4 + - Eth25-ASIC4 + - Eth26-ASIC4 + - Eth27-ASIC4 + - Eth28-ASIC4 + - Eth29-ASIC4 + - Eth30-ASIC4 + - Eth31-ASIC4 + configuration_properties: + common: + dut_asn: 65100 + asic_type: BackEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.0 + - 2603:10e2:400:1::1 + interfaces: + Eth16-ASIC0: + lacp: 1 + Eth17-ASIC0: + lacp: 1 + Eth18-ASIC0: + lacp: 1 + Eth19-ASIC0: + lacp: 1 + Eth20-ASIC0: + lacp: 1 + Eth21-ASIC0: + lacp: 1 + Eth22-ASIC0: + lacp: 1 + Eth23-ASIC0: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.1/31 + ipv6: 2603:10e2:400:1::2/126 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.4 + - 2603:10e2:400:1::9 + interfaces: + Eth16-ASIC1: + lacp: 2 + Eth17-ASIC1: + lacp: 2 + Eth18-ASIC1: + lacp: 2 + Eth19-ASIC1: + lacp: 2 + Eth20-ASIC1: + lacp: 2 + Eth21-ASIC1: + lacp: 2 + Eth22-ASIC1: + lacp: 2 + Eth23-ASIC1: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.5/31 + ipv6: 2603:10e2:400:1::a/126 + ASIC2: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.8 + - 2603:10e2:400:1::11 + interfaces: + Eth16-ASIC2: + lacp: 3 + Eth17-ASIC2: + lacp: 3 + Eth18-ASIC2: + lacp: 3 + Eth19-ASIC2: + lacp: 3 + Eth20-ASIC2: + lacp: 3 + Eth21-ASIC2: + lacp: 3 + Eth22-ASIC2: + lacp: 3 + Eth23-ASIC2: + lacp: 3 + Port-Channel3: + ipv4: 10.1.0.9/31 + ipv6: 2603:10e2:400:1::12/126 + ASIC3: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.12 + - 2603:10e2:400:1::19 + interfaces: + Eth16-ASIC3: + lacp: 4 + Eth17-ASIC3: + lacp: 4 + Eth18-ASIC3: + lacp: 4 + Eth19-ASIC3: + lacp: 4 + Eth20-ASIC3: + lacp: 4 + Eth21-ASIC3: + lacp: 4 + Eth22-ASIC3: + lacp: 4 + Eth23-ASIC3: + lacp: 4 + Port-Channel4: + ipv4: 10.1.0.13/31 + ipv6: 2603:10e2:400:1::1a/126 + ASIC5: + topology: + NEIGH_ASIC: + ASIC0: + asic_intfs: + - Eth0-ASIC5 + - Eth1-ASIC5 + - Eth2-ASIC5 + - Eth3-ASIC5 + - Eth4-ASIC5 + - Eth5-ASIC5 + - Eth6-ASIC5 + - Eth7-ASIC5 + ASIC1: + asic_intfs: + - Eth8-ASIC5 + - Eth9-ASIC5 + - Eth10-ASIC5 + - Eth11-ASIC5 + - Eth12-ASIC5 + - Eth13-ASIC5 + - Eth14-ASIC5 + - Eth15-ASIC5 + ASIC2: + asic_intfs: + - Eth16-ASIC5 + - Eth17-ASIC5 + - Eth18-ASIC5 + - Eth19-ASIC5 + - Eth20-ASIC5 + - Eth21-ASIC5 + - Eth22-ASIC5 + - Eth23-ASIC5 + ASIC3: + asic_intfs: + - Eth24-ASIC5 + - Eth25-ASIC5 + - Eth26-ASIC5 + - Eth27-ASIC5 + - Eth28-ASIC5 + - Eth29-ASIC5 + - Eth30-ASIC5 + - Eth31-ASIC5 + configuration_properties: + common: + dut_asn: 65100 + asic_type: BackEnd + configuration: + ASIC0: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.2 + - 2603:10e2:400:1::5 + interfaces: + Eth24-ASIC0: + lacp: 1 + Eth25-ASIC0: + lacp: 1 + Eth26-ASIC0: + lacp: 1 + Eth27-ASIC0: + lacp: 1 + Eth28-ASIC0: + lacp: 1 + Eth29-ASIC0: + lacp: 1 + Eth30-ASIC0: + lacp: 1 + Eth31-ASIC0: + lacp: 1 + Port-Channel1: + ipv4: 10.1.0.3/31 + ipv6: 2603:10e2:400:1::6/126 + ASIC1: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.6 + - 2603:10e2:400:1::d + interfaces: + Eth24-ASIC1: + lacp: 2 + Eth25-ASIC1: + lacp: 2 + Eth26-ASIC1: + lacp: 2 + Eth27-ASIC1: + lacp: 2 + Eth28-ASIC1: + lacp: 2 + Eth29-ASIC1: + lacp: 2 + Eth30-ASIC1: + lacp: 2 + Eth31-ASIC1: + lacp: 2 + Port-Channel2: + ipv4: 10.1.0.7/31 + ipv6: 2603:10e2:400:1::e/126 + ASIC2: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.10 + - 2603:10e2:400:1::15 + interfaces: + Eth24-ASIC2: + lacp: 3 + Eth25-ASIC2: + lacp: 3 + Eth26-ASIC2: + lacp: 3 + Eth27-ASIC2: + lacp: 3 + Eth28-ASIC2: + lacp: 3 + Eth29-ASIC2: + lacp: 3 + Eth30-ASIC2: + lacp: 3 + Eth31-ASIC2: + lacp: 3 + Port-Channel3: + ipv4: 10.1.0.11/31 + ipv6: 2603:10e2:400:1::16/126 + ASIC3: + bgp: + asn: 65100 + peers: + 65100: + - 10.1.0.14 + - 2603:10e2:400:1::1d + interfaces: + Eth24-ASIC3: + lacp: 4 + Eth25-ASIC3: + lacp: 4 + Eth26-ASIC3: + lacp: 4 + Eth27-ASIC3: + lacp: 4 + Eth28-ASIC3: + lacp: 4 + Eth29-ASIC3: + lacp: 4 + Eth30-ASIC3: + lacp: 4 + Eth31-ASIC3: + lacp: 4 + Port-Channel4: + ipv4: 10.1.0.15/31 + ipv6: 2603:10e2:400:1::1e/126 diff --git a/ansible/vars/topo_t2-vs.yml b/ansible/vars/topo_t2-vs.yml index acdc630f19b..f1c458d8c22 100644 --- a/ansible/vars/topo_t2-vs.yml +++ b/ansible/vars/topo_t2-vs.yml @@ -54,7 +54,7 @@ configuration_properties: max_tor_subnet_number: 32 tor_subnet_size: 128 dut_asn: 65100 - dut_type: Spine + dut_type: SpineRouter nhipv4: 10.10.246.254 nhipv6: FC0A::FF core: diff --git a/ansible/vars/topo_t2.yml b/ansible/vars/topo_t2.yml index af7291dd855..e69a9d4f3c3 100644 --- a/ansible/vars/topo_t2.yml +++ b/ansible/vars/topo_t2.yml @@ -337,7 +337,7 @@ configuration_properties: max_tor_subnet_number: 32 tor_subnet_size: 128 dut_asn: 65100 - dut_type: Spine + dut_type: SpineRouter nhipv4: 10.10.246.254 nhipv6: FC0A::FF core: diff --git a/ansible/veos_vtb b/ansible/veos_vtb index 9eca241c31c..9dc4c6fde2b 100644 --- a/ansible/veos_vtb +++ b/ansible/veos_vtb @@ -127,6 +127,8 @@ all: iface_speed: 40000 start_topo_service: True frontend_asics: [0,1,2,3] + loopback4096_ip: [8.0.0.0/32, 8.0.0.1/32, 8.0.0.2/32, 8.0.0.3/32, 8.0.0.4/32, 8.0.0.5/32] + loopback4096_ipv6: [2603:10e2:400::/128, 2603:10e2:400::1/128, 2603:10e2:400::2/128, 2603:10e2:400::3/128, 2603:10e2:400::4/128, 2603:10e2:400::5/128] vlab-08: ansible_host: 10.250.0.112 ansible_hostv6: fec0::ffff:afa:c @@ -139,6 +141,8 @@ all: iface_speed: 40000 start_topo_service: True frontend_asics: [0,1] + loopback4096_ip: [8.0.0.0/32, 8.0.0.1/32, 8.0.0.2/32, 8.0.0.3/32] + loopback4096_ipv6: [2603:10e2:400::/128, 2603:10e2:400::1/128, 2603:10e2:400::2/128, 2603:10e2:400::3/128] vlab-simx-01: ansible_host: 10.250.0.103 ansible_hostv6: fec0::ffff:afa:3 @@ -157,7 +161,7 @@ all: serial_port: 9020 ansible_password: password ansible_user: admin - slot_num: 1 + slot_num: slot1 vlab-t2-02: ansible_host: 10.250.0.121 ansible_hostv6: fec0::ffff:afa:11 @@ -166,7 +170,7 @@ all: serial_port: 9021 ansible_password: password ansible_user: admin - slot_num: 2 + slot_num: slot2 vlab-t2-sup: ansible_host: 10.250.0.122 ansible_hostv6: fec0::ffff:afa:12 @@ -176,7 +180,7 @@ all: ansible_password: password ansible_user: admin card_type: supervisor - slot_num: 3 + slot_num: slot3 # The groups below are helpers to limit running playbooks to a specific server only server_1: diff --git a/tests/voq/conftest.py b/tests/voq/conftest.py index 694a8063cdb..6caeeeb722d 100644 --- a/tests/voq/conftest.py +++ b/tests/voq/conftest.py @@ -22,7 +22,7 @@ def chassis_facts(duthosts, request): host_vars = get_host_visible_vars(inv_files, a_host.hostname) assert 'slot_num' in host_vars, "Variable 'slot_num' not found in inventory for host {}".format(a_host.hostname) slot_num = host_vars['slot_num'] - a_host.facts['slot_num'] = int(slot_num) + a_host.facts['slot_num'] = int(slot_num[len("slot"):]) @pytest.fixture(scope="module")