Cast esplicito per parametri configurati come numeri.

This commit is contained in:
Emiliano Vavassori 2022-08-20 00:27:04 +02:00
parent 77305d350f
commit 3b439040a9

View File

@ -19,7 +19,7 @@ baseimg = lv.Volume("base-image",
volume = lv.Volume("disk", volume = lv.Volume("disk",
base_volume_id = baseimg.id, base_volume_id = baseimg.id,
pool = pool.name, pool = pool.name,
size = config.require("disksize") * 1024 ** 3 size = int(config.require("disksize")) * 1024 ** 3
) )
# Stream configuration files # Stream configuration files
@ -39,7 +39,7 @@ vm = lv.Domain("debian11",
) ], ) ],
cloudinit = cloudinit.id, cloudinit = cloudinit.id,
disks = [ lv.DomainDiskArgs(volume_id = volume.id) ], disks = [ lv.DomainDiskArgs(volume_id = volume.id) ],
memory = config.require("memory"), memory = int(config.require("memory")),
network_interfaces = [ lv.DomainNetworkInterfaceArgs( network_interfaces = [ lv.DomainNetworkInterfaceArgs(
network_name = "default", network_name = "default",
wait_for_lease = True wait_for_lease = True