Feature 10937: Transport API (TAPI) WIM connector for RO
[osm/RO.git] / RO-SDN-tapi / osm_rosdn_tapi / tests / constants.py
1 # -*- coding: utf-8 -*-
2
3 #######################################################################################
4 # This file is part of OSM RO module
5 #
6 # Copyright ETSI Contributors and Others.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License"); you may
9 # not use this file except in compliance with the License. You may obtain
10 # a copy of the License at
11 #
12 # http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 # License for the specific language governing permissions and limitations
18 # under the License.
19 #######################################################################################
20 # This work has been performed in the context of the TeraFlow Project -
21 # funded by the European Commission under Grant number 101015857 through the
22 # Horizon 2020 program.
23 # Contributors:
24 # - Lluis Gifre <lluis.gifre@cttc.es>
25 # - Ricard Vilalta <ricard.vilalta@cttc.es>
26 #######################################################################################
27
28 """This file contains the WIM settings for the unit test used to validate the
29 Transport API (TAPI) WIM connector."""
30
31
32 from osm_rosdn_tapi.tests.tools import wim_port_mapping
33
34
35 WIM_HOST_PORT = ("127.0.0.127", 49000)
36
37 # WIM_URL should be populated with the WIM url provided for the WIM connector during its instantiation
38 WIM_URL = "http://{:s}:{:d}".format(*WIM_HOST_PORT)
39
40 # WIM_ACCOUNT should be populated with the WIM credentials provided for the WIM connector during its instantiation
41 WIM_ACCOUNT = {"user": "admin", "password": "admin"}
42
43 # WIM_PORT_MAPPING should be populated with the port mapping provided for the WIM connector during its instantiation
44 # In this example, SIPs are taken from mock_tapi_handler.py file.
45 WIM_PORT_MAPPING = [
46 wim_port_mapping(
47 "dc1",
48 "dc1r1",
49 "eth0",
50 "R1-eth0",
51 service_mapping_info={},
52 ),
53 wim_port_mapping(
54 "dc2",
55 "dc2r2",
56 "eth0",
57 "R2-eth0",
58 service_mapping_info={},
59 ),
60 wim_port_mapping(
61 "dc3",
62 "dc3r3",
63 "eth0",
64 "R3-opt1",
65 service_mapping_info={
66 "sip_input": "R3-opt1-rx",
67 "sip_output": "R3-opt1-tx",
68 },
69 ),
70 wim_port_mapping(
71 "dc4",
72 "dc4r4",
73 "eth0",
74 "R4-opt1",
75 service_mapping_info={
76 "sip_input": "R4-opt1-rx",
77 "sip_output": "R4-opt1-tx",
78 },
79 ),
80 ]