diff options
Diffstat (limited to 'resources/test_data/honeycomb')
-rw-r--r-- | resources/test_data/honeycomb/pbb/pbb.py | 249 |
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" + } } |