|
48 | 48 | - fail: msg="The DUT you are trying to run test does not belongs to this testbed" |
49 | 49 | when: inventory_hostname not in testbed_facts['duts'] |
50 | 50 |
|
| 51 | + - name: Set default num_asic |
| 52 | + set_fact: |
| 53 | + num_asics: 1 |
| 54 | + when: num_asics is not defined |
| 55 | + |
51 | 56 | - name: Set default dut index |
52 | 57 | set_fact: |
53 | 58 | dut_index: "{{ testbed_facts['duts_map'][inventory_hostname]|int }}" |
|
62 | 67 | when: "testbed_facts['vm_base'] != ''" |
63 | 68 | when: testbed_name is defined |
64 | 69 |
|
65 | | - - topo_facts: topo={{ topo }} |
| 70 | + - topo_facts: topo={{ topo }} hwsku={{ hwsku }} |
66 | 71 | delegate_to: localhost |
67 | 72 |
|
68 | 73 | - name: find interface name mapping and individual interface speed if defined from dut |
69 | | - port_alias: hwsku="{{ hwsku }}" |
| 74 | + port_alias: hwsku="{{ hwsku }}" num_asic="{{ num_asics }}" |
70 | 75 | when: deploy is defined and deploy|bool == true |
71 | 76 |
|
72 | 77 | - name: find interface name mapping and individual interface speed if defined with local data |
73 | | - port_alias: hwsku="{{ hwsku }}" |
| 78 | + port_alias: hwsku="{{ hwsku }}" num_asic="{{ num_asics }}" |
74 | 79 | delegate_to: localhost |
75 | 80 | when: deploy is not defined or deploy|bool == false |
76 | 81 |
|
|
100 | 105 | delegate_to: localhost |
101 | 106 | when: "'dualtor' in topo" |
102 | 107 |
|
103 | | - - name: generate y_cable simulator driver |
104 | | - include_tasks: dualtor/config_y_cable_simulator.yml |
105 | | - when: "'dualtor' in topo" |
106 | | - |
107 | 108 | - name: set default vm file path |
108 | 109 | set_fact: |
109 | 110 | vm_file: veos |
|
126 | 127 | delegate_to: localhost |
127 | 128 | when: "('host_interfaces_by_dut' in vm_topo_config) and ('tor' in vm_topo_config['dut_type'] | lower)" |
128 | 129 |
|
| 130 | + - name: find downlink portchannel configuration for T0 topology |
| 131 | + set_fact: |
| 132 | + portchannel_config: "{{ vm_topo_config['DUT']['portchannel_config'] | default({})}}" |
| 133 | + delegate_to: localhost |
| 134 | + when: "('host_interfaces_by_dut' in vm_topo_config) and ('tor' in vm_topo_config['dut_type'] | lower)" |
| 135 | + |
129 | 136 | - name: find any tunnel configurations |
130 | 137 | tunnel_config: |
131 | 138 | vm_topo_config: "{{ vm_topo_config }}" |
|
149 | 156 | - "{{ interface_to_vms }}" |
150 | 157 | - "ports" |
151 | 158 |
|
| 159 | + # create map of VM to asic interface names |
| 160 | + - name: find all interface asic names |
| 161 | + set_fact: |
| 162 | + vm_asic_ifnames: "{{ vm_asic_ifnames | default({}) | combine({item.0.name: vm_asic_ifnames[item.0.name]|default([]) + [ front_panel_asic_ifnames[item.1]] }) }}" |
| 163 | + with_subelements: |
| 164 | + - "{{ interface_to_vms }}" |
| 165 | + - "ports" |
| 166 | + when: front_panel_asic_ifnames != [] |
| 167 | + |
152 | 168 | - name: create minigraph file in ansible minigraph folder |
153 | 169 | template: src=templates/minigraph_template.j2 |
154 | 170 | dest=minigraph/{{ inventory_hostname}}.{{ topo }}.xml |
|
352 | 368 |
|
353 | 369 | - debug: msg={{ docker_status.stdout_lines }} |
354 | 370 |
|
| 371 | + - name: start topology service for multi-asic platform |
| 372 | + become: true |
| 373 | + shell: systemctl start topology.service |
| 374 | + when: start_topo_service is defined and start_topo_service|bool == true |
| 375 | + |
355 | 376 | - name: execute cli "config load_minigraph -y" to apply new minigraph |
356 | 377 | become: true |
357 | 378 | shell: config load_minigraph -y |
|
0 commit comments