diff options
author | Cole Robinson <crobinso@redhat.com> | 2013-07-16 16:47:08 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2013-07-23 17:34:32 -0400 |
commit | f37d4d010a8a6236c7538ca473697ef9530a2a8c (patch) | |
tree | c3a4e4d55e649bc457d1fe67e9b122591d0b33dd /tests | |
parent | aba9d82bac7df9fd78950c04be6c0ceba5f427e4 (diff) | |
download | virt-manager-f37d4d010a8a6236c7538ca473697ef9530a2a8c.tar.gz |
virtinst: Drop __init__ params from Guest and Installer
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils.py | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/tests/utils.py b/tests/utils.py index d1684cc9..93a048b6 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -169,7 +169,8 @@ def diff_compare(actual_out, filename=None, expect_out=None): def get_basic_paravirt_guest(installer=None): - g = virtinst.Guest(_conn, type="xen") + g = virtinst.Guest(_conn) + g.type = "xen" g.name = "TestGuest" g.memory = int(200 * 1024) g.maxmemory = int(400 * 1024) @@ -195,7 +196,8 @@ def get_basic_paravirt_guest(installer=None): def get_basic_fullyvirt_guest(typ="xen", installer=None): - g = virtinst.Guest(_conn, type=typ) + g = virtinst.Guest(_conn) + g.type = typ g.name = "TestGuest" g.memory = int(200 * 1024) g.maxmemory = int(400 * 1024) @@ -220,24 +222,32 @@ def get_basic_fullyvirt_guest(typ="xen", installer=None): def make_import_installer(os_type="hvm"): - inst = virtinst.ImportInstaller(type="xen", os_type=os_type, conn=_conn) + inst = virtinst.ImportInstaller(_conn) + inst.type = "xen" + inst.os_type = os_type return inst def make_distro_installer(location="/default-pool/default-vol", gtype="xen"): - inst = virtinst.DistroInstaller(type=gtype, os_type="hvm", conn=_conn, - location=location) + inst = virtinst.DistroInstaller(_conn) + inst.type = gtype + inst.os_type = "hvm" + inst.location = location return inst def make_live_installer(location="/dev/loop0", gtype="xen"): - inst = virtinst.LiveCDInstaller(type=gtype, os_type="hvm", - conn=_conn, location=location) + inst = virtinst.LiveCDInstaller(_conn) + inst.type = gtype + inst.os_type = "hvm" + inst.location = location return inst def make_pxe_installer(gtype="xen"): - inst = virtinst.PXEInstaller(type=gtype, os_type="hvm", conn=_conn) + inst = virtinst.PXEInstaller(_conn) + inst.type = gtype + inst.os_type = "hvm" return inst |