aboutsummaryrefslogtreecommitdiffstats
path: root/resources/test_data
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2016-11-22 15:05:19 +0100
committerPeter Mikus <pmikus@cisco.com>2016-11-28 08:27:18 +0000
commit68d20c90a35c886cb0b187cb5d6234b232ad0bb4 (patch)
tree8be512e8c3b030577a95a66ec990df13cc7dd62a /resources/test_data
parent4dadc7a005ca99aa5a14ac650e9aa187cea10619 (diff)
CSIT-460: HC Test: Rework existing PBB tests
Rework PBB tests to account for changes in: https://gerrit.fd.io/r/2520 https://gerrit.fd.io/r/1833 Change-Id: Id18027c23e57180b76c8478b010a4e3a69a75e43 Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/test_data')
-rw-r--r--resources/test_data/honeycomb/pbb/pbb.py249
1 files changed, 53 insertions, 196 deletions
diff --git a/resources/test_data/honeycomb/pbb/pbb.py b/resources/test_data/honeycomb/pbb/pbb.py
index 93ef2e28cf..f71c70ebaf 100644
--- a/resources/test_data/honeycomb/pbb/pbb.py
+++ b/resources/test_data/honeycomb/pbb/pbb.py
@@ -17,135 +17,27 @@
# Add pbb sub interface
# Configuration data
-cfg_pbb_sub_if_1_ID = '1'
cfg_pbb_sub_if_1 = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_1_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:aa:ab",
- "destination-address": "bb:bb:bb:bb:bb:bc",
- "b-vlan-tag-vlan-id": "2223",
- "i-tag-isid": "12"
- },
- }
- ]
-}
-
-# Expected operational data:
-oper_pbb_sub_if_1 = {
- 'admin-status': 'up',
- 'ietf-ip:ipv4': {},
- 'oper-status': 'up',
- 'sub-interfaces:sub-interfaces': {},
- 'type': 'iana-if-type:ethernetCsmacd',
- 'v3po:ethernet': {
- 'duplex': 'full',
- 'mtu': 9216
+ "pbb-rewrite": {
+ "source-address": "aa:aa:aa:aa:aa:ab",
+ "destination-address": "bb:bb:bb:bb:bb:bc",
+ "b-vlan-tag-vlan-id": "2223",
+ "outer-tag": "16",
+ "i-tag-isid": "12",
+ "interface-operation": "translate-2-1"
}
}
# Modify pbb sub interface
# Configuration data
-cfg_pbb_sub_if_1_ID = '2'
cfg_pbb_sub_if_1_mod = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_1_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:aa:de",
- "destination-address": "bb:bb:bb:bb:bb:ed",
- "b-vlan-tag-vlan-id": "2223",
- "i-tag-isid": "12"
- },
- }
- ]
-}
-
-# Expected operational data:
-oper_pbb_sub_if_1_mod = {
- 'admin-status': 'up',
- 'ietf-ip:ipv4': {},
- 'oper-status': 'up',
- 'sub-interfaces:sub-interfaces': {},
- 'type': 'iana-if-type:ethernetCsmacd',
- 'v3po:ethernet': {
- 'duplex': 'full',
- 'mtu': 9216
- }
-}
-
-# Configuration data
-cfg_pbb_sub_if_2_ID = '3'
-cfg_pbb_sub_if_2 = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_2_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:aa:cc",
- "destination-address": "bb:bb:bb:bb:bb:dd",
- "b-vlan-tag-vlan-id": "10",
- "i-tag-isid": "20"
- },
- }
- ]
-}
-
-# Expected operational data:
-oper_pbb_sub_if_2 = {
- 'admin-status': 'up',
- 'ietf-ip:ipv4': {},
- 'oper-status': 'up',
- 'sub-interfaces:sub-interfaces': {},
- 'type': 'iana-if-type:ethernetCsmacd',
- 'v3po:ethernet': {
- 'duplex': 'full',
- 'mtu': 9216
- }
-}
-
-# Configuration data
-cfg_pbb_sub_if_3_ID = '4'
-cfg_pbb_sub_if_3 = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_3_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:cc:aa",
- "destination-address": "bb:bb:bb:bb:dd:bb",
- "b-vlan-tag-vlan-id": "30",
- "i-tag-isid": "40"
- },
- }
- ]
-}
-
-# Expected operational data:
-oper_pbb_sub_if_3 = {
- 'admin-status': 'up',
- 'ietf-ip:ipv4': {},
- 'oper-status': 'up',
- 'sub-interfaces:sub-interfaces': {},
- 'type': 'iana-if-type:ethernetCsmacd',
- 'v3po:ethernet': {
- 'duplex': 'full',
- 'mtu': 9216
+ "pbb-rewrite": {
+ "source-address": "aa:aa:aa:aa:aa:ac",
+ "destination-address": "bb:bb:bb:bb:bb:bd",
+ "b-vlan-tag-vlan-id": "2224",
+ "outer-tag": "17",
+ "i-tag-isid": "13",
+ "interface-operation": "push-2"
}
}
@@ -153,94 +45,59 @@ oper_pbb_sub_if_3 = {
# Wrong source-address
cfg_pbb_sub_if_ID = '5'
cfg_pbb_sub_if_wrong_src_addr = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "ab:cd:ef:gh:ij",
- "destination-address": "bb:bb:bb:bb:bb:bc",
- "b-vlan-tag-vlan-id": "2223",
- "i-tag-isid": "12"
- },
- }
- ]
+ "pbb-rewrite": {
+ "source-address": "aa:aa:aa:aa:aa:ag",
+ "destination-address": "bb:bb:bb:bb:bb:ce",
+ "b-vlan-tag-vlan-id": "2226",
+ "outer-tag": "19",
+ "i-tag-isid": "15",
+ "interface-operation": "pop-2"
+ }
}
# Wrong destination-address
cfg_pbb_sub_if_wrong_dst_addr = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:aa:ab",
- "destination-address": "ab:cd:ef:gh:ij",
- "b-vlan-tag-vlan-id": "2223",
- "i-tag-isid": "12"
- },
- }
- ]
+ "pbb-rewrite": {
+ "source-address": "aa:aa:aa:aa:aa:ae",
+ "destination-address": "bb:bb:bb:bb:bb:cg",
+ "b-vlan-tag-vlan-id": "2226",
+ "outer-tag": "19",
+ "i-tag-isid": "15",
+ "interface-operation": "pop-2"
+ }
}
# Wrong b-vlan-tag-vlan-id
cfg_pbb_sub_if_wrong_vlan_tag = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:aa:ab",
- "destination-address": "bb:bb:bb:bb:bb:bc",
- "b-vlan-tag-vlan-id": "123456789",
- "i-tag-isid": "12"
- },
- }
- ]
+ "pbb-rewrite": {
+ "source-address": "aa:aa:aa:aa:aa:ae",
+ "destination-address": "bb:bb:bb:bb:bb:ce",
+ "b-vlan-tag-vlan-id": "123456789",
+ "outer-tag": "19",
+ "i-tag-isid": "15",
+ "interface-operation": "pop-2"
+ }
}
# Wrong i-tag-isid
cfg_pbb_sub_if_wrong_i_tag = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:aa:ab",
- "destination-address": "bb:bb:bb:bb:bb:bc",
- "b-vlan-tag-vlan-id": "2223",
- "i-tag-isid": "167772152345"
- },
- }
- ]
+ "pbb-rewrite": {
+ "source-address": "aa:aa:aa:aa:aa:ae",
+ "destination-address": "bb:bb:bb:bb:bb:ce",
+ "b-vlan-tag-vlan-id": "2226",
+ "outer-tag": "19",
+ "i-tag-isid": "167772152345",
+ "interface-operation": "pop-2"
+ }
}
# b-vlan-tag-vlan-id is missing
cfg_pbb_sub_if_no_vlan_tag = {
- "sub-interface": [
- {
- "identifier": cfg_pbb_sub_if_ID,
- "vlan-type": "dot1ah-types:802dot1ah",
- "enabled": "true",
- "admin-status": "up",
- "oper-status": "up",
- "pbb": {
- "source-address": "aa:aa:aa:aa:aa:ab",
- "destination-address": "bb:bb:bb:bb:bb:bc",
- "i-tag-isid": "12"
- },
- }
- ]
+ "pbb-rewrite": {
+ "source-address": "aa:aa:aa:aa:aa:ae",
+ "destination-address": "bb:bb:bb:bb:bb:ce",
+ "outer-tag": "19",
+ "i-tag-isid": "15",
+ "interface-operation": "pop-2"
+ }
}