diff options
author | Tibor Frank <tifrank@cisco.com> | 2016-06-14 11:48:54 +0200 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-06-20 07:06:31 +0000 |
commit | dbef20c93ad802b07607c9ca1c0e05c232c963f4 (patch) | |
tree | cdf1aae29d6375c69524e669f5a718e557bdcf4d /tests | |
parent | 025d95939e2c14658204b307420fc75656a90ca7 (diff) |
Modify tests for Honeycomb sub-interfaces
JIRA: CSIT-139
- modify tests for Honeycomb sub-interfaces to reflect the last changes
in the model
- modify existing keywords to work with latest changes in Honyecomb and VPP
Change-Id: Idc88fbac7e743e6125d5c865d9d144448657dd20
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/suites/honeycomb/3 - bridge_domain.robot | 1 | ||||
-rw-r--r-- | tests/suites/honeycomb/6 - sub_interface.robot | 581 | ||||
-rw-r--r-- | tests/suites/honeycomb/8 - vxlan_gpe.robot | 6 | ||||
-rw-r--r-- | tests/suites/honeycomb/resources/sub_interfaces.py | 285 | ||||
-rw-r--r-- | tests/suites/honeycomb/resources/vxlan_gpe.py | 6 |
5 files changed, 517 insertions, 362 deletions
diff --git a/tests/suites/honeycomb/3 - bridge_domain.robot b/tests/suites/honeycomb/3 - bridge_domain.robot index d1f1c7b329..61a67cc901 100644 --- a/tests/suites/honeycomb/3 - bridge_domain.robot +++ b/tests/suites/honeycomb/3 - bridge_domain.robot @@ -27,6 +27,7 @@ | Resource | resources/libraries/robot/default.robot | Resource | resources/libraries/robot/honeycomb/interfaces.robot | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot +| Suite Teardown | Honeycomb removes all bridge domains | ${node} | Documentation | *Honeycomb bridge domain management test suite.* | ... | ... | Test suite uses the first two interfaces on the first DUT node. diff --git a/tests/suites/honeycomb/6 - sub_interface.robot b/tests/suites/honeycomb/6 - sub_interface.robot index 50becace60..6938082c16 100644 --- a/tests/suites/honeycomb/6 - sub_interface.robot +++ b/tests/suites/honeycomb/6 - sub_interface.robot @@ -17,370 +17,347 @@ | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot | Resource | resources/libraries/robot/honeycomb/interfaces.robot | Variables | tests/suites/honeycomb/resources/sub_interfaces.py +| Suite Teardown | Honeycomb removes all bridge domains | ${node} | Documentation | *Honeycomb sub-interface management test suite.* | ... | ... | This test suite tests if it is posible to create, modify and\ | ... | delete a sub-interface. +| Force Tags | honeycomb_sanity *** Variables *** | ${node}= | ${nodes['DUT1']} # Test interface 1 and its sub-interface parameters: -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${sub_interface_id}= | 10 -| ${sub_interface_name}= | ${interface}.${sub_interface_id} -| &{sub_interface_base_settings}= -| ... | name=${sub_interface_name} -| ... | type=v3po:sub-interface -| &{sub_interface_settings}= -| ... | super-interface=${interface} -| ... | identifier=${sub_interface_id} -| ... | vlan-type=802dot1ad -| ... | number-of-tags=2 -| ... | outer-id=22 -| ... | inner-id=33 -| ... | match-any-outer-id=${FALSE} -| ... | match-any-inner-id=${FALSE} -| ... | exact-match=${TRUE} -| ... | default-subif=${TRUE} -| &{sub_interface_settings_wrong}= -| ... | super-interface=${interface} -| ... | identifier=${sub_interface_id} -| ... | vlan-type=WRONG_TYPE -| ... | number-of-tags=2 -| ... | outer-id=22 -| ... | inner-id=33 -| ... | match-any-outer-id=${TRUE} -| ... | match-any-inner-id=${TRUE} -| ... | exact-match=${TRUE} -| ... | default-subif=${TRUE} - -# Test interface 2 and its sub-interface parameters: -| ${interface2}= | ${node['interfaces']['port3']['name']} -| ${sub_interface2_name}= | ${interface2}.${sub_interface_id} -| &{sub_interface2_base_settings}= -| ... | name=${sub_interface2_name} -| ... | type=v3po:sub-interface -| ... | v3po:l2=&{bd_rw_settings} -| &{sub_interface2_settings}= -| ... | super-interface=${interface2} -| ... | identifier=${sub_interface_id} -| ... | vlan-type=802dot1ad -| ... | number-of-tags=2 -| ... | outer-id=44 -| ... | inner-id=55 -| ... | match-any-outer-id=${FALSE} -| ... | match-any-inner-id=${FALSE} -| ... | exact-match=${TRUE} -| ... | default-subif=${FALSE} +| ${super_if}= | ${node['interfaces']['port1']['name']} +| ${sub_if_id}= | ${sub_if_1_settings['identifier']} +| ${sub_if_name}= | ${super_if}.${sub_if_id} *** Test Cases *** | Honycomb creates sub-interface | | [Documentation] | Check if Honeycomb creates a sub-interface. | | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be empty -| | ... | ${node} | ${sub_interface_name} -| | And sub-interface configuration from VAT should be empty -| | ... | ${node} | ${sub_interface_name} -| | When Honeycomb creates sub-interface -| | ... | ${node} | ${interface} | ${sub_interface_id} -| | ... | ${sub_interface_base_settings} | ${sub_interface_settings} -| | Then sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings} - -| Honeycomb adds sub-interface to bridge domain -| | [Documentation] | Check if Honeycomb adds a sub-interface to bridge domain. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | When Honeycomb creates L2 bridge domain -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Then Bridge domain configuration from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | When Honeycomb adds sub-interface to bridge domain -| | ... | ${node} | ${sub_interface_name} | ${bd_name} | ${sub_bd_settings} -| | Then sub-interface bridge domain configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_bd_settings} -| | And sub-interface bridge domain configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_bd_settings} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings} - -| Honeycomb sets vlan tag rewrite on sub-interface in bridge domain -| | [Documentation] | Check if Honeycomb adds vlan tag rewrite on sub-interface\ -| | ... | in bridge domain. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | And sub-interface bridge domain configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_bd_settings} -| | &{init_rw_params}= | Create dictionary | first-pushed=802dot1ad -| | ... | rewrite-operation=disabled -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${init_rw_params} -| | When Honeycomb sets rewrite tag -| | ... | ${node} | ${sub_interface_name} | ${rw_params} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params} -| | And rewrite tag configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings} - -| Honeycomb edits vlan tag rewrite on sub-interface in bridge domain -| | [Documentation] | Check if Honeycomb updates vlan tag rewrite on\ -| | ... | sub-interface in bridge domain. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params} -| | When Honeycomb sets rewrite tag -| | ... | ${node} | ${sub_interface_name} | ${rw_params_edited} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_edited} -| | And rewrite tag configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_edited} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings} - -| Honeycomb removes vlan tag rewrite from sub-interface -| | [Documentation] | Check if Honeycomb removes vlan tag rewrite from\ -| | ... | sub-interface. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_edited} -| | When Honeycomb removes rewrite tag -| | ... | ${node} | ${sub_interface_name} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} -| | And rewrite tag configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings} - -| Honeycomb sets again vlan tag rewrite on sub-interface in bridge domain -| | [Documentation] | Check if Honeycomb adds vlan tag rewrite on sub-interface\ -| | ... | in bridge domain if it was disabled before. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} -| | When Honeycomb sets rewrite tag -| | ... | ${node} | ${sub_interface_name} | ${rw_params} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params} -| | And rewrite tag configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings} - -| Honycomb deletes sub-interface -| | [Documentation] | Check if Honeycomb can delete an existing sub-interface. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | When Honeycomb fails to remove sub-interface -| | ... | ${node} | ${sub_interface_name} -| | Then sub-interface configuration from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings} -| | ... | ${sub_interface_settings} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings} - -| Honycomb creates sub-interface with bridge domain -| | [Documentation] | Check if Honeycomb creates a sub-interface with bridge\ -| | ... | domain and rewrite tag configured. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration from Honeycomb should be empty -| | ... | ${node} | ${sub_interface2_name} -| | And sub-interface configuration from VAT should be empty -| | ... | ${node} | ${sub_interface2_name} -| | When Honeycomb creates L2 bridge domain -| | ... | ${node} | ${bd2_name} | ${bd2_settings} -| | And Honeycomb creates sub-interface -| | ... | ${node} | ${interface2} | ${sub_interface_id} -| | ... | ${sub_interface2_base_settings} | ${sub_interface2_settings} -| | Then sub-interface configuration with bd and rw from Honeycomb should be -| | ... | ${node} | ${sub_interface2_name} | ${sub_interface2_base_settings} -| | ... | ${sub_interface2_settings} -| | And sub-interface configuration from VAT should be -| | ... | ${node} | ${sub_interface2_name} | ${sub_interface2_settings} -| | And rewrite tag configuration from VAT should be -| | ... | ${node} | ${sub_interface2_name} | ${rw_params} - -| Honeycomb sets wrong operation in vlan tag rewrite -| | [Documentation] | Negative test: Honeycomb tries to set a wrong value of\ -| | ... | "rewrite-operation" parameter in "vlan-tag-rewrite". The operation\ -| | ... | must fail. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration with bd and rw from Honeycomb should be -| | ... | ${node} | ${sub_interface2_name} | ${sub_interface2_base_settings} -| | ... | ${sub_interface2_settings} -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} -| | When Honeycomb fails to set wrong rewrite tag -| | ... | ${node} | ${sub_interface_name} | ${rw_params_wrong_op} -| | Then sub-interface configuration with bd and rw from Honeycomb should be -| | ... | ${node} | ${sub_interface2_name} | ${sub_interface2_base_settings} -| | ... | ${sub_interface2_settings} -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} -| | And rewrite tag configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} - -| Honeycomb sets wrong first-pushed in vlan tag rewrite -| | [Documentation] | Negative test: Honeycomb tries to set a wrong value of\ -| | ... | "first-pushed" parameter in "vlan-tag-rewrite". The operation must\ -| | ... | fail. -| | ... -| | [Tags] | honeycomb_sanity -| | ... -| | Given sub-interface configuration with bd and rw from Honeycomb should be -| | ... | ${node} | ${sub_interface2_name} | ${sub_interface2_base_settings} -| | ... | ${sub_interface2_settings} -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} -| | When Honeycomb fails to set wrong rewrite tag -| | ... | ${node} | ${sub_interface_name} | ${rw_params_wrong_pushed} -| | Then sub-interface configuration with bd and rw from Honeycomb should be -| | ... | ${node} | ${sub_interface2_name} | ${sub_interface2_base_settings} -| | ... | ${sub_interface2_settings} -| | And rewrite tag from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} -| | And rewrite tag configuration from VAT should be -| | ... | ${node} | ${sub_interface_name} | ${rw_params_disabled} +| | Given interface configuration from Honeycomb should be empty +| | ... | ${node} | ${sub_if_name} +| | And interface configuration from VAT should be empty +| | ... | ${node} | ${sub_if_name} +| | When Honeycomb creates sub-interface | ${node} | ${super_if} +| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} +| | Then run keyword and continue on failure +| | ... | Sub-interface configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And run keyword and continue on failure +| | ... | Sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} +| | And sub-interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${super_if} | ${sub_if_id} | Honeycomb sets interface and sub-interface up | | [Documentation] | Honeycomb changes the state of interface up and then\ | | ... | changes the state of its sub-interface up, in this order. | | ... -| | [Tags] | honeycomb_sanity -| | ... | | Given interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down | | And interface state from VAT should be -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down | | When Honeycomb sets interface state -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | | Then interface state from Honeycomb should be -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | | And interface state from VAT should be -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | | Given interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | down +| | ... | ${node} | ${sub_if_name} | down | | And interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | down -| | When Honeycomb sets interface state -| | ... | ${node} | ${sub_interface_name} | up +| | ... | ${node} | ${sub_if_name} | down +| | When Honeycomb sets the sub-interface up +| | ... | ${node} | ${super_if} | ${sub_if_id} | | Then interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | up +| | ... | ${node} | ${sub_if_name} | up | | And Interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | up +| | ... | ${node} | ${sub_if_name} | up | Honeycomb sets sub-interface down while its super-interface is up | | [Documentation] | Honeycomb sets the sub-interface down while its\ | | ... | super-interface is up. It must be possible. | | ... -| | [Tags] | honeycomb_sanity +| | [Teardown] | Set super and sub interfaces up +| | ... | ${node} | ${super_if} | ${sub_if_id} | | ... | | Given interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | up -| | And Interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | up +| | ... | ${node} | ${sub_if_name} | up +| | And interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | up | | And interface state from Honeycomb should be -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | | And interface state from VAT should be -| | ... | ${node} | ${interface} | up -| | When Honeycomb sets interface state -| | ... | ${node} | ${sub_interface_name} | down -| | Then Interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | down -| | And Interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | down +| | ... | ${node} | ${super_if} | up +| | When Honeycomb sets the sub-interface down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then interface state from Honeycomb should be +| | ... | ${node} | ${sub_if_name} | down +| | And interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | | And interface state from Honeycomb should be -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | | And interface state from VAT should be -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | Honeycomb sets interface and sub-interface down | | [Documentation] | Honeycomb changes the state of interface down and then\ | | ... | changes the state of its sub-interface down, in this order. | | ... -| | [Tags] | honeycomb_sanity +| | [Teardown] | Set super and sub interfaces down +| | ... | ${node} | ${super_if} | ${sub_if_id} | | ... | | Given interface state from Honeycomb should be -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | | And interface state from VAT should be -| | ... | ${node} | ${interface} | up +| | ... | ${node} | ${super_if} | up | | When Honeycomb sets interface state -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down | | Then interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down -| | And Interface state from VAT should be -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | down | | Given interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | up +| | ... | ${node} | ${sub_if_name} | up | | And interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | up -| | When Honeycomb sets interface state -| | ... | ${node} | ${sub_interface_name} | down -| | Then Interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | down -| | And Interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | down +| | ... | ${node} | ${sub_if_name} | up +| | When Honeycomb sets the sub-interface down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then interface state from Honeycomb should be +| | ... | ${node} | ${sub_if_name} | down +| | And interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | Honeycomb fails to set sub-interface up while its super-interface is down | | [Documentation] | Honeycomb tries to set the sub-interface up while its\ | | ... | super-interface is down. It must not be possible. | | ... -| | [Tags] | honeycomb_sanity -| | ... | | Given interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down | | And interface state from VAT should be -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down | | And interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | down +| | ... | ${node} | ${sub_if_name} | down | | And interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | down +| | ... | ${node} | ${sub_if_name} | down | | When Honeycomb fails to set sub-interface up -| | ... | ${node} | ${sub_interface_name} +| | ... | ${node} | ${super_if} | ${sub_if_id} | | Then interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down | | And interface state from VAT should be -| | ... | ${node} | ${interface} | down +| | ... | ${node} | ${super_if} | down | | And interface state from Honeycomb should be -| | ... | ${node} | ${sub_interface_name} | down +| | ... | ${node} | ${sub_if_name} | down | | And interface state from VAT should be -| | ... | ${node} | ${sub_interface_name} | down +| | ... | ${node} | ${sub_if_name} | down + +| Honeycomb fails to delete sub-interface +| | [Documentation] | Check if Honeycomb can delete an existing sub-interface. +| | ... +| | [Setup] | Set super and sub interfaces down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given sub-interface configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} +| | When Honeycomb fails to remove all sub-interfaces +| | ... | ${node} | ${super_if} +| | Then sub-interface configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} + +| Honeycomb adds sub-interface to new bridge domain +| | [Documentation] | Check if Honeycomb adds a sub-interface to bridge domain. +| | ... +| | [Setup] | Set super and sub interfaces down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given sub-interface configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} +| | When Honeycomb creates L2 bridge domain +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | Then bridge domain configuration from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | When Honeycomb adds sub-interface to bridge domain +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings} +| | Then sub-interface bridge domain configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings} +| | And sub-interface bridge domain configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_bd_settings} +| | And sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} + +| Honeycomb enables tag-rewrite pop 1 +| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its\ +| | ... | parameters correctly. Case: pop 1. +| | ... +| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} + +| Honeycomb enables tag-rewrite push +| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its\ +| | ... | parameters correctly. Case: push. +| | ... +| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT} + +| Honeycomb enables tag-rewrite translate 1-2 +| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its\ +| | ... | parameters correctly. Case: translate 1-2. +| | ... +| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${tag_rewrite_translate_1_2_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT} + +| Honeycomb disables tag-rewrite +| | [Documentation] | Check if Honeycomb disables the tag-rewrite. +| | ... +| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id} +| | ... +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} +| | Then rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} + +| Honeycomb enables tag-rewrite pop 1 again +| | [Documentation] | Check if Honeycomb can enable tag-rewrite again, once it\ +| | ... | was disabled by Honeycomb. +| | ... +| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} + +| Honeycomb modifies the tag-rewrite +| | [Documentation] | Honeycomb sets the tag-rewrite: +| | ... | 1. pop 1, then +| | ... | 2. push, then +| | ... | 3. translate 1 - 2 +| | ... | Then Honeycomb disables the tag-rewrite. +| | ... +| | [Teardown] | VAT disables tag-rewrite | ${node} | ${super_if}.${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${tag_rewrite_translate_1_2_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} +| | Then rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} + +| Honeycomb fails to set wrong vlan-type in tag-rewrite +| | [Documentation] | Check that Honeycomb does not accept wrong values of\ +| | ... | vlan-type in tag-rewrite. +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb fails to set wrong rewrite tag +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${tag_rewrite_translate_1_2_wrong} +| | Then rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} + +*** Keywords *** +| Set super and sub interfaces up +| | [Documentation] | Honeycomb sets super-interface and sub-interface up, in\ +| | ... | this order. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... | - super_interface - Super interface. Type: string +| | ... | - identifier - Sub-interface identifier. Type: integer or string +| | ... +| | ... | *Example:* +| | ... | \| Set super and sub interfaces up\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| +| | ... +| | [Arguments] | ${node} | ${super_interface} | ${identifier} +| | ... +| | Honeycomb sets interface state +| | ... | ${node} | ${super_interface} | up +| | Honeycomb sets the sub-interface up +| | ... | ${node} | ${super_interface} | ${identifier} + +| Set super and sub interfaces down +| | [Documentation] | Honeycomb sets super-interface and sub-interface down, in\ +| | ... | this order. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... | - super_interface - Super interface. Type: string +| | ... | - identifier - Sub-interface identifier. Type: integer or string +| | ... +| | ... | *Example:* +| | ... | \| Set super and sub interfaces down\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| +| | ... +| | [Arguments] | ${node} | ${super_interface} | ${identifier} +| | ... +| | Honeycomb sets interface state +| | ... | ${node} | ${super_interface} | down +| | Honeycomb sets the sub-interface down +| | ... | ${node} | ${super_interface} | ${identifier} diff --git a/tests/suites/honeycomb/8 - vxlan_gpe.robot b/tests/suites/honeycomb/8 - vxlan_gpe.robot index 43d6b4bc04..0031a0a92d 100644 --- a/tests/suites/honeycomb/8 - vxlan_gpe.robot +++ b/tests/suites/honeycomb/8 - vxlan_gpe.robot @@ -60,7 +60,7 @@ | | ... | VxLAN GPE configuration from VAT should be | | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings} | | And run keyword and continue on failure -| | ... | Interface indices should be the same from Honeycomb and VAT +| | ... | VxLAN GPE Interface indices from Honeycomb and VAT should correspond | | ... | ${node} | ${vxlan_gpe_if1} | Honeycomb removes VxLAN GPE tunnel @@ -149,7 +149,7 @@ | | ... | VxLAN GPE configuration from VAT should be | | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings} | | And run keyword and continue on failure -| | ... | Interface indices should be the same from Honeycomb and VAT +| | ... | VxLAN GPE Interface indices from Honeycomb and VAT should correspond | | ... | ${node} | ${vxlan_gpe_if5} | Honeycomb creates the second VxLAN GPE tunnel with ipv6 @@ -171,5 +171,5 @@ | | ... | VxLAN GPE configuration from VAT should be | | ... | ${node} | ${vxlan_gpe_if6} | ${vxlan_gpe_ipv6_settings2} | | And run keyword and continue on failure -| | ... | Interface indices should be the same from Honeycomb and VAT +| | ... | VxLAN GPE Interface indices from Honeycomb and VAT should correspond | | ... | ${node} | ${vxlan_gpe_if6} diff --git a/tests/suites/honeycomb/resources/sub_interfaces.py b/tests/suites/honeycomb/resources/sub_interfaces.py index 9c18984930..e4acd004ac 100644 --- a/tests/suites/honeycomb/resources/sub_interfaces.py +++ b/tests/suites/honeycomb/resources/sub_interfaces.py @@ -13,6 +13,62 @@ """Test variables for Honeycomb sub-interface test suite.""" +# Sub-interface 1 and its settings: +sub_if_1_settings = { + "identifier": "1", + "vlan-type": "802dot1q", + "enabled": "false" +} + +sub_if_1_tags = [ + { + "index": "0", + "dot1q-tag": { + "tag-type": "dot1q-types:s-vlan", + "vlan-id": "100" + } + }, + { + "index": "1", + "dot1q-tag": { + "tag-type": "dot1q-types:c-vlan", + "vlan-id": "any" + } + } +] + +sub_if_1_match = "vlan-tagged-exact-match" + +# Expected operational data: sub-interface. +sub_if_1_oper = { + "identifier": 1, + "oper-status": "down", + "admin-status": "down", + "tags": { + "tag": [ + { + "index": 1, + "dot1q-tag": { + "tag-type": "dot1q-types:c-vlan", + "vlan-id": "any" + } + }, + { + "index": 0, + "dot1q-tag": { + "tag-type": "dot1q-types:s-vlan", + "vlan-id": "100" + } + } + ] + }, + "match": { + "vlan-tagged": { + "match-exact-tags": False + } + } +} + # Bridge domain name. bd_name = 'test-sub-bd' @@ -25,76 +81,197 @@ bd_settings = { 'arp-termination': True } -# Bridge domain configuration used while adding the bridge domain to a -# sub-interface. +# Bridge domain configuration used while adding the sub-interface to the bridge +# domain. sub_bd_settings = { 'bridge-domain': bd_name, - 'split-horizon-group': '0', - 'bridged-virtual-interface': 'False' + 'split-horizon-group': 1, + 'bridged-virtual-interface': False } -# Rewrite tag parameters used while setting the rewrite tag. -rw_params = { - 'rewrite-operation': 'pop-1', - 'first-pushed': '802dot1ad', - 'tag1': '1', - 'tag2': '2' +# Configuration data: Enable tag-rewrite push. +tag_rewrite_push = { + "vlan-type": "vpp-vlan:802dot1q", + "push-tags": [ + { + "index": 0, + "dot1q-tag": { + "tag-type": "dot1q-types:s-vlan", + "vlan-id":123 + } + }, + { + "index": 1, + "dot1q-tag": { + "tag-type": "dot1q-types:c-vlan", + "vlan-id": 456 + } + } + ] } -# Rewrite tag parameters used while editing the rewrite tag. -rw_params_edited = { - 'rewrite-operation': 'push-1', - 'first-pushed': '802dot1q', - 'tag1': '12', - 'tag2': '22' +# Expected operational data: tag-rewrite push. +tag_rewrite_push_oper = { + "vlan-type": "vpp-vlan:802dot1q", + "push-tags": [ + { + "index": 1, + "dot1q-tag": { + "tag-type": "dot1q-types:c-vlan", + "vlan-id": 456 + } + }, + { + "index": 0, + "dot1q-tag": { + "tag-type": "dot1q-types:s-vlan", + "vlan-id": 123 + } + } + ] } -# Rewrite tag parameters when it is disabled. -rw_params_disabled = { - 'rewrite-operation': 'disabled', - 'first-pushed': '802dot1ad' +# Expected VAT data: tag-rewrite push. +tag_rewrite_push_VAT = { + 'sub_default': 0, + 'sub_dot1ad': 0, + 'sub_exact_match': 0, + 'sub_inner_vlan_id': 0, + 'sub_inner_vlan_id_any': 1, + 'sub_number_of_tags': 2, + 'sub_outer_vlan_id': 100, + 'sub_outer_vlan_id_any': 0, + 'vtr_op': 2, + 'vtr_push_dot1q': 1, + 'vtr_tag1': 123, + 'vtr_tag2': 456 } -# Rewrite tag parameters - wrong value of 'rewrite-operation' parameter. -# Used in negative test. -rw_params_wrong_op = { - 'rewrite-operation': 'WRONG_OP', - 'first-pushed': '802dot1q', - 'tag1': '1', - 'tag2': '2' +# Configuration data: Enable tag-rewrite pop 1. +tag_rewrite_pop_1 = { + "pop-tags": "1" } -# Rewrite tag parameters - wrong value of 'first-pushed' parameter. -# Used in negative test. -rw_params_wrong_pushed = { - 'rewrite-operation': 'pop-1', - 'first-pushed': 'WRONG_PUSHED', - 'tag1': '1', - 'tag2': '2' +# Expected operational data: tag-rewrite pop 1. +tag_rewrite_pop_1_oper = { + "vlan-type": "vpp-vlan:802dot1ad", + "pop-tags": 1 } -# Second bridge domain name. -bd2_name = 'test-sub-bd2' -sub2_bd_settings = { - 'bridge-domain': bd2_name, - 'split-horizon-group': '0', - 'bridged-virtual-interface': 'False' +# Expected VAT data: tag-rewrite pop 1. +tag_rewrite_pop_1_VAT = { + 'sub_default': 0, + 'sub_dot1ad': 0, + 'sub_exact_match': 0, + 'sub_inner_vlan_id': 0, + 'sub_inner_vlan_id_any': 1, + 'sub_number_of_tags': 2, + 'sub_outer_vlan_id': 100, + 'sub_outer_vlan_id_any': 0, + 'vtr_op': 3, + 'vtr_push_dot1q': 0, + 'vtr_tag1': 0, + 'vtr_tag2': 0 } -# Second bridge domain configuration used while adding the bridge domain to a -# sub-interface. -bd2_settings = { - 'flood': True, - 'forward': True, - 'learn': True, - 'unknown-unicast-flood': True, - 'arp-termination': True +# Configuration data: Enable tag-rewrite translate 1-2. +tag_rewrite_translate_1_2 = { + "vlan-type": "vpp-vlan:802dot1q", + "pop-tags": "1", + "push-tags": [ + { + "index": 0, + "dot1q-tag": { + "tag-type": "dot1q-types:s-vlan", + "vlan-id": 111 + } + }, + { + "index": 1, + "dot1q-tag": { + "tag-type": "dot1q-types:c-vlan", + "vlan-id": 222 + } + } + ] +} + +# Expected operational data: tag-rewrite translate 1-2. +tag_rewrite_translate_1_2_oper = { + "vlan-type": "vpp-vlan:802dot1q", + "pop-tags": 1, + "push-tags": [ + { + "index": 1, + "dot1q-tag": { + "tag-type": "dot1q-types:c-vlan", + "vlan-id": 222 + } + }, + { + "index": 0, + "dot1q-tag": { + "tag-type": "dot1q-types:s-vlan", + "vlan-id": 111 + } + } + ] +} + +# Expected VAT data: tag-rewrite translate 1-2. +tag_rewrite_translate_1_2_VAT = { + 'sub_default': 0, + 'sub_dot1ad': 0, + 'sub_exact_match': 0, + 'sub_inner_vlan_id': 0, + 'sub_inner_vlan_id_any': 1, + 'sub_number_of_tags': 2, + 'sub_outer_vlan_id': 100, + 'sub_outer_vlan_id_any': 0, + 'vtr_op': 6, + 'vtr_push_dot1q': 1, + 'vtr_tag1': 111, + 'vtr_tag2': 222 +} + +# Configuration data: Disable tag-rewrite. +tag_rewrite_disabled = {} + +# Expected VAT data: Disable tag-rewrite. +tag_rewrite_disabled_VAT = { + 'sub_default': 0, + 'sub_dot1ad': 0, + 'sub_exact_match': 0, + 'sub_inner_vlan_id': 0, + 'sub_inner_vlan_id_any': 1, + 'sub_number_of_tags': 2, + 'sub_outer_vlan_id': 100, + 'sub_outer_vlan_id_any': 0, + 'vtr_op': 0, + 'vtr_push_dot1q': 0, + 'vtr_tag1': 0, + 'vtr_tag2': 0 } -# Parameters of a bridge domain with rewrite tag. -bd_rw_settings = { - 'bridge-domain': bd2_name, - 'split-horizon-group': '0', - 'bridged-virtual-interface': 'False', - 'vlan-tag-rewrite': rw_params +# Configuration data: +# Wrong vlan-type for enable tag-rewrite translate 1-2. +tag_rewrite_translate_1_2_wrong = { + "vlan-type": "vpp-vlan:WRONG", + "pop-tags": "1", + "push-tags": [ + { + "index": 0, + "dot1q-tag": { + "tag-type": "dot1q-types:s-vlan", + "vlan-id": 111 + } + }, + { + "index": 1, + "dot1q-tag": { + "tag-type": "dot1q-types:c-vlan", + "vlan-id": 222 + } + } + ] } diff --git a/tests/suites/honeycomb/resources/vxlan_gpe.py b/tests/suites/honeycomb/resources/vxlan_gpe.py index 7f219f93b6..308cd0a316 100644 --- a/tests/suites/honeycomb/resources/vxlan_gpe.py +++ b/tests/suites/honeycomb/resources/vxlan_gpe.py @@ -43,7 +43,7 @@ vxlan_gpe_wrong_type_base_settings = { 'name': vxlan_gpe_if2, 'type': 'iana-if-type:ethernetCsmacd', 'description': 'for testing purposes', - 'enabled': 'true', + 'enabled': True, 'link-up-down-trap-enable': 'enabled' } @@ -69,7 +69,7 @@ vxlan_gpe_if5 = 'vxlan_gpe_tunnel0' vxlan_gpe_base_ipv6_settings = { 'name': vxlan_gpe_if5, 'description': 'for testing purposes', - 'enabled': 'true', + 'enabled': True, 'link-up-down-trap-enable': 'enabled' } vxlan_gpe_ipv6_settings = { @@ -86,7 +86,7 @@ vxlan_gpe_if6 = 'vxlan_gpe_tunnel1' vxlan_gpe_base_ipv6_settings2 = { 'name': vxlan_gpe_if6, 'description': 'for testing purposes', - 'enabled': 'true', + 'enabled': True, 'link-up-down-trap-enable': 'enabled' } vxlan_gpe_ipv6_settings2 = { |