forked from AMWA-TV/nmos-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.py
190 lines (167 loc) · 6.06 KB
/
Config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# Copyright 2018 British Broadcasting Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NMOS Testing Configuration File
# -------------------------------
# Please consult ReadMe.md for instructions on how to adjust these values for common testing setups including
# unicast DNS-SD and HTTPS testing.
# Enable or disable DNS-SD advertisements. Browsing is always permitted.
# The IS-04 Node tests create a mock registry on the network unless the `ENABLE_DNS_SD` parameter is set to `False`.
# If set to `False`, make sure to update the Query API hostname/IP and port via `QUERY_API_HOST` and `QUERY_API_PORT`.
ENABLE_DNS_SD = True
# Set the DNS-SD mode to either 'multicast' or 'unicast'
DNS_SD_MODE = 'multicast'
# Number of seconds to wait after a DNS-SD advert is created for a client to notice and perform an action
DNS_SD_ADVERT_TIMEOUT = 5
# Number of seconds to wait after browsing for a DNS-SD advert before checking the results
DNS_SD_BROWSE_TIMEOUT = 2
# Number of seconds expected between heartbeats
HEARTBEAT_INTERVAL = 5
# Number of seconds to wait for the garbage collection
GARBAGE_COLLECTION_TIMEOUT = 12
# Number of seconds to wait for messages to appear via a WebSocket subscription
WS_MESSAGE_TIMEOUT = 2
# Number of seconds to wait after performing an API action for the results to be fully visible via IS-04
API_PROCESSING_TIMEOUT = 1
# Set a Query API hostname/IP and port for use when operating without DNS-SD
QUERY_API_HOST = "127.0.0.1"
QUERY_API_PORT = 80
# Path to store the specification file cache in. Relative to the base of the testing repository.
CACHE_PATH = 'cache'
# Timeout for any HTTP requests
HTTP_TIMEOUT = 1
# Restrict the maximum number of resources that time consuming tests run against.
# 0 = unlimited for a really thorough test!
MAX_TEST_ITERATIONS = 0
# Number of seconds to wait after selecting a test to run before carrying it out
# Useful for unicast DNS testing where the device under test needs to restart in order to observe the new DNS records
TEST_START_DELAY = 0
# Test using HTTPS rather than HTTP as per AMWA BCP-003-01
ENABLE_HTTPS = False
# Prefer a specific network interface when making mDNS announcements and similar.
# Example: BIND_INTERFACE = 'ens1f0'
BIND_INTERFACE = None
# Which certificate authority to trust when performing requests in HTTPS mode.
# Defaults to the CA contained within this test suite
CERT_TRUST_ROOT_CA = "test_data/BCP00301/ca/certs/ca.cert.pem"
# Certificate chains and the corresponding private keys
CERTS_MOCKS = [
"test_data/BCP00301/ca/intermediate/certs/ecdsa.mocks.testsuite.nmos.tv.cert.chain.pem",
"test_data/BCP00301/ca/intermediate/certs/rsa.mocks.testsuite.nmos.tv.cert.chain.pem"
]
KEYS_MOCKS = [
"test_data/BCP00301/ca/intermediate/private/ecdsa.mocks.testsuite.nmos.tv.key.pem",
"test_data/BCP00301/ca/intermediate/private/rsa.mocks.testsuite.nmos.tv.key.pem"
]
# Default User Credentials for interacting with Authorization Server
AUTH_USERNAME = "TEST_USER"
AUTH_PASSWORD = "TEST_PASSWORD"
# Domain name to use for the local DNS server and mock Node
# This must match the domain name used for certificates in HTTPS mode
DNS_DOMAIN = "testsuite.nmos.tv"
# Definition of each API specification and its versions.
SPECIFICATIONS = {
"is-04": {
"repo": "nmos-discovery-registration",
"versions": ["v1.0", "v1.1", "v1.2", "v1.3"],
"default_version": "v1.2",
"apis": {
"node": {
"name": "Node API",
"raml": "NodeAPI.raml"
},
"query": {
"name": "Query API",
"raml": "QueryAPI.raml"
},
"registration": {
"name": "Registration API",
"raml": "RegistrationAPI.raml"
}
}
},
"is-05": {
"repo": "nmos-device-connection-management",
"versions": ["v1.0", "v1.1"],
"default_version": "v1.0",
"apis": {
"connection": {
"name": "Connection API",
"raml": "ConnectionAPI.raml"
}
}
},
"is-06": {
"repo": "nmos-network-control",
"versions": ["v1.0"],
"default_version": "v1.0",
"apis": {
"netctrl": {
"name": "Network API",
"raml": "NetworkControlAPI.raml"
}
}
},
"is-07": {
"repo": "nmos-event-tally",
"versions": ["v1.0"],
"default_version": "v1.0",
"apis": {
"events": {
"name": "Events API",
"raml": "EventsAPI.raml"
}
}
},
"is-08": {
"repo": "nmos-audio-channel-mapping",
"versions": ["v1.0"],
"default_version": "v1.0",
"apis": {
"channelmapping": {
"name": "Channel Mapping API",
"raml": "ChannelMappingAPI.raml"
}
}
},
"is-09": {
"repo": "nmos-system",
"versions": ["v1.0"],
"default_version": "v1.0",
"apis": {
"system": {
"name": "System API",
"raml": "SystemAPI.raml"
}
}
},
"is-10": {
"repo": "nmos-authorization",
"versions": ["v1.0"],
"default_version": "v1.0",
"apis": {
"auth": {
"name": "Authorization API",
"raml": "AuthorizationAPI.raml"
}
}
},
"bcp-003-01": {
"repo": None,
"versions": ["v1.0"],
"default_version": "v1.0",
"apis": {
"secure": {}
}
}
}