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 SPAN port mirroring test suite."""
17 def get_variables(interface1, interface2, interface3):
18 """Create and return a dictionary of test variables.
20 :param interface1: Name of an interface.
21 :param interface2: Name of an interface.
22 :param interface3: Name of an interface.
23 :type interface1: string
24 :type interface2: string
25 :type interface3: string
27 :returns: Dictionary of test variables - settings for Honeycomb's
28 SPAN port mirroring suite.
32 "interface1": interface1,
33 "interface2": interface2,
34 "interface3": interface3,
36 # Interface 2 - ingress
39 "iface-ref": interface2,
42 # Interface 2 - egress
43 "settings_transmit": {
45 "iface-ref": interface2,
48 # Interface 2 - ingress/egress
51 "iface-ref": interface2,
54 # Interface 3 - ingress/egress
57 "iface-ref": interface3,
60 # IP addresses for traffic test
61 "tg_to_dut_if1_ip": "192.168.1.1",
62 "dut_to_tg_if1_ip": "192.168.1.2",
63 "tg_to_dut_if2_ip": "192.168.2.1",
64 "dut_to_tg_if2_ip": "192.168.2.2",