Commit e25721be by Guba Sándor

fixing parameters to match with serilaized data

parent c57c7b83
...@@ -25,12 +25,12 @@ class VMInstance: ...@@ -25,12 +25,12 @@ class VMInstance:
cpu_share=100, cpu_share=100,
arch="x86_64", arch="x86_64",
boot_menu=False, boot_menu=False,
vm_type="kvm", vm_type="test",
network_list=None, network_list=None,
disk_list=None, disk_list=None,
graphics=None, graphics=None,
acpi=True, acpi=True,
raw_data=None, raw_data="",
seclabel_type="dynamic", seclabel_type="dynamic",
seclabel_mode="apparmor"): seclabel_mode="apparmor"):
'''Default Virtual Machine constructor '''Default Virtual Machine constructor
...@@ -113,7 +113,7 @@ class VMInstance: ...@@ -113,7 +113,7 @@ class VMInstance:
attrib={ attrib={
'type': self.graphics['type'], 'type': self.graphics['type'],
'listen': self.graphics['listen'], 'listen': self.graphics['listen'],
'port': self.graphics['port'], 'port': str(self.graphics['port']),
'passwd': self.graphics['passwd'], 'passwd': self.graphics['passwd'],
}) })
# Features (TODO: features as list) # Features (TODO: features as list)
...@@ -121,7 +121,7 @@ class VMInstance: ...@@ -121,7 +121,7 @@ class VMInstance:
if self.acpi: if self.acpi:
ET.SubElement(features, 'acpi') ET.SubElement(features, 'acpi')
# Building raw data into xml # Building raw data into xml
if self.raw_data is not None: if self.raw_data:
xml_top.append(ET.fromstring(self.raw_data)) xml_top.append(ET.fromstring(self.raw_data))
# Security label # Security label
ET.SubElement(xml_top, 'seclabel', attrib={ ET.SubElement(xml_top, 'seclabel', attrib={
...@@ -151,7 +151,6 @@ class VMDisk: ...@@ -151,7 +151,6 @@ class VMDisk:
target_device = None target_device = None
def __init__(self, def __init__(self,
name,
source, source,
disk_type="file", disk_type="file",
disk_device="disk", disk_device="disk",
...@@ -159,7 +158,6 @@ class VMDisk: ...@@ -159,7 +158,6 @@ class VMDisk:
driver_type="qcow2", driver_type="qcow2",
driver_cache="none", driver_cache="none",
target_device="vda"): target_device="vda"):
self.name = name
self.source = source self.source = source
self.disk_type = disk_type self.disk_type = disk_type
self.disk_device = disk_device self.disk_device = disk_device
......
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