aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/honeycomb
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/honeycomb')
-rw-r--r--resources/libraries/robot/honeycomb/bridge_domain.robot135
-rw-r--r--resources/libraries/robot/honeycomb/l2_fib.robot187
2 files changed, 295 insertions, 27 deletions
diff --git a/resources/libraries/robot/honeycomb/bridge_domain.robot b/resources/libraries/robot/honeycomb/bridge_domain.robot
index 29510bdd7a..4c455ff50d 100644
--- a/resources/libraries/robot/honeycomb/bridge_domain.robot
+++ b/resources/libraries/robot/honeycomb/bridge_domain.robot
@@ -16,6 +16,8 @@
| Library | resources.libraries.python.honeycomb.HcAPIKwBridgeDomain.BridgeDomainKeywords
| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
| ... | WITH NAME | InterfaceAPI
+| Library | resources.libraries.python.InterfaceUtil
+| ... | WITH NAME | interfaceCLI
*** Keywords ***
| Honeycomb creates first L2 bridge domain
@@ -23,9 +25,9 @@
| | ... | VPP node. Any other bridge domains will be removed in the process.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
-| | ... | - bd_name - name of the created bridge domain. Type: string
-| | ... | - settings - settings for the created bridge domain. Type: dictionary
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the created bridge domain. Type: string
+| | ... | - settings - Settings for the created bridge domain. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
@@ -39,9 +41,9 @@
| | ... | VPP node.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
-| | ... | - bd_name - name of the created bridge domain. Type: string
-| | ... | - settings - settings for the created bridge domain. Type: dictionary
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the created bridge domain. Type: string
+| | ... | - settings - Settings for the created bridge domain. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
@@ -55,9 +57,9 @@
| | ... | against provided values.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
-| | ... | - bd_name - name of the bridge domain. Type: string
-| | ... | - settings - expected settings for the bridge domain. Type: dictionary
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - settings - Expected settings for the bridge domain. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
@@ -73,9 +75,9 @@
| | ... | against provided values.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
-| | ... | - bd_name - name of the bridge domain. Type: string
-| | ... | - settings - expected settings for the bridge domain. Type: dictionary
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - settings - Expected settings for the bridge domain. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
@@ -93,11 +95,11 @@
| | ... | domain.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
-| | ... | - interface1, interface2 - names of interfaces to assign to bridge\
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - 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.\
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - settings - Bridge domain specific interface settings.\
| | ... | Type: dictionary
| | ...
| | ... | *Example:*
@@ -117,11 +119,11 @@
| | ... | bridge domain.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
-| | ... | - interface1, interface2 - names of interfaces to assign to bridge\
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - 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.\
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - settings - Bridge domain specific interface settings.\
| | ... | Type: dictionary
| | ...
| | ... | *Example:*
@@ -149,12 +151,12 @@
| | ... | bridge domain.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
-| | ... | - index - index of bridge domains on VPP node. Starts from 0,\
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - 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\
+| | ... | - interface1, interface2 - Names of interfaces to assign to bridge\
| | ... | domain. Type: string
-| | ... | - settings - bridge domain specific interface settings.\
+| | ... | - settings - Bridge domain specific interface settings.\
| | ... | Type: dictionary
| | ...
| | ... | *Example:*
@@ -179,7 +181,7 @@
| | ... | VPP node.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - node - Information about a DUT node. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
@@ -192,7 +194,7 @@
| | ... | bridge domains.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - node - Information about a DUT node. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
@@ -205,7 +207,7 @@
| | [Documentation] | Uses VAT to verify the removal of all bridge domains.
| | ...
| | ... | *Arguments:*
-| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - node - Information about a DUT node. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
@@ -213,3 +215,82 @@
| | [Arguments] | ${node}
| | Run Keyword And Expect Error | ValueError: No JSON object could be decoded
| | ... | VPP get bridge domain data | ${node}
+
+| Honeycomb adds interface to bridge domain
+| | [Documentation] | Uses Honeycomb API to assign interface to a bridge\
+| | ... | domain.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - interface - Name of interface 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 \| bd-04 \
+| | ... | \| ${{split_horizon_group:2, bvi:False}} \|
+| | ...
+| | [Arguments] | ${node} | ${interface} | ${bd_name} | ${settings}
+| | ...
+| | interfaceAPI.Add bridge domain to interface
+| | ... | ${node} | ${interface} | ${settings['bridge-domain']}
+| | ... | ${settings['split-horizon-group']}
+| | ... | ${settings['bridged-virtual-interface']}
+
+| Bridge domain configuration in interface operational data should be empty
+| | [Documentation] | Get interface operational data and retrieve bridge
+| | ... | domain configuration from it. It should be empty.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - interface - Name of interface where the bridge domain parameters \
+| | ... | will be checked.Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| Bridge domain configuration in interface operational data should \
+| | ... | be empty \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \|
+| | ...
+| | [Arguments] | ${node} | ${interface}
+| | ...
+| | ${if_data}= | interfaceAPI.Get BD Oper Data From Interface
+| | ... | ${node} | ${interface}
+| | Should be empty | ${if_data}
+
+| Bridge domain configuration in interface operational data should be
+| | [Documentation] | Get interface operational data and retrieve bridge
+| | ... | domain configuration from it. Compare the data to the expected one.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - interface - Name of interface where the bridge domain parameters \
+| | ... | will be checked. Type: string
+| | ... | - bd_settings - The referential bridge domain data. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ... | \| Bridge domain configuration in interface operational data should \
+| | ... | be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${if_bd_settings} \|
+| | ...
+| | [Arguments] | ${node} | ${interface} | ${bd_settings}
+| | ...
+| | ${if_data}= | interfaceAPI.Get BD Oper Data From Interface
+| | ... | ${node} | ${interface}
+| | interfaceAPI.Compare Data Structures | ${if_data} | ${bd_settings}
+
+| VAT removes bridge domain
+| | [Documentation] Remove the specified bridge domain using VAT.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_id - Bridge domain ID. Type: integer
+| | ...
+| | ... | *Example:*
+| | ... | \| VAT removes bridge domain \
+| | ... | \| ${nodes['DUT1']} \| 1 \|
+| | ...
+| | [Arguments] | ${node} | ${bd_id}
+| | ...
+| | Delete Bridge Domain VAT | ${node} | ${bd_id}
diff --git a/resources/libraries/robot/honeycomb/l2_fib.robot b/resources/libraries/robot/honeycomb/l2_fib.robot
new file mode 100644
index 0000000000..e63f299d11
--- /dev/null
+++ b/resources/libraries/robot/honeycomb/l2_fib.robot
@@ -0,0 +1,187 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.L2Util
+| Library | resources.libraries.python.honeycomb.HcAPIKwBridgeDomain.BridgeDomainKeywords
+| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
+| ... | WITH NAME | InterfaceAPI
+
+*** Keywords ***
+| Honeycomb adds L2 FIB entry to bridge domain
+| | [Documentation] | Add L2 FIB entry to the specified bridge domain using \
+| | ... | Honyecomb API.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - l2_fib_settings - The parameters of the new L2 FIB entry. \
+| | ... | Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ... | \| Honeycomb adds L2 FIB entry to bridge domain \
+| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_forward_cfg} \|
+| | ...
+| | [Arguments] | ${node} | ${bd_name} | ${l2_fib_settings}
+| | ...
+| | Add L2 FIB Entry | ${node} | ${bd_name} | ${l2_fib_settings}
+
+| L2 FIB Table from Honeycomb should be empty
+| | [Documentation] | Check if the L2 FIB table in the specified bridge domain \
+| | ... | is empty.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| L2 FIB Table from Honeycomb should be empty \
+| | ... | \| ${nodes['DUT1']} \| test_bd \|
+| | ...
+| | [Arguments] | ${node} | ${bd_name}
+| | ...
+| | ${l2_fib_data}= | Get All L2 FIB Entries | ${node} | ${bd_name}
+| | Should be empty | ${l2_fib_data}
+
+| L2 FIB Entry from Honeycomb should be
+| | [Documentation] | Retrieves the operational data about the specified L2 \
+| | ... | FIB entry and checks if they are as expected.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - l2_fib_ref_data - L2 FIB entry referential data. Type: dictionay
+| | ...
+| | ... | *Example:*
+| | ... | \| L2 FIB Entry from Honeycomb should be \
+| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_forward_oper} \|
+| | ...
+| | [Arguments] | ${node} | ${bd_name} | ${l2_fib_ref_data}
+| | ...
+| | ${l2_fib_data}= | Get L2 FIB Entry | ${node} | ${bd_name}
+| | ... | ${l2_fib_ref_data['phys-address']}
+| | interfaceAPI.Compare Data Structures | ${l2_fib_data} | ${l2_fib_ref_data}
+
+| Honeycomb removes L2 FIB entry
+| | [Documentation] | Remove the specified L2 FIB entry from the bridge \
+| | ... | domain's L2 FIB table.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - mac - MAC address used as the key in L2 FIB data structure. \
+| | ... | Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| Honeycomb removes L2 FIB entry \
+| | ... | \| ${nodes['DUT1']} \| test_bd \
+| | ... | \| ${l2_fib_forward_oper['phys-address']} \|
+| | ...
+| | [Arguments] | ${node} | ${bd_name} | ${mac}
+| | ...
+| | Remove L2 FIB Entry | ${node} | ${bd_name} | ${mac}
+
+| Honeycomb removes all L2 FIB entries
+| | [Documentation] | Remove all L2 FIB enties from the bridge domain's L2 FIB \
+| | ... | table.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ...
+| | ... | *Example:*
+| | ... | \| Honeycomb removes all L2 FIB entries \
+| | ... | \| ${nodes['DUT1']} \| test_bd \|
+| | ...
+| | [Arguments] | ${node} | ${bd_name}
+| | ...
+| | Remove all L2 FIB entries | ${node} | ${bd_name}
+
+| Honeycomb fails to add wrong L2 FIB entry
+| | [Documentation] | Honeycomb tries to add a wrong L2 FIB entry and expects \
+| | ... | that it fails.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - l2_fib_settings - The wrong parameters of the new L2 FIB entry. \
+| | ... | Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ... | \| Honeycomb fails to add wrong L2 FIB entry \
+| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_wrong_cfg} \|
+| | ...
+| | [Arguments] | ${node} | ${bd_name} | ${l2_fib_settings}
+| | ...
+| | Run keyword and expect error | *HoneycombError: * was not successful. *00.
+| | ... | Add L2 FIB Entry | ${node} | ${bd_name} | ${l2_fib_settings}
+
+| Honeycomb fails to modify L2 FIB entry
+| | [Documentation] | Honeycomb tries to modify an existing L2 FIB entry and \
+| | ... | expects to fail.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_name - Name of the bridge domain. Type: string
+| | ... | - mac - MAC address used as the key in L2 FIB data structure. \
+| | ... | Type: string
+| | ... | - param - The parameter to be modified. Type: string
+| | ... | - value - The new value of the parameter. Type: string or integer
+| | ...
+| | ... | *Example:*
+| | ... | \| Honeycomb fails to modify L2 FIB entry \
+| | ... | \| ${nodes['DUT1']} \| test_bd \
+| | ... | \| ${l2_fib_forward_oper['phys-address']} \| action \
+| | ... | \| l2-fib-forward \|
+| | ...
+| | [Arguments] | ${node} | ${bd_name} | ${mac} | ${param} | ${value}
+| | ...
+| | Run keyword and expect error | *HoneycombError: * was not successful. *00.
+| | ... | Modify L2 FIB Entry
+| | ... | ${node} | ${bd_name} | ${mac} | ${param} | ${value}
+
+| L2 FIB entry from VAT should be
+| | [Documentation] | Retrieves the operational data about the specified L2 \
+| | ... | FIB entry using VAT and checks if it is as expected.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_index - Index of the bridge domain. Type: integer
+| | ... | - l2_fib_ref_data - L2 FIB entry referential data. Type: dictionay
+| | ...
+| | ... | *Example:*
+| | ... | \| L2 FIB entry from VAT should be \
+| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_forward_oper} \|
+| | ...
+| | [Arguments] | ${node} | ${bd_index} | ${l2_fib_ref_data}
+| | ...
+| | ${l2_fib_data}= | Get L2 FIB entry VAT | ${node} | ${bd_index}
+| | ... | ${l2_fib_ref_data['mac']}
+| | interfaceAPI.Compare Data Structures | ${l2_fib_data} | ${l2_fib_ref_data}
+
+| L2 FIB Table from VAT should be empty
+| | [Documentation] | Check if the L2 FIB table in the specified bridge domain \
+| | ... | is empty. VAT is used to get operational data.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - Information about a DUT node. Type: dictionary
+| | ... | - bd_index - Index of the bridge domain. Type: integer
+| | ...
+| | ... | *Example:*
+| | ... | \| L2 FIB Table from VAT should be empty \
+| | ... | \| ${nodes['DUT1']} \| test_bd \|
+| | ...
+| | [Arguments] | ${node} | ${bd_index}
+| | ...
+| | ${l2_fib_data}= | Get L2 FIB table VAT | ${node} | ${bd_index}
+| | Should be empty | ${l2_fib_data}