Ejemplo n.º 1
0
    def testF11Xen(self):
        utils.set_conn(_plainxen)
        i = utils.make_distro_installer(gtype="xen")
        g = utils.get_basic_fullyvirt_guest("xen", installer=i)

        g.os_type = "linux"
        g.os_variant = "fedora11"
        g.installer.cdrom = True
        g.disks.append(utils.get_floppy())
        g.disks.append(utils.get_filedisk())
        g.disks.append(utils.get_blkdisk())
        g.nics.append(utils.get_virtual_network())
        self._compare(g, "install-f11-xen", False)
Ejemplo n.º 2
0
        def build_guest():
            i = utils.make_distro_installer(gtype="kvm")
            g = utils.get_basic_fullyvirt_guest("kvm", installer=i)

            g.os_type = "linux"
            g.os_variant = "fedora11"
            g.installer.cdrom = True
            g.disks.append(utils.get_floppy())
            g.disks.append(utils.get_filedisk())
            g.disks.append(utils.get_blkdisk())
            g.nics.append(utils.get_virtual_network())
            g.add_device(VirtualAudio())
            return g
Ejemplo n.º 3
0
    def testOSDeviceDefaultChange(self):
        """
        Make sure device defaults are properly changed if we change OS
        distro/variant mid process
        """
        utils.set_conn(_plainkvm)

        i = utils.make_distro_installer(gtype="kvm")
        g = utils.get_basic_fullyvirt_guest("kvm", installer=i)

        do_install = False
        g.installer.cdrom = True
        g.disks.append(utils.get_floppy())
        g.disks.append(utils.get_filedisk())
        g.disks.append(utils.get_blkdisk())
        g.nics.append(utils.get_virtual_network())

        # Call get_config_xml sets first round of defaults w/o os_variant set
        g.get_xml_config(do_install)

        g.os_variant = "fedora11"
        self._compare(g, "install-f11", do_install)
Ejemplo n.º 4
0
    def testFullKVMRHEL6(self):
        utils.set_conn(_plainkvm)
        i = utils.make_distro_installer(
                                  location="tests/cli-test-xml/fakerhel6tree",
                                  gtype="kvm")
        g = utils.get_basic_fullyvirt_guest("kvm", installer=i)
        g.disks.append(utils.get_floppy())
        g.disks.append(utils.get_filedisk("/default-pool/rhel6.img"))
        g.disks.append(utils.get_blkdisk())
        g.nics.append(utils.get_virtual_network())
        g.add_device(VirtualAudio())
        g.add_device(VirtualVideoDevice(g.conn))
        g.os_autodetect = True

        # Do this ugly hack to make sure the test doesn't try and use vol
        # upload
        origscratch = getattr(i, "_get_system_scratchdir")
        try:
            setattr(i, "_get_system_scratchdir",
                    lambda: i.scratchdir)
            self._testInstall(g, "rhel6-kvm-stage1", "rhel6-kvm-stage2")
        finally:
            setattr(i, "_get_system_scratchdir", origscratch)
 def testFedoraTreeinfo(self):
     i = utils.make_distro_installer(
                             location="tests/cli-test-xml/fakefedoratree",
                             gtype="kvm")
     t, v = i.detect_distro()
     self.assertEquals((t, v), ("linux", "fedora17"))