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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
14 """Test variables for Honeycomb persistence test suite."""
17 def get_variables(interface):
18 """Creates and returns dictionary of test variables.
20 :param interface: name of super-interface for the tested sub-interface
22 :return: dictionary of test variables
26 bd_name = 'bd_persist'
28 sub_if_name = interface + '.' + str(sub_if_id)
32 'vx_interface': 'vx_tunnel_test',
33 'vxlan_settings': {'src': '192.168.0.2',
37 # bridge domain settings
39 'bd_settings': {'flood': True,
42 'unknown-unicast-flood': True,
43 'arp-termination': True
45 # tap interface settings
46 'tap_interface': 'tap_test',
47 'tap_interface_vat': 'tap0',
48 'tap_settings': {'host-interface-name': 'tap_test',
49 'mac': '08:00:27:c0:5d:37',
52 'tap_settings_oper': {'host-interface-name': 'tap_test',
53 'device-name': 'tap0',
56 'mac': '08:00:27:c0:5d:37',
59 'tap_settings_vat': {'dev_name': 'tap0',
62 'mac': '08:00:27:c0:5d:37',
65 # vhost-user interface settings
66 'vhost_interface': 'test_vhost',
67 'vhost_user_client': {'socket': 'soc1',
70 # Vlan subinterface settings
71 'sub_if_id': sub_if_id,
72 'sub_if_name': sub_if_name,
73 'sub_if_1_settings': {
74 "identifier": sub_if_id,
75 "vlan-type": "_802dot1q",
82 "tag-type": "dot1q-types:s-vlan",
89 "tag-type": "dot1q-types:c-vlan",
94 'sub_if_1_match': "vlan-tagged-exact-match",
96 "identifier": sub_if_id,
104 "tag-type": "dot1q-types:c-vlan",
111 "tag-type": "dot1q-types:s-vlan",
119 "match-exact-tags": True
124 'bridge-domain': bd_name,
125 'split-horizon-group': '1',
126 'bridged-virtual-interface': 'False'
128 'tag_rewrite_pop_1': {
132 'tag_rewrite_pop_1_oper': {
133 "vlan-type": "vpp-vlan:_802dot1ad",
137 'tag_rewrite_pop_1_VAT': {
140 'sub_exact_match': 1,
141 'sub_inner_vlan_id': 0,
142 'sub_inner_vlan_id_any': 1,
143 'sub_number_of_tags': 2,
144 'sub_outer_vlan_id': 100,
145 'sub_outer_vlan_id_any': 0,