11# Configuration file, to be adapted to one's needs
22
3- from typing import Any, Dict, TYPE_CHECKING
3+ from __future__ import annotations
44
55import legacycrypt as crypt # type: ignore
66import os
7+ from typing import Any, TYPE_CHECKING
78
89if TYPE_CHECKING:
910 from lib.typing import IsoImageDef
@@ -21,7 +22,7 @@ def hash_password(password):
2122
2223HOST_DEFAULT_PASSWORD_HASH = hash_password(HOST_DEFAULT_PASSWORD)
2324
24- # Public key for a private key available to the test runner
25+ # Public keys for a private keys available to the test runner
2526TEST_SSH_PUBKEY = """
2627ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMnN/wVdQqHA8KsndfrLS7fktH/IEgxoa533efuXR6rw XCP-ng CI
2728ssh-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
3738# skip_xo_config allows to not touch XO's configuration regarding the host
3839# Else the default behaviour is to add the host to XO servers at the beginning
3940# of the testing session and remove it at the end.
40- HOSTS: Dict [str, Dict [str, Any]] = {
41+ HOSTS: dict [str, dict [str, Any]] = {
4142# "10.0.0.1": {"user": "root", "password": ""},
4243# "testhost1": {"user": "root", "password": "", 'skip_xo_config': True},
4344}
@@ -107,7 +108,7 @@ OTHER_GUEST_TOOLS = {
107108}
108109
109110# Tools
110- TOOLS: Dict [str, str] = {
111+ TOOLS: dict [str, str] = {
111112# "iso-remaster": "/home/user/src/xcpng/xcp/scripts/iso-remaster/iso-remaster.sh",
112113}
113114
@@ -127,7 +128,7 @@ ISO_IMAGES_CACHE = "/home/user/iso"
127128# for local-only ISO with things like "locally-built/my.iso" or "xs/8.3.iso".
128129# If 'net-only' is set to 'True' only source of type URL will be possible.
129130# By default the parameter is set to False.
130- ISO_IMAGES: Dict [str, "IsoImageDef"] = {
131+ ISO_IMAGES: dict [str, "IsoImageDef"] = {
131132 '83nightly': {'path': os.environ.get("XCPNG83_NIGHTLY",
132133 "http://unconfigured.iso"),
133134 'unsigned': True},
@@ -182,44 +183,44 @@ DEFAULT_SR = 'default'
182183CACHE_IMPORTED_VM = False
183184
184185# Default NFS device config:
185- NFS_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
186+ NFS_DEVICE_CONFIG: dict [str, dict [str, str]] = {
186187# 'server': '10.0.0.2', # URL/Hostname of NFS server
187188# 'serverpath': '/path/to/shared/mount' # Path to shared mountpoint
188189}
189190
190191# Default NFS4+ only device config:
191- NFS4_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
192+ NFS4_DEVICE_CONFIG: dict [str, dict [str, str]] = {
192193# 'server': '10.0.0.2', # URL/Hostname of NFS server
193194# 'serverpath': '/path_to_shared_mount' # Path to shared mountpoint
194195# 'nfsversion': '4.1'
195196}
196197
197198# 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]] = {
199200# 'location': '10.0.0.2:/path/to/shared/mount' # URL/Hostname of NFS server and path to shared mountpoint
200201}
201202
202203# 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]] = {
204205# 'location': r'\\10.0.0.2\<shared folder name>',
205206# 'username': '<user>',
206207# 'cifspassword': '<password>',
207208# 'type': 'cifs',
208209# 'vers': '<1.0> or <3.0>'
209210}
210211
211- CEPHFS_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
212+ CEPHFS_DEVICE_CONFIG: dict [str, dict [str, str]] = {
212213# 'server': '10.0.0.2',
213214# 'serverpath': '/vms'
214215}
215216
216- MOOSEFS_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
217+ MOOSEFS_DEVICE_CONFIG: dict [str, dict [str, str]] = {
217218# 'masterhost': 'mfsmaster',
218219# 'masterport': '9421',
219220# 'rootpath': '/vms'
220221}
221222
222- LVMOISCSI_DEVICE_CONFIG: Dict [str, Dict [str, str]] = {
223+ LVMOISCSI_DEVICE_CONFIG: dict [str, dict [str, str]] = {
223224# 'target': '192.168.1.1',
224225# 'port': '3260',
225226# 'targetIQN': 'target.example',
@@ -248,16 +249,7 @@ BASE_ANSWERFILES = dict(
248249 },
249250)
250251
251- IMAGE_EQUIVS: Dict [str, str] = {
252+ IMAGE_EQUIVS: dict [str, str] = {
252253# 'install.test::Nested::install[bios-830-ext]-vm1-607cea0c825a4d578fa5fab56978627d8b2e28bb':
253254# 'install.test::Nested::install[bios-830-ext]-vm1-addb4ead4da49856e1d2fb3ddf4e31027c6b693b',
254255}
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