コード例 #1
0
ファイル: xmlconfig.py プロジェクト: yen3/virt-manager
    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
ファイル: xmlconfig.py プロジェクト: aenertia/virt-manager
    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
ファイル: xmlconfig.py プロジェクト: aenertia/virt-manager
    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
ファイル: xmlconfig.py プロジェクト: niklaushirt/virt-manager
    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