commit virt-manager for openSUSE:12.1
Hello community, here is the log from the commit of package virt-manager for openSUSE:12.1 checked in at 2011-10-29 08:01:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.1/virt-manager (Old) and /work/SRC/openSUSE:12.1/.virt-manager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "virt-manager", Maintainer is "CARNOLD@suse.com" Changes: -------- --- /work/SRC/openSUSE:12.1/virt-manager/virt-manager.changes 2011-10-24 13:32:01.000000000 +0200 +++ /work/SRC/openSUSE:12.1/.virt-manager.new/virt-manager.changes 2011-10-29 08:01:29.000000000 +0200 @@ -1,0 +2,8 @@ +Fri Oct 28 10:19:43 MDT 2011 - carnold@novell.com + +- Upstream bug fixes + virtinst-git-mac-prefix.diff + virtman-git-error-reporting.diff + virtman-git-explicit-python.diff + +------------------------------------------------------------------- Old: ---- virtinst-cpu-model-name-fix.diff virtinst-error-message-fix.diff virtinst-hv-version-fix.diff virtinst-initrd-inject-fix.diff virtinst-initrd-inject2-fix.diff virtinst-no-volume-fix.diff virtinst-prompts-fix.diff virtinst-remote-storage-fix.diff virtinst-typo-fix.diff virtinst-xml-clear-fix.diff virtman-char-device-mode-fix.diff virtman-collidelist-fix.diff virtman-delete-fix.diff virtman-details-fix.diff virtman-domain-name-fix.diff virtman-finish-button-fix.diff virtman-grep-fix.diff virtman-netstats-fix.diff virtman-no-cd-present-fix.diff virtman-resize-menu-fix.diff virtman-set-has-window-fix.diff virtman-shutoff-fix.diff virtman-storage-pool-fix.diff virtman-unapplied-changes-fix.diff virtman-vcpu-count-fix.diff New: ---- virtinst-git-cpu-model-name.diff virtinst-git-error-message.diff virtinst-git-hv-version.diff virtinst-git-initrd-inject.diff virtinst-git-initrd-inject2.diff virtinst-git-mac-prefix.diff virtinst-git-no-volume.diff virtinst-git-prompts.diff virtinst-git-remote-storage.diff virtinst-git-typo.diff virtinst-git-xml-clear.diff virtman-git-char-device-mode.diff virtman-git-collidelist.diff virtman-git-connection-pylint.diff virtman-git-delete.diff virtman-git-details.diff virtman-git-domain-name.diff virtman-git-error-reporting.diff virtman-git-explicit-python.diff virtman-git-finish-button.diff virtman-git-grep.diff virtman-git-netstats.diff virtman-git-no-cd-present.diff virtman-git-resize-menu.diff virtman-git-set-has-window.diff virtman-git-shutoff.diff virtman-git-storage-pool.diff virtman-git-tick-obj-lists.diff virtman-git-unapplied-changes.diff virtman-git-vcpu-count.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ virt-manager.spec ++++++ --- /var/tmp/diff_new_pack.2vGCMc/_old 2011-10-29 08:01:30.000000000 +0200 +++ /var/tmp/diff_new_pack.2vGCMc/_new 2011-10-29 08:01:30.000000000 +0200 @@ -38,21 +38,25 @@ Source1: %{virtinst_name}.tar.bz2 # see https://bugzilla.redhat.com/show_bug.cgi?id=620216, # https://bugzilla.novell.com/show_bug.cgi?id=641981 -Patch1: virtman-netstats-fix.diff -Patch2: virtman-finish-button-fix.diff -Patch3: virtman-shutoff-fix.diff -Patch4: virtman-set-has-window-fix.diff -Patch5: virtman-grep-fix.diff -Patch6: virtman-no-cd-present-fix.diff -Patch7: virtman-resize-menu-fix.diff -Patch8: virtman-vcpu-count-fix.diff -Patch9: virtman-storage-pool-fix.diff -Patch10: virtman-domain-name-fix.diff -Patch11: virtman-unapplied-changes-fix.diff -Patch12: virtman-details-fix.diff -Patch13: virtman-delete-fix.diff -Patch14: virtman-collidelist-fix.diff -Patch15: virtman-char-device-mode-fix.diff +Patch1: virtman-git-netstats.diff +Patch2: virtman-git-finish-button.diff +Patch3: virtman-git-shutoff.diff +Patch4: virtman-git-set-has-window.diff +Patch5: virtman-git-grep.diff +Patch6: virtman-git-no-cd-present.diff +Patch7: virtman-git-resize-menu.diff +Patch8: virtman-git-vcpu-count.diff +Patch9: virtman-git-storage-pool.diff +Patch10: virtman-git-domain-name.diff +Patch11: virtman-git-unapplied-changes.diff +Patch12: virtman-git-details.diff +Patch13: virtman-git-delete.diff +Patch14: virtman-git-collidelist.diff +Patch15: virtman-git-char-device-mode.diff +Patch16: virtman-git-connection-pylint.diff +Patch17: virtman-git-tick-obj-lists.diff +Patch18: virtman-git-error-reporting.diff +Patch19: virtman-git-explicit-python.diff Patch50: virtman-desktop.diff Patch51: virtman-vminstall.diff Patch52: virtman-cdrom.diff @@ -65,19 +69,20 @@ Patch62: virtman-storage-pool.diff Patch63: virtman-eepro100.diff Patch64: virtman-qed.diff -Patch100: virtinst-hv-version-fix.diff -Patch101: virtinst-initrd-inject-fix.diff -Patch102: virtinst-initrd-inject2-fix.diff -Patch103: virtinst-no-volume-fix.diff -Patch104: virtinst-prompts-fix.diff -Patch105: virtinst-cpu-model-name-fix.diff -Patch106: virtinst-xml-clear-fix.diff -Patch107: virtinst-remote-storage-fix.diff -Patch108: virtinst-error-message-fix.diff -Patch109: virtinst-typo-fix.diff -Patch110: virtinst-cdrom.diff -Patch111: virtinst-storage-ocfs2.diff -Patch112: virtinst-qed.diff +Patch100: virtinst-git-hv-version.diff +Patch101: virtinst-git-initrd-inject.diff +Patch102: virtinst-git-initrd-inject2.diff +Patch103: virtinst-git-no-volume.diff +Patch104: virtinst-git-prompts.diff +Patch105: virtinst-git-cpu-model-name.diff +Patch106: virtinst-git-xml-clear.diff +Patch107: virtinst-git-remote-storage.diff +Patch108: virtinst-git-error-message.diff +Patch109: virtinst-git-typo.diff +Patch110: virtinst-git-mac-prefix.diff +Patch150: virtinst-cdrom.diff +Patch151: virtinst-storage-ocfs2.diff +Patch152: virtinst-qed.diff ExclusiveArch: %{ix86} x86_64 BuildRoot: %{_tmppath}/%{name}-%{version}-build %gconf_schemas_prereq @@ -174,6 +179,10 @@ %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 %patch50 -p1 %patch51 -p1 %patch52 -p1 @@ -198,8 +207,9 @@ %patch108 -p1 %patch109 -p1 %patch110 -p1 -%patch111 -p1 -%patch112 -p1 +%patch150 -p1 +%patch151 -p1 +%patch152 -p1 popd # sed -i -e "s@sr\@Latn@sr\@latin@" configure # mv po/sr@Latn.po po/sr@latin.po ++++++ virtinst-git-cpu-model-name.diff ++++++ Subject: virt-install: Don't lowercase --cpu model name From: Cole Robinson crobinso@redhat.com Mon Aug 29 11:53:05 2011 -0400 Date: Mon Aug 29 11:53:05 2011 -0400: Git: 36c0e33c0ec1b725726679f6c904374578e25eba Index: virtinst-0.600.0/tests/cli-test-xml/compare/qemu-plain.xml =================================================================== --- virtinst-0.600.0.orig/tests/cli-test-xml/compare/qemu-plain.xml +++ virtinst-0.600.0/tests/cli-test-xml/compare/qemu-plain.xml @@ -11,6 +11,9 @@ <features> <acpi/><apic/><pae/> </features> + <cpu match='exact'> + <model>Penryn</model> + </cpu> <clock offset="utc"/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> Index: virtinst-0.600.0/tests/clitest.py =================================================================== --- virtinst-0.600.0.orig/tests/clitest.py +++ virtinst-0.600.0/tests/clitest.py @@ -678,7 +678,8 @@ args_dict = { # xenner ("--os-variant fedora14 --nodisks --boot hd --paravirt", "kvm-xenner"), # plain qemu - ("--os-variant fedora14 --nodisks --boot cdrom --virt-type qemu", + ("--os-variant fedora14 --nodisks --boot cdrom --virt-type qemu " + "--cpu Penryn", "qemu-plain"), # 32 on 64 ("--os-variant fedora14 --nodisks --boot network --nographics --arch i686", Index: virtinst-0.600.0/virtinst/cli.py =================================================================== --- virtinst-0.600.0.orig/virtinst/cli.py +++ virtinst-0.600.0/virtinst/cli.py @@ -1149,7 +1149,7 @@ def parse_optstr_tuples(optstr, compress opt_type, opt_val = opt.split("=", 1) optlist.append((opt_type.lower(), opt_val)) else: - optlist.append((opt.lower(), None)) + optlist.append((opt, None)) return optlist ++++++ virtinst-git-error-message.diff ++++++ Subject: util: Fix name validation error message From: Cole Robinson crobinso@redhat.com Thu Sep 1 13:12:44 2011 -0400 Date: Thu Sep 1 13:12:44 2011 -0400: Git: 72de7f4fba5e3536a0b68a23473ca9c81869882f Index: virtinst-0.600.0/virtinst/_util.py =================================================================== --- virtinst-0.600.0.orig/virtinst/_util.py +++ virtinst-0.600.0/virtinst/_util.py @@ -152,7 +152,7 @@ def validate_uuid(val): def validate_name(name_type, val, lencheck=False): if type(val) is not str or len(val) == 0: - raise ValueError(_("%s name must be a string")) + raise ValueError(_("%s name must be a string") % name_type) if lencheck: if len(val) > 50: ++++++ virtinst-git-hv-version.diff ++++++ Subject: support: If getting HV version fails, just use 0 From: Cole Robinson crobinso@redhat.com Mon Aug 1 16:16:01 2011 -0400 Date: Mon Aug 1 16:16:01 2011 -0400: Git: c11616761952697dadb2b9a88b761d9816060c54 If libvirt has issues building qemu caps, version can fail. Index: virtinst-0.600.0/virtinst/support.py =================================================================== --- virtinst-0.600.0.orig/virtinst/support.py +++ virtinst-0.600.0/virtinst/support.py @@ -373,9 +373,12 @@ def _hv_ver(conn, uri): if not _try_command(cmd, args): return 0 - ret = cmd(*args) - if type(ret) == tuple: - ret = ret[1] + try: + ret = cmd(*args) + if type(ret) == tuple: + ret = ret[1] + except libvirt.libvirtError: + ret = 0 return ret ++++++ virtinst-git-initrd-inject.diff ++++++ Subject: virt-install: Fix --initrd-inject From: Cole Robinson crobinso@redhat.com Tue Aug 23 15:35:32 2011 -0400 Date: Tue Aug 23 15:35:32 2011 -0400: Git: b7054426336929abb0ab0d822ad208a11d418904 And add unit tests for it! Index: virtinst-0.600.0/tests/clitest.py =================================================================== --- virtinst-0.600.0.orig/tests/clitest.py +++ virtinst-0.600.0/tests/clitest.py @@ -265,6 +265,11 @@ args_dict = { "--arch i486 --pxe", # Directory tree URL install "--hvm --location %(TREEDIR)s", + # initrd-inject + "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install", + # initrd-inject with manual kernel/initrd + "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install", + # Directory tree URL install with extra-args # Directory tree URL install with extra-args "--hvm --location %(TREEDIR)s --extra-args console=ttyS0", # Directory tree CDROM install Index: virtinst-0.600.0/virtinst/DistroInstaller.py =================================================================== --- virtinst-0.600.0.orig/virtinst/DistroInstaller.py +++ virtinst-0.600.0/virtinst/DistroInstaller.py @@ -270,11 +270,10 @@ class DistroInstaller(Installer.Installe transient=transient) self.install_devices.append(disk) - def _perform_initrd_injections(self): + def _perform_initrd_injections(self, initrd): """ Insert files into the root directory of the initial ram disk """ - initrd = self._install_bootconfig.initrd tempdir = tempfile.mkdtemp(dir=self.scratchdir) os.chmod(tempdir, 0775) @@ -379,7 +378,7 @@ class DistroInstaller(Installer.Installe self._tmpfiles.append(initrdfn) if self._initrd_injections: - self._perform_initrd_injections() + self._perform_initrd_injections(initrdfn) # If required, upload media to an accessible guest location kernelfn, initrdfn = self._upload_media(guest, meter, ++++++ virtinst-git-initrd-inject2.diff ++++++ Subject: virt-install: Error if initrd-inject and not --location From: Cole Robinson crobinso@redhat.com Tue Aug 23 15:55:20 2011 -0400 Date: Tue Aug 23 15:55:20 2011 -0400: Git: 178276dbc8978342c842081f67ee7bd06a146282 Index: virtinst-0.600.0/tests/clitest.py =================================================================== --- virtinst-0.600.0.orig/tests/clitest.py +++ virtinst-0.600.0/tests/clitest.py @@ -267,9 +267,6 @@ args_dict = { "--hvm --location %(TREEDIR)s", # initrd-inject "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install", - # initrd-inject with manual kernel/initrd - "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install", - # Directory tree URL install with extra-args # Directory tree URL install with extra-args "--hvm --location %(TREEDIR)s --extra-args console=ttyS0", # Directory tree CDROM install @@ -309,6 +306,8 @@ args_dict = { "--hvm --pxe --boot menu=foobar", # cdrom fail w/ extra-args "--hvm --cdrom %(EXISTIMG1)s --extra-args console=ttyS0", + # initrd-inject with manual kernel/initrd + "--hvm --boot kernel=%(TREEDIR)s/pxeboot/vmlinuz,initrd=%(TREEDIR)s/pxeboot/initrd.img --initrd-inject virt-install", ], }, # category "install" Index: virtinst-0.600.0/virt-install =================================================================== --- virtinst-0.600.0.orig/virt-install +++ virtinst-0.600.0/virt-install @@ -415,6 +415,8 @@ def check_option_collisions(options, gue if not options.location and options.extra: fail(_("--extra-args only work if specified with --location.")) + if not options.location and options.initrd_injections: + fail(_("--initrd-inject only works if specified with --location.")) ########################## ++++++ virtinst-git-mac-prefix.diff ++++++ Subject: CloneManager: Use correct mac prefix when cloning KVM guests From: Cole Robinson crobinso@redhat.com Fri Oct 14 15:18:18 2011 -0400 Date: Fri Oct 14 15:18:18 2011 -0400: Git: 8060feeb26be4cd0ab36feca88e8a92db54b09e2 Index: virtinst-0.600.0/virtinst/CloneManager.py =================================================================== --- virtinst-0.600.0.orig/virtinst/CloneManager.py +++ virtinst-0.600.0/virtinst/CloneManager.py @@ -437,7 +437,6 @@ class CloneDesign(object): # We simply edit the original VM xml in place doc = libxml2.parseDoc(self._clone_xml) ctx = doc.xpathNewContext() - typ = ctx.xpathEval("/domain")[0].prop("type") # changing name node = ctx.xpathEval("/domain/name") @@ -465,7 +464,7 @@ class CloneDesign(object): mac = self._clone_mac[i - 1] except Exception: while 1: - mac = _util.randomMAC(typ) + mac = _util.randomMAC(self.original_conn.getType().lower()) dummy, msg = self._check_mac(mac) if msg is not None: continue ++++++ virtinst-git-no-volume.diff ++++++ Subject: DistroInstaller: Warn if failed to find upload volume From: Cole Robinson crobinso@redhat.com Wed Aug 24 17:45:50 2011 -0400 Date: Wed Aug 24 17:45:50 2011 -0400: Git: b4189ff03fef319d61862d4254b6aa232974ebb6 Index: virtinst-0.600.0/virtinst/DistroInstaller.py =================================================================== --- virtinst-0.600.0.orig/virtinst/DistroInstaller.py +++ virtinst-0.600.0/virtinst/DistroInstaller.py @@ -111,6 +111,8 @@ def _upload_file(conn, meter, destpool, disk.setup_dev(meter=meter) vol = disk.vol_object + if not vol: + raise RuntimeError(_("Failed to lookup scratch media volume")) try: # Register upload ++++++ virtinst-git-prompts.diff ++++++ Subject: virt-install: Fix several prompting scenarios From: Cole Robinson crobinso@redhat.com Thu Aug 25 13:50:21 2011 -0400 Date: Thu Aug 25 16:00:06 2011 -0400: Git: de8aaf09157a31aa8ca66036371751100b3d0edb Index: virtinst-0.600.0/virt-install =================================================================== --- virtinst-0.600.0.orig/virt-install +++ virtinst-0.600.0/virt-install @@ -146,20 +146,22 @@ def get_disk(diskopts, size, sparse, gue guest.disks.append(d) -def get_disks(guest, file_paths, disk_paths, size, sparse): +def get_disks(guest, file_paths, disk_paths, size, sparse, need_storage): is_file_path = (file_paths or (not disk_paths and cli.is_prompt())) - disk = (file_paths or disk_paths) + disks = (file_paths or disk_paths) + if not disks and need_storage and cli.is_prompt(): + disks = [None] def padlist(l, padsize): l = cli.listify(l) l.extend((padsize - len(l)) * [None]) return l - disk = padlist(disk, 0) - size = padlist(size, len(disk)) + disklist = padlist(disks, 0) + sizelist = padlist(size, len(disklist)) - for idx in range(len(disk)): - get_disk(disk[idx], size[idx], sparse, guest, is_file_path) + for idx in range(len(disklist)): + get_disk(disklist[idx], sizelist[idx], sparse, guest, is_file_path) def get_networks(guest, options): networks, macs = cli.digest_networks(guest, options) @@ -288,11 +290,11 @@ def get_virt_type(conn, options): # Install media setup/validation # ################################## -def get_install_media(guest, location, cdpath): +def get_install_media(guest, location, cdpath, need_install): manual_cdrom = cdrom_specified(guest) cdinstall = bool(not location and (cdpath or cdrom_specified(guest))) - if not (location or cdpath or manual_cdrom): + if not (location or cdpath or manual_cdrom or need_install): return try: @@ -347,26 +349,33 @@ def validate_required_options(options, g # Required config. Don't error right away if nothing is specified, # aggregate the errors to help first time users get it right msg = "" - if cli.is_prompt(): - return + need_storage = False + need_install = False if not options.name: msg += "\n" + cli.name_missing + if not options.memory: msg += "\n" + cli.ram_missing + if (not guest.installer.is_container() and not storage_specified(options.file_paths, options.diskopts, options.nodisks, options.filesystems)): msg += "\n" + disk_missing + need_storage = True + if (not guest.installer.is_container() and (not install_specified(options.location, options.cdrom, options.pxe, options.import_install)) and (not cdrom_specified(guest, options.diskopts))): msg += "\n" + install_missing + need_install = True - if msg: + if msg and not cli.is_prompt(): fail(msg) + return need_storage, need_install + def check_option_collisions(options, guest): # Disk collisions if options.nodisks and (options.file_paths or @@ -508,15 +517,15 @@ def build_guest_instance(conn, options): # Do this after setting up all optional parameters, so we report error # about those first. - validate_required_options(options, guest) + need_storage, need_install = validate_required_options(options, guest) # Actually set required options cli.get_name(options.name, guest) cli.get_memory(options.memory, guest) if not options.nodisks: get_disks(guest, options.file_paths, options.diskopts, - options.disksize, options.sparse) - get_install_media(guest, options.location, options.cdrom) + options.disksize, options.sparse, need_storage) + get_install_media(guest, options.location, options.cdrom, need_install) # Various little validations about option collisions. Need to do # this after setting guest.installer at least Index: virtinst-0.600.0/virtinst/cli.py =================================================================== --- virtinst-0.600.0.orig/virtinst/cli.py +++ virtinst-0.600.0/virtinst/cli.py @@ -549,6 +549,7 @@ def prompt_for_input(noprompt_err, promp fail(noprompt_err) print_stdout(prompt + " ", do_force=True) + sys.stdout.flush() return sys.stdin.readline().strip() def prompt_for_yes_or_no(warning, question): ++++++ virtinst-git-remote-storage.diff ++++++ Subject: VirtualDisk: Fix logic error determining if we are creating storage From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:54:47 2011 -0400 Date: Tue Aug 30 14:54:47 2011 -0400: Git: 9ad2e3a68b8f5cc1b5c11588dc1c4d5edcca3deb If creating a storage volume, the logic would fall through and check if the path existed locally. This isn't valid for remote connections. Addtionally cleanup similar functions to be easier to read and hopefully avoid these problems in the future. Index: virtinst-0.600.0/virtinst/VirtualDisk.py =================================================================== --- virtinst-0.600.0.orig/virtinst/VirtualDisk.py +++ virtinst-0.600.0/virtinst/VirtualDisk.py @@ -1123,23 +1123,38 @@ class VirtualDisk(VirtualDevice): Return bool representing if managed storage parameters have been explicitly specified or filled in """ - return (self.vol_object != None or self.vol_install != None or - self._pool_object != None) + return bool(self.vol_object != None or + self.vol_install != None or + self._pool_object != None) def __creating_storage(self): """ Return True if the user requested us to create a device """ - return not (self.__no_storage() or - (self.__managed_storage() and - self.vol_object or self._pool_object) or - (self.path and os.path.exists(self.path))) + if self.__no_storage(): + return False + + if self.__managed_storage(): + if self.vol_object or self._pool_object: + return False + return True + + if (not self.is_remote() and + self.path and + os.path.exists(self.path)): + return False + + return True def __no_storage(self): """ Return True if no path or storage was specified """ - return (not self.__managed_storage() and not self.path) + if self.__managed_storage(): + return False + if self.path: + return False + return True def _storage_security_label(self): ++++++ virtinst-git-typo.diff ++++++ Subject: Fix typo s/type/managed From: Marc-André Lureau marcandre.lureau@gmail.com Fri Sep 2 03:21:16 2011 +0200 Date: Mon Sep 12 13:06:40 2011 -0400: Git: 7a1966edb2182c3219f1646e39528a6db8a4f99f Index: virtinst-0.600.0/virtinst/VirtualHostDevice.py =================================================================== --- virtinst-0.600.0.orig/virtinst/VirtualHostDevice.py +++ virtinst-0.600.0/virtinst/VirtualHostDevice.py @@ -120,7 +120,7 @@ class VirtualHostDevice(VirtualDevice.Vi return self._managed def set_managed(self, val): self._managed = bool(val) - managed = _xml_property(get_type, set_type, + managed = _xml_property(get_managed, set_managed, get_converter=lambda s, x: bool(x == "yes"), set_converter=lambda s, x: x and "yes" or "no", xpath="./@managed") ++++++ virtinst-git-xml-clear.diff ++++++ Subject: VirtualDeviceAddress: Only clear XML if not building from scratch From: Cole Robinson crobinso@redhat.com Mon Aug 29 13:12:32 2011 -0400 Date: Mon Aug 29 13:12:32 2011 -0400: Git: 061668208fa6cd8f45cf66dd921a56386de3f3b5 Index: virtinst-0.600.0/virtinst/VirtualDevice.py =================================================================== --- virtinst-0.600.0.orig/virtinst/VirtualDevice.py +++ virtinst-0.600.0/virtinst/VirtualDevice.py @@ -170,7 +170,8 @@ class VirtualDeviceAddress(XMLBuilderDom self._unit = None self._port = None - self._remove_child_xpath("./address") + if self._is_parse(): + self._remove_child_xpath("./address") def _get_type(self): return self._type ++++++ virtman-autorestart.diff ++++++ --- /var/tmp/diff_new_pack.2vGCMc/_old 2011-10-29 08:01:30.000000000 +0200 +++ /var/tmp/diff_new_pack.2vGCMc/_new 2011-10-29 08:01:30.000000000 +0200 @@ -2,7 +2,7 @@ =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/details.py +++ virt-manager-0.9.0/src/virtManager/details.py -@@ -2008,11 +2008,9 @@ class vmmDetails(vmmGObjectUI): +@@ -2019,11 +2019,9 @@ class vmmDetails(vmmGObjectUI): return self._change_config_helper(df, da, hf, ha) @@ -17,7 +17,7 @@ if self.editted(EDIT_AUTOSTART): auto = self.widget("config-autostart") try: -@@ -2022,6 +2020,11 @@ class vmmDetails(vmmGObjectUI): +@@ -2033,6 +2031,11 @@ class vmmDetails(vmmGObjectUI): (_("Error changing autostart value: %s") % str(e))) return False @@ -29,7 +29,7 @@ if self.editted(EDIT_BOOTORDER): bootdevs = self.get_config_boot_devs() add_define(self.vm.set_boot_device, bootdevs) -@@ -2359,6 +2362,8 @@ class vmmDetails(vmmGObjectUI): +@@ -2370,6 +2373,8 @@ class vmmDetails(vmmGObjectUI): buttons=gtk.BUTTONS_OK, dialog_type=dtype) ++++++ virtman-device-flags.diff ++++++ --- /var/tmp/diff_new_pack.2vGCMc/_old 2011-10-29 08:01:30.000000000 +0200 +++ /var/tmp/diff_new_pack.2vGCMc/_new 2011-10-29 08:01:30.000000000 +0200 @@ -25,7 +25,7 @@ =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/details.py +++ virt-manager-0.9.0/src/virtManager/details.py -@@ -2245,6 +2245,17 @@ class vmmDetails(vmmGObjectUI): +@@ -2256,6 +2256,17 @@ class vmmDetails(vmmGObjectUI): text1=(_("Are you sure you want to remove this device?"))): return ++++++ virtman-git-char-device-mode.diff ++++++ Subject: virt-manager: fix char device source mode From: Marc-André Lureau marcandre.lureau@gmail.com Tue Aug 30 21:03:27 2011 +0200 Date: Thu Sep 1 13:23:54 2011 -0400: Git: df4dfd7362d33410e3af368293edcc096553aead Index: virt-manager-0.9.0/src/virtManager/addhardware.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/addhardware.py +++ virt-manager-0.9.0/src/virtManager/addhardware.py @@ -1251,6 +1251,7 @@ class vmmAddHardware(vmmGObjectUI): def validate_page_char(self): chartype = self.get_char_type() + modebox = self.widget("char-mode") devbox = self.widget("char-device-type") devtype = devbox.get_model()[devbox.get_active()][0] conn = self.conn.vmm @@ -1258,6 +1259,7 @@ class vmmAddHardware(vmmGObjectUI): devclass = VirtualCharDevice.get_dev_instance(conn, chartype, devtype) source_path = self.widget("char-path").get_text() + source_mode = modebox.get_model()[modebox.get_active()][0] source_host = self.widget("char-host").get_text() bind_host = self.widget("char-bind-host").get_text() source_port = self.widget("char-port").get_adjustment().value @@ -1271,6 +1273,7 @@ class vmmAddHardware(vmmGObjectUI): value_mappings = { "source_path" : source_path, + "source_mode" : source_mode, "source_host" : source_host, "source_port" : source_port, "bind_port": bind_port, ++++++ virtman-git-collidelist.diff ++++++ Subject: util: get_default_path: Handle 'None' in collidelist From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:29:08 2011 -0400 Date: Tue Aug 30 14:29:08 2011 -0400: Git: 9a46aa41e092e73ed1596c361acbca65ac3cbe95 Index: virt-manager-0.9.0/src/virtManager/util.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/util.py +++ virt-manager-0.9.0/src/virtManager/util.py @@ -126,14 +126,14 @@ def get_default_path(conn, name, collide target, ignore, suffix = get_ideal_path_info(conn, name) # Sanitize collidelist to work with the collision checker - for c in collidelist[:]: - collidelist.remove(c) - if os.path.dirname(c) == pool.get_target_path(): - collidelist.append(os.path.basename(c)) + newcollidelist = [] + for c in collidelist: + if c and os.path.dirname(c) == pool.get_target_path(): + newcollidelist.append(os.path.basename(c)) path = virtinst.Storage.StorageVolume.find_free_name(name, pool_object=pool.pool, suffix=suffix, - collidelist=collidelist) + collidelist=newcollidelist) path = os.path.join(target, path) ++++++ virtman-git-connection-pylint.diff ++++++ Subject: connection: Fix some code that trips up pylint From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:50:29 2011 -0400 Date: Tue Aug 30 14:50:29 2011 -0400: Git: 66f879e19dfadcb3dcb5a8caeea7ebfa19c40eae Index: virt-manager-0.9.0/src/virtManager/connection.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/connection.py +++ virt-manager-0.9.0/src/virtManager/connection.py @@ -1140,23 +1140,29 @@ class vmmConnection(vmmGObject): logging.debug("Background 'open connection' thread is running") while True: + libexc = None exc = None tb = None try: self.vmm = self._try_open() + except libvirt.libvirtError, libexc: + tb = "".join(traceback.format_exc()) except Exception, exc: tb = "".join(traceback.format_exc()) + if libexc: + exc = libexc + if not exc: self.state = self.STATE_ACTIVE break self.state = self.STATE_DISCONNECTED - if (type(exc) == libvirt.libvirtError and - exc.get_error_code() == libvirt.VIR_ERR_AUTH_FAILED and - "GSSAPI Error" in exc.get_error_message() and - "No credentials cache found" in exc.get_error_message()): + if (libexc and + libexc.get_error_code() == libvirt.VIR_ERR_AUTH_FAILED and + "GSSAPI Error" in libexc.get_error_message() and + "No credentials cache found" in libexc.get_error_message()): if self._acquire_tgt(): continue ++++++ virtman-git-delete.diff ++++++ Subject: domain: Remove managed save state before delete From: Cole Robinson crobinso@redhat.com Mon Aug 29 14:03:50 2011 -0400 Date: Mon Aug 29 14:03:50 2011 -0400: Git: b36ec4b8c2ec7ed72404db7f71cadfaecfea719e Newer libvirt forbids 'undefine' in this case Index: virt-manager-0.9.0/src/virtManager/domain.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/domain.py +++ virt-manager-0.9.0/src/virtManager/domain.py @@ -1055,6 +1055,11 @@ class vmmDomain(vmmLibvirtObject): self.force_update_status() def delete(self): + if self.hasSavedImage(): + try: + self._backend.managedSaveRemove(0) + except: + logging.exception("Failed to remove managed save state") self._backend.undefine() def resume(self): ++++++ virtman-git-details.diff ++++++ Subject: delete: Properly raise 'undefine' errors From: Cole Robinson crobinso@redhat.com Mon Aug 29 14:01:40 2011 -0400 Date: Mon Aug 29 14:01:40 2011 -0400: Git: db21a2a8331c8518f27b136d0013a56cf84df7e6 Index: virt-manager-0.9.0/src/virtManager/delete.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/delete.py +++ virt-manager-0.9.0/src/virtManager/delete.py @@ -183,7 +183,7 @@ class vmmDeleteDialog(vmmGObjectUI): for errinfo in storage_errors: storage_errstr += "%s\n%s\n" % (errinfo[0], errinfo[1]) - if not storage_errstr: + if not storage_errstr and not details: return # We had extra storage errors. If there was another error message, ++++++ virtman-git-domain-name.diff ++++++ Subject: manager: Properly show domain names with reserved XML characters From: Cole Robinson crobinso@redhat.com Mon Aug 29 12:11:43 2011 -0400 Date: Mon Aug 29 12:11:43 2011 -0400: Git: 8a513361522780fcc126ec2ded48839ecc24ef6e Index: virt-manager-0.9.0/src/virtManager/delete.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/delete.py +++ virt-manager-0.9.0/src/virtManager/delete.py @@ -91,7 +91,7 @@ class vmmDeleteDialog(vmmGObjectUI): # Set VM name in title' title_str = ("<span size='x-large'>%s '%s'</span>" % - (_("Delete"), self.vm.get_name())) + (_("Delete"), util.xml_escape(self.vm.get_name()))) self.widget("delete-main-label").set_markup(title_str) self.widget("delete-cancel").grab_focus() Index: virt-manager-0.9.0/src/virtManager/manager.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/manager.py +++ virt-manager-0.9.0/src/virtManager/manager.py @@ -701,12 +701,12 @@ class vmmManager(vmmGObjectUI): return hint def _build_conn_markup(self, conn, row): + name = util.xml_escape(row[ROW_NAME]) + text = name if conn.state == conn.STATE_DISCONNECTED: - text = str(row[ROW_NAME]) + " - " + _("Not Connected") + text += " - " + _("Not Connected") elif conn.state == conn.STATE_CONNECTING: - text = str(row[ROW_NAME]) + " - " + _("Connecting...") - else: - text = str(row[ROW_NAME]) + text += " - " + _("Connecting...") markup = "<span size='smaller'>%s</span>" % text return markup @@ -720,7 +720,7 @@ class vmmManager(vmmGObjectUI): def _build_vm_markup(self, row): domtext = ("<span size='smaller' weight='bold'>%s</span>" % - row[ROW_NAME]) + util.xml_escape(row[ROW_NAME])) statetext = "<span size='smaller'>%s</span>" % row[ROW_STATUS] return domtext + "\n" + statetext Index: virt-manager-0.9.0/src/virtManager/migrate.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/migrate.py +++ virt-manager-0.9.0/src/virtManager/migrate.py @@ -122,7 +122,7 @@ class vmmMigrateDialog(vmmGObjectUI): def reset_state(self): title_str = ("<span size='large' color='white'>%s '%s'</span>" % - (_("Migrate"), self.vm.get_name())) + (_("Migrate"), util.xml_escape(self.vm.get_name()))) self.widget("migrate-main-label").set_markup(title_str) self.widget("migrate-cancel").grab_focus() Index: virt-manager-0.9.0/src/virtManager/util.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/util.py +++ virt-manager-0.9.0/src/virtManager/util.py @@ -29,6 +29,8 @@ import virtinst running_config = None +xml_escape = virtinst.util.xml_escape + # FIXME: selinux policy also has a ~/VirtualMachines/isos dir def get_default_pool_path(conn): if conn.is_session_uri(): ++++++ virtman-git-error-reporting.diff ++++++ Subject: details: Better logging and error reporting for child dialogs From: Cole Robinson crobinso@redhat.com Tue Aug 30 14:29:51 2011 -0400 Date: Tue Aug 30 14:29:51 2011 -0400: Git: cbbc8044bf3eaed18f09c0c2af40e9a4aa6e7717 Index: virt-manager-0.9.0/src/virtManager/details.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/details.py +++ virt-manager-0.9.0/src/virtManager/details.py @@ -1392,6 +1392,7 @@ class vmmDetails(vmmGObjectUI): if self.addhw is None: self.addhw = vmmAddHardware(self.vm) + logging.debug("Launching addhw for vm '%s'", self.vm.get_name()) self.addhw.show(self.topwin) except Exception, e: self.err.show_err((_("Error launching hardware dialog: %s") % @@ -1771,24 +1772,34 @@ class vmmDetails(vmmGObjectUI): curpath = disk.path devtype = disk.device - if curpath: - # Disconnect cdrom - self.change_storage_media(dev_id_info, None) + try: + if curpath: + # Disconnect cdrom + self.change_storage_media(dev_id_info, None) + return + except Exception, e: + self.err.show_err((_("Error disconnecting media: %s") % e)) return - def change_cdrom_wrapper(src_ignore, dev_id_info, newpath): - return self.change_storage_media(dev_id_info, newpath) + try: + def change_cdrom_wrapper(src_ignore, dev_id_info, newpath): + return self.change_storage_media(dev_id_info, newpath) + + # Launch 'Choose CD' dialog + if self.media_choosers[devtype] is None: + ret = vmmChooseCD(self.vm, dev_id_info) - # Launch 'Choose CD' dialog - if self.media_choosers[devtype] is None: - ret = vmmChooseCD(self.vm, dev_id_info) - - ret.connect("cdrom-chosen", change_cdrom_wrapper) - self.media_choosers[devtype] = ret - - dialog = self.media_choosers[devtype] - dialog.dev_id_info = dev_id_info - dialog.show(self.topwin) + ret.connect("cdrom-chosen", change_cdrom_wrapper) + self.media_choosers[devtype] = ret + + dialog = self.media_choosers[devtype] + dialog.dev_id_info = dev_id_info + + logging.debug("Launching choosecd for vm '%s'", self.vm.get_name()) + dialog.show(self.topwin) + except Exception, e: + self.err.show_err((_("Error launching media dialog: %s") % e)) + return ################################################## # Details/Hardware config changes (apply button) # ++++++ virtman-git-explicit-python.diff ++++++ Subject: Specify /usr/bin/python explicitly From: Cole Robinson crobinso@redhat.com Wed Aug 24 12:41:00 2011 -0400 Date: Wed Aug 24 12:41:30 2011 -0400: Git: 5104669795788a1685006761b437e9b296840f89 Index: virt-manager-0.9.0/src/virt-manager-tui.in =================================================================== --- virt-manager-0.9.0.orig/src/virt-manager-tui.in +++ virt-manager-0.9.0/src/virt-manager-tui.in @@ -1,3 +1,3 @@ #!/bin/sh -exec python "::PYTHONDIR::/::PACKAGE::.py" "$@" +exec /usr/bin/python "::PYTHONDIR::/::PACKAGE::.py" "$@" Index: virt-manager-0.9.0/src/virt-manager.in =================================================================== --- virt-manager-0.9.0.orig/src/virt-manager.in +++ virt-manager-0.9.0/src/virt-manager.in @@ -1,3 +1,3 @@ #!/bin/sh -exec python "::PYTHONDIR::/::PACKAGE::.py" "$@" +exec /usr/bin/python "::PYTHONDIR::/::PACKAGE::.py" "$@" ++++++ virtman-git-finish-button.diff ++++++ Subject: Fixed the Finish button on the start pool command. From: Darryl L. Pierce dpierce@redhat.com Fri Jul 22 11:05:15 2011 -0400 Date: Sat Jul 30 07:53:47 2011 -0400: Git: 2b5b8a8b35b79977a0e9aacf6a6fb6f48edf475f The Finish button is now shown on the final page, and the final page displays confirmation that a pool was stopped. Subject: Fixed the Finish button on the stop pool command. From: Darryl L. Pierce dpierce@redhat.com Fri Jul 22 11:20:15 2011 -0400 Date: Sat Jul 30 07:53:47 2011 -0400: Git: 4ad89abd508d37e27df39de669c9ea83a77c22ac The Finish button is now displayed on the last page where the stopping is confirmed to the user. Index: virt-manager-0.9.0/src/virtManagerTui/startpool.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManagerTui/startpool.py +++ virt-manager-0.9.0/src/virtManagerTui/startpool.py @@ -37,10 +37,6 @@ class StartStoragePoolConfigScreen(Stora def page_has_next(self, page): return page is LIST_POOLS_PAGE and self.has_selectable_pools() - def page_has_back(self, page): - ignore = page - return False - def page_has_finish(self, page): return page is FINAL_PAGE @@ -55,10 +51,10 @@ class StartStoragePoolConfigScreen(Stora def process_input(self, page): if page is LIST_POOLS_PAGE: self.get_libvirt().create_storage_pool(self.get_selected_pool()) - self.set_finished() def get_final_page(self, screen): ignore = screen + self.set_finished() return [snack.Label("Storage pool started: %s" % self.get_selected_pool())] def StartStoragePool(): Index: virt-manager-0.9.0/src/virtManagerTui/stoppool.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManagerTui/stoppool.py +++ virt-manager-0.9.0/src/virtManagerTui/stoppool.py @@ -37,10 +37,6 @@ class StopStoragePoolConfigScreen(Storag def page_has_next(self, page): return page is LIST_POOLS_PAGE and self.has_selectable_pools() - def page_has_back(self, page): - ignore = page - return False - def page_has_finish(self, page): return page is FINAL_PAGE @@ -55,10 +51,10 @@ class StopStoragePoolConfigScreen(Storag def process_input(self, page): if page is LIST_POOLS_PAGE: self.get_libvirt().destroy_storage_pool(self.get_selected_pool()) - self.set_finished() def get_final_page(self, screen): ignore = screen + self.set_finished() return [snack.Label("Storage pool stopped: %s" % self.get_selected_pool())] def StopStoragePool(): ++++++ virtman-git-grep.diff ++++++ Subject: grep -q Portability From: Richard Laager rlaager@wiktel.com Mon Aug 8 15:42:18 2011 -0500 Date: Tue Aug 9 11:33:31 2011 -0400: Git: d078def94fda124304da95733d41844384e739ad I don't think I've sent this one to the list yet. The nc -q autodetection code fails if the target system's grep does not have a -q argument (quite the ironic coincidence). I believe -q is specified by POSIX, but Solaris 11's /bin/grep does not support -q. Redirecting to /dev/null works portably. (In fact, this is even recommended in favor of -q for portability by GNU grep's man page.) This needs to be changed in virt-manager's src/virtManager/console.py. Richard Index: virt-manager-0.9.0/src/virtManager/console.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/console.py +++ virt-manager-0.9.0/src/virtManager/console.py @@ -93,7 +93,7 @@ class Tunnel(object): nc_params = "%s %s" % (gaddr, gport) nc_cmd = ( - """nc -q 2>&1 | grep -q "requires an argument";""" + """nc -q 2>&1 | grep "requires an argument" >/dev/null;""" """if [ $? -eq 0 ] ; then""" """ CMD="nc -q 0 %(nc_params)s";""" """else""" ++++++ virtman-git-netstats.diff ++++++ Subject: domain: Fix typo that broke net stats gathering From: Cole Robinson crobinso@redhat.com Wed Jul 27 12:02:29 2011 -0400 Date: Wed Jul 27 12:02:29 2011 -0400: Git: 62a762e77f2f5e5298ececda6fb4638b8488da4a Index: virt-manager-0.9.0/src/virtManager/domain.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/domain.py +++ virt-manager-0.9.0/src/virtManager/domain.py @@ -1448,7 +1448,7 @@ class vmmDomain(vmmLibvirtObject): def _sample_network_traffic(self): rx = 0 tx = 0 - if (not self._stats_net_supported or not + if (not self._stats_net_supported or not self._enable_net_poll or not self.is_active()): return rx, tx ++++++ virtman-git-no-cd-present.diff ++++++ Subject: Fixes the TUI error when no CD is present for a CD installation. From: Darryl L. Pierce dpierce@redhat.com Fri Aug 5 10:43:52 2011 -0400 Date: Tue Aug 9 11:53:36 2011 -0400: Git: a885407aa106fb2cddf2fc5576634a93b60a460b Before displaying the install media selection list it first ensures that there is data to display. If no install media was detected, a message is shown and the user cannot proceed. They instead must move back and select another installation path. Index: virt-manager-0.9.0/src/virtManagerTui/adddomain.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManagerTui/adddomain.py +++ virt-manager-0.9.0/src/virtManagerTui/adddomain.py @@ -150,7 +150,7 @@ class DomainConfigScreen(VmmTuiConfigScr elif page is SELECT_CDROM_PAGE: if self.__install_media.getSelection() != None: if len(self.get_libvirt().list_installable_volumes()) == 0: - errors.append("No installable media is available.") + errors.append("No installable media detected.") else: return True else: @@ -349,6 +349,8 @@ class DomainConfigScreen(VmmTuiConfigScr return self.__has_pools elif page is SELECT_VOLUME_PAGE: return self.__has_volumes + elif page is SELECT_CDROM_PAGE: + return self.__has_install_media elif page < CONFIRM_PAGE: return True @@ -384,17 +386,23 @@ class DomainConfigScreen(VmmTuiConfigScr grid] def get_select_cdrom_page(self, screen): - drives = [] + fields = [] + self.__has_install_media = False devs = self.get_libvirt().list_installable_volumes() - for dev in devs: - row = [dev.pretty_label(), dev.get_path(), - self.__config.is_install_media(dev.get_path())] - drives.append(row) - self.__install_media = snack.RadioBar(screen, (drives)) - grid = snack.Grid(1, 1) - grid.setField(self.__install_media, 0, 0) + if len(devs) > 0: + drives = [] + for dev in devs: + row = [dev.pretty_label(), dev.get_path(), + self.__config.is_install_media(dev.get_path())] + drives.append(row) + if len(drives) > 0: + self.__has_install_media = True + self.__install_media = snack.RadioBar(screen, (drives)) + fields.append((self.__install_media, None)) + if self.__has_install_media == False: + fields.append(("No media detected.", None)) return [snack.Label("Select the install media"), - grid] + self.create_grid_from_fields(fields)] def get_select_iso_page(self, screen): ignore = screen ++++++ virtman-git-resize-menu.diff ++++++ Subject: virt-manager: Fix "Resize to VM" menu option From: Marc Deslauriers marc.deslauriers@canonical.com Fri Aug 19 11:50:11 2011 -0400 Date: Tue Aug 23 15:48:30 2011 -0400: Git: a815fa17a7c643ddde8ea326399e2bee449dff98 Hello, This patch fixes the "Resize to VM" menu option by correcting inverted return values in autodrawer.py. Thanks, Marc. commit 8e666f4b87926c866ed35e58eb82213d2c514e89 Author: Marc Deslauriers <marc.deslauriers@ubuntu.com> Date: Fri Aug 19 11:46:48 2011 -0400 Fix inverted width and height Index: virt-manager-0.9.0/src/virtManager/autodrawer.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/autodrawer.py +++ virt-manager-0.9.0/src/virtManager/autodrawer.py @@ -271,10 +271,10 @@ class OverBox(parentclass): self.underWin = None def do_size_request(self, req): - height, width = self._size_request() + width, height = self._size_request() - req.height = height req.width = width + req.height = height def do_size_allocate(self, newalloc): self.allocation = newalloc ++++++ virtman-git-set-has-window.diff ++++++ Subject: autodrawer: Make it work on RHEL6 From: Cole Robinson crobinso@redhat.com Tue Aug 2 12:54:21 2011 -0400 Date: Tue Aug 2 12:55:02 2011 -0400: Git: 347b02b29fbe984f63c05f705d76ef95b3545c96 Index: virt-manager-0.9.0/src/virtManager/autodrawer.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/autodrawer.py +++ virt-manager-0.9.0/src/virtManager/autodrawer.py @@ -27,6 +27,21 @@ import gtk parentclass = gtk.VBox +def _set_has_window(widget, val): + if hasattr(widget, "set_has_window"): + # Only available on gtk 2.18 or later + widget.set_has_window(val) + elif val: + widget.set_flags(widget.flags() & ~gtk.NO_WINDOW) + else: + widget.set_flags(widget.flags() | gtk.NO_WINDOW) + +def _is_toplevel(widget): + if hasattr(widget, "is_toplevel"): + # Only available on gtk 2.18 or later + return widget.is_toplevel() + return bool(widget.flags() & gtk.TOPLEVEL) + class OverBox(parentclass): """ Implementation of an overlapping box @@ -44,7 +59,7 @@ class OverBox(parentclass): self._fraction = 0 self.verticalOffset = 0 - self.set_has_window(True) + _set_has_window(self, True) #################### # Internal helpers # @@ -418,7 +433,7 @@ class AutoDrawer(Drawer): def _update(self, do_immediate): toplevel = self.get_toplevel() - if not toplevel or not toplevel.is_toplevel(): + if not toplevel or not _is_toplevel(toplevel): # The autoDrawer cannot function properly without a toplevel. return @@ -535,10 +550,10 @@ class AutoDrawer(Drawer): def _on_hierarchy_changed(self, oldTopLevel, ignore): newTopLevel = self.get_toplevel() - if oldTopLevel and oldTopLevel.is_toplevel(): + if oldTopLevel and _is_toplevel(oldTopLevel): oldTopLevel.disconnect_by_func(self._set_focus) - if newTopLevel and newTopLevel.is_toplevel(): + if newTopLevel and _is_toplevel(newTopLevel): newTopLevel.connect_after("set_focus", self._set_focus) self._update(True) @@ -589,7 +604,7 @@ class AutoDrawer(Drawer): def drawer_close(self): toplevel = self.get_toplevel() - if not toplevel or not toplevel.is_toplevel(): + if not toplevel or not _is_toplevel(toplevel): # The autoDrawer cannot function properly without a toplevel. return ++++++ virtman-git-shutoff.diff ++++++ Subject: virt-manager: Show if the shut off vm has a saved image From: Miklos Vajna vmiklos@frugalware.org Sat Jul 30 22:15:44 2011 +0200 Date: Mon Aug 1 16:16:40 2011 -0400: Git: 927daf1e1354c282373f468e3ae50e1ca1c1d246 Hi, So far in virt-manager one had to click on a shut off vm in the "Shutoff" state to see if it has a saved image: once the item is selected then the "play" icon will be "Run" or "Restore". This means that in case one has a lot of VMs, it's hard to get an overview of what VM has a saved image and what not. The attached patch changes the "Shutoff" status message to "Saved" in case the vm has a saved image. Thanks.
From 14445dc510fcc55c267649295246984972691885 Mon Sep 17 00:00:00 2001 From: Miklos Vajna <vmiklos@frugalware.org> Date: Sat, 30 Jul 2011 22:02:48 +0200 Subject: [PATCH] domain: Show if the shut off vm has a saved image
Index: virt-manager-0.9.0/src/virtManager/domain.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/domain.py +++ virt-manager-0.9.0/src/virtManager/domain.py @@ -1334,7 +1334,10 @@ class vmmDomain(vmmLibvirtObject): elif self.status() == libvirt.VIR_DOMAIN_SHUTDOWN: return _("Shutting Down") elif self.status() == libvirt.VIR_DOMAIN_SHUTOFF: - return _("Shutoff") + if self.hasSavedImage(): + return _("Saved") + else: + return _("Shutoff") elif self.status() == libvirt.VIR_DOMAIN_CRASHED: return _("Crashed") ++++++ virtman-git-storage-pool.diff ++++++ Subject: storagepool: Fix RHEL6 gtk compat issue From: Cole Robinson crobinso@redhat.com Wed Aug 24 12:52:46 2011 -0400 Date: Wed Aug 24 12:52:46 2011 -0400: Git: 14586040349d40e4a437361ea09e6bb98776a34f Index: virt-manager-0.9.0/src/virtManager/createpool.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/createpool.py +++ virt-manager-0.9.0/src/virtManager/createpool.py @@ -391,7 +391,7 @@ class vmmCreatePool(vmmGObjectUI): def get_config_iqn(self): iqn = self.widget("pool-iqn") - if iqn.get_sensitive() and iqn.get_property("visible"): + if iqn.get_property("sensitive") and iqn.get_property("visible"): return iqn.get_text().strip() return None ++++++ virtman-git-tick-obj-lists.diff ++++++ Subject: connection: Don't have tick edit object lists in place From: Cole Robinson crobinso@redhat.com Thu Oct 13 16:59:15 2011 -0400 Date: Thu Oct 13 16:59:15 2011 -0400: Git: 392cb8075fe5ae2f20b9fdf0d85e4510cc799cc1 Since 'tick' isn't really thread safe, and we sometimes call a manual tick to refresh resources (say immediately after creating a guest), we can't depend on lists staying consistent. Index: virt-manager-0.9.0/src/virtManager/connection.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/connection.py +++ virt-manager-0.9.0/src/virtManager/connection.py @@ -1270,7 +1270,7 @@ class vmmConnection(vmmGObject): return (stop, start, origlist, new, current) def _update_nets(self): - orig = self.nets + orig = self.nets.copy() name = "network" active_list = self.vmm.listNetworks inactive_list = self.vmm.listDefinedNetworks @@ -1283,7 +1283,7 @@ class vmmConnection(vmmGObject): lookup_func, build_class) def _update_pools(self): - orig = self.pools + orig = self.pools.copy() name = "pool" active_list = self.vmm.listStoragePools inactive_list = self.vmm.listDefinedStoragePools @@ -1296,7 +1296,7 @@ class vmmConnection(vmmGObject): lookup_func, build_class) def _update_interfaces(self): - orig = self.interfaces + orig = self.interfaces.copy() name = "interface" active_list = self.vmm.listInterfaces inactive_list = self.vmm.listDefinedInterfaces @@ -1310,7 +1310,7 @@ class vmmConnection(vmmGObject): def _update_nodedevs(self): - orig = self.nodedevs + orig = self.nodedevs.copy() name = "nodedev" active_list = lambda: self.vmm.listDevices(None, 0) inactive_list = lambda: [] @@ -1332,7 +1332,7 @@ class vmmConnection(vmmGObject): oldActiveIDs = {} oldInactiveNames = {} - origlist = self.vms + origlist = self.vms.copy() current = {} new = [] ++++++ virtman-git-unapplied-changes.diff ++++++ Subject: details: Fix confusion when removing device with unapplied changes From: Cole Robinson crobinso@redhat.com Mon Aug 29 12:47:44 2011 -0400 Date: Mon Aug 29 12:53:02 2011 -0400: Git: 41e6d7b0f4eacb3991710a047a5dc708c7ef97a6 Index: virt-manager-0.9.0/src/virtManager/details.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/details.py +++ virt-manager-0.9.0/src/virtManager/details.py @@ -1098,7 +1098,10 @@ class vmmDetails(vmmGObjectUI): def get_boot_selection(self): return self.get_selected_row(self.widget("config-boot-list")) - def set_hw_selection(self, page): + def set_hw_selection(self, page, disable_apply=True): + if disable_apply: + self.widget("config-apply").set_sensitive(False) + hwlist = self.widget("hw-list") selection = hwlist.get_selection() selection.select_path(str(page)) @@ -1119,7 +1122,7 @@ class vmmDetails(vmmGObjectUI): page = self.get_hw_selection(HW_LIST_COL_TYPE) if page is None: page = HW_LIST_TYPE_GENERAL - self.widget("hw-list").get_selection().select_path(0) + self.set_hw_selection(0) return page @@ -1168,7 +1171,7 @@ class vmmDetails(vmmGObjectUI): if self.compare_hw_rows(model[idx], oldrow): pageidx = idx break - self.set_hw_selection(pageidx) + self.set_hw_selection(pageidx, disable_apply=False) else: self.oldhwrow = newrow self.hw_selected() @@ -2259,6 +2262,7 @@ class vmmDetails(vmmGObjectUI): detach_err = (str(e), "".join(traceback.format_exc())) if not detach_err: + self.widget("config-apply").set_sensitive(False) return self.err.show_err( ++++++ virtman-git-vcpu-count.diff ++++++ Subject: domain: Don't fetch XML on tick to get vcpu count From: Cole Robinson crobinso@redhat.com Tue Aug 23 15:47:31 2011 -0400 Date: Tue Aug 23 15:48:30 2011 -0400: Git: 9dc799af9c3d4fab926ee41685d68642c95593fe It's available in the domain info structure. Saves us from hammering xenstored and just plain doing to much work on every tick. Index: virt-manager-0.9.0/src/virtManager/domain.py =================================================================== --- virt-manager-0.9.0.orig/src/virtManager/domain.py +++ virt-manager-0.9.0/src/virtManager/domain.py @@ -1152,10 +1152,10 @@ class vmmDomain(vmmLibvirtObject): if not (info[0] in [libvirt.VIR_DOMAIN_SHUTOFF, libvirt.VIR_DOMAIN_CRASHED]): + guestcpus = info[3] cpuTime = info[4] - prevCpuTime cpuTimeAbs = info[4] hostcpus = self.conn.host_active_processor_count() - guestcpus = self.vcpu_count() pcentbase = (((cpuTime) * 100.0) / ((now - prevTimestamp) * 1000.0 * 1000.0 * 1000.0)) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de