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
25 # Vlan subinterface basic settings
27 sub_interface_name = interface + '.' + str(sub_interface_id)
31 'vx_interface': 'vx_tunnel_test',
32 'vxlan_settings': {'src': '192.168.0.2',
36 # bridge domain settings
37 'bd_name': 'bd_persist',
38 'bd_settings': {'flood': True,
41 'unknown-unicast-flood': True,
42 'arp-termination': True
44 # tap interface settings
45 'tap_interface': 'tap_test',
46 'tap_settings': {'tap-name': 'tap_test',
47 'mac': '08:00:27:c0:5d:37',
50 # vhost-user interface settings
51 'vhost_interface': 'test_vhost',
52 'vhost_user_server': {'socket': 'soc1',
55 # Vlan subinterface settings
56 'sub_interface_id': sub_interface_id,
57 'sub_interface_name': sub_interface_name,
58 'sub_interface_base_settings': {'name': sub_interface_name,
59 'type': 'v3po:sub-interface'
61 'sub_interface_settings': {
62 'super-interface': interface,
63 'identifier': sub_interface_id,
64 'vlan-type': '802dot1ad',
68 'match-any-outer-id': False,
69 'match-any-inner-id': False,