CSIT-219: Realocate resources for Honeycomb tests
[csit.git] / resources / test_data / honeycomb / l2_fib.py
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 """Test variables for Honeycomb L2 FIB test suite."""
15
16 # Bridge domain name.
17 bd_name = 'test-l2-bd'
18 bd_index = 1
19
20 # Bridge domain settings used while creating a test bridge domain.
21 bd_settings = {
22     'flood': True,
23     'forward': True,
24     'learn': True,
25     'unknown-unicast-flood': True,
26     'arp-termination': True
27 }
28
29 # Bridge domain configuration used while adding the bridge domain to an
30 # interface.
31 if_bd_settings = {
32     'bridge-domain': bd_name,
33     'split-horizon-group': 1,
34     'bridged-virtual-interface': False
35 }
36
37 # Add L2 FIB entry (forward).
38 # Configuration data:
39 l2_fib_forward_cfg = {
40     "phys-address": "aa:bb:cc:dd:ee:ff",
41     "outgoing-interface": "GigabitEthernet0/8/0",
42     "action": "l2-fib-forward"
43 }
44
45 # Expected operational data:
46 l2_fib_forward_oper = {
47     "phys-address": "aa:bb:cc:dd:ee:ff",
48     "outgoing-interface": "GigabitEthernet0/8/0",
49     "bridged-virtual-interface": False,
50     "action": "v3po:l2-fib-forward",
51     "static-config": False
52 }
53
54 # Expected VAT data:
55 l2_fib_forward_vat = {
56     "mac": int("".join(l2_fib_forward_oper["phys-address"].split(':')), 16),
57     "static_mac": 0,
58     "filter_mac": 0,
59     "bvi_mac": 0
60   }
61
62 # Add L2 FIB entry (static, forward).
63 # Configuration data:
64 l2_fib_static_forward_cfg = {
65     "phys-address": "22:22:33:44:55:66",
66     "outgoing-interface": "GigabitEthernet0/8/0",
67     "static-config": True,
68     "action": "l2-fib-forward"
69 }
70
71 # Expected operational data:
72 l2_fib_static_forward_oper = {
73     "phys-address": "22:22:33:44:55:66",
74     "outgoing-interface": "GigabitEthernet0/8/0",
75     "bridged-virtual-interface": False,
76     "action": "v3po:l2-fib-forward",
77     "static-config": True
78 }
79
80 # Expected VAT data:
81 l2_fib_static_forward_vat = {
82     "mac": int("".join(l2_fib_static_forward_oper["phys-address"].
83                        split(':')), 16),
84     "sw_if_index": 5,
85     "static_mac": 1,
86     "filter_mac": 0,
87     "bvi_mac": 0
88 }
89
90 # Add L2 FIB entry (filter).
91 # Configuration data:
92 l2_fib_filter_cfg = {
93     "phys-address": "00:01:02:03:04:05",
94     "outgoing-interface": "GigabitEthernet0/8/0",
95     "static-config": True,
96     "action": "l2-fib-filter"
97 }
98
99 # Expected operational data:
100 l2_fib_filter_oper = {
101     "phys-address": "00:01:02:03:04:05",
102     "outgoing-interface": "GigabitEthernet0/8/0",
103     "bridged-virtual-interface": False,
104     "action": "v3po:l2-fib-filter",
105     "static-config": True
106 }
107
108 # Expected VAT data:
109 l2_fib_filter_vat = {
110     "mac": int("".join(l2_fib_filter_oper["phys-address"].split(':')), 16),
111     "sw_if_index": 5,
112     "static_mac": 1,
113     "filter_mac": 1,
114     "bvi_mac": 0
115 }
116
117 # WRONG configuration data - Add L2 FIB entry.
118 l2_fib_forward_cfg_wrong_mac = {
119     "phys-address": "WRONG-MAC",
120     "outgoing-interface": "GigabitEthernet0/8/0",
121     "action": "l2-fib-forward"
122 }
123
124 l2_fib_forward_cfg_wrong_if = {
125     "phys-address": "aa:bb:cc:dd:ee:ff",
126     "outgoing-interface": "WRONG-INTERFACE",
127     "action": "l2-fib-forward"
128 }
129
130 l2_fib_forward_cfg_wrong_action = {
131     "phys-address": "aa:bb:cc:dd:ee:ff",
132     "outgoing-interface": "GigabitEthernet0/8/0",
133     "action": "WRONG-ACTION"
134 }
135
136 # Modify L2 FIB entry (forward).
137 # Configuration data:
138 l2_fib_forward_modified_cfg = {
139     "phys-address": "aa:bb:cc:dd:ee:ff",
140     "outgoing-interface": "GigabitEthernet0/9/0",
141     "action": "l2-fib-forward"
142 }