Commit a7537840 by Bach Dániel

fix VMNetwork.build_xml()

parent 826959cd
...@@ -275,7 +275,7 @@ class VMNetwork: ...@@ -275,7 +275,7 @@ class VMNetwork:
xml_top = ET.Element('interface', attrib={'type': self.network_type}) xml_top = ET.Element('interface', attrib={'type': self.network_type})
if self.vlan > 0 and self.network_type == "bridge": if self.vlan > 0 and self.network_type == "bridge":
xml_vlan = ET.SubElement(xml_top, 'vlan') xml_vlan = ET.SubElement(xml_top, 'vlan')
ET.SubElement(xml_vlan, 'tag', attrib={'id': self.vlan}) ET.SubElement(xml_vlan, 'tag', attrib={'id': str(self.vlan)})
if self.network_type == "bridge": if self.network_type == "bridge":
ET.SubElement(xml_top, 'source', attrib={'bridge': self.bridge}) ET.SubElement(xml_top, 'source', attrib={'bridge': self.bridge})
if self.network_type == "ethernet": if self.network_type == "ethernet":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment