Fixing syntax for main.
This commit is contained in:
parent
ff2f4252e4
commit
9b8c772615
@ -1,4 +1,5 @@
|
|||||||
"""A Pulumi deployment with libvirt and Python"""
|
"""A Pulumi deployment with libvirt and Python"""
|
||||||
|
# vim:sts=4:sw=4
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from dotmap import DotMap
|
from dotmap import DotMap
|
||||||
@ -33,9 +34,7 @@ cloudinit = lv.CloudInitDisk("cloud-init",
|
|||||||
)
|
)
|
||||||
|
|
||||||
vm = lv.Domain(conf.name,
|
vm = lv.Domain(conf.name,
|
||||||
boot_devices = [ lv.DomainBootDeviceArgs(
|
boot_devices=[lv.DomainBootDeviceArgs(devs=["hd", "cdrom"])],
|
||||||
devs = [ "hd", "cdrom" ]
|
|
||||||
) ],
|
|
||||||
cloudinit=cloudinit.id,
|
cloudinit=cloudinit.id,
|
||||||
vcpu=conf.vcpu,
|
vcpu=conf.vcpu,
|
||||||
disks=[lv.DomainDiskArgs(volume_id=volume.id)],
|
disks=[lv.DomainDiskArgs(volume_id=volume.id)],
|
||||||
@ -43,10 +42,11 @@ vm = lv.Domain(conf.name,
|
|||||||
network_interfaces=[lv.DomainNetworkInterfaceArgs(
|
network_interfaces=[lv.DomainNetworkInterfaceArgs(
|
||||||
network_name="default",
|
network_name="default",
|
||||||
wait_for_lease=True
|
wait_for_lease=True
|
||||||
) ],
|
)
|
||||||
|
],
|
||||||
consoles=[lv.DomainConsoleArgs(
|
consoles=[lv.DomainConsoleArgs(
|
||||||
type="pty",
|
type="pty",
|
||||||
target_port = 0,
|
target_port='0',
|
||||||
target_type="serial"
|
target_type="serial"
|
||||||
)],
|
)],
|
||||||
opts=pulumi.ResourceOptions(
|
opts=pulumi.ResourceOptions(
|
||||||
|
Loading…
Reference in New Issue
Block a user