X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fhoneycomb%2Fbridge_domain.robot;h=29510bdd7a4fecfb4c0512cc004cb4f907d02a1f;hp=da3ae0af473978b7d0e827b6f51c08d392d62577;hb=fdc6e0fc0c675eb4faa699fef7e1e2ca91df2b03;hpb=b19bcf36d9d9be1a771495547335fcfc7b3e446b diff --git a/resources/libraries/robot/honeycomb/bridge_domain.robot b/resources/libraries/robot/honeycomb/bridge_domain.robot index da3ae0af47..29510bdd7a 100644 --- a/resources/libraries/robot/honeycomb/bridge_domain.robot +++ b/resources/libraries/robot/honeycomb/bridge_domain.robot @@ -13,9 +13,9 @@ *** Settings *** | Library | resources.libraries.python.L2Util -| Library | resources.libraries.python.HcAPIKwBridgeDomain.BridgeDomainKeywords -| Library | resources.libraries.python.HcAPIKwInterfaces.InterfaceKeywords -| ... | WITH NAME | InterfaceAPI +| Library | resources.libraries.python.honeycomb.HcAPIKwBridgeDomain.BridgeDomainKeywords +| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords +| ... | WITH NAME | InterfaceAPI *** Keywords *** | Honeycomb creates first L2 bridge domain @@ -64,7 +64,7 @@ | | ... | \| Bridge domain configuration from Honeycomb should be \ | | ... | \| ${nodes['DUT1']} \| bd-04 \| ${{flood:True,learn:False}} \| | | [Arguments] | ${node} | ${bd_name} | ${settings} -| | ${api_data}= | Get bd cfg data | ${node} | ${bd_name} +| | ${api_data}= | Get bd oper data | ${node} | ${bd_name} | | :FOR | ${key} | IN | @{settings.keys()} | | | Should be equal | ${settings['${key}']} | ${api_data['${key}']} @@ -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 @@ -131,10 +136,13 @@ | | ${if2_data}= | interfaceAPI.Get interface oper data | | ... | ${node} | ${interface2} | | Should be equal | ${if1_data['v3po:l2']['bridge-domain']} -| | ... | ${if1_data['v3po:l2']['bridge-domain']} | ${bd_name} -| | :FOR | ${key} | IN | @{settings.keys()} -| | | Should be equal | ${if1_data['v3po:l2']['${key}']} -| | | ... | ${if2_data['v3po:l2']['${key}']} | ${settings['${key}']} +| | ... | ${if2_data['v3po:l2']['bridge-domain']} | ${bd_name} +| | Should be equal | ${if1_data['v3po:l2']['split-horizon-group']} +| | ... | ${if2_data['v3po:l2']['split-horizon-group']} +| | ... | ${settings['split_horizon_group']} +| | Should be equal | ${if1_data['v3po:l2']['bridged-virtual-interface']} +| | ... | ${if2_data['v3po:l2']['bridged-virtual-interface']} +| | ... | ${settings['bvi']} | VAT should show interfaces assigned to bridge domain | | [Documentation] | Uses VAT to verify interface assignment to\ @@ -142,24 +150,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 \ @@ -185,7 +198,7 @@ | | ... | | ... | \| Honeycomb should show no bridge domains \| ${nodes['DUT1']} \| | | [Arguments] | ${node} -| | ${bd_data} | Get all BDs cfg data | ${node} +| | ${bd_data}= | Get all BDs oper data | ${node} | | Should be empty | ${bd_data} | VAT should show no bridge domains