Skip to content

Commit

Permalink
[everflow]: Add support for t1-64-lag topology (#502)
Browse files Browse the repository at this point in the history
Add --platform-dir ptftests to all PTF shell command

This will enable using the remote.py platform in the ptftest folder
instead of using the default remote.py platform file in ptf package,
since the default one only supports 32-port platforms and the cutomized
one deployed in the ptftest folder supports 64-port platforms and is
backward compatible with the default ptf remote.py file.

TODO: Use PTF runner to invoke all the PTF tests

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
  • Loading branch information
Shuotian Cheng authored Mar 14, 2018
1 parent 7a01d5e commit 764eeab
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/test/tasks/everflow_testbed/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
when: testbed_type is not defined

- fail: msg="testbed_type {{testbed_type}} is invalid."
when: testbed_type not in ['t1-lag', 't1']
when: testbed_type not in ['t1-lag', 't1', 't1-64-lag']

- name: Gathering minigraph facts about the device
minigraph_facts: host={{ inventory_hostname }}
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/test/tasks/everflow_testbed/testcase_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- block:
- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_1 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/test/tasks/everflow_testbed/testcase_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
shell: ip route add {{ session_prefix_1 }} via {{ neighbor_info_1['addr'] }}

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_1 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand All @@ -16,7 +16,7 @@
shell: ip route add {{ session_prefix_2 }} via {{ unresolved_nexthop }}

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_1 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand All @@ -26,7 +26,7 @@
shell: ip route change {{ session_prefix_2 }} via {{ neighbor_info_2['addr'] }}

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_2 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/test/tasks/everflow_testbed/testcase_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
shell: ip route add {{ session_prefix_1 }} via {{ neighbor_info_1['addr'] }}

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_1 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand All @@ -16,7 +16,7 @@
shell: ip route add {{ session_prefix_2 }} via {{ neighbor_info_2['addr'] }}

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_2}}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand All @@ -27,7 +27,7 @@
ignore_errors: yes

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_1 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/test/tasks/everflow_testbed/testcase_4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
shell: ip route add {{ session_prefix_1 }} via {{ neighbor_info_1['addr'] }}

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_1 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";expected_dst_mac="{{ neighbor_mac_1 }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";expected_dst_mac="{{ neighbor_mac_1 }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand All @@ -16,7 +16,7 @@
shell: ip neigh replace {{ neighbor_info_1['addr'] }} lladdr "00:11:22:33:44:55" nud permanent dev {{ dst_port_1 }}

- name: Send traffic and verify that packets with correct Everflow header are received on destination port {{ dst_port_1 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";expected_dst_mac="00:11:22:33:44:55";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";expected_dst_mac="00:11:22:33:44:55";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/test/tasks/everflow_testbed/testcase_5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- block:
- name: Send traffic and verify that packets with correct Everflow header are received on {{ dst_port_1 }} or {{ dst_port_2 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}, {{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}, {{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/test/tasks/everflow_testbed/testcase_6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
shell: ip route add {{ session_prefix_1 }} nexthop via {{ neighbor_info_1['addr'] }} via {{ neighbor_info_2['addr'] }}

- name: Send traffic and verify that packets with correct Everflow header are received on {{ dst_port_1 }} or {{ dst_port_2 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}, {{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}, {{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand All @@ -16,14 +16,14 @@
shell: ip route change {{ session_prefix_1 }} nexthop via {{ neighbor_info_1['addr'] }} via {{ neighbor_info_2['addr'] }} via {{ neighbor_info_3['addr'] }}

- name: Send traffic and verify that packets with correct Everflow header are received on {{ dst_port_1 }} or {{ dst_port_2 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}, {{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_1_ptf_id }}, {{ dst_port_2_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
register: out

- name: Send traffic and verify that packets are not received on {{ dst_port_3 }}.
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_3_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
shell: ptf --test-dir acstests everflow_tb_test.EverflowTest --platform-dir ptftests --platform remote -t 'hwsku="{{ sonic_hwsku }}";router_mac="{{ ansible_Ethernet0['macaddress'] }}";src_port="{{ src_port_ptf_id }}";dst_ports="{{ dst_port_3_ptf_id }}";session_src_ip="{{ session_src_ip }}";session_dst_ip="{{ session_dst_ip }}";session_ttl="{{ session_ttl }}";session_dscp="{{ session_dscp }}";verbose=True'
args:
chdir: /root
delegate_to: "{{ ptf_host }}"
Expand Down
Loading

0 comments on commit 764eeab

Please sign in to comment.