Exemplo n.º 1
0
    def testLiveCDInstaller(self):
        def exception_check(obj, paramname, paramvalue):
            if paramname == 'location':
                # Don't pass a tuple location if installer has no conn
                if not obj.conn and type(paramvalue) == tuple:
                    return True

            return False

        label = 'livecdinstaller'
        for conn in self._getInitConns(label):
            dinstall = virtinst.LiveCDInstaller(conn=conn)
            self._testArgs(dinstall, virtinst.LiveCDInstaller, 'installer',
                           exception_check)
            self._testArgs(dinstall, virtinst.LiveCDInstaller, label,
                           exception_check)
Exemplo n.º 2
0
def make_live_installer(location="/dev/loop0", gtype="xen"):
    inst = virtinst.LiveCDInstaller(type=gtype, os_type="hvm",
                                    conn=_conn, location=location)
    return inst