mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
add MAC address inputs for instance create methods
This commit is contained in:
parent
61d822efaa
commit
c354393685
3 changed files with 46 additions and 14 deletions
|
@ -338,10 +338,12 @@ class wvmCreate(wvmConnect):
|
|||
xml += """<target dev='vd%s' bus='%s'/>""" % (vd_disk_letters.pop(0), "virtio")
|
||||
xml += """</disk>"""
|
||||
|
||||
for net in networks.split(","):
|
||||
if mac:
|
||||
macs = mac.split(',')
|
||||
for idx, net in enumerate(networks.split(",")):
|
||||
xml += """<interface type='network'>"""
|
||||
if mac:
|
||||
xml += f"""<mac address='{mac}'/>"""
|
||||
xml += f"""<mac address='{macs[idx]}'/>"""
|
||||
xml += f"""<source network='{net}'/>"""
|
||||
if nwfilter:
|
||||
xml += f"""<filterref filter='{nwfilter}'/>"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue