3f6a1e6a0057f8e2b09946a2e52c68c9d810e911
[csit.git] / resources / test_data / honeycomb / spanrx-apihc-apivat.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 SPAN port mirroring test suite."""
15
16
17 def get_variables(node,
18                   interface1,
19                   interface2,
20                   interface3
21                  ):
22     """Create and return a dictionary of test variables.
23
24     :param node: Honeycomb node.
25     :param interface1: Name of an interface.
26     :param interface2: Name of an interface.
27     :param interface3: Name of an interface.
28     :type node: dict
29     :type interface1: string
30     :type interface2: string
31     :type interface3: string
32
33     :returns: Dictionary of test variables - settings for Honeycomb's
34     SPAN port mirroring suite.
35     :rtype: dict
36     """
37     variables = {
38         "interface1": interface1,
39         "interface2": interface2,
40         "interface3": interface3,
41         "settings_1": {
42             "state": "receive",
43             "iface-ref": interface2,
44         },
45
46         "settings_2": {
47             "state": "transmit",
48             "iface-ref": interface2,
49         },
50
51         "settings_3": {
52             "state": "both",
53             "iface-ref": interface2,
54         },
55
56         "settings_4": {
57             "state": "both",
58             "iface-ref": interface3,
59         },
60
61         "tg_to_dut_if1_ip": "192.168.1.1",
62         "dut_to_tg_if1_ip": "192.168.1.2",
63         "prefix": 24,
64     }
65     return variables

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.