예제 #1
0
    def testOSDeviceDefaultChange(self):
        """
        Make sure device defaults are properly changed if we change OS
        distro/variant mid process
        """
        # Use connver=12005 so that non-rhel displays ac97
        conn = utils.open_kvm_rhel(connver=12005)

        g = _make_guest(conn=conn, os_variant="fedora11")
        self._compare(g, "install-f11-norheldefaults", False)

        try:
            CLIConfig.stable_defaults = True

            g = _make_guest(conn=conn, os_variant="fedora11")
            origemu = g.emulator
            g.emulator = "/usr/libexec/qemu-kvm"
            self.assertTrue(g.conn.stable_defaults())

            setattr(g.conn, "_support_cache", {})
            self._compare(g, "install-f11-rheldefaults", False)
            g.emulator = origemu
            setattr(g.conn, "_support_cache", {})
        finally:
            CLIConfig.stable_defaults = False
예제 #2
0
    def testOSDeviceDefaultChange(self):
        """
        Make sure device defaults are properly changed if we change OS
        distro/variant mid process
        """
        # Use connver=12005 so that non-rhel displays ac97
        conn = utils.open_kvm_rhel(connver=12005)

        g = _make_guest(conn=conn)
        g.os_variant = "fedora11"
        self._compare(g, "install-f11-norheldefaults", False)

        try:
            CLIConfig.stable_defaults = True

            g = _make_guest(conn=conn)
            g.os_variant = "fedora11"
            origemu = g.emulator
            g.emulator = "/usr/libexec/qemu-kvm"
            self.assertTrue(g.conn.stable_defaults())

            setattr(g.conn, "_support_cache", {})
            self._compare(g, "install-f11-rheldefaults", False)
            g.emulator = origemu
            setattr(g.conn, "_support_cache", {})
        finally:
            CLIConfig.stable_defaults = False
예제 #3
0
    def test_no_vmvga_RHEL(self):
        # Test that vmvga is not used on RHEL
        conn = utils.open_kvm_rhel()
        def _make():
            g = _make_guest(conn=conn)
            g.emulator = "/usr/libexec/qemu-kvm"
            g.add_default_video_device()
            g.os_variant = "ubuntu13.10"
            return g

        try:
            g = _make()
            self._compare(g, "install-novmvga-rhel", True)

            CLIConfig.stable_defaults = True
            g = _make()
            self._compare(g, "install-novmvga-rhel", True)
        finally:
            CLIConfig.stable_defaults = False
예제 #4
0
    def test_no_vmvga_RHEL(self):
        # Test that vmvga is not used on RHEL
        conn = utils.open_kvm_rhel()
        def _make():
            g = _make_guest(conn=conn)
            g.emulator = "/usr/libexec/qemu-kvm"
            g.add_default_video_device()
            g.os_variant = "ubuntu13.10"
            return g

        try:
            g = _make()
            self._compare(g, "install-novmvga-rhel", True)

            CLIConfig.stable_defaults = True
            g = _make()
            self._compare(g, "install-novmvga-rhel", True)
        finally:
            CLIConfig.stable_defaults = False
예제 #5
0
    def test_no_vmvga_RHEL(self):
        # Test that vmvga is not used on RHEL
        conn = utils.open_kvm_rhel()

        def _make():
            g = _make_guest(conn=conn)
            g.emulator = "/usr/libexec/qemu-kvm"
            g.add_default_video_device()
            g.os_variant = "ubuntu13.10"

            # Some input handling to work with different libsoinfo dbs
            g.add_default_input_device()
            g.get_devices("input")[0].type = "tablet"
            return g

        try:
            g = _make()
            self._compare(g, "install-novmvga-rhel", True)

            CLIConfig.stable_defaults = True
            g = _make()
            self._compare(g, "install-novmvga-rhel", True)
        finally:
            CLIConfig.stable_defaults = False