1
1
# Configuration file, to be adapted to one's needs
2
2
3
- from typing import Any, Dict, TYPE_CHECKING
3
+ from __future__ import annotations
4
4
5
5
import legacycrypt as crypt # type: ignore
6
6
import os
7
+ from typing import Any, TYPE_CHECKING
7
8
8
9
if TYPE_CHECKING:
9
10
from lib.typing import IsoImageDef
@@ -21,7 +22,7 @@ def hash_password(password):
21
22
22
23
HOST_DEFAULT_PASSWORD_HASH = hash_password(HOST_DEFAULT_PASSWORD)
23
24
24
- # Public key for a private key available to the test runner
25
+ # Public keys for a private keys available to the test runner
25
26
TEST_SSH_PUBKEY = """
26
27
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMnN/wVdQqHA8KsndfrLS7fktH/IEgxoa533efuXR6rw XCP-ng CI
27
28
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKz9uQOoxq6Q0SQ0XTzQHhDolvuo/7EyrDZsYQbRELhcPJG8MT/o5u3HyJFhIP2+HqBSXXgmqRPJUkwz9wUwb2sUwf44qZm/pyPUWOoxyVtrDXzokU/uiaNKUMhbnfaXMz6Ogovtjua63qld2+ZRXnIgrVtYKtYBeu/qKGVSnf4FTOUKl1w3uKkr59IUwwAO8ay3wVnxXIHI/iJgq6JBgQNHbn3C/SpYU++nqL9G7dMyqGD36QPFuqH/cayL8TjNZ67TgAzsPX8OvmRSqjrv3KFbeSlpS/R4enHkSemhgfc8Z2f49tE7qxWZ6x4Uyp5E6ur37FsRf/tEtKIUJGMRXN XCP-ng CI
@@ -37,7 +38,7 @@ OBJECTS_NAME_PREFIX = None
37
38
# skip_xo_config allows to not touch XO's configuration regarding the host
38
39
# Else the default behaviour is to add the host to XO servers at the beginning
39
40
# of the testing session and remove it at the end.
40
- HOSTS: Dict [str, Dict [str, Any]] = {
41
+ HOSTS: dict [str, dict [str, Any]] = {
41
42
# "10.0.0.1": {"user": "root", "password": ""},
42
43
# "testhost1": {"user": "root", "password": "", 'skip_xo_config': True},
43
44
}
@@ -107,7 +108,7 @@ OTHER_GUEST_TOOLS = {
107
108
}
108
109
109
110
# Tools
110
- TOOLS: Dict [str, str] = {
111
+ TOOLS: dict [str, str] = {
111
112
# "iso-remaster": "/home/user/src/xcpng/xcp/scripts/iso-remaster/iso-remaster.sh",
112
113
}
113
114
@@ -127,7 +128,7 @@ ISO_IMAGES_CACHE = "/home/user/iso"
127
128
# for local-only ISO with things like "locally-built/my.iso" or "xs/8.3.iso".
128
129
# If 'net-only' is set to 'True' only source of type URL will be possible.
129
130
# By default the parameter is set to False.
130
- ISO_IMAGES: Dict [str, "IsoImageDef"] = {
131
+ ISO_IMAGES: dict [str, "IsoImageDef"] = {
131
132
'83nightly': {'path': os.environ.get("XCPNG83_NIGHTLY",
132
133
"http://unconfigured.iso"),
133
134
'unsigned': True},
@@ -182,44 +183,44 @@ DEFAULT_SR = 'default'
182
183
CACHE_IMPORTED_VM = False
183
184
184
185
# Default NFS device config:
185
- NFS_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
186
+ NFS_DEVICE_CONFIG: dict [str, dict [str, str]] = {
186
187
# 'server': '10.0.0.2', # URL/Hostname of NFS server
187
188
# 'serverpath': '/path/to/shared/mount' # Path to shared mountpoint
188
189
}
189
190
190
191
# Default NFS4+ only device config:
191
- NFS4_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
192
+ NFS4_DEVICE_CONFIG: dict [str, dict [str, str]] = {
192
193
# 'server': '10.0.0.2', # URL/Hostname of NFS server
193
194
# 'serverpath': '/path_to_shared_mount' # Path to shared mountpoint
194
195
# 'nfsversion': '4.1'
195
196
}
196
197
197
198
# Default NFS ISO device config:
198
- NFS_ISO_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
199
+ NFS_ISO_DEVICE_CONFIG: dict [str, dict [str, str]] = {
199
200
# 'location': '10.0.0.2:/path/to/shared/mount' # URL/Hostname of NFS server and path to shared mountpoint
200
201
}
201
202
202
203
# Default CIFS ISO device config:
203
- CIFS_ISO_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
204
+ CIFS_ISO_DEVICE_CONFIG: dict [str, dict [str, str]] = {
204
205
# 'location': r'\\10.0.0.2\<shared folder name>',
205
206
# 'username': '<user>',
206
207
# 'cifspassword': '<password>',
207
208
# 'type': 'cifs',
208
209
# 'vers': '<1.0> or <3.0>'
209
210
}
210
211
211
- CEPHFS_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
212
+ CEPHFS_DEVICE_CONFIG: dict [str, dict [str, str]] = {
212
213
# 'server': '10.0.0.2',
213
214
# 'serverpath': '/vms'
214
215
}
215
216
216
- MOOSEFS_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
217
+ MOOSEFS_DEVICE_CONFIG: dict [str, dict [str, str]] = {
217
218
# 'masterhost': 'mfsmaster',
218
219
# 'masterport': '9421',
219
220
# 'rootpath': '/vms'
220
221
}
221
222
222
- LVMOISCSI_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
223
+ LVMOISCSI_DEVICE_CONFIG: dict [str, dict [str, str]] = {
223
224
# 'target': '192.168.1.1',
224
225
# 'port': '3260',
225
226
# 'targetIQN': 'target.example',
@@ -248,16 +249,7 @@ BASE_ANSWERFILES = dict(
248
249
},
249
250
)
250
251
251
- IMAGE_EQUIVS: Dict [str, str] = {
252
+ IMAGE_EQUIVS: dict [str, str] = {
252
253
# 'install.test::Nested::install[bios-830-ext]-vm1-607cea0c825a4d578fa5fab56978627d8b2e28bb':
253
254
# 'install.test::Nested::install[bios-830-ext]-vm1-addb4ead4da49856e1d2fb3ddf4e31027c6b693b',
254
255
}
255
-
256
- # compatibility settings for older tests
257
- DEFAULT_NFS_DEVICE_CONFIG = NFS_DEVICE_CONFIG
258
- DEFAULT_NFS4_DEVICE_CONFIG = NFS4_DEVICE_CONFIG
259
- DEFAULT_NFS_ISO_DEVICE_CONFIG = NFS_ISO_DEVICE_CONFIG
260
- DEFAULT_CIFS_ISO_DEVICE_CONFIG = CIFS_ISO_DEVICE_CONFIG
261
- DEFAULT_CEPHFS_DEVICE_CONFIG = CEPHFS_DEVICE_CONFIG
262
- DEFAULT_MOOSEFS_DEVICE_CONFIG = MOOSEFS_DEVICE_CONFIG
263
- DEFAULT_LVMOISCSI_DEVICE_CONFIG = LVMOISCSI_DEVICE_CONFIG
0 commit comments