HC Test: add test for vlan sub-interface exact tag match
[csit.git] / resources / test_data / honeycomb / sub_interfaces.py
index 6904b48..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 = {
@@ -47,19 +49,19 @@ sub_if_1_oper = {
     "tags": {
         "tag": [
             {
-                "index": 1,
+                "index": 0,
                 "dot1q-tag": {
-                    "tag-type": "dot1q-types:c-vlan",
-                    "vlan-id": "any"
+                    "tag-type": "dot1q-types:s-vlan",
+                    "vlan-id": "100"
                 }
             },
             {
-                "index": 0,
+                "index": 1,
                 "dot1q-tag": {
-                    "tag-type": "dot1q-types:s-vlan",
-                    "vlan-id": "100"
+                    "tag-type": "dot1q-types:c-vlan",
+                    "vlan-id": "any"
                 }
-            }
+            },
         ]
     },
     "match": {
@@ -97,7 +99,7 @@ tag_rewrite_push = {
             "index": 0,
             "dot1q-tag": {
                 "tag-type": "dot1q-types:s-vlan",
-                "vlan-id":123
+                "vlan-id": 123
             }
         },
         {
@@ -115,17 +117,17 @@ tag_rewrite_push_oper = {
     "vlan-type": "vpp-vlan:802dot1q",
     "push-tags": [
         {
-            "index": 1,
+            "index": 0,
             "dot1q-tag": {
-                "tag-type": "dot1q-types:c-vlan",
-                "vlan-id": 456
+                "tag-type": "dot1q-types:s-vlan",
+                "vlan-id": 123
             }
         },
         {
-            "index": 0,
+            "index": 1,
             "dot1q-tag": {
-                "tag-type": "dot1q-types:s-vlan",
-                "vlan-id": 123
+                "tag-type": "dot1q-types:c-vlan",
+                "vlan-id": 456
             }
         }
     ]
@@ -202,19 +204,19 @@ tag_rewrite_translate_1_2_oper = {
     "pop-tags": 1,
     "push-tags": [
         {
-            "index": 1,
+            "index": 0,
             "dot1q-tag": {
-                "tag-type": "dot1q-types:c-vlan",
-                "vlan-id": 222
+                "tag-type": "dot1q-types:s-vlan",
+                "vlan-id": 111
             }
         },
         {
-            "index": 0,
+            "index": 1,
             "dot1q-tag": {
-                "tag-type": "dot1q-types:s-vlan",
-                "vlan-id": 111
+                "tag-type": "dot1q-types:c-vlan",
+                "vlan-id": 222
             }
-        }
+        },
     ]
 }
 
@@ -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