1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Refactor VM fixtures to include HA and protection settings

This commit is contained in:
Adolfo Gómez García 2024-08-21 16:59:59 +02:00
parent 6df00254af
commit 8aaed4d41e
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -152,6 +152,7 @@ DEF_VMS_INFO: list[prox_types.VMInfo] = [
id=i, id=i,
node=DEF_NODES[i % len(DEF_NODES)].name, node=DEF_NODES[i % len(DEF_NODES)].name,
template=True, template=True,
ha=prox_types.HAInfo.null(),
agent='agent', agent='agent',
cpus=1, cpus=1,
lock='lock', lock='lock',
@ -183,11 +184,12 @@ DEF_VMS_CONFIGURATION: list[prox_types.VMConfiguration] = [
digest='digest', digest='digest',
networks=[ networks=[
prox_types.NetworkConfiguration( prox_types.NetworkConfiguration(
net='net', type='type', macaddr=f'{i:02x}:{i+1:02x}:{i+2:02x}:{i+3:02x}:{i+4:02x}:{i+5:02x}' net='net', type='type', macaddr=f'{i:02x}:{i+1:02x}:{i+2:02x}:{i+3:02x}:{i+4:02x}:{i+5:02x}', netdata='netdata',
) )
], ],
tpmstate0='tpmstate0', tpmstate0='tpmstate0',
template=bool(i > 8), # Last two are templates template=bool(i > 8), # Last two are templates,
protection=bool(i % 2), # Every two is protected
) )
for i in range(10) for i in range(10)
] ]