-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdata.py-dist
More file actions
270 lines (233 loc) · 10.1 KB
/
Copy pathdata.py-dist
File metadata and controls
270 lines (233 loc) · 10.1 KB
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Configuration file, to be adapted to one's needs
from __future__ import annotations
import os
from lib.common import hash_password
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
from lib.typing import IsoImageDef
# Default user and password to connect to a host through XAPI
# Note: this won't be used for SSH.
# You need to have an SSH key into the hosts' /root/.ssh/authorized_keys.
HOST_DEFAULT_USER = "root"
HOST_DEFAULT_PASSWORD = ""
HOST_DEFAULT_PASSWORD_HASH = hash_password(HOST_DEFAULT_PASSWORD)
# Public keys for a private keys available to the test runner
TEST_SSH_PUBKEY = """
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMnN/wVdQqHA8KsndfrLS7fktH/IEgxoa533efuXR6rw XCP-ng CI
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKz9uQOoxq6Q0SQ0XTzQHhDolvuo/7EyrDZsYQbRELhcPJG8MT/o5u3HyJFhIP2+HqBSXXgmqRPJUkwz9wUwb2sUwf44qZm/pyPUWOoxyVtrDXzokU/uiaNKUMhbnfaXMz6Ogovtjua63qld2+ZRXnIgrVtYKtYBeu/qKGVSnf4FTOUKl1w3uKkr59IUwwAO8ay3wVnxXIHI/iJgq6JBgQNHbn3C/SpYU++nqL9G7dMyqGD36QPFuqH/cayL8TjNZ67TgAzsPX8OvmRSqjrv3KFbeSlpS/R4enHkSemhgfc8Z2f49tE7qxWZ6x4Uyp5E6ur37FsRf/tEtKIUJGMRXN XCP-ng CI
"""
# The following prefix will be added to the `name-label` parameter of XAPI objects
# that the tests will create or import, such as VMs and SRs.
# Default value: [your login/user]
# OBJECTS_NAME_PREFIX = "[TEST]"
OBJECTS_NAME_PREFIX = None
# Override settings for specific hosts
# skip_xo_config allows to not touch XO's configuration regarding the host
# Else the default behaviour is to add the host to XO servers at the beginning
# of the testing session and remove it at the end.
HOSTS: dict[str, dict[str, Any]] = {
# "10.0.0.1": {"user": "root", "password": ""},
# "testhost1": {"user": "root", "password": "", 'skip_xo_config': True},
}
NETWORKS = {
"MGMT": "Pool-wide network associated with eth0",
}
# PXE config server for automated XCP-ng installation
PXE_CONFIG_SERVER = 'pxe'
# server on MGMT network, where ARP tables can reveal the MACs
ARP_SERVER = PXE_CONFIG_SERVER
# Default VM images location
DEF_VM_URL = 'http://pxe/images/'
# Guest tools ISO download location
ISO_DOWNLOAD_URL = 'http://pxe/isos/'
# Definitions of Windows guest tool ISOs to be tested
WIN_GUEST_TOOLS_ISOS = {
"stable": {
# ISO name on SR or subpath of ISO_DOWNLOAD_URL
"name": "guest-tools-win.iso",
# Whether ISO should be downloaded from ISO_DOWNLOAD_URL
"download": True,
# ISO-relative path of MSI file to be installed
"package": "package\\XenDrivers-x64.msi",
# ISO-relative path of XenClean script
"xenclean_path": "package\\XenClean\\x64\\Invoke-XenClean.ps1",
# ISO-relative path of root cert file to be installed before guest tools (optional)
"testsign_cert": "testsign\\XCP-ng_Test_Signer.crt",
# What's the onboard family of our tools? This is equal to the WinPV VENDOR_NAME value
"onboard_family": "XCP-ng",
},
# Add more guest tool ISOs here as needed
}
# Definition of ISO containing other guest tools to be tested
OTHER_GUEST_TOOLS_ISO = {
"name": "other-guest-tools-win.iso",
"download": False,
}
# Definitions of other guest tools contained in OTHER_GUEST_TOOLS_ISO
OTHER_GUEST_TOOLS = {
"xcp-ng-9.0.9000": {
# Whether we are installing MSI files ("msi"), bare .inf drivers ("inf")
# or nothing in case of Windows Update (absent or null)
"type": "msi",
# ISO-relative path of this guest tool
"path": "xcp-ng-9.0.9000",
# "path"-relative path of MSI or driver files to be installed
"package": "package\\XenDrivers-x64.msi",
# Relative path of root cert file (optional)
"testsign_cert": "testsign\\XCP-ng_Test_Signer.crt",
# Whether this guest tool version wants vendor device to be activated (optional, defaults to False)
# Note: other guest tools may not install correctly with this setting enabled
"vendor_device": False,
# Can we upgrade automatically from this guest tool to our tools?
"upgradable": True,
# What is the expected onboarding phase after running XenClean when this tool is installed? (optional)
"onboarding_phase": "see test_xenclean.py ONBOARDING_PHASES",
},
"vendor": {
"vendor_device": True,
"upgradable": False,
},
}
# Tools
TOOLS: dict[str, str] = {
# "iso-remaster": "/home/user/src/xcpng/xcp/scripts/iso-remaster/iso-remaster.sh",
}
# Values can be either full URLs or only partial URLs that will be automatically appended to DEF_VM_URL
VM_IMAGES = {
'mini-linux-x86_64-bios': 'alpine-minimal-3.12.0.xva',
'mini-linux-x86_64-uefi': 'alpine-uefi-minimal-3.12.0.xva'
}
ISO_IMAGES_BASE = "https://updates.xcp-ng.org/isos/"
ISO_IMAGES_CACHE = "/home/user/iso"
# ISO_IMAGES path can be:
# - absolute filename
# - absolute URL
# - path relative to ISO_IMAGES_BASE URL
# Note the dirname part is ignored when looking in ISO_IMAGES_CACHE, abuse this
# for local-only ISO with things like "locally-built/my.iso" or "xs/8.3.iso".
# If 'net-only' is set to 'True' only source of type URL will be possible.
# By default the parameter is set to False.
ISO_IMAGES: dict[str, "IsoImageDef"] = {
'83nightly': {'path': os.environ.get("XCPNG83_NIGHTLY",
"http://unconfigured.iso"),
'unsigned': True},
# FIXME: no such symlimk + useless without 'net-url'
#'83nightlynet': {'path': "http://pxe/isos/xcp-ng-8.3-ci-netinstall-latest"},
# 'net-url': 'fake",
# 'net-only': True},
'830': {'path': "8.3/xcp-ng-8.3.0.iso",
#'net-url': "http://server/installers/xcp-ng/8.3.0",
},
## FIXME: only a compensation for the lack of 83nightlynet
#'830net': {'path': "8.3/xcp-ng-8.3.0-netinstall.iso",
# 'net-url': "http://server/installers/xcp-ng/8.3.0",
# 'net-only': True},
'82nightly': {'path': os.environ.get("XCPNG82_NIGHTLY",
"http://unconfigured.iso"),
'unsigned': True},
'821.1': {'path': "8.2/xcp-ng-8.2.1-20231130.iso",
#'net-url': f"http://{PXE_CONFIG_SERVER}/installers/xcp-ng/8.2.1-refreshed/",
},
'821': {'path': "8.2/xcp-ng-8.2.1.iso"},
'820': {'path': "8.2/xcp-ng-8.2.0.iso"},
'81': {'path': "8.1/xcp-ng-8.1.0-2.iso"},
'80': {'path': "8.0/xcp-ng-8.0.0.iso"},
'76': {'path': "7.6/xcp-ng-7.6.0.iso"},
'75': {'path': "7.5/xcp-ng-7.5.0-2.iso"},
'xs8': {'path': "XenServer8_2024-03-18.iso"},
'ch821.1': {'path': "CitrixHypervisor-8.2.1-2306-install-cd.iso"},
'ch821': {'path': "CitrixHypervisor-8.2.1-install-cd.iso"},
}
# In some cases, we may prefer to favour a local SR to store test VM disks,
# to avoid latency or unstabilities related to network or shared file servers.
# However it's not good practice to make a local SR the default SR for a pool of several hosts.
# Hence this configuration value that you can set to `local` so that our tests use this SR by default.
# This setting affects VMs managed by the `imported_vm` fixture.
# Possible values:
# - 'default': keep using the pool's default SR
# - 'local': use the first local SR found instead
# - A UUID of the SR to be used
DEFAULT_SR = 'default'
# Whether to cache VMs on the test host, that is import them only if not already
# present in the target SR. This also causes the VM to be cloned at the beginning
# of each test module, so that the original VM remains untouched.
# /!\ The VM identifier in cache is simply the URL where it was imported from.
# No checksum or date is checked.
# A cached VM is just a VM which has a special description.
# Example description: "[Cache for http://example.com/images/filename.xva]"
# Delete the VM to remove it from cache.
# This setting affects VMs managed by the `imported_vm` fixture.
CACHE_IMPORTED_VM = False
# Default LINSTOR redundancy configuration for creating SRs.
LINSTOR_REDUNDANCY = 2
# Default NFS device config:
NFS_DEVICE_CONFIG: dict[str, str] = {
# 'server': '10.0.0.2', # URL/Hostname of NFS server
# 'serverpath': '/path/to/shared/mount' # Path to shared mountpoint
}
# Default NFS4+ only device config:
NFS4_DEVICE_CONFIG: dict[str, str] = {
# 'server': '10.0.0.2', # URL/Hostname of NFS server
# 'serverpath': '/path_to_shared_mount' # Path to shared mountpoint
# 'nfsversion': '4.1'
}
# Default NFS ISO device config:
NFS_ISO_DEVICE_CONFIG: dict[str, str] = {
# 'location': '10.0.0.2:/path/to/shared/mount' # URL/Hostname of NFS server and path to shared mountpoint
}
# Default CIFS ISO device config:
CIFS_ISO_DEVICE_CONFIG: dict[str, str] = {
# 'location': r'\\10.0.0.2\<shared folder name>',
# 'username': '<user>',
# 'cifspassword': '<password>',
# 'type': 'cifs',
# 'vers': '<1.0> or <3.0>'
}
CEPHFS_DEVICE_CONFIG: dict[str, str] = {
# 'server': '10.0.0.2',
# 'serverpath': '/vms'
}
MOOSEFS_DEVICE_CONFIG: dict[str, str] = {
# 'masterhost': 'mfsmaster',
# 'masterport': '9421',
# 'rootpath': '/vms'
}
LVMOISCSI_DEVICE_CONFIG: dict[str, str] = {
# 'target': '192.168.1.1',
# 'port': '3260',
# 'targetIQN': 'target.example',
# 'SCSIid': 'id'
}
LVMOHBA_DEVICE_CONFIG: dict[str, str] = {
# 'SCSIid': 'wwid'
}
BASE_ANSWERFILES = dict(
INSTALL={
"TAG": "installation",
"CONTENTS": (
{"TAG": "root-password",
"type": "hash",
"CONTENTS": HOST_DEFAULT_PASSWORD_HASH},
{"TAG": "timezone",
"CONTENTS": "Europe/Paris"},
{"TAG": "keymap",
"CONTENTS": "us"},
),
},
UPGRADE={
"TAG": "installation",
"mode": "upgrade",
},
RESTORE={
"TAG": "restore",
},
)
IMAGE_EQUIVS: dict[str, str] = {
# 'install.test::Nested::install[bios-830-ext]-vm1-607cea0c825a4d578fa5fab56978627d8b2e28bb':
# 'install.test::Nested::install[bios-830-ext]-vm1-addb4ead4da49856e1d2fb3ddf4e31027c6b693b',
}
# This should be a working DNS server that's not used by any VM images.
TEST_DNS_SERVER = "1.1.1.1"
# List of NICs available on host for network tests.
# example: HOST_FREE_NICS: list[str] = ['eth1', 'eth2']
HOST_FREE_NICS: list[str] = []