HC Test: add test for vlan sub-interface exact tag match 65/5665/2
authorselias <samelias@cisco.com>
Wed, 8 Mar 2017 09:15:52 +0000 (10:15 +0100)
committerTibor Frank <tifrank@cisco.com>
Mon, 13 Mar 2017 13:35:17 +0000 (13:35 +0000)
Change-Id: Ie5feb1ac6c46f447a20d388680fc19854f2c7ef6
Signed-off-by: selias <samelias@cisco.com>
resources/test_data/honeycomb/sub_interfaces.py
tests/func/honeycomb/mgmt-cfg-int-subint-apihc-apivat-func.robot

index a8afb22..98e2b13 100644 (file)
@@ -13,6 +13,8 @@
 
 """Test variables for Honeycomb sub-interface test suite."""
 
+from copy import deepcopy
+
 # Sub-interface 1 and its settings:
 sub_if_1_settings = {
     "identifier": "1",
@@ -37,7 +39,7 @@ sub_if_1_tags = [
     }
 ]
 
-sub_if_1_match = "vlan-tagged-exact-match"
+sub_if_1_match = "vlan-tagged"
 
 # Expected operational data: sub-interface.
 sub_if_1_oper = {
@@ -285,3 +287,9 @@ ipv4_2 = {
     "address": "192.168.0.5",
     "netmask": "255.255.0.0",
     "prefix-length": 16}
+
+sub_if_2_settings = sub_if_1_settings
+sub_if_2_tags = sub_if_1_tags
+sub_if_2_match = "vlan-tagged-exact-match"
+sub_if_2_oper = deepcopy(sub_if_1_oper)
+sub_if_2_oper["match"]["vlan-tagged"]["match-exact-tags"] = True
index 9ee12e1..2203597 100644 (file)
 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
 | Variables | resources/test_data/honeycomb/sub_interfaces.py
-| Suite Teardown | Run keywords
-| ... | Run Keyword If Any Tests Failed
+| Suite Teardown
 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
-| ... | AND | Honeycomb removes all bridge domains | ${node}
 | Force Tags | honeycomb_sanity
 | Documentation | *Honeycomb sub-interface management test suite.*
 
 *** Variables ***
 # Test interface 1 and its sub-interface parameters:
 | ${super_if}= | ${node['interfaces']['port1']['name']}
+| ${super_if2}= | ${node['interfaces']['port3']['name']}
 | ${sub_if_id}= | ${sub_if_1_settings['identifier']}
 | ${sub_if_name}= | ${super_if}.${sub_if_id}
+| ${sub_if2_name}= | ${super_if2}.${sub_if_id}
 
 *** Test Cases ***
 | TC01: Honycomb creates sub-interface
 | | ... | ${node} | ${sub_if_name}
 | | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']}
 
+| TC18: Honeycomb modifies sub-interface exact tag match
+| | [Documentation] | Check if Honeycomb can modify a sub-interface with exact\
+| | ... | tag match.
+| | Given Honeycomb sets interface state | ${node} | ${super_if2} | down
+| | And sub-interface configuration from Honeycomb should be empty
+| | ... | ${node} | ${super_if2} | ${sub_if_id}
+| | And interface configuration from VAT should be empty
+| | ... | ${node} | ${sub_if2_name}
+| | When Honeycomb creates sub-interface | ${node} | ${super_if2}
+| | ... | ${sub_if_2_match} | ${sub_if_2_tags} | ${sub_if_2_settings}
+| | Then Sub-interface configuration from Honeycomb should be
+| | ... | ${node} | ${super_if2} | ${sub_if_id} | ${sub_if_2_oper}
+| | And Sub-interface configuration from VAT should be
+| | ... | ${node} | ${sub_if2_name} | ${sub_if_2_oper}
+| | And sub-interface indices from Honeycomb and VAT should correspond
+| | ... | ${node} | ${super_if2} | ${sub_if_id}
+
 *** Keywords ***
 | Set super and sub interfaces up
 | | [Documentation] | Honeycomb sets super-interface and sub-interface up, in \