diff options
author | selias <samelias@cisco.com> | 2016-05-11 15:44:13 +0200 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-05-16 08:33:13 +0000 |
commit | ef93cbce8d23d85ade2ba6c446a7cf7b8da5bf1b (patch) | |
tree | 3b165de3a8bc34228eb3be703aa859c4ca763a44 | |
parent | 8b4fad4fe84e123f4ffad7d2c5f96b7780c1bfaf (diff) |
Update Honeycomb bridge domain tests
- fix interface assignment verification through VAT
- add verification of split horizon group setting through VAT
- clean up documentation of high level bridge domain keywords
Change-Id: I7552494d68c6bbc86d3e5ddea4e29c6a7444d50c
Signed-off-by: selias <samelias@cisco.com>
-rw-r--r-- | resources/libraries/robot/honeycomb/bridge_domain.robot | 30 | ||||
-rw-r--r-- | tests/suites/honeycomb/2 - bridge_domain.robot | 4 |
2 files changed, 22 insertions, 12 deletions
diff --git a/resources/libraries/robot/honeycomb/bridge_domain.robot b/resources/libraries/robot/honeycomb/bridge_domain.robot index a3f695cf70..f84bcc3b2f 100644 --- a/resources/libraries/robot/honeycomb/bridge_domain.robot +++ b/resources/libraries/robot/honeycomb/bridge_domain.robot @@ -97,11 +97,14 @@ | | ... | - interface1, interface2 - names of interfaces to assign to bridge\ | | ... | domain. Type: string | | ... | - bd_name - name of the bridge domain. Type: string +| | ... | - settings - bridge domain specific interface settings.\ +| | ... | Type: dictionary | | ... | | ... | *Example:* | | ... | | ... | \| Honeycomb adds interfaces to bridge domain \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \| bd-04 \| +| | ... | \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \| bd-04 \ +| | ... | \| ${{split_horizon_group:2, bvi:False}} \| | | [Arguments] | ${node} | ${interface1} | ${interface2} | ${bd_name} | | ... | ${settings} | | interfaceAPI.Add bridge domain to interface @@ -118,12 +121,14 @@ | | ... | - interface1, interface2 - names of interfaces to assign to bridge\ | | ... | domain. Type: string | | ... | - bd_name - name of the bridge domain. Type: string +| | ... | - settings - bridge domain specific interface settings.\ +| | ... | Type: dictionary | | ... | | ... | *Example:* | | ... | | ... | \| Honeycomb should show interfaces assigned to bridge domain \ | | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \ -| | ... | \| bd-04 \| +| | ... | \| bd-04 \| ${{split_horizon_group:2, bvi:False}} \| | | [Arguments] | ${node} | ${interface1} | ${interface2} | ${bd_name} | | ... | ${settings} | | ${if1_data}= | interfaceAPI.Get interface oper data @@ -142,24 +147,29 @@ | | ... | | ... | *Arguments:* | | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface1, interface2 - names of interfaces to assign to bridge\ -| | ... | domain. Type: string | | ... | - index - index of bridge domains on VPP node. Starts from 0,\ | | ... | new BDs reuse numbers after a bridge domain is removed. Type: int +| | ... | - interface1, interface2 - names of interfaces to assign to bridge\ +| | ... | domain. Type: string +| | ... | - settings - bridge domain specific interface settings.\ +| | ... | Type: dictionary | | ... | | ... | *Example:* | | ... | | ... | \| VAT should show interfaces assigned to bridge domain \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \ -| | ... | \| ${4} \| -| | [Arguments] | ${node} | ${interface1} | ${interface2} | ${index} +| | ... | \| ${nodes['DUT1']} \| ${4} \| GigabitEthernet0/8/0 \ +| | ... | \| GigabitEthernet0/9/0 \| ${{split_horizon_group:2, bvi:False}} \| +| | [Arguments] | ${node} | ${index} | ${interface1} | ${interface2} +| | ... | ${settings} | | ${if1_index}= | Get interface sw index | ${node} | ${interface1} | | ${if2_index}= | Get interface sw index | ${node} | ${interface2} | | ${if_indices}= | Create list | ${if1_index} | ${if2_index} | | ${bd_data}= | VPP get bridge domain data | ${node} -| | ${bd_data}= | Set Variable | ${bd_data[${index}]} -| | :FOR | ${sw_if_index} | IN | ${bd_data['sw_if']} -| | | Should contain | ${if_indices} | ${sw_if_index} +| | ${bd_interfaces}= | Set Variable | ${bd_data[${index}]['sw_if']} +| | @{bd_interfaces}= | Create List | ${bd_interfaces[0]} | ${bd_interfaces[1]} +| | :FOR | ${interface} | IN | @{bd_interfaces} +| | | Should contain | ${if_indices} | ${interface['sw_if_index']} +| | | Should be equal | ${interface['shg']} | ${settings['split_horizon_group']} | Honeycomb removes all bridge domains | | [Documentation] | Uses Honeycomb API to remove all bridge domains from the \ diff --git a/tests/suites/honeycomb/2 - bridge_domain.robot b/tests/suites/honeycomb/2 - bridge_domain.robot index 34f5dd848d..8b75888275 100644 --- a/tests/suites/honeycomb/2 - bridge_domain.robot +++ b/tests/suites/honeycomb/2 - bridge_domain.robot @@ -19,7 +19,7 @@ | ${bd2_name}= | bd-02 | &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} | ... | unknown-unicast-flood=${True} | arp-termination=${True} -| &{if_settings}= | split_horizon_group=1 | bvi=${True} +| &{if_settings}= | split_horizon_group=${1} | bvi=${True} *** Settings *** | Resource | resources/libraries/robot/default.robot @@ -53,7 +53,7 @@ | | Then Honeycomb should show interfaces assigned to bridge domain | | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} | | And VAT should show interfaces assigned to bridge domain -| | ... | ${node} | ${0} | @{interfaces} +| | ... | ${node} | ${0} | @{interfaces} | ${if_settings} | Honeycomb manages multiple bridge domains on node | | [Documentation] | Check if Honeycomb can manage multiple bridge domains on\ |