diff options
author | Jan Gelety <jgelety@cisco.com> | 2016-04-28 22:54:59 +0200 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-05-09 10:58:12 +0000 |
commit | 8935f5271dacc631d5b834b27b36bfad83c350c2 (patch) | |
tree | fbadbe1796758555178e5dc8ae7a34d231b2158a /resources/libraries | |
parent | b19bcf36d9d9be1a771495547335fcfc7b3e446b (diff) |
CSIT-19: MAC split-horizon group
- test case to test MAC split-horizon group functionality
Change-Id: Iadee707f3670e5fc9c209bd8b072a65ea1af27cd
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r-- | resources/libraries/python/TrafficScriptExecutor.py | 5 | ||||
-rw-r--r-- | resources/libraries/robot/bridge_domain.robot | 75 |
2 files changed, 77 insertions, 3 deletions
diff --git a/resources/libraries/python/TrafficScriptExecutor.py b/resources/libraries/python/TrafficScriptExecutor.py index 89362c5a56..fa4462393c 100644 --- a/resources/libraries/python/TrafficScriptExecutor.py +++ b/resources/libraries/python/TrafficScriptExecutor.py @@ -65,7 +65,10 @@ class TrafficScriptExecutor(object): logger.debug("stderr: {}".format(stderr)) logger.debug("ret_code: {}".format(ret_code)) if ret_code != 0: - raise Exception("Traffic script execution failed") + if "RuntimeError: ICMP echo Rx timeout" in stderr: + raise Exception("ICMP echo Rx timeout") + else: + raise Exception("Traffic script execution failed") @staticmethod def traffic_script_gen_arg(rx_if, tx_if, src_mac, dst_mac, src_ip, dst_ip): diff --git a/resources/libraries/robot/bridge_domain.robot b/resources/libraries/robot/bridge_domain.robot index e31a3bff05..9cd3a70a97 100644 --- a/resources/libraries/robot/bridge_domain.robot +++ b/resources/libraries/robot/bridge_domain.robot @@ -115,6 +115,76 @@ | | Set Test Variable | ${dut1_node} | | Set Test Variable | ${dut2_node} +| Path for 3-node BD-SHG testing is set +| | [Documentation] | Compute path for bridge domain split-horizon group testing +| | ... | on three given nodes with following interconnections +| | ... | TG - (2 links) - DUT1 - (1 link) - DUT2 - (2 links) - TG +| | ... | and set corresponding test case variables. +| | ... +| | ... | *Arguments:* +| | ... | - ${tg_node} - TG node. Type: dictionary +| | ... | - ${dut1_node} - DUT1 node. Type: dictionary +| | ... | - ${dut2_node} - DUT2 node. Type: dictionary +| | ... +| | ... | *Return:* +| | ... | - No value returned +| | ... | +| | ... | _NOTE:_ This KW sets following test case variables: +| | ... | - ${tg_node} - TG node. +| | ... | - ${tg_to_dut1_if1} - TG interface 1 towards DUT1. +| | ... | - ${tg_to_dut1_if2} - TG interface 2 towards DUT1. +| | ... | - ${tg_to_dut2_if1} - TG interface 1 towards DUT2. +| | ... | - ${tg_to_dut2_if2} - TG interface 2 towards DUT2. +| | ... | - ${dut1_node} - DUT1 node. +| | ... | - ${dut1_to_tg_if1} - DUT1 interface 1 towards TG. +| | ... | - ${dut1_to_tg_if2} - DUT1 interface 2 towards TG. +| | ... | - ${dut1_to_dut2} - DUT1 interface towards DUT2. +| | ... | - ${dut2_node} - DUT2 node. +| | ... | - ${dut2_to_tg_if1} - DUT2 interface 1 towards TG. +| | ... | - ${dut2_to_tg_if2} - DUT2 interface 2 towards TG. +| | ... | - ${dut2_to_dut1} - DUT2 interface towards DUT1. +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Given Path for 3-node BD-SHG testing is set \| ${nodes['TG']} \ +| | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \| +| | [Arguments] | ${tg_node} | ${dut1_node} | ${dut2_node} +| | # Compute path TG - DUT1 with two links in between +| | Append Nodes | ${tg_node} | ${dut1_node} | ${tg_node} +| | Compute Path | always_same_link=${FALSE} +| | ${tg_to_dut1_if1} | ${tmp}= | First Interface +| | ${tg_to_dut1_if2} | ${tmp}= | Last Interface +| | ${dut1_to_tg_if1} | ${tmp}= | First Ingress Interface +| | ${dut1_to_tg_if2} | ${tmp}= | Last Egress Interface +| | # Compute path TG - DUT2 with two links in between +| | Clear Path +| | Append Nodes | ${tg_node} | ${dut2_node} | ${tg_node} +| | Compute Path | always_same_link=${FALSE} +| | ${tg_to_dut2_if1} | ${tmp}= | First Interface +| | ${tg_to_dut2_if2} | ${tmp}= | Last Interface +| | ${dut2_to_tg_if1} | ${tmp}= | First Ingress Interface +| | ${dut2_to_tg_if2} | ${tmp}= | Last Egress Interface +| | # Compute path DUT1 - DUT2 with one link in between +| | Clear Path +| | Append Nodes | ${dut1_node} | ${dut2_node} +| | Compute Path +| | ${dut1_to_dut2} | ${tmp}= | Next Interface +| | ${dut2_to_dut1} | ${tmp}= | Next Interface +| | # Set test variables +| | Set Test Variable | ${tg_to_dut1_if1} +| | Set Test Variable | ${tg_to_dut1_if2} +| | Set Test Variable | ${tg_to_dut2_if1} +| | Set Test Variable | ${tg_to_dut2_if2} +| | Set Test Variable | ${dut1_to_tg_if1} +| | Set Test Variable | ${dut1_to_tg_if2} +| | Set Test Variable | ${dut2_to_tg_if1} +| | Set Test Variable | ${dut2_to_tg_if2} +| | Set Test Variable | ${dut1_to_dut2} +| | Set Test Variable | ${dut2_to_dut1} +| | Set Test Variable | ${tg_node} +| | Set Test Variable | ${dut1_node} +| | Set Test Variable | ${dut2_node} + | Bridge domain on DUT node is created | | [Documentation] | Create bridge domain on given VPP node with defined | | ... | learning status. @@ -146,6 +216,7 @@ | | ... | - ${dut_node} - DUT node. Type: dictionary | | ... | - ${dut_if} - DUT node interface name. Type: string | | ... | - ${bd_id} - Bridge domain ID. Type: integer +| | ... | - ${shg} - Split-horizon group ID. Type: integer, default value: 0 | | ... | | ... | *Return:* | | ... | - No value returned @@ -154,9 +225,9 @@ | | ... | | ... | \| Interface is added to bridge domain \| ${nodes['DUT2']} \ | | ... | \| GigabitEthernet0/8/0 \| 3 \| -| | [Arguments] | ${dut_node} | ${dut_if} | ${bd_id} +| | [Arguments] | ${dut_node} | ${dut_if} | ${bd_id} | ${shg}=0 | | Set Interface State | ${dut_node} | ${dut_if} | up -| | Add Interface To L2 BD | ${dut_node} | ${dut_if} | ${bd_id} +| | Add Interface To L2 BD | ${dut_node} | ${dut_if} | ${bd_id} | ${shg} | Destination port is added to L2FIB on DUT node | | [Documentation] | Create a static L2FIB entry for required destination port |