[virt-tools-list] [virt-manager PATCH] pylint: fix simplifiable-if-statement issue
From: Chen Hanxiao pylint complain: The if statement can be replaced with 'var = bool(test)' Signed-off-by: Chen Hanxiao --- virtinst/guest.py | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/virtinst/guest.py b/virtinst/guest.py index 2de4dc96..c89a4eac 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -604,10 +604,8 @@ class Guest(XMLBuilder): usb2 = False usb3 = False if self.os.is_x86(): -if self.osinfo.supports_usb3() and qemu_usb3: -usb3 = True -else: -usb2 = True +usb3 = bool(self.osinfo.supports_usb3() and qemu_usb3) +usb2 = not usb3 elif self.os.is_arm_machvirt(): # For machvirt, we always assume OS supports usb3 if (qemu_usb3 and -- 2.17.1 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] pylint: fix logging-too-few-args issue
At 2018-02-14 08:06:37, "Cole Robinson" <crobi...@redhat.com> wrote: >On 02/13/2018 03:46 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> pylint complain: >> Not enough arguments for logging format string (logging-too-few-args) >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >> --- >> tests/uitests/utils.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tests/uitests/utils.py b/tests/uitests/utils.py >> index e481e443..1f7d61e8 100644 >> --- a/tests/uitests/utils.py >> +++ b/tests/uitests/utils.py >> @@ -176,7 +176,7 @@ class _FuzzyPredicate(dogtail.predicate.Predicate): >> except Exception as e: >> logging.debug( >> "got predicate exception name=%s role=%s labeller=%s: >> %s", >> -(self._name, self._roleName, self._labeller_text, e)) >> +self._name, self._roleName, self._labeller_text, e) >> >> >> def check_in_loop(func, timeout=2): >> > >ACK, sorry I missed that > Pushed, Thanks. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] pylint: fix logging-too-few-args issue
From: Chen Hanxiao <chenhanx...@gmail.com> pylint complain: Not enough arguments for logging format string (logging-too-few-args) Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/uitests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/uitests/utils.py b/tests/uitests/utils.py index e481e443..1f7d61e8 100644 --- a/tests/uitests/utils.py +++ b/tests/uitests/utils.py @@ -176,7 +176,7 @@ class _FuzzyPredicate(dogtail.predicate.Predicate): except Exception as e: logging.debug( "got predicate exception name=%s role=%s labeller=%s: %s", -(self._name, self._roleName, self._labeller_text, e)) +self._name, self._roleName, self._labeller_text, e) def check_in_loop(func, timeout=2): -- 2.14.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] pylint: remove a unnecessary pass
At 2017-12-22 19:59:08, "Pavel Hrdina" <phrd...@redhat.com> wrote: >On Fri, Dec 22, 2017 at 04:49:06PM +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> pylint complains: >> Unnecessary pass statement (unnecessary-pass) >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >> --- >> virtManager/connection.py | 1 - >> 1 file changed, 1 deletion(-) > >Reviewed-by: Pavel Hrdina <phrd...@redhat.com> Pushed, thanks. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] pylint: remove a unnecessary pass
From: Chen Hanxiao <chenhanx...@gmail.com> pylint complains: Unnecessary pass statement (unnecessary-pass) Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtManager/connection.py | 1 - 1 file changed, 1 deletion(-) diff --git a/virtManager/connection.py b/virtManager/connection.py index 43fa3eb5..0574ac50 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -1443,7 +1443,6 @@ class vmmConnection(vmmGObject): raise except Exception as err: e = err -pass if e is None: return -- 2.14.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH 0/2] Fix some pylint
At 2017-10-22 00:35:23, "Cole Robinson" <crobi...@redhat.com> wrote: >On 10/21/2017 02:49 AM, Chen Hanxiao wrote: >> >> Chen Hanxiao (2): >> pylint: Replace deprecated assertEquals with assertEqual > >ACK, curious that my pylint version is showing it though. pylint is >inconsistent across versions though... I tested in Feodra 26 # rpm -qa|grep pylint pylint-1.7.2-2.fc26.noarch python3-pylint-1.7.2-2.fc26.noarch Pushed now. > >> pylint: change import order > >This one confuses me, since termios is part of the standard library as >well, not sure why it's warning about import order > I'll do some investigation on it. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E125 warnings
At 2017-10-22 00:18:49, "Cole Robinson" <crobi...@redhat.com> wrote: >On 10/21/2017 02:30 AM, Chen Hanxiao wrote: >> At 2017-10-02 17:58:58, "Pavel Hrdina" <phrd...@redhat.com> wrote: >> >>> On Wed, Sep 20, 2017 at 04:06:49PM +0800, Chen Hanxiao wrote: >>>> From: Chen Hanxiao <chenhanx...@gmail.com> >>>> >> >>>> # Define the change >>> >>> This change will fix the E125 warning but it could be extended to fix >>> the E128 warning as well. Otherwise these lines would be modified twice >>> in order to fix both warnings. What I would suggest is to create a >>> patch series, that fixes all of E126, E127, E128, E125, E129, E122 in >>> that order. These warnings are slightly related. >>> >> >> Sorry for the late reply. >> >> As [1], this patch fix 4 E128 but introduce a new one. >> >> We had too many E128 warnings : < >> >> When I had time, I'll create a series with the order as your suggestion. >> >> With Cole's ACK, I'll push this patch later. >> > >Whoops, I missed pavel's comments, I didn't intend to override them with >my ACK, I thought the patch hadn't been reviewed. I agree with his >comments though so a complete series to clean the similar issues up will >be nice > I agree Pavel's comments too. But there're t many E128 warnings Maybe I could try that series next holiday. I'll be more careful next time before pushing. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E125 warnings
At 2017-10-20 03:42:27, "Cole Robinson" <crobi...@redhat.com> wrote: >On 09/20/2017 04:06 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >>Fix all E125: >> Continuation line with same indent as next logical line >> >>Also remove ignore options of E125 >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> > >ACK > Pushed, thanks. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 0/2] Fix some pylint
Chen Hanxiao (2): pylint: Replace deprecated assertEquals with assertEqual pylint: change import order tests/hostkeymap.py | 10 +- virtManager/serialcon.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) -- 2.13.5 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 1/2] pylint: Replace deprecated assertEquals with assertEqual
From: Chen Hanxiao <chenhanx...@gmail.com> pylint complain: Using deprecated method assertEquals() (deprecated-method) https://docs.python.org/3.3/library/unittest.html#deprecated-aliases Method Name Deprecated aliasDeprecated alias assertEqual() failUnlessEqual assertEquals Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/hostkeymap.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/hostkeymap.py b/tests/hostkeymap.py index ce5d0f64..8fd79f76 100644 --- a/tests/hostkeymap.py +++ b/tests/hostkeymap.py @@ -32,23 +32,23 @@ class TestHostkeymap(unittest.TestCase): return open(os.path.join(os.getcwd(), "tests/hostkeymap", filename)) -self.assertEquals( +self.assertEqual( hostkeymap._sysconfig_keyboard( _open("sysconfig-comments.txt")), "") -self.assertEquals( +self.assertEqual( hostkeymap._sysconfig_keyboard( _open("sysconfig-rhel5.txt")), "us") -self.assertEquals( +self.assertEqual( hostkeymap._find_xkblayout( _open("default-keyboard-debian9.txt")), "us") -self.assertEquals( +self.assertEqual( hostkeymap._find_xkblayout( _open("console-setup-debian9.txt")), None) -self.assertEquals( +self.assertEqual( hostkeymap._xorg_keymap( _open("xorg-rhel5.txt")), "us") -- 2.13.5 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 2/2] pylint: change import order
From: Chen Hanxiao <chenhanx...@gmail.com> pylint complain: standard import "import tty" should be placed before "import termios" (wrong-import-order) Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtManager/serialcon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtManager/serialcon.py b/virtManager/serialcon.py index 7caf6db4..4148e151 100644 --- a/virtManager/serialcon.py +++ b/virtManager/serialcon.py @@ -19,11 +19,11 @@ # import os -import termios import tty import pty import fcntl import logging +import termios import gi from gi.repository import Gdk -- 2.13.5 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E125 warnings
At 2017-10-02 17:58:58, "Pavel Hrdina" <phrd...@redhat.com> wrote: >On Wed, Sep 20, 2017 at 04:06:49PM +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> # Define the change > >This change will fix the E125 warning but it could be extended to fix >the E128 warning as well. Otherwise these lines would be modified twice >in order to fix both warnings. What I would suggest is to create a >patch series, that fixes all of E126, E127, E128, E125, E129, E122 in >that order. These warnings are slightly related. > Sorry for the late reply. As [1], this patch fix 4 E128 but introduce a new one. We had too many E128 warnings : < When I had time, I'll create a series with the order as your suggestion. With Cole's ACK, I'll push this patch later. Regards, - Chen [1]: diff of pylint output w/o this fix: --- 2.log 2017-10-21 14:26:02.368745056 +0800 +++ 1.log 2017-10-21 14:22:41.0 +0800 @@ -1,4 +1,4 @@ -old +new setup.py:165: [E128] continuation line under-indented for visual indent setup.py:266: [E128] continuation line under-indented for visual indent virt-install:379: [E128] continuation line under-indented for visual indent @@ -281,8 +281,6 @@ virtinst/osdict.py:378: [E128] continuation line under-indented for visual indent virtinst/osdict.py:560: [E128] continuation line under-indented for visual indent virtinst/storage.py:74: [E128] continuation line under-indented for visual indent -virtinst/storage.py:378: [E128] continuation line under-indented for visual indent -virtinst/storage.py:379: [E128] continuation line under-indented for visual indent virtinst/storage.py:411: [E128] continuation line under-indented for visual indent virtinst/storage.py:455: [E128] continuation line under-indented for visual indent virtinst/storage.py:631: [E128] continuation line under-indented for visual indent @@ -556,6 +554,7 @@ virtManager/details.py:904: [E128] continuation line under-indented for visual indent virtManager/details.py:987: [E128] continuation line under-indented for visual indent virtManager/details.py:989: [E128] continuation line under-indented for visual indent +virtManager/details.py:1135: [E128] continuation line under-indented for visual indent virtManager/details.py:1824: [E128] continuation line under-indented for visual indent virtManager/details.py:1986: [E128] continuation line under-indented for visual indent virtManager/details.py:1987: [E128] continuation line under-indented for visual indent @@ -801,9 +800,7 @@ virtManager/viewers.py:576: [E128] continuation line under-indented for visual indent virtManager/viewers.py:621: [E128] continuation line under-indented for visual indent virtManager/viewers.py:624: [E128] continuation line under-indented for visual indent -virtManager/viewers.py:628: [E128] continuation line under-indented for visual indent virtManager/viewers.py:637: [E128] continuation line under-indented for visual indent -virtManager/viewers.py:643: [E128] continuation line under-indented for visual indent virtManager/viewers.py:694: [E128] continuation line under-indented for visual indent virtManager/viewers.py:700: [E128] continuation line under-indented for visual indent virtManager/viewers.py:717: [E128] continuation line under-indented for visual indent ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E124 warnings
At 2017-09-09 04:13:42, "Cole Robinson" <crobi...@redhat.com> wrote: >On 09/07/2017 05:07 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >>Fix all E124: >> Closing bracket does not match visual indentation >> >>Also remove ignore options of E124 >> > >ACK > Pushed, thanks. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH 0/5] improve panic device code
At 2017-09-05 15:59:14, "Pavel Hrdina"wrote: >Apart from the patches there is one more improvement that could by done. >For --panic default we could generate an empty XML element >which is accepted by libvirt and libvirt fills in the default values. >However, I was not able to achieve that because for some reason the >xmlbuilder ignored the empty element. > >Pavel Hrdina (5): > virtinst: remove address configuration from panic device > virtManager: remove panic iobase from GUI > devicepanic: use model instead of address.type > devicepanic: don't set default iobase > devicepanic: add all models supported by libvirt > Thanks for the improving. ACK. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E124 warnings
From: Chen Hanxiao <chenhanx...@gmail.com> Fix all E124: Closing bracket does not match visual indentation Also remove ignore options of E124 Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/pycodestyle.cfg | 3 +- virtManager/addhardware.py | 33 ++-- virtManager/details.py | 124 ++--- virtManager/snapshots.py | 2 +- virtinst/urlfetcher.py | 6 +-- 5 files changed, 82 insertions(+), 86 deletions(-) diff --git a/tests/pycodestyle.cfg b/tests/pycodestyle.cfg index 2588043..38584d8 100644 --- a/tests/pycodestyle.cfg +++ b/tests/pycodestyle.cfg @@ -10,7 +10,6 @@ format = pylint # E122: Continuation line missing indentation or outdented # E123: Closing bracket does not match indentation of opening # bracket's line -# E124: Closing bracket does not match visual indentation # E125: Continuation line with same indent as next logical line # E126: Continuation line over-indented for hanging indent # E127: Continuation line over-indented for visual indent @@ -28,4 +27,4 @@ format = pylint # E741: Do not use variables named ‘l’, ‘O’, or ‘I’ -ignore = E122, E123, E124, E125, E126, E127, E128, E129, E221, E241, E301, E303, E305, E306, E402, E501, E741 +ignore = E122, E123, E125, E126, E127, E128, E129, E221, E241, E301, E303, E305, E306, E402, E501, E741 diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index 4d142c9..c79d8be 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -43,23 +43,22 @@ from .baseclass import vmmGObjectUI from .addstorage import vmmAddStorage (PAGE_ERROR, -PAGE_DISK, -PAGE_CONTROLLER, -PAGE_NETWORK, -PAGE_INPUT, -PAGE_GRAPHICS, -PAGE_SOUND, -PAGE_HOSTDEV, -PAGE_CHAR, -PAGE_VIDEO, -PAGE_WATCHDOG, -PAGE_FILESYSTEM, -PAGE_SMARTCARD, -PAGE_USBREDIR, -PAGE_TPM, -PAGE_RNG, -PAGE_PANIC, -) = range(0, 17) + PAGE_DISK, + PAGE_CONTROLLER, + PAGE_NETWORK, + PAGE_INPUT, + PAGE_GRAPHICS, + PAGE_SOUND, + PAGE_HOSTDEV, + PAGE_CHAR, + PAGE_VIDEO, + PAGE_WATCHDOG, + PAGE_FILESYSTEM, + PAGE_SMARTCARD, + PAGE_USBREDIR, + PAGE_TPM, + PAGE_RNG, + PAGE_PANIC) = range(0, 17) class vmmAddHardware(vmmGObjectUI): diff --git a/virtManager/details.py b/virtManager/details.py index 4d1ae2c..0dd93a4 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -46,69 +46,67 @@ from .graphwidgets import Sparkline # Parameters that can be edited in the details window (EDIT_NAME, -EDIT_TITLE, -EDIT_MACHTYPE, -EDIT_FIRMWARE, -EDIT_DESC, -EDIT_IDMAP, - -EDIT_VCPUS, -EDIT_MAXVCPUS, -EDIT_CPU, -EDIT_TOPOLOGY, - -EDIT_MEM, - -EDIT_AUTOSTART, -EDIT_BOOTORDER, -EDIT_BOOTMENU, -EDIT_KERNEL, -EDIT_INIT, - -EDIT_DISK_RO, -EDIT_DISK_SHARE, -EDIT_DISK_REMOVABLE, -EDIT_DISK_CACHE, -EDIT_DISK_IO, -EDIT_DISK_BUS, -EDIT_DISK_SERIAL, -EDIT_DISK_FORMAT, -EDIT_DISK_SGIO, - -EDIT_SOUND_MODEL, - -EDIT_SMARTCARD_MODE, - -EDIT_NET_MODEL, -EDIT_NET_VPORT, -EDIT_NET_SOURCE, -EDIT_NET_MAC, - -EDIT_GFX_PASSWD, -EDIT_GFX_TYPE, -EDIT_GFX_KEYMAP, -EDIT_GFX_LISTEN, -EDIT_GFX_ADDRESS, -EDIT_GFX_TLSPORT, -EDIT_GFX_PORT, -EDIT_GFX_OPENGL, -EDIT_GFX_RENDERNODE, - -EDIT_VIDEO_MODEL, -EDIT_VIDEO_3D, - -EDIT_WATCHDOG_MODEL, -EDIT_WATCHDOG_ACTION, - -EDIT_CONTROLLER_MODEL, - -EDIT_TPM_TYPE, - -EDIT_FS, - -EDIT_HOSTDEV_ROMBAR, - -) = range(1, 49) + EDIT_TITLE, + EDIT_MACHTYPE, + EDIT_FIRMWARE, + EDIT_DESC, + EDIT_IDMAP, + + EDIT_VCPUS, + EDIT_MAXVCPUS, + EDIT_CPU, + EDIT_TOPOLOGY, + + EDIT_MEM, + + EDIT_AUTOSTART, + EDIT_BOOTORDER, + EDIT_BOOTMENU, + EDIT_KERNEL, + EDIT_INIT, + + EDIT_DISK_RO, + EDIT_DISK_SHARE, + EDIT_DISK_REMOVABLE, + EDIT_DISK_CACHE, + EDIT_DISK_IO, + EDIT_DISK_BUS, + EDIT_DISK_SERIAL, + EDIT_DISK_FORMAT, + EDIT_DISK_SGIO, + + EDIT_SOUND_MODEL, + + EDIT_SMARTCARD_MODE, + + EDIT_NET_MODEL, + EDIT_NET_VPORT, + EDIT_NET_SOURCE, + EDIT_NET_MAC, + + EDIT_GFX_PASSWD, + EDIT_GFX_TYPE, + EDIT_GFX_KEYMAP, + EDIT_GFX_LISTEN, + EDIT_GFX_ADDRESS, + EDIT_GFX_TLSPORT, + EDIT_GFX_PORT, + EDIT_GFX_OPENGL, + EDIT_GFX_RENDERNODE, + + EDIT_VIDEO_MODEL, + EDIT_VIDEO_3D, + + EDIT_WATCHDOG_MODEL, + EDIT_WATCHDOG_ACTION, + + EDIT_CONTROLLER_MODEL, + + EDIT_TPM_TYPE, + + EDIT_FS, + + EDIT_HOSTDEV_ROMBAR) = range(1, 49) # Columns in hw list model diff --git a/virtManager/snapshots.py b/virtManager/snapshots.py index 3429321..eeb1a9f 100644 --- a/virtManager/snapshots.py +++ b/virtManager/snapshots.py @@ -472,7 +472,7 @@ class vmmSnapshotPage(vmmGObjectUI): def _validate_new_snapshot(self): name = self.widget("snapshot-new-name").get_text() desc = self.widget("snapshot-new-description" -).get_buffer().get_property("text") + ).get_buffer().get_property("text") try: newsnap = DomainSnapshot(self.vm.conn.get_backend()) diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py index 8296f2a..589b206 100644 --- a/virtinst/urlfetcher.py +++ b/virtinst/url
Re: [virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E131 warnings
At 2017-08-26 08:19:57, "Cole Robinson" <crobi...@redhat.com> wrote: >On 08/17/2017 09:18 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >>Fix all E131: >> Continuation line unaligned for hanging indent >> >>Also remove ignore options of E131 >> > >ACK > Pushed, Thanks. Regards. - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E131 warnings
From: Chen Hanxiao <chenhanx...@gmail.com> Fix all E131: Continuation line unaligned for hanging indent Also remove ignore options of E131 Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/clitest.py | 6 +++--- tests/pycodestyle.cfg | 3 +-- virt-install | 2 +- virtManager/clone.py | 2 +- virtManager/createinterface.py | 2 +- virtManager/manager.py | 10 +- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/tests/clitest.py b/tests/clitest.py index ca2ca1f..3fe2d7f 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -238,9 +238,9 @@ class Command(object): raise AssertionError( ("Expected command to %s, but it didn't.\n" % (self.check_success and "pass" or "fail")) + - ("Command was: %s\n" % self.cmdstr) + - ("Error code : %d\n" % code) + - ("Output was:\n%s" % output)) +("Command was: %s\n" % self.cmdstr) + +("Error code : %d\n" % code) + +("Output was:\n%s" % output)) if self.compare_file: if self._check_support(tests, conn, self.compare_check, diff --git a/tests/pycodestyle.cfg b/tests/pycodestyle.cfg index 0b0d45c..2588043 100644 --- a/tests/pycodestyle.cfg +++ b/tests/pycodestyle.cfg @@ -16,7 +16,6 @@ format = pylint # E127: Continuation line over-indented for visual indent # E128: Continuation line under-indented for visual indent # E129: Visually indented line with same indent as next logical line -# E131: Continuation line unaligned for hanging indent # E221: Multiple spaces before operator # E241: Multiple spaces after ‘,’ # E301: Expected 1 blank line, found 0 @@ -29,4 +28,4 @@ format = pylint # E741: Do not use variables named ‘l’, ‘O’, or ‘I’ -ignore = E122, E123, E124, E125, E126, E127, E128, E129, E131, E221, E241, E301, E303, E305, E306, E402, E501, E741 +ignore = E122, E123, E124, E125, E126, E127, E128, E129, E221, E241, E301, E303, E305, E306, E402, E501, E741 diff --git a/virt-install b/virt-install index 10be93f..4163d0f 100755 --- a/virt-install +++ b/virt-install @@ -439,7 +439,7 @@ def validate_required_options(options, guest): (not cdrom_specified(guest, options.disk))): msg += "\n" + ( _("An install method must be specified\n(%(methods)s)") % - {"methods": install_methods}) +{"methods": install_methods}) if msg: fail(msg) diff --git a/virtManager/clone.py b/virtManager/clone.py index 4eb3a4a..baa4d2e 100644 --- a/virtManager/clone.py +++ b/virtManager/clone.py @@ -792,7 +792,7 @@ class vmmCloneVM(vmmGObjectUI): _("The following disk devices will not be cloned:\n\n%s\n" "Running the new guest could overwrite data in these " "disk images.") - % warn_str) +% warn_str) if not res: return False diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py index f01d178..fa2c6e7 100644 --- a/virtManager/createinterface.py +++ b/virtManager/createinterface.py @@ -975,7 +975,7 @@ class vmmCreateInterface(vmmGObjectUI): "configured:\n\n%s\n\nUsing these may overwrite " "their existing configuration. Are you sure you " "want to use the selected interface(s)?") % - defined_ifaces) +defined_ifaces) if not ret: return ret diff --git a/virtManager/manager.py b/virtManager/manager.py index d170355..73fe6ea 100644 --- a/virtManager/manager.py +++ b/virtManager/manager.py @@ -127,15 +127,15 @@ class vmmManager(vmmGObjectUI): self.builder.connect_signals({ "on_menu_view_guest_cpu_usage_activate": -self.toggle_stats_visible_guest_cpu, +self.toggle_stats_visible_guest_cpu, "on_menu_view_host_cpu_usage_activate": -self.toggle_stats_visible_host_cpu, +self.toggle_stats_visible_host_cpu, "on_menu_view_memory_usage_activate": -self.toggle_stats_visible_memory_usage, +self.toggle_stats_visible_memory_usage, "on_menu_view_disk_io_activate": -self.toggle_stats_visible_disk, +self.toggle_stats_visible_disk, "on_menu_view_network_traffic_activate": -self.toggle_stats_visible_network, +self.toggle_stats_visible_net
Re: [virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E203 warnings
At 2017-08-09 23:40:24, "Cole Robinson" <crobi...@redhat.com> wrote: >On 08/09/2017 10:47 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >>Fix all E203 whitespace before ':' >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >> --- >> v2: fix a small indent > >ACK, but amend the patch to also remove E203 from the pycodestyle.cfg so we >test for it in the future too > Pushed with E203 removed. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E203 warnings
From: Chen Hanxiao <chenhanx...@gmail.com> Fix all E203 whitespace before ':' Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v2: fix a small indent setup.py | 4 +- tests/clitest.py | 66 +++ tests/clonetest.py | 4 +- tests/nodedev.py | 2 +- virt-install | 4 +- virtManager/addhardware.py | 50 +- virtManager/asyncjob.py| 4 +- virtManager/clone.py | 18 +++ virtManager/config.py | 40 +++--- virtManager/connection.py | 38 +++--- virtManager/create.py | 8 +-- virtManager/createinterface.py | 18 +++ virtManager/createnet.py | 20 +++ virtManager/createpool.py | 18 +++ virtManager/createvol.py | 20 +++ virtManager/delete.py | 8 +-- virtManager/details.py | 30 +-- virtManager/domain.py | 116 - virtManager/gfxdetails.py | 2 +- virtManager/graphwidgets.py| 8 +-- virtManager/host.py| 14 ++--- virtManager/keyring.py | 4 +- virtManager/manager.py | 2 +- virtManager/migrate.py | 16 +++--- virtManager/preferences.py | 2 +- virtManager/snapshots.py | 4 +- virtManager/storagebrowse.py | 2 +- virtManager/storagelist.py | 12 ++--- virtinst/capabilities.py | 2 +- virtinst/cli.py| 6 +-- virtinst/cloner.py | 4 +- virtinst/devicechar.py | 22 virtinst/devicecontroller.py | 16 +++--- virtinst/devicerng.py | 24 - virtinst/devicetpm.py | 2 +- virtinst/diskbackend.py| 4 +- virtinst/network.py| 2 +- virtinst/osdict.py | 84 ++--- virtinst/storage.py| 2 +- virtinst/urlfetcher.py | 2 +- 40 files changed, 352 insertions(+), 352 deletions(-) diff --git a/setup.py b/setup.py index 6f4b37b..762a056 100755 --- a/setup.py +++ b/setup.py @@ -673,8 +673,8 @@ distutils.core.setup( 'rpm': my_rpm, 'test': TestCommand, 'test_ui': TestUI, -'test_urls' : TestURLFetch, -'test_initrd_inject' : TestInitrdInject, +'test_urls': TestURLFetch, +'test_initrd_inject': TestInitrdInject, }, distclass=VMMDistribution, diff --git a/tests/clitest.py b/tests/clitest.py index 696ca64..ca2ca1f 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -75,43 +75,43 @@ test_files = { 'URI-KVM-SESSION': utils.uri_kvm_session, 'URI-KVM-REMOTE': utils.uri_kvm + ",remote", 'URI-KVM-NODOMCAPS': utils.uri_kvm_nodomcaps, -'URI-KVM-ARMV7L' : utils.uri_kvm_armv7l, -'URI-KVM-AARCH64' : utils.uri_kvm_aarch64, -'URI-KVM-PPC64LE' : utils.uri_kvm_ppc64le, -'URI-KVM-S390X' : utils.uri_kvm_s390x, -'URI-KVM-S390X-KVMIBM' : utils.uri_kvm_s390x_KVMIBM, +'URI-KVM-ARMV7L': utils.uri_kvm_armv7l, +'URI-KVM-AARCH64': utils.uri_kvm_aarch64, +'URI-KVM-PPC64LE': utils.uri_kvm_ppc64le, +'URI-KVM-S390X': utils.uri_kvm_s390x, +'URI-KVM-S390X-KVMIBM': utils.uri_kvm_s390x_KVMIBM, 'URI-XEN': utils.uri_xen, 'URI-LXC': utils.uri_lxc, 'URI-VZ': utils.uri_vz, -'CLONE_DISK_XML': "%s/clone-disk.xml" % xmldir, -'CLONE_STORAGE_XML' : "%s/clone-disk-managed.xml" % xmldir, -'CLONE_NOEXIST_XML' : "%s/clone-disk-noexist.xml" % xmldir, -'IMAGE_XML' : "%s/image.xml" % xmldir, -'IMAGE_NOGFX_XML' : "%s/image-nogfx.xml" % xmldir, -'OVF_IMG1' : "%s/tests/virtconv-files/ovf_input/test1.ovf" % os.getcwd(), -'VMX_IMG1' : "%s/tests/virtconv-files/vmx_input/test1.vmx" % os.getcwd(), - -'NEWIMG1' : "/dev/default-pool/new1.img", -'NEWIMG2' : "/dev/default-pool/new2.img", -'NEWCLONEIMG1' : new_images[0], -'NEWCLONEIMG2' : new_images[1], -'NEWCLONEIMG3' : new_images[2], -'AUTOMANAGEIMG' : "/some/new/pool/dir/new", -'BLOCKVOL' : '/iscsi-pool/diskvol1', -'EXISTIMG1' : "/dev/default-pool/testvol1.img", -'EXISTIMG2' : "/dev/default-pool/testvol2.img", -'EXISTIMG3' : exist_images[0], -'EXISTIMG4' : exist_images[1], -'EXISTUPPER': "/dev/default-pool/UPPER", -'POOL' : "default-pool", -'VOL' : "testvol1.img", -'DIR' : "/var", -'TREEDIR' : treedir, -'MANAGEDNEW1' : "/dev/default-pool/clonevol", -'MANAGEDDISKNEW1' : "/dev/disk-pool/newvol1.img", -'COLLIDE' : "/dev/default-pool/collidevol1.img&q
Re: [virt-tools-list] [virt-manager PATCH 2/2] pycodestyle: fix all E203 warnings
At 2017-08-07 16:09:49, "Radostin Stoyanov" <rstoyan...@gmail.com> wrote: > >On 07/08/17 02:15, Chen Hanxiao wrote: >> >> >> At 2017-08-07 05:35:48, "Cole Robinson" <crobi...@redhat.com> wrote: >>> On 08/05/2017 03:01 AM, Chen Hanxiao wrote: >>>> From: Chen Hanxiao <chenhanx...@gmail.com> >>>> >>>>Fix all E203 whitespace before ':' >>>> >>>> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >>> This one is also already ignored in tests/pycodestyle.cfg, is it giving you >>> warnings? >>> >>> That said this is one that I'm fine with keeping as long as we can preserve >>> horizontal alignment in a few places, which you've kept. But I'm curious as >>> to >>> how you hit these issues. What version of pycodestyle do you have installed? >>> >>> - Cole >>> > >Hi Chen, > >This will happen if pycodestyle cannot find the file >"tests/pycodestyle.cfg" [1] > >Would you be able to check if this works for you? > >diff --git a/setup.py b/setup.py >index 6f4b37ba..be67be30 100755 >--- a/setup.py >+++ b/setup.py >@@ -582,7 +582,7 @@ class CheckPylint(distutils.core.Command): > > print("running pycodestyle") > cmd = "pycodestyle " >-cmd += "--config tests/pycodestyle.cfg " >+cmd += "--config ./tests/pycodestyle.cfg " > cmd += "--exclude %s " % ",".join(exclude) > cmd += " ".join(files) > os.system(cmd) > >or > >diff --git a/setup.py b/setup.py >index 6f4b37ba..246a43a6 100755 >--- a/setup.py >+++ b/setup.py >@@ -582,7 +582,7 @@ class CheckPylint(distutils.core.Command): > > print("running pycodestyle") > cmd = "pycodestyle " >-cmd += "--config tests/pycodestyle.cfg " >+cmd += "--config %s " % os.path.realpath('tests/pycodestyle.cfg') > cmd += "--exclude %s " % ",".join(exclude) > cmd += " ".join(files) > os.system(cmd) > >[1] https://github.com/PyCQA/pycodestyle/blob/master/pycodestyle.py#L2213 >> Hi, Radostin: Neither of these works for me. After some googling, I found: https://github.com/PyCQA/pycodestyle/issues/564 Seams like a pycodestyle bug on 2.0.0 I replaced pycodestyle by its upstream version, all works fine with virt-manager upstream codes. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH 2/2] pycodestyle: fix all E203 warnings
At 2017-08-07 05:35:48, "Cole Robinson" <crobi...@redhat.com> wrote: >On 08/05/2017 03:01 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >>Fix all E203 whitespace before ':' >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> > >This one is also already ignored in tests/pycodestyle.cfg, is it giving you >warnings? > >That said this is one that I'm fine with keeping as long as we can preserve >horizontal alignment in a few places, which you've kept. But I'm curious as to >how you hit these issues. What version of pycodestyle do you have installed? > >- Cole > >$ pycodestyle --version >2.0.0 I'll push [2/2] later. # pycodestyle --version 2.0.0 # python setup.py pylint running pylint running pycodestyle setup.py:73:5: E301 expected 1 blank line, found 0 setup.py:143:25: E129 visually indented line with same indent as next logical line setup.py:175:5: E303 too many blank lines (2) setup.py:214:5: E303 too many blank lines (2) setup.py:294:5: E301 expected 1 blank line, found 0 setup.py:347:5: E303 too many blank lines (2) setup.py:482:1: E303 too many blank lines (3) . hundreds of lines. Looks the ignore config not actting as we wished on my Fedora24. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 2/2] pycodestyle: fix all E203 warnings
From: Chen Hanxiao <chenhanx...@gmail.com> Fix all E203 whitespace before ':' Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- setup.py | 4 +- tests/clitest.py | 66 +++ tests/clonetest.py | 4 +- tests/nodedev.py | 2 +- virt-install | 4 +- virtManager/addhardware.py | 50 +- virtManager/asyncjob.py| 4 +- virtManager/clone.py | 18 +++ virtManager/config.py | 40 +++--- virtManager/connection.py | 38 +++--- virtManager/create.py | 8 +-- virtManager/createinterface.py | 18 +++ virtManager/createnet.py | 20 +++ virtManager/createpool.py | 18 +++ virtManager/createvol.py | 20 +++ virtManager/delete.py | 8 +-- virtManager/details.py | 30 +-- virtManager/domain.py | 116 - virtManager/gfxdetails.py | 2 +- virtManager/graphwidgets.py| 8 +-- virtManager/host.py| 14 ++--- virtManager/keyring.py | 4 +- virtManager/manager.py | 2 +- virtManager/migrate.py | 16 +++--- virtManager/preferences.py | 2 +- virtManager/snapshots.py | 4 +- virtManager/storagebrowse.py | 2 +- virtManager/storagelist.py | 12 ++--- virtinst/capabilities.py | 2 +- virtinst/cli.py| 6 +-- virtinst/cloner.py | 4 +- virtinst/devicechar.py | 23 virtinst/devicecontroller.py | 16 +++--- virtinst/devicerng.py | 24 - virtinst/devicetpm.py | 2 +- virtinst/diskbackend.py| 4 +- virtinst/network.py| 2 +- virtinst/osdict.py | 84 ++--- virtinst/storage.py| 2 +- virtinst/urlfetcher.py | 2 +- 40 files changed, 353 insertions(+), 352 deletions(-) diff --git a/setup.py b/setup.py index f042037..a8990f6 100755 --- a/setup.py +++ b/setup.py @@ -675,8 +675,8 @@ distutils.core.setup( 'rpm': my_rpm, 'test': TestCommand, 'test_ui': TestUI, -'test_urls' : TestURLFetch, -'test_initrd_inject' : TestInitrdInject, +'test_urls': TestURLFetch, +'test_initrd_inject': TestInitrdInject, }, distclass=VMMDistribution, diff --git a/tests/clitest.py b/tests/clitest.py index 696ca64..ca2ca1f 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -75,43 +75,43 @@ test_files = { 'URI-KVM-SESSION': utils.uri_kvm_session, 'URI-KVM-REMOTE': utils.uri_kvm + ",remote", 'URI-KVM-NODOMCAPS': utils.uri_kvm_nodomcaps, -'URI-KVM-ARMV7L' : utils.uri_kvm_armv7l, -'URI-KVM-AARCH64' : utils.uri_kvm_aarch64, -'URI-KVM-PPC64LE' : utils.uri_kvm_ppc64le, -'URI-KVM-S390X' : utils.uri_kvm_s390x, -'URI-KVM-S390X-KVMIBM' : utils.uri_kvm_s390x_KVMIBM, +'URI-KVM-ARMV7L': utils.uri_kvm_armv7l, +'URI-KVM-AARCH64': utils.uri_kvm_aarch64, +'URI-KVM-PPC64LE': utils.uri_kvm_ppc64le, +'URI-KVM-S390X': utils.uri_kvm_s390x, +'URI-KVM-S390X-KVMIBM': utils.uri_kvm_s390x_KVMIBM, 'URI-XEN': utils.uri_xen, 'URI-LXC': utils.uri_lxc, 'URI-VZ': utils.uri_vz, -'CLONE_DISK_XML': "%s/clone-disk.xml" % xmldir, -'CLONE_STORAGE_XML' : "%s/clone-disk-managed.xml" % xmldir, -'CLONE_NOEXIST_XML' : "%s/clone-disk-noexist.xml" % xmldir, -'IMAGE_XML' : "%s/image.xml" % xmldir, -'IMAGE_NOGFX_XML' : "%s/image-nogfx.xml" % xmldir, -'OVF_IMG1' : "%s/tests/virtconv-files/ovf_input/test1.ovf" % os.getcwd(), -'VMX_IMG1' : "%s/tests/virtconv-files/vmx_input/test1.vmx" % os.getcwd(), - -'NEWIMG1' : "/dev/default-pool/new1.img", -'NEWIMG2' : "/dev/default-pool/new2.img", -'NEWCLONEIMG1' : new_images[0], -'NEWCLONEIMG2' : new_images[1], -'NEWCLONEIMG3' : new_images[2], -'AUTOMANAGEIMG' : "/some/new/pool/dir/new", -'BLOCKVOL' : '/iscsi-pool/diskvol1', -'EXISTIMG1' : "/dev/default-pool/testvol1.img", -'EXISTIMG2' : "/dev/default-pool/testvol2.img", -'EXISTIMG3' : exist_images[0], -'EXISTIMG4' : exist_images[1], -'EXISTUPPER': "/dev/default-pool/UPPER", -'POOL' : "default-pool", -'VOL' : "testvol1.img", -'DIR' : "/var", -'TREEDIR' : treedir, -'MANAGEDNEW1' : "/dev/default-pool/clonevol", -'MANAGEDDISKNEW1' : "/dev/disk-pool/newvol1.img", -'COLLIDE' : "/dev/default-pool/collidevol1.img", -'SHARE'
[virt-tools-list] [virt-manager PATCH 1/2] pycodestyle: add ignore option
From: Chen Hanxiao <chenhanx...@gmail.com> Also disabled: E128 continuation line under-indented for visual indent Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 6f4b37b..f042037 100755 --- a/setup.py +++ b/setup.py @@ -579,11 +579,13 @@ class CheckPylint(distutils.core.Command): output_format = sys.stdout.isatty() and "colorized" or "text" exclude = ["virtinst/progress.py"] +ignore = ["E128"] print("running pycodestyle") cmd = "pycodestyle " cmd += "--config tests/pycodestyle.cfg " cmd += "--exclude %s " % ",".join(exclude) +cmd += "--ignore %s " % ",".join(ignore) cmd += " ".join(files) os.system(cmd) -- 2.7.5 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [libvirt][PATCH] nodedev: fix an improper comment
From: Chen Hanxiao <chenhanx...@gmail.com> Actually we use virConnectNodeDeviceEventGenericCallback. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- include/libvirt/libvirt-nodedev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h index cd3f237..25e8724 100644 --- a/include/libvirt/libvirt-nodedev.h +++ b/include/libvirt/libvirt-nodedev.h @@ -142,7 +142,7 @@ int virNodeDeviceDestroy (virNodeDevicePtr dev); */ typedef enum { VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE = 0, /* virConnectNodeDeviceEventLifecycleCallback */ -VIR_NODE_DEVICE_EVENT_ID_UPDATE = 1, /* virConnectNodeDeviceEventUpdateCallback */ +VIR_NODE_DEVICE_EVENT_ID_UPDATE = 1, /* virConnectNodeDeviceEventGenericCallback */ # ifdef VIR_ENUM_SENTINELS VIR_NODE_DEVICE_EVENT_ID_LAST -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] gfxdetails: add checkbox for password visibility toggle
From: Chen Hanxiao <chenhanx...@gmail.com> This patch add a checkbox for password visibility toggle. As we stored password of SPICE/VNC in clear text in XML, it's easy to use in UI. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- ui/gfxdetails.ui | 42 ++ virtManager/gfxdetails.py | 7 +++ 2 files changed, 49 insertions(+) diff --git a/ui/gfxdetails.ui b/ui/gfxdetails.ui index 9f85c8a..db188f7 100644 --- a/ui/gfxdetails.ui +++ b/ui/gfxdetails.ui @@ -500,5 +500,47 @@ 9 + + +Visi_bility +True +True +False +True +True + + + +2 +5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/virtManager/gfxdetails.py b/virtManager/gfxdetails.py index a76eb77..35748ab 100644 --- a/virtManager/gfxdetails.py +++ b/virtManager/gfxdetails.py @@ -51,6 +51,7 @@ class vmmGraphicsDetails(vmmGObjectUI): "on_graphics_port_auto_toggled": self._change_port_auto, "on_graphics_tlsport_auto_toggled": self._change_tlsport_auto, "on_graphics_use_password": self._change_password_chk, +"on_graphics_show_password": self._show_password_chk, "on_graphics_listen_type_changed": self._change_graphics_listen, "on_graphics_password_changed": lambda ignore: self.emit("changed-password"), @@ -373,3 +374,9 @@ class vmmGraphicsDetails(vmmGObjectUI): self.widget("graphics-password").set_text("") self.widget("graphics-password").set_sensitive(False) self.emit("changed-password") + +def _show_password_chk(self, ignore=None): +if self.widget("graphics-visiblity-chk").get_active(): +self.widget("graphics-password").set_visibility(True) +else: +self.widget("graphics-password").set_visibility(False) -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] pylint: disable undefined-loop-variable
From: Chen Hanxiao <chenhanx...@gmail.com> pylint brings noise, disable it. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtinst/urlfetcher.py | 1 + 1 file changed, 1 insertion(+) diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py index 4abc83a..b5b1244 100644 --- a/virtinst/urlfetcher.py +++ b/virtinst/urlfetcher.py @@ -500,6 +500,7 @@ def getDistroStore(guest, fetcher): found = True break +# pylint: disable=undefined-loop-variable if found: logging.debug("Prioritizing distro store=%s", store) stores.remove(store) -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH v2] virtManager: UI: add support enable setting multifunction on hostdev
From: Chen Hanxiao <chenhanx...@gmail.com> We could turn on/off multifunction of hostdev in page details. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v2: drop irrelevant cli part ui/details.ui | 74 ++ virtManager/details.py | 11 +++- virtManager/domain.py | 8 +- 3 files changed, 62 insertions(+), 31 deletions(-) diff --git a/ui/details.ui b/ui/details.ui index 5932860..66284f7 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -132,9 +132,9 @@ -vertical True False +vertical True @@ -400,7 +400,6 @@ -horizontal True False @@ -593,16 +592,15 @@ -horizontal True False 12 12 -vertical True False +vertical 6 @@ -670,9 +668,9 @@ -vertical True False +vertical 6 @@ -682,9 +680,9 @@ False -vertical True False +vertical 12 @@ -1702,9 +1700,9 @@ if you know what you are doing./small vertical -vertical True False +vertical 12 @@ -1990,10 +1988,10 @@ if you know what you are doing./small -vertical True False start +vertical 12 @@ -2009,7 +2007,6 @@ if you know what you are doing./small 12 -horizontal True False 6 @@ -2132,7 +2129,6 @@ if you know what you are doing./small -horizontal True False 6 @@ -2292,9 +2288,9 @@ if you know what you are doing./small 12 -vertical True False +vertical 4 @@ -2322,7 +2318,6 @@ if you know what you are doing./small 0 -horizontal True False 6 @@ -2437,7 +2432,6 @@ if you know what you are doing./small -horizontal True False 6 @@ -2527,9 +2521,9 @@ if you know what you are doing./small -vertical
Re: [virt-tools-list] [virt-manager PATCH 2/2] virtManager: UI: add support enable setting multifunction on hostdev
At 2017-05-10 18:04:37, "Pavel Hrdina" <phrd...@redhat.com> wrote: >On Tue, May 09, 2017 at 06:23:57PM +0800, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> We could turn on/off multifunction of hostdev >> in page details. >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >> --- >> ui/details.ui | 74 >> ++ >> virtManager/details.py | 13 - >> virtManager/domain.py | 8 +- >> 3 files changed, 64 insertions(+), 31 deletions(-) > >In the future please don't include the unrelated changes to the >generated UI files, it adds a lot of noise. > Maybe I need to update may glade. >The patch itself is wrong, it configures the multifunction attribute >for the source address introduced by previous patch, but the source >address describes the PCI address of the device in the host. > >What we actually need is to properly configure the element >presented to the guest which is not possible via the virt-manager UI. >Adding just the "multifunction" checkbox doesn't help at all. > >Lets consider, that the guest has the following Nvidia GPU card: > >06:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] >[10de:13c2] (rev a1) >06:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio >Controller [10de:0fbb] (rev a1)}} > >And we need to get the following XML: > >... > > > > > function='0x0' multifunction='on'/> > > > > > > function='0x1'/> > >... > >In order to achieve this configuration virt-manager would have to do >some post-parsing of the created configuration to detect that there >are two host devices with the same address except the function and >ensure that they are presented as different functions to the guest >or add UI bits to configure the address presented to the guest manually. > >Currently virt-manager don't create the guest address because that >one is automatically generated by libvirt and is not required, only >the source address is required. The auto-generated adrress from libvirt don't add multifunction. We could edit the address in details via: hostdev.address.multifunction Regards, - Chen > >Pavel ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 1/2] virtinst: add support enable setting multifunction on hostdev
From: Chen Hanxiao <chenhanx...@gmail.com> This patch will enable setting multifunction on hostdev. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/cli-test-xml/compare/virt-install-many-devices.xml | 6 ++ tests/clitest.py | 1 + virtinst/cli.py | 1 + virtinst/devicehostdev.py| 3 ++- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml index 06edf9d..e4e1a74 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -353,6 +353,12 @@ + + + + + + diff --git a/tests/clitest.py b/tests/clitest.py index e329e67..a263574 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -515,6 +515,7 @@ c.add_compare(""" \ --host-device 04b3:4485 \ --host-device pci_8086_2829_scsi_host_scsi_device_lun0 \ --hostdev usb_5_20 --hostdev usb_5_21 \ +--hostdev 00:15:0.1,address.type=pci,address.domain=0x,address.bus=0x0,address.slot=0xa,address.multifunction=on \ \ --filesystem /source,/target \ diff --git a/virtinst/cli.py b/virtinst/cli.py index 52f9106..9a332f0 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -2691,6 +2691,7 @@ ParserHostdev.add_arg(None, "name", ParserHostdev.add_arg("driver_name", "driver_name") ParserHostdev.add_arg("boot.order", "boot_order") ParserHostdev.add_arg("rom_bar", "rom_bar", is_onoff=True) +ParserHostdev.add_arg("multifunction", "multifunction", is_onoff=True) ### diff --git a/virtinst/devicehostdev.py b/virtinst/devicehostdev.py index 34c00b0..fe751c1 100644 --- a/virtinst/devicehostdev.py +++ b/virtinst/devicehostdev.py @@ -111,7 +111,7 @@ class VirtualHostDevice(VirtualDevice): _XML_PROP_ORDER = ["mode", "type", "managed", "vendor", "product", - "domain", "bus", "slot", "function"] + "domain", "bus", "slot", "function", "multifunction"] mode = XMLProperty("./@mode", default_cb=lambda s: "subsystem") type = XMLProperty("./@type") @@ -134,6 +134,7 @@ class VirtualHostDevice(VirtualDevice): domain = XMLProperty("./source/address/@domain", default_cb=_get_default_domain) function = XMLProperty("./source/address/@function") +multifunction = XMLProperty("./address/@multifunction") slot = XMLProperty("./source/address/@slot") driver_name = XMLProperty("./driver/@name") -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 2/2] virtManager: UI: add support enable setting multifunction on hostdev
From: Chen Hanxiao <chenhanx...@gmail.com> We could turn on/off multifunction of hostdev in page details. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- ui/details.ui | 74 ++ virtManager/details.py | 13 - virtManager/domain.py | 8 +- 3 files changed, 64 insertions(+), 31 deletions(-) diff --git a/ui/details.ui b/ui/details.ui index 5932860..66284f7 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -132,9 +132,9 @@ -vertical True False +vertical True @@ -400,7 +400,6 @@ -horizontal True False @@ -593,16 +592,15 @@ -horizontal True False 12 12 -vertical True False +vertical 6 @@ -670,9 +668,9 @@ -vertical True False +vertical 6 @@ -682,9 +680,9 @@ False -vertical True False +vertical 12 @@ -1702,9 +1700,9 @@ if you know what you are doing./small vertical -vertical True False +vertical 12 @@ -1990,10 +1988,10 @@ if you know what you are doing./small -vertical True False start +vertical 12 @@ -2009,7 +2007,6 @@ if you know what you are doing./small 12 -horizontal True False 6 @@ -2132,7 +2129,6 @@ if you know what you are doing./small -horizontal True False 6 @@ -2292,9 +2288,9 @@ if you know what you are doing./small 12 -vertical True False +vertical 4 @@ -2322,7 +2318,6 @@ if you know what you are doing./small 0 -horizontal True False 6 @@ -2437,7 +2432,6 @@ if you know what you are doing./small -horizontal True False 6 @@ -2527,9 +2521,9 @@ if you know what you are doing./small -vertical True
[virt-tools-list] [virt-manager PATCH 0/2] add support for setting
Add support for both UI and cli Chen Hanxiao (2): virtinst: add support enable setting multifunction on hostdev virtManager: UI: add support enable setting multifunction on hostdev .../compare/virt-install-many-devices.xml | 6 ++ tests/clitest.py | 1 + ui/details.ui | 74 +- virtManager/details.py | 13 +++- virtManager/domain.py | 8 ++- virtinst/cli.py| 1 + virtinst/devicehostdev.py | 3 +- 7 files changed, 74 insertions(+), 32 deletions(-) -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] domain: treat VIR_DOMAIN_CRASHED not as runnable but rather as stoppable
At 2017-05-01 20:58:47, "Eric Blake"wrote: >On 04/30/2017 04:33 PM, Cole Robinson wrote: > >>> >> >> Is there an easy way to move a qemu VM into the crashed state? So I can test >> >> IIRC this logic was based on how old xen behaved, crashed was really a >> shutoff >> type of state, but my recollection is fuzzy. > >I think you can use the pvpanic device to achieve that, although I >haven't attempted it myself any time recently. > Yes, pvpanic device could help: 1) add a pvpanic device 2) change from restart to: preserve 3) use sysrq-trigger to crash the guest. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] domain: treat VIR_DOMAIN_CRASHED not as runnable but rather as stoppable
From: Chen Hanxiao <chenhanx...@gmail.com> If we set on_crash as `preserve`, we'll get a crashed VM state. At this time, it's impossible to start this VM. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtManager/domain.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virtManager/domain.py b/virtManager/domain.py index fc5f54a..3830d22 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -1734,12 +1734,13 @@ class vmmDomain(vmmLibvirtObject): def is_stoppable(self): return self.status() in [libvirt.VIR_DOMAIN_RUNNING, libvirt.VIR_DOMAIN_PAUSED, + libvirt.VIR_DOMAIN_CRASHED, libvirt.VIR_DOMAIN_PMSUSPENDED] def is_destroyable(self): return (self.is_stoppable() or self.status() in [libvirt.VIR_DOMAIN_CRASHED]) def is_runable(self): -return self.is_shutoff() or self.is_crashed() +return self.is_shutoff() def is_pauseable(self): return self.status() in [libvirt.VIR_DOMAIN_RUNNING] def is_unpauseable(self): -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] Any Interest in GPU Pass-through UI Enhancements for Virtual Machine Manager?
At 2017-04-21 01:29:08, "Clif Houck"wrote: >Hi virt-tools, > >I've been playing around with vfio and GPU pass-through for a while now, and >I've noticed that the Virtual Machine Manager UI makes it a bit difficult to >configure a VM properly to use GPU pass-through, and by extension PCI >pass-through. > Passthrough a GPU is similar to passthrough a regular PCI device. If supported, libvirt will take vfio as its first choice. So actually virt-manager already support GPU passthrough. >For instance, I don't see a way to pass a multi-function PCI device with >"multifunction='on'" or make sure that functions on the same host PCI device >get mapped to the same guest PCI device. At least not with VMM. > Maybe we could add a multifunction checkbox on PCI selection window. Regards, - Chen >Would VMM maintainers be interested in patches aimed towards making GPU >pass-through easier to accomplish from within VMM? May not be able to make it >fool-proof, but hopefully a bit easier at least. > >Thanks, >Clif Houck > >___ >virt-tools-list mailing list >virt-tools-list@redhat.com >https://www.redhat.com/mailman/listinfo/virt-tools-list ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] nodedev: remove useless exception instance
At 2017-03-30 22:12:34, "Cole Robinson" <crobi...@redhat.com> wrote: >On 03/30/2017 06:20 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> Commit f341352cdadeadedab1579d1759ed1387aa28c75 >> removed redundant error string, >> so the instance 'e' in exception is useless. >> Just delete it. >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >> --- >> virtinst/nodedev.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py >> index f82ba35..c8f5adc 100644 >> --- a/virtinst/nodedev.py >> +++ b/virtinst/nodedev.py >> @@ -84,7 +84,7 @@ class NodeDevice(XMLBuilder): >> >> try: >> return _AddressStringToNodedev(conn, idstring) >> -except Exception, e: >> +except Exception: >> logging.debug("Error looking up nodedev from idstring=%s", >> idstring, exc_info=True) >> raise >> > >ACK > Pushed. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] nodedev: remove useless exception instance
From: Chen Hanxiao <chenhanx...@gmail.com> Commit f341352cdadeadedab1579d1759ed1387aa28c75 removed redundant error string, so the instance 'e' in exception is useless. Just delete it. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtinst/nodedev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py index f82ba35..c8f5adc 100644 --- a/virtinst/nodedev.py +++ b/virtinst/nodedev.py @@ -84,7 +84,7 @@ class NodeDevice(XMLBuilder): try: return _AddressStringToNodedev(conn, idstring) -except Exception, e: +except Exception: logging.debug("Error looking up nodedev from idstring=%s", idstring, exc_info=True) raise -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] virt-xml: add qemu commandline passthrough example
At 2017-03-29 19:33:11, "Cole Robinson" <crobi...@redhat.com> wrote: >On 03/28/2017 06:42 AM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> We forgot to mention --qemu-commandline in virt-xml.pod. >> Also added an example copied from Cole's blog. >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >> --- >> man/virt-xml.pod | 6 ++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/man/virt-xml.pod b/man/virt-xml.pod >> index 675288d..fa75cb3 100644 >> --- a/man/virt-xml.pod >> +++ b/man/virt-xml.pod >> @@ -222,6 +222,8 @@ Before defining or updating the domain, show the >> generated XML diff and interact >> >> =item B<--panic> >> >> +=item B<--qemu-commandline> >> + >> These options alter the XML for a single class of XML elements. More >> complete documentation is found in L<virt-install(1)>. >> >> Generally these options map pretty straightforwardly to the libvirt XML, >> documented at L<http://libvirt.org/formatdomain.html> >> @@ -337,6 +339,10 @@ Generate XML for a virtio console device and print it >> to stdout: >> >># virt-xml --build-xml --console pty,target_type=virtio >> >> +Add qemu command line passthrough: >> + >> + # virt-xml f25 --edit --confirm --qemu-commandline="-device FOO" >> + >> >> =head1 CAVEATS >> >> > >ACK > Pushed Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] virt-xml: add qemu commandline passthrough example
From: Chen Hanxiao <chenhanx...@gmail.com> We forgot to mention --qemu-commandline in virt-xml.pod. Also added an example copied from Cole's blog. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- man/virt-xml.pod | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/virt-xml.pod b/man/virt-xml.pod index 675288d..fa75cb3 100644 --- a/man/virt-xml.pod +++ b/man/virt-xml.pod @@ -222,6 +222,8 @@ Before defining or updating the domain, show the generated XML diff and interact =item B<--panic> +=item B<--qemu-commandline> + These options alter the XML for a single class of XML elements. More complete documentation is found in L<virt-install(1)>. Generally these options map pretty straightforwardly to the libvirt XML, documented at L<http://libvirt.org/formatdomain.html> @@ -337,6 +339,10 @@ Generate XML for a virtio console device and print it to stdout: # virt-xml --build-xml --console pty,target_type=virtio +Add qemu command line passthrough: + + # virt-xml f25 --edit --confirm --qemu-commandline="-device FOO" + =head1 CAVEATS -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 1/2] hostdev: add support for specify driver name when adding host device
From: Chen Hanxiao <chenhanx...@gmail.com> When adding host device, we could specify driver names, such as vfio, xen, etc. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- ui/addhardware.ui | 38 -- virtManager/addhardware.py | 17 + virtinst/devicehostdev.py | 1 + 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/ui/addhardware.ui b/ui/addhardware.ui index 92e72c7..12c5aff 100644 --- a/ui/addhardware.ui +++ b/ui/addhardware.ui @@ -1,5 +1,5 @@ - + @@ -674,7 +674,7 @@ True False -2 +3 6 6 @@ -714,6 +714,40 @@ 2 + + +True +False + + +True +False +Driver Name: + + +False +True +0 + + + + +True +False + + +False +True +1 + + + + +2 +3 + + + 7 diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index 7645cf9..0115361 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -250,6 +250,8 @@ class vmmAddHardware(vmmGObjectUI): host_col.add_attribute(text, 'text', 0) host_dev_model.set_sort_column_id(0, Gtk.SortType.ASCENDING) host_dev.append_column(host_col) +host_dev_drvname = self.widget("host-device-drvname") +self.build_host_device_drvname_combo(self.vm, host_dev_drvname) # Video device video_dev = self.widget("video-model") @@ -689,6 +691,17 @@ class vmmAddHardware(vmmGObjectUI): combo.set_active(-1) @staticmethod +def build_host_device_drvname_combo(vm, combo): +ignore = vm +model = Gtk.ListStore(str) +combo.set_model(model) +uiutil.init_combo_text_column(combo, 0) +model.set_sort_column_id(0, Gtk.SortType.ASCENDING) + +for m in virtinst.VirtualHostDevice.DRIVER_TYPE: +model.append([m]) + +@staticmethod def populate_disk_bus_combo(vm, devtype, model): # try to get supported disk bus types from domain capabilities domcaps = vm.get_domain_capabilities() @@ -1587,6 +1600,8 @@ class vmmAddHardware(vmmGObjectUI): def _validate_page_hostdev(self): nodedev = uiutil.get_list_selection(self.widget("host-device"), 1) +driver_type = uiutil.get_list_selection( +self.widget("host-device-drvname")) if nodedev is None: return self.err.val_err(_("Physical Device Required"), _("A device must be selected.")) @@ -1607,6 +1622,8 @@ class vmmAddHardware(vmmGObjectUI): if not res: return False dev.set_from_nodedev(nodedev) +if driver_type is not None: +dev.driver_name = driver_type self._dev = dev except Exception, e: return self.err.val_err(_("Host device parameter error"), e) diff --git a/virtinst/devicehostdev.py b/virtinst/devicehostdev.py index 34c00b0..3955fd4 100644 --- a/virtinst/devicehostdev.py +++ b/virtinst/devicehostdev.py @@ -24,6 +24,7 @@ from .xmlbuilder import XMLProperty class VirtualHostDevice(VirtualDevice): virtual_device_type = VirtualDevice.VIRTUAL_DEV_HOSTDEV +DRIVER_TYPE = [None, "kvm", "vfio", "xen"] def set_from_nodedev(self, nodedev): """ -- 2.7.4 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] virtManager/addhardware: get supported disk bus types from libvirt
At 2017-02-06 16:17:05, "Pavel Hrdina"wrote: >On Sun, Feb 05, 2017 at 04:51:57PM -0500, Cole Robinson wrote: >> On 01/20/2017 10:21 AM, Pavel Hrdina wrote: >> > Libvirt provides domain capabilities where supported disk bus types are >> > listed. Virt-manager should try to get those bus types. The old code >> > remains as fallback if domain capabilities doesn't contain the disk >> > bus types. >> > >> > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1387218 >> > >> > Signed-off-by: Pavel Hrdina >> > --- >> > virtManager/addhardware.py | 49 >> > +- >> > 1 file changed, 31 insertions(+), 18 deletions(-) >> > >> > diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py >> > index aab90957..e63ad3d0 100644 >> > --- a/virtManager/addhardware.py >> > +++ b/virtManager/addhardware.py >> > @@ -690,25 +690,38 @@ class vmmAddHardware(vmmGObjectUI): >> > >> > @staticmethod >> > def populate_disk_bus_combo(vm, devtype, model): >> > +# try to get supported disk bus types from domain capabilities >> > +domcaps = vm.get_domain_capabilities() >> > +disk_bus_types = None >> > +if "bus" in domcaps.devices.disk.enum_names(): >> > +disk_bus_types = >> > domcaps.devices.disk.get_enum("bus").get_values() >> > + >> >> Unfortunately libvirt's domcaps don't seem to be exhaustive. For example, >> bus=sd isn't listed, which virt-manager supports in the existing code. So in >> order to enable this we would need to 1) fix libvirt, 2) only use the domcaps >> code from known good versions. That's kind of the general difficulty in >> switching to these types of capabilities reporting APIs unfortunately... > >Yes, I've noticed that, but unfortunately after I've pushed the patch. I would >say that this makes things better than worst even though virt-manager will not >display all available buses for disks. I agree that Libvirt should be fixed >to provide correct data if it already provides these data. > I send a libvirt patch for fixing this issue: http://www.redhat.com/archives/libvir-list/2017-February/msg00191.html I tested virt-manager 798a2e508011512e0fe5671f222a9e49049059e3 with this libvirt patch. It works. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] HACKING: show virt-tools-list address
From: Chen Hanxiao <chenhanx...@gmail.com> Show virt-tools-list address in HACKING, so we could send patches under the guide of it. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- HACKING | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/HACKING b/HACKING index 37fec94..eda8a93 100644 --- a/HACKING +++ b/HACKING @@ -46,8 +46,11 @@ release. The git repo is at: https://github.com/virt-manager/virt-manager -Patches should be sent to the mailing list (see README for details). Using -git format-patch/send-email is preferred, but an attachment with +Patches should be sent to the mailing list (see README for details): + + http://www.redhat.com/mailman/listinfo/virt-tools-list + +Using git format-patch/send-email is preferred, but an attachment with format-patch output is fine too. Small patches are acceptable via github pull-request, but anything -- 1.8.3.1 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] virtManager: disable 'Clone' in VMActionMenu if VM can't be cloned
At 2016-09-30 22:03:49, "Cole Robinson" <crobi...@redhat.com> wrote: >On 09/20/2016 11:59 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> We can't clone a VM in some scenarios, >> such as a VM is active. >> >> This patch will disable 'Clone' label in VMActionMenu >> if we can't clone a VM, >> as same as we did for 'Clone' button in clone ui page. >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> >> --- >> virtManager/domain.py | 4 >> virtManager/vmmenu.py | 2 +- >> 2 files changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/virtManager/domain.py b/virtManager/domain.py >> index a707f25..582de64 100644 >> --- a/virtManager/domain.py >> +++ b/virtManager/domain.py >> @@ -1655,6 +1655,10 @@ class vmmDomain(vmmLibvirtObject): >> return self.status() in [libvirt.VIR_DOMAIN_PAUSED] >> def is_paused(self): >> return self.status() in [libvirt.VIR_DOMAIN_PAUSED] >> +def is_clonable(self): >> +return self.status() in [libvirt.VIR_DOMAIN_SHUTOFF, >> + libvirt.VIR_DOMAIN_PAUSED, >> + libvirt.VIR_DOMAIN_PMSUSPENDED] >> >> def run_status(self): >> return self.pretty_run_status(self.status(), >> self.has_managed_save()) >> diff --git a/virtManager/vmmenu.py b/virtManager/vmmenu.py >> index a1ae375..bb23360 100644 >> --- a/virtManager/vmmenu.py >> +++ b/virtManager/vmmenu.py >> @@ -128,7 +128,7 @@ class VMActionMenu(_VMMenu): >> "suspend": bool(vm and vm.is_stoppable()), >> "resume": bool(vm and vm.is_paused()), >> "migrate": bool(vm and vm.is_stoppable()), >> -"clone": True, >> +"clone": bool(vm and vm.is_clonable()), >> } >> vismap = { >> "suspend": bool(vm and not vm.is_paused()), >> > >Technically we can clone an active VM, if it doesn't have any disks, but >that's sufficiently rare that I don't think it's worth supporting in the UI. >So ACK > Pushed, Thanks. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] virtManager: disable 'Clone' in VMActionMenu if VM can't be cloned
From: Chen Hanxiao <chenhanx...@gmail.com> We can't clone a VM in some scenarios, such as a VM is active. This patch will disable 'Clone' label in VMActionMenu if we can't clone a VM, as same as we did for 'Clone' button in clone ui page. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtManager/domain.py | 4 virtManager/vmmenu.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/virtManager/domain.py b/virtManager/domain.py index a707f25..582de64 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -1655,6 +1655,10 @@ class vmmDomain(vmmLibvirtObject): return self.status() in [libvirt.VIR_DOMAIN_PAUSED] def is_paused(self): return self.status() in [libvirt.VIR_DOMAIN_PAUSED] +def is_clonable(self): +return self.status() in [libvirt.VIR_DOMAIN_SHUTOFF, + libvirt.VIR_DOMAIN_PAUSED, + libvirt.VIR_DOMAIN_PMSUSPENDED] def run_status(self): return self.pretty_run_status(self.status(), self.has_managed_save()) diff --git a/virtManager/vmmenu.py b/virtManager/vmmenu.py index a1ae375..bb23360 100644 --- a/virtManager/vmmenu.py +++ b/virtManager/vmmenu.py @@ -128,7 +128,7 @@ class VMActionMenu(_VMMenu): "suspend": bool(vm and vm.is_stoppable()), "resume": bool(vm and vm.is_paused()), "migrate": bool(vm and vm.is_stoppable()), -"clone": True, +"clone": bool(vm and vm.is_clonable()), } vismap = { "suspend": bool(vm and not vm.is_paused()), -- 1.8.3.1 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] virt-install: fix a wrong example
From: Chen Hanxiao <chenhanx...@gmail.com> a backslash missed. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- Pushed as trivial. man/virt-install.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/virt-install.pod b/man/virt-install.pod index a1229c8..06307bf 100644 --- a/man/virt-install.pod +++ b/man/virt-install.pod @@ -1659,7 +1659,7 @@ booting from PXE, using VNC server/viewer, with virtio-scsi disk --disk path=/dev/HostVG/DemoVM,bus=scsi \ --controller virtio-scsi \ --network network=default \ - --virt-type qemu + --virt-type qemu \ --graphics vnc \ --os-variant fedora9 -- 1.8.3.1 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] virt-install: introduce vhostuser interface
From: Chen Hanxiao <chenhanx...@gmail.com> Add support to interface type 'vhostuser' by: --network vhostuser,source_type=unix,source_path=/tmp/vhost1.sock,source_mode=server,model=virtio Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/cli-test-xml/compare/virt-xml-edit-simple-network.xml | 6 +++--- tests/clitest.py| 1 + virtinst/cli.py | 2 ++ virtinst/deviceinterface.py | 9 ++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-network.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-network.xml index 9464976..fd70f78 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-network.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-network.xml @@ -2,10 +2,10 @@ - -- ++ + - -+ -+ ++ - + diff --git a/tests/clitest.py b/tests/clitest.py index b63a7a0..bc1af33 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -848,6 +848,7 @@ c.add_compare("--pm suspend_to_mem=yes,suspend_to_disk=no", "edit-simple-pm") c.add_compare("--disk /dev/zero,perms=ro,startup_policy=optional", "edit-simple-disk") c.add_compare("--disk path=", "edit-simple-disk-remove-path") c.add_compare("--network source=br0,type=bridge,model=virtio,mac=", "edit-simple-network") +c.add_compare("--network vhostuser,source_type=unix,source_path=/tmp/vhost1.sock,source_mode=server,model=virtio", "edit-simple-network") c.add_compare("--graphics tlsport=5902,keymap=ja", "edit-simple-graphics", compare_check="1.3.5") # compare_check=new graphics listen output c.add_compare("--graphics listen=none", "edit-graphics-listen-none", compare_check="2.0.0") # compare_check=graphics listen=none support c.add_compare("--controller index=15,model=lsilogic", "edit-simple-controller") diff --git a/virtinst/cli.py b/virtinst/cli.py index 73a16bd..43f0a29 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1992,6 +1992,8 @@ _add_device_address_args(ParserNetwork) ParserNetwork.add_arg("type", "type", cb=ParserNetwork.set_type_cb) ParserNetwork.add_arg("source", "source") ParserNetwork.add_arg("source_mode", "source_mode") +ParserNetwork.add_arg("source_type", "source_type") +ParserNetwork.add_arg("source_path", "source_path") ParserNetwork.add_arg("portgroup", "portgroup") ParserNetwork.add_arg("target_dev", "target") ParserNetwork.add_arg("model", "model") diff --git a/virtinst/deviceinterface.py b/virtinst/deviceinterface.py index 6b5b527..29447c1 100644 --- a/virtinst/deviceinterface.py +++ b/virtinst/deviceinterface.py @@ -132,6 +132,7 @@ class VirtualNetworkInterface(VirtualDevice): TYPE_BRIDGE = "bridge" TYPE_VIRTUAL= "network" TYPE_USER = "user" +TYPE_VHOSTUSER = "vhostuser" TYPE_ETHERNET = "ethernet" TYPE_DIRECT = "direct" network_types = [TYPE_BRIDGE, TYPE_VIRTUAL, TYPE_USER, TYPE_ETHERNET, @@ -272,9 +273,9 @@ class VirtualNetworkInterface(VirtualDevice): ## _XML_PROP_ORDER = [ -"_bridge", "_network", "_source_dev", "source_mode", "portgroup", -"macaddr", "target_dev", "model", "virtualport", -"filterref", "rom_bar", "rom_file"] +"_bridge", "_network", "_source_dev", "source_type", "source_path", +"source_mode", "portgroup", "macaddr", "target_dev", "model", +"virtualport", "filterref", "rom_bar", "rom_file"] _bridge = XMLProperty("./source/@bridge", default_cb=_get_default_bridge) _network = XMLProperty("./source/@network") @@ -288,6 +289,8 @@ class VirtualNetworkInterface(VirtualDevice): set_converter=_validate_mac, default_cb=_get_default_mac) +source_type = XMLProperty("./source/@type") +source_path = XMLProperty("./source/@path") source_mode = XMLProperty("./source/@mode", default_cb=_default_source_mode) portgroup = XMLProperty("./source/@portgroup") -- 1.8.3.1 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] snapshot: start snapshot when double-click the item of snapshot list
From: Chen Hanxiao <chenhanx...@gmail.com> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- ui/snapshots.ui | 37 +++-- virtManager/snapshots.py | 3 ++- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/ui/snapshots.ui b/ui/snapshots.ui index 0598251..673754b 100644 --- a/ui/snapshots.ui +++ b/ui/snapshots.ui @@ -1,5 +1,5 @@ - + @@ -51,9 +51,9 @@ True False -0 span size='large' color='white'Create snapshot/span True +0 True @@ -94,10 +94,10 @@ True False -0 _Name: True snapshot-new-name +0 0 @@ -121,11 +121,11 @@ True False -0 -0 _Description: True snapshot-new-description +0 +0 0 @@ -155,8 +155,8 @@ True False -0 Status: +0 0 @@ -184,8 +184,8 @@ True False -0 Shut down +0 False @@ -203,9 +203,9 @@ True False +Screenshot: 0 0 -Screenshot: 0 @@ -316,6 +316,7 @@ True False + @@ -355,9 +356,9 @@ True False +Description: 0 0 -Description: 0 @@ -389,8 +390,8 @@ True False -0 VM State: +0 0 @@ -418,8 +419,8 @@ True False -0 Shut down +0 False @@ -437,8 +438,8 @@ True False -0 Timestamp: +0 0 @@ -449,8 +450,8 @@ True False -0 label +0 1 @@ -461,9 +462,9 @@ True False -0 bsnapshot 'foo'/b True +0 0 @@ -475,8 +476,8 @@ True False -0 Snapshot Mode: +0 0 @@ -487,8 +488,8 @@
Re: [virt-tools-list] [virt-manager PATCH] tests: fix a testcase failure by --os-variant
At 2016-06-16 20:56:16, "Cole Robinson" <crobi...@redhat.com> wrote: >On 06/15/2016 10:35 PM, Chen Hanxiao wrote: >> From: Chen Hanxiao <chenhanx...@gmail.com> >> >> Current libosinfo release on fedora23 and centos7 >> didn't know fedora23. >> Change --os-variant fedora22 as a workaroud. >> >> df1c3e74a introduce this issue. >> >> Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> > >ACK > Pushed, thanks. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] tests: fix a testcase failure by --os-variant
From: Chen Hanxiao <chenhanx...@gmail.com> Current libosinfo release on fedora23 and centos7 didn't know fedora23. Change --os-variant fedora22 as a workaroud. df1c3e74a introduce this issue. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/clitest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/clitest.py b/tests/clitest.py index 67ab7b1..70f3dc8 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -712,7 +712,7 @@ c.add_compare("--arch aarch64 --machine virt --boot kernel=/f19-arm.kernel,initr c.add_compare("--arch aarch64 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,kernel_args=\"console=ttyAMA0,1234 rw root=/dev/vda3\" --disk %(EXISTIMG1)s", "aarch64-machdefault") c.add_compare("--arch aarch64 --cdrom %(EXISTIMG2)s --boot loader=CODE.fd,nvram_template=VARS.fd --disk %(EXISTIMG1)s --cpu none --events on_crash=preserve,on_reboot=destroy,on_poweroff=restart", "aarch64-cdrom") c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os-variant fedora21", "aarch64-kvm-import") -c.add_compare("--connect %(URI-KVM-AARCH64)s --disk none --os-variant fedora23 --features gic_version=host", "aarch64-kvm-gic") +c.add_compare("--connect %(URI-KVM-AARCH64)s --disk none --os-variant fedora22 --features gic_version=host", "aarch64-kvm-gic") # ppc64 tests c.add_compare("--arch ppc64 --machine pseries --boot network --disk %(EXISTIMG1)s --disk device=cdrom --os-variant fedora20 --network none", "ppc64-pseries-f20") -- 1.8.3.1 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] test: Fix tests with latest libvirt
From: Chen Hanxiao <chenhanx...@gmail.com> libvirt commit b33c14b342e5c2ab91c852ef2032327cb355 introduce this. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- tests/cli-test-xml/compare/virt-xml-edit-graphics-spice-gl.xml | 6 +++--- tests/cli-test-xml/compare/virt-xml-edit-pos-num.xml| 2 +- tests/cli-test-xml/compare/virt-xml-edit-select-sound-model.xml | 2 +- tests/cli-test-xml/compare/virt-xml-edit-simple-graphics.xml| 8 tests/cli-test-xml/compare/virt-xml-edit-simple-soundhw.xml | 6 +++--- tests/cli-test-xml/compare/virt-xml-edit-simple-tpm.xml | 2 +- tests/cli-test-xml/compare/virt-xml-remove-sound-model.xml | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-xml-edit-graphics-spice-gl.xml b/tests/cli-test-xml/compare/virt-xml-edit-graphics-spice-gl.xml index 14e350d..299ffcb 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-graphics-spice-gl.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-graphics-spice-gl.xml @@ -1,13 +1,13 @@ -- +- +- + + -+ + - Domain 'test-for-virtxml' defined successfully. Changes will take effect after the next domain shutdown. \ No newline at end of file diff --git a/tests/cli-test-xml/compare/virt-xml-edit-pos-num.xml b/tests/cli-test-xml/compare/virt-xml-edit-pos-num.xml index cde3838..7e4c250 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-pos-num.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-pos-num.xml @@ -1,4 +1,4 @@ - + - diff --git a/tests/cli-test-xml/compare/virt-xml-edit-select-sound-model.xml b/tests/cli-test-xml/compare/virt-xml-edit-select-sound-model.xml index cde3838..7e4c250 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-select-sound-model.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-select-sound-model.xml @@ -1,4 +1,4 @@ - + - diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-graphics.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-graphics.xml index a0ba254..655074e 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-graphics.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-graphics.xml @@ -1,11 +1,11 @@ -- -+ +- ++ + + - - Domain 'test-for-virtxml' defined successfully. Changes will take effect after the next domain shutdown. \ No newline at end of file diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-soundhw.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-soundhw.xml index 642e5ba..c592205 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-soundhw.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-soundhw.xml @@ -1,6 +1,6 @@ - - - + + + - + diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-tpm.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-tpm.xml index 64388e6..6e534c9 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-tpm.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-tpm.xml @@ -5,7 +5,7 @@ + - + Domain 'test-for-virtxml' defined successfully. Changes will take effect after the next domain shutdown. \ No newline at end of file diff --git a/tests/cli-test-xml/compare/virt-xml-remove-sound-model.xml b/tests/cli-test-xml/compare/virt-xml-remove-sound-model.xml index 5af1248..f15ca6e 100644 --- a/tests/cli-test-xml/compare/virt-xml-remove-sound-model.xml +++ b/tests/cli-test-xml/compare/virt-xml-remove-sound-model.xml @@ -1,4 +1,4 @@ - + - -- 2.5.5 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [PATCH virt-manager] chardev: use pretty type of virtio
From: Chen Hanxiao <chenhanx...@gmail.com> We shoud use VirtIO instead of virtio. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtManager/addhardware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index 56c9235..6afe8b3 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -272,7 +272,7 @@ class vmmAddHardware(vmmGObjectUI): lst.set_model(model) uiutil.init_combo_text_column(lst, 1) if self.conn.is_qemu(): -model.append(["virtio", "virtio"]) +model.append(["virtio", "VirtIO"]) else: model.append([None, _("Hypervisor default")]) -- 1.8.3.1 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager][PATCH v1 1/2] Modify the default graphics device to "vnc" for ppc64 and ppc64le
On 12/15/2015 09:06 PM, Kevin Zhao wrote: Modify the default graphics device to "vnc",since the powerpc does't support spice devices.Otherwise, virt-manager can not be used in ppc64 and ppc64le hardware.So that change make virt-manager supports arch "ppc64" and "ppc64le".Also add a test case to cover this change. --- .../compare/virt-install-ppc64le-cdrom-f22.xml | 39 ++ tests/clitest.py | 2 +- virtinst/guest.py | 3 ++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/cli-test-xml/compare/virt-install-ppc64le-cdrom-f22.xml diff --git a/tests/cli-test-xml/compare/virt-install-ppc64le-cdrom-f22.xml b/tests/cli-test-xml/compare/virt-install-ppc64le-cdrom-f22.xml new file mode 100644 index 000..c710169 --- /dev/null +++ b/tests/cli-test-xml/compare/virt-install-ppc64le-cdrom-f22.xml @@ -0,0 +1,39 @@ + + foobar + ---- + 1048576 + 1048576 + 1 + +hvm + + + + + destroy + destroy + destroy + +/usr/bin/qemu-system-ppc64 + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/clitest.py b/tests/clitest.py index 994b415..f2085cc 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -702,7 +702,7 @@ c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os- c.add_compare("--arch ppc64 --machine pseries --boot network --disk %(EXISTIMG1)s --os-variant fedora20 --network none", "ppc64-pseries-f20") c.add_compare("--arch ppc64 --boot network --disk %(EXISTIMG1)s --os-variant fedora20 --network none", "ppc64-machdefault-f20") c.add_compare("--connect %(URI-KVM-PPC64LE)s --import --disk %(EXISTIMG1)s --os-variant fedora20", "ppc64le-kvm-import") - +c.add_compare("--arch ppc64 --machine pseries --connect %(URI-KVM-PPC64LE)s --disk %(EXISTIMG1)s --disk %(EXISTIMG3)s,device=cdrom --os-variant fedora22", "ppc64le-cdrom-f22") # s390x tests c.add_compare("--arch s390x --machine s390-ccw-virtio --connect %(URI-KVM-S390X)s --boot kernel=/kernel.img,initrd=/initrd.img --disk %(EXISTIMG1)s --disk %(EXISTIMG3)s,device=cdrom --os-variant fedora21", "s390x-cdrom") c.add_compare("--arch s390x --machine s390-ccw-virtio --connect %(URI-KVM-S390X-KVMIBM)s --boot kernel=/kernel.img,initrd=/initrd.img --disk %(EXISTIMG1)s --disk %(EXISTIMG3)s,device=cdrom --os-variant fedora21 --watchdog diag288,action=reset", "s390x-cdrom-KVMIBM") diff --git a/virtinst/guest.py b/virtinst/guest.py index 6284b1f..f075345 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -1125,6 +1125,9 @@ class Guest(XMLBuilder): "Using vnc.") gtype = "vnc" +if self.os.is_ppc64(): +gtype = "vnc" + gfx.type = gtype for dev in self.get_devices("graphics"): ACK. Regards. - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager][PATCH v1 2/2] Modify the xml file for the virt-install for ppc64le
On 12/15/2015 09:06 PM, Kevin Zhao wrote: Modify the xml file for virt-install of ppc64le for importing existing image using KVM.Because the spice devices has not been supported by powerpc64 and powerpc64le,the only supporting graphic device is vnc. Signed-off-by: Kevin Zhao--- .../compare/virt-install-ppc64le-kvm-import.xml | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml b/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml index 7a3d4c2..5166f03 100644 --- a/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml +++ b/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml @@ -23,21 +23,10 @@ - - - + - - - - - - - - - ACK. Regards. - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager v2] details: show Channel label by device type
On 11/11/2015 10:50 PM, Cole Robinson wrote: On 11/11/2015 07:26 AM, Chen Hanxiao wrote: From: Chen Hanxiao <chenhanx...@gmail.com> Currently we show channel label by its name. If we use name com.redhat.spice.0 but set it as unix socket, the label in details keep unchanged. This patch will set label according to device type if we failed matching target_name Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v2: use device type when failed to match target name. virtManager/details.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtManager/details.py b/virtManager/details.py index 71ba39d..d0e8dc8 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -214,6 +214,8 @@ def _label_for_device(dev): if devtype == "channel": label = _("Channel") name = dev.pretty_channel_name(dev.target_name) +if not name: +name = dev.pretty_type(dev.type) if name: label += " %s" % name return label Ah okay that looks fine, ACK Pushed, thanks. - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager v2] details: show Channel label by device type
From: Chen Hanxiao <chenhanx...@gmail.com> Currently we show channel label by its name. If we use name com.redhat.spice.0 but set it as unix socket, the label in details keep unchanged. This patch will set label according to device type if we failed matching target_name Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- v2: use device type when failed to match target name. virtManager/details.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtManager/details.py b/virtManager/details.py index 71ba39d..d0e8dc8 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -214,6 +214,8 @@ def _label_for_device(dev): if devtype == "channel": label = _("Channel") name = dev.pretty_channel_name(dev.target_name) +if not name: +name = dev.pretty_type(dev.type) if name: label += " %s" % name return label -- 1.9.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [PATCH] details: show Channel label by device type
From: Chen Hanxiao <chenhanx...@gmail.com> Currently we show channel label by its name. If we use name com.redhat.spice.0 but set it as unix socket, the label in details keep unchanged. This patch will set label according to device type. Signed-off-by: Chen Hanxiao <chenhanx...@gmail.com> --- virtManager/details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtManager/details.py b/virtManager/details.py index 742448d..b1f2662 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -213,7 +213,7 @@ def _label_for_device(dev): if devtype == "channel": label = _("Channel") -name = dev.pretty_channel_name(dev.target_name) +name = dev.pretty_type(dev.type) if name: label += " %s" % name return label -- 1.9.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] cli: fix a comment typo
s/uncoditionally/unconditionally Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- Note: pushed as trivial. virtinst/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtinst/cli.py b/virtinst/cli.py index 457368d..22123d8 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -101,7 +101,7 @@ class VirtStreamHandler(logging.StreamHandler): def emit(self, record): Based on the StreamHandler code from python 2.6: ripping out all -the unicode handling and just uncoditionally logging seems to fix +the unicode handling and just unconditionally logging seems to fix logging backtraces with unicode locales (for me at least). No doubt this is atrocious, but it WORKSFORME! -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] How to make virt-manager targets the correct qemu emulators
Hi, From: virt-tools-list-boun...@redhat.com [mailto:virt-tools-list-boun...@redhat.com] On Behalf Of Gabriel Laupre Sent: Thursday, June 25, 2015 9:35 AM To: virt-tools-list@redhat.com Subject: [virt-tools-list] How to make virt-manager targets the correct qemu emulators Hello, I have an old version of qemu installed under the path /usr/bin/. I am using a Centos 7 machine. I just got the last qemu code and made some modifications, recompiled it and I have my qemu emulators under /usr/local/bin. When I launch the virt-manager, it seems that it targets the old one under /usr/bin/ and I want to change that the virt-manager will use my new one under /usr/local/bin. Where can I specify this information? You could: 1) virsh edit $YOU_VM 2) find this: emulator/usr/bin/qemu-kvm/emulator 3) change it to emulator/usr/local/bin/qemu-kvm/emulator 4) you may need to disabled your selinux vim /etc/selinux/config Hope this could help. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] addhardware: fix a chaotic widget naming
char-mode: should be an entry char-bind-host: should be an ComboBox We mixed them, and much of the code use the improper naming, but at least one got lost. How to find: Add Hardware-Serial-Tcp net console, you could find that short-cut for 'Mode' missing :) Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- ui/addhardware.ui | 6 +++--- virtManager/addhardware.py | 18 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ui/addhardware.ui b/ui/addhardware.ui index a42f840..7ef9134 100644 --- a/ui/addhardware.ui +++ b/ui/addhardware.ui @@ -790,7 +790,7 @@ /packing /child child - object class=GtkComboBox id=char-mode + object class=GtkComboBox id=char-bind-host property name=visibleTrue/property property name=can_focusFalse/property property name=halignstart/property @@ -855,7 +855,7 @@ property name=can_focusFalse/property property name=spacing6/property child - object class=GtkEntry id=char-bind-host + object class=GtkEntry id=char-mode property name=visibleTrue/property property name=can_focusTrue/property /object @@ -947,7 +947,7 @@ property name=xalign0/property property name=label translatable=yes_Bind Host:/property property name=use_underlineTrue/property -property name=mnemonic_widgetchar-mode/property +property name=mnemonic_widgetchar-bind-host/property /object packing property name=left_attach0/property diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py index 7607529..cd1e855 100644 --- a/virtManager/addhardware.py +++ b/virtManager/addhardware.py @@ -260,16 +260,16 @@ class vmmAddHardware(vmmGObjectUI): video_dev = self.widget(video-model) self.build_video_combo(self.vm, video_dev) -# Character dev mode -char_mode = self.widget(char-mode) +# Character bind host mode +char_bind_host = self.widget(char-bind-host) # Mode name, desc -char_mode_model = Gtk.ListStore(str, str) -char_mode.set_model(char_mode_model) -uiutil.init_combo_text_column(char_mode, 1) -char_mode_model.set_sort_column_id(0, Gtk.SortType.ASCENDING) +char_bind_host_model = Gtk.ListStore(str, str) +char_bind_host.set_model(char_bind_host_model) +uiutil.init_combo_text_column(char_bind_host, 1) +char_bind_host_model.set_sort_column_id(0, Gtk.SortType.ASCENDING) for t in VirtualSerialDevice.MODES: desc = VirtualSerialDevice.pretty_mode(t) -char_mode_model.append([t, desc + (%s) % t]) +char_bind_host_model.append([t, desc + (%s) % t]) # Char target type lst = self.widget(char-target-type) @@ -447,7 +447,7 @@ class vmmAddHardware(vmmGObjectUI): self.widget(char-channel).set_text() self.widget(char-host).set_text(127.0.0.1) self.widget(char-port).set_value(4555) -self.widget(char-bind-host).set_text(127.0.0.1) +self.widget(char-mode).set_text(127.0.0.1) self.widget(char-bind-port).set_value(4556) self.widget(char-use-telnet).set_active(False) self.widget(char-auto-socket).set_active(True) @@ -1674,7 +1674,7 @@ class vmmAddHardware(vmmGObjectUI): source_channel = self.widget(char-channel).get_text() source_mode = uiutil.get_list_selection(modebox) source_host = self.widget(char-host).get_text() -bind_host = self.widget(char-bind-host).get_text() +bind_host = self.widget(char-mode).get_text() source_port = self.widget(char-port).get_value() bind_port = self.widget(char-bind-port).get_value() target_name = self.widget(char-target-name).get_child().get_text() -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH v2 1/2] clitest: upated virt-xml test --console target_type from serial to sclp
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Tuesday, June 09, 2015 5:44 AM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH v2 1/2] clitest: upated virt-xml test --console target_type from serial to sclp On 06/07/2015 10:55 PM, Chen Hanxiao wrote: libvirt commit: 8728a78e904de7ddfa32b7761b40d6339fa15030 Always add 'console' matching the 'serial' device If --console target_type=serial, nothing changed. We had to update the test case. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com Thanks, but these patches are still a bit less than ideal, since they change the test suite to _only_ work with very recent libvirt.git I pushed a similar change that fixes the test suite to work both before and after the libvirt.git change. Thanks, your patch is more close to the design of that libvirt's commit. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH v2 1/2] clitest: upated virt-xml test --console target_type from serial to sclp
libvirt commit: 8728a78e904de7ddfa32b7761b40d6339fa15030 Always add 'console' matching the 'serial' device If --console target_type=serial, nothing changed. We had to update the test case. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: keep the case and change --console target_type from serial to sclp tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml | 12 +++- tests/clitest.py| 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml index 7bf3a19..4818ed3 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml @@ -1,11 +1,13 @@ + source path=/tmp/foo.log/ target port=0/ /parallel - console type=pty -- target type=virtio port=0/ -+ target type=serial port=0/ +-console type=null +- target type=serial port=0/ ++console type=pty ++ target type=sclp port=0/ /console - channel type=pipe - source path=/tmp/guestfwd/ + console type=pty + target type=virtio port=1/ Domain 'test-for-virtxml' defined successfully. Changes will take effect after the next domain shutdown. \ No newline at end of file diff --git a/tests/clitest.py b/tests/clitest.py index 056ec4a..97e73ab 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -816,7 +816,7 @@ c.add_compare(--memballoon model=none, edit-simple-memballoon) c.add_compare(--serial pty, edit-simple-serial) c.add_compare(--parallel unix,path=/some/other/log, edit-simple-parallel) c.add_compare(--channel null, edit-simple-channel) -c.add_compare(--console target_type=serial, edit-simple-console) +c.add_compare(--console char_type=pty,target_type=sclp, edit-simple-console) c.add_compare(--filesystem /1/2/3,/4/5/6,mode=mapped, edit-simple-filesystem) c.add_compare(--video cirrus, edit-simple-video, compare_check=support.SUPPORT_CONN_VIDEO_NEW_RAM_OUTPUT) c.add_compare(--sound pcspk, edit-simple-soundhw) -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH v2 2/2] test: update test xml
test output xml upated according to libvirt commit: 8728a78e904de7ddfa32b7761b40d6339fa15030 Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml | 2 +- tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml index 2935216..84b4a88 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml @@ -1,5 +1,5 @@ console type=pty - target type=virtio port=0/ + target type=virtio port=1/ /console -channel type=pipe +channel type=null diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml index ca2c811..8513c0e 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml @@ -7,7 +7,7 @@ + source path=/some/other/log/ target port=0/ /parallel - console type=pty + console type=null Domain 'test-for-virtxml' defined successfully. Changes will take effect after the next domain shutdown. \ No newline at end of file -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH 1/2] clitest: remove virt-xml test --console target_type=serial
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Saturday, June 06, 2015 6:09 AM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH 1/2] clitest: remove virt-xml test --console target_type=serial On 06/04/2015 11:14 PM, Chen Hanxiao wrote: libvirt commit: 8728a78e904de7ddfa32b7761b40d6339fa15030 Always add 'console' matching the 'serial' device We don't need this test since then. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/clitest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/clitest.py b/tests/clitest.py index 056ec4a..9e7026a 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -816,7 +816,6 @@ c.add_compare(--memballoon model=none, edit-simple-memballoon) c.add_compare(--serial pty, edit-simple-serial) c.add_compare(--parallel unix,path=/some/other/log, edit-simple-parallel) c.add_compare(--channel null, edit-simple-channel) -c.add_compare(--console target_type=serial, edit-simple-console) c.add_compare(--filesystem /1/2/3,/4/5/6,mode=mapped, edit-simple-filesystem) c.add_compare(--video cirrus, edit-simple-video, compare_check=support.SUPPORT_CONN_VIDEO_NEW_RAM_OUTPUT) c.add_compare(--sound pcspk, edit-simple-soundhw) Did that libvirt commit break our test suite? If so, we should just change the test options so it _doesn't_ break. The idea of that test case is to make sure virt-xml --console works. So maybe adjust it to edit --console name=$foo or something Yes, it breaks our test suite. With that libvirt commit, serial console will be added automatically. I'll update the test cases with another tartget_type. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 2/2] test: update test xml
remove virt-xml-edit-simple-console.xml Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml | 2 +- tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml | 11 --- tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml index 2935216..84b4a88 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml @@ -1,5 +1,5 @@ console type=pty - target type=virtio port=0/ + target type=virtio port=1/ /console -channel type=pipe +channel type=null diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml deleted file mode 100644 index 7bf3a19..000 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml +++ /dev/null @@ -1,11 +0,0 @@ - target port=0/ - /parallel - console type=pty -- target type=virtio port=0/ -+ target type=serial port=0/ - /console - channel type=pipe - source path=/tmp/guestfwd/ - -Domain 'test-for-virtxml' defined successfully. -Changes will take effect after the next domain shutdown. \ No newline at end of file diff --git a/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml b/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml index ca2c811..8513c0e 100644 --- a/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml +++ b/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml @@ -7,7 +7,7 @@ + source path=/some/other/log/ target port=0/ /parallel - console type=pty + console type=null Domain 'test-for-virtxml' defined successfully. Changes will take effect after the next domain shutdown. \ No newline at end of file -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 1/2] clitest: remove virt-xml test --console target_type=serial
libvirt commit: 8728a78e904de7ddfa32b7761b40d6339fa15030 Always add 'console' matching the 'serial' device We don't need this test since then. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/clitest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/clitest.py b/tests/clitest.py index 056ec4a..9e7026a 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -816,7 +816,6 @@ c.add_compare(--memballoon model=none, edit-simple-memballoon) c.add_compare(--serial pty, edit-simple-serial) c.add_compare(--parallel unix,path=/some/other/log, edit-simple-parallel) c.add_compare(--channel null, edit-simple-channel) -c.add_compare(--console target_type=serial, edit-simple-console) c.add_compare(--filesystem /1/2/3,/4/5/6,mode=mapped, edit-simple-filesystem) c.add_compare(--video cirrus, edit-simple-video, compare_check=support.SUPPORT_CONN_VIDEO_NEW_RAM_OUTPUT) c.add_compare(--sound pcspk, edit-simple-soundhw) -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] createinterface: fix a typo
s/selectabel/selectable Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- Note: pushed as trivial. virtManager/createinterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py index ab2d8ed..2e0cdb8 100644 --- a/virtManager/createinterface.py +++ b/virtManager/createinterface.py @@ -211,7 +211,7 @@ class vmmCreateInterface(vmmGObjectUI): # Parent/slave Interface list slave_list = self.widget(interface-list) -# [ vmmInterface, selected, selectabel, name, type, is defined, +# [ vmmInterface, selected, selectable, name, type, is defined, # is active, in use by str, mac] slave_model = Gtk.ListStore(object, bool, bool, str, str, bool, bool, str, str) -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] virt-manager mirror on github, eventually transition?
-Original Message- From: virt-tools-list-boun...@redhat.com [mailto:virt-tools-list-boun...@redhat.com] On Behalf Of Cole Robinson Sent: Friday, May 22, 2015 8:48 AM To: virt-tools-list Subject: [virt-tools-list] virt-manager mirror on github, eventually transition? Hey all, I set up a virt-manager mirror on github: https://github.com/virt-manager/virt-manager Right now it's just updated from the fedorahosted repo using a cron script, so it's just a readonly mirror. However I'd like to fully transition to using github for source hosting in the near term. Reasons being: 1) github is way faster than fedorahosted 2) the network effect is real, I'm quite certain it will generate contributions we wouldn't have otherwise received 3) there's tons of valuable services built around github, like travis-ci I figure bug tracking will stay in bugzilla, though maybe we keep github issues enabled to give people an easier way to report small bugs. Anything that can't be fixed basically on demand we ask the reporter to file it in bugzilla. Probably needs some experimentation pull-requests can't be disabled on github, but I think it's okay to handle them in a similar way: if someone submits a small patch, then one of the other maintainers can just merge it. but if it's anything non-trival, close the pull request and ask they submit it to the mailing list. That's great! We would had more developers. One question If we could merge trivial PR in github, do we had sync mechanism for fedorahosted and github? Also, see decription of Rich's libguestfs on github: ''' library and tools for accessing and modifying virtual machine disk images. PLEASE DO NOT USE GITHUB FOR ISSUES OR PULL REQUESTS. See the website for how to file a bug or contact us. http://libguestfs.org ''' But we should give it a try. Hope this will not bring much extra work to Cole :) Regards - Chen Any objections? - Cole ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager] commit 5219e49e causes virt-manager hang
-Original Message- From: virt-tools-list-boun...@redhat.com [mailto:virt-tools-list-boun...@redhat.com] On Behalf Of Lin Ma Sent: Wednesday, May 20, 2015 3:19 PM To: crobi...@redhat.com; virt-tools-list@redhat.com Subject: [virt-tools-list] [virt-manager] commit 5219e49e causes virt-manager hang Hi Cole, It seems that commit 5219e49e caused virt-manager to infinite recursion in certain cases. e.g: create new vm - local install media - select an iso(says fedora 21 Server), Then the virt-manager hangs. Not sure whether the following changes make sense, just FYI: (actually I dont know which scenario meets the both of condition: 'if nothing is selected' and 'the widget is a combo box with a text entry') Same issue occur on my Fedora21 host. This patch works for me. Tested-by: Chen Hanxiao chenhanx...@cn.fujitsu.com Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] tests: fix test cases failed by 'vmport'
-Original Message- From: Giuseppe Scrivano [mailto:gscri...@redhat.com] Sent: Monday, May 11, 2015 4:43 PM To: Chen, Hanxiao/陈 晗霄 Cc: virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] tests: fix test cases failed by 'vmport' Chen Hanxiao chenhanx...@cn.fujitsu.com writes: Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/cli-test-xml/compare/virt-convert-ovf-compare.xml| 1 + tests/cli-test-xml/compare/virt-convert-vmx-compare.xml| 1 + tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml | 1 + tests/cli-test-xml/compare/virt-install-kvm-centos7.xml| 2 ++ tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml| 2 ++ tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml | 2 ++ tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml | 2 ++ tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml | 3 +++ tests/cli-test-xml/compare/virt-install-location-iso.xml | 2 ++ tests/cli-test-xml/compare/virt-install-many-devices.xml | 1 + tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml | 1 + tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml | 1 + tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml | 1 + tests/cli-test-xml/compare/virt-install-q35-defaults.xml | 2 ++ tests/cli-test-xml/compare/virt-install-qemu-plain.xml | 1 + tests/cli-test-xml/compare/virt-install-singleton-config-1.xml | 1 + tests/cli-test-xml/compare/virt-install-win7-uefi.xml | 3 +++ tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt | 1 + tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt | 1 + .../virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 | 1 + tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt| 1 + 25 files changed, 35 insertions(+) ACK Pushed, thanks. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] tests: fix test cases failed by 'vmport'
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/cli-test-xml/compare/virt-convert-ovf-compare.xml| 1 + tests/cli-test-xml/compare/virt-convert-vmx-compare.xml| 1 + tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml | 1 + tests/cli-test-xml/compare/virt-install-kvm-centos7.xml| 2 ++ tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml| 2 ++ tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml | 2 ++ tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml | 2 ++ tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml | 3 +++ tests/cli-test-xml/compare/virt-install-location-iso.xml | 2 ++ tests/cli-test-xml/compare/virt-install-many-devices.xml | 1 + tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml | 1 + tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml | 1 + tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml | 1 + tests/cli-test-xml/compare/virt-install-q35-defaults.xml | 2 ++ tests/cli-test-xml/compare/virt-install-qemu-plain.xml | 1 + tests/cli-test-xml/compare/virt-install-singleton-config-1.xml | 1 + tests/cli-test-xml/compare/virt-install-win7-uefi.xml | 3 +++ tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt | 1 + tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt | 1 + .../virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 | 1 + tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw | 1 + tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt| 1 + 25 files changed, 35 insertions(+) diff --git a/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml b/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml index bcdf991..0d8556d 100644 --- a/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml +++ b/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml @@ -13,6 +13,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=custom match=exact modelOpteron_G4/model diff --git a/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml b/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml index 8ada025..d5a0714 100644 --- a/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml +++ b/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml @@ -12,6 +12,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=custom match=exact modelOpteron_G4/model diff --git a/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml b/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml index 15ba910..735181c 100644 --- a/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml +++ b/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml @@ -12,6 +12,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=custom match=exact modelOpteron_G4/model diff --git a/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml index 5189aec..92105c1 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml @@ -13,6 +13,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=custom match=exact modelOpteron_G4/model @@ -85,6 +86,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=custom match=exact modelOpteron_G4/model diff --git a/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml b/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml index fad4a38..d70b4fa 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml @@ -14,6 +14,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=host-model/ clock offset=utc @@ -73,6 +74,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=host-model/ clock offset=utc diff --git a/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml index 5189aec..92105c1 100644 --- a/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml +++ b/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml @@ -13,6 +13,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=custom match=exact modelOpteron_G4/model @@ -85,6 +86,7 @@ acpi/ apic/ pae/ +vmport state=off/ /features cpu mode=custom match=exact
Re: [virt-tools-list] [PATCH virt-manager] sshtunnels: use ipaddr to check if address is loopback or unspecified
-Original Message- From: virt-tools-list-boun...@redhat.com [mailto:virt-tools-list-boun...@redhat.com] On Behalf Of Giuseppe Scrivano Sent: Friday, April 24, 2015 5:12 PM To: virt-tools-list@redhat.com Subject: [virt-tools-list] [PATCH virt-manager] sshtunnels: use ipaddr to check if address is loopback or unspecified It supports IPv6 addresses written as 0::0, 0:0::0. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- virtManager/sshtunnels.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) ACK. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] virt-manager default storage values customization
Hi, Evanghelos From: virt-tools-list-boun...@redhat.com [mailto:virt-tools-list-boun...@redhat.com] On Behalf Of Evanghelos Papaioannu Sent: Monday, March 30, 2015 2:14 PM To: virt-tools-list@redhat.com Subject: [virt-tools-list] virt-manager default storage values customization Hi everybody, is it possible to configure virt-manager (0.9.5-1) so that when an operator adds storage: * add hardware * storage the default value for Cache mode is none? Please use upstream virt-manager J At the beginning I thought there were a default config file to modify, but after spending several time researching I came to the conclusion that the only way is to modify the code of virt-manager. We had a edit-preference (virtManager/preferences.py) to do such kind of job. Unfortunately I'm new to python. I think some modification have to be made in files * addhardware.py (line 632) * createvol.py But I have no idea how to proceed ... Do you have any advice? Thank you very much for your support. Evan See build_disk_cache_combo in virtManager/addhardware.py: _iter = model.insert(0, [None, default]) If you really want to change the cache mode of lots of storage, *virsh edit* may be a better choice than “Add Hardware- Storage” If you want really want to do that, you need to 1) change ui 2) change virtManager/addhardware.py, virtManager/preferences.py etc. I wonder whether it worth to do this. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] details: change duplicated short-key 'd' to 'e' on Overview tab
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Tuesday, March 17, 2015 2:57 AM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] details: change duplicated short-key 'd' to 'e' on Overview tab On 03/16/2015 01:33 AM, Chen Hanxiao wrote: add hardware also use 'd' as its short-key. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- ui/details.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/details.ui b/ui/details.ui index 6804124..19c2f32 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -814,7 +814,7 @@ property name=can_focusFalse/property property name=xalign0/property property name=yalign0/property -property name=label translatable=yes_Description:/property +property name=label translatable=yesD_escription:/property property name=use_underlineTrue/property property name=mnemonic_widgetoverview-description/property /object ACK Pushed, thanks guys. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] details: change duplicated short-key 'd' to 'e' on Overview tab
add hardware also use 'd' as its short-key. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- ui/details.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/details.ui b/ui/details.ui index 6804124..19c2f32 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -814,7 +814,7 @@ property name=can_focusFalse/property property name=xalign0/property property name=yalign0/property -property name=label translatable=yes_Description:/property +property name=label translatable=yesD_escription:/property property name=use_underlineTrue/property property name=mnemonic_widgetoverview-description/property /object -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH v2 0/2] add btrfs COW copy support for virt-clone
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Saturday, February 07, 2015 3:55 AM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH v2 0/2] add btrfs COW copy support for virt-clone On 01/29/2015 10:50 PM, Chen Hanxiao wrote: v2: modified based on Cole's comments: add reflink property to cloner and storage add flag check to support.py fix man page typo Chen Hanxiao (2): virt-clone: introduce --reflink for btrfs COW copy man: add man page for virt-clone --reflink man/virt-clone.pod | 6 ++ virt-clone | 4 virtinst/cloner.py | 9 + virtinst/storage.py | 15 +++ virtinst/support.py | 3 +++ 5 files changed, 37 insertions(+) ACK series Pushed, thanks. - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH 1/3] virt-clone: introduce --reflink for btrfs COW copy
-Original Message- From: Giuseppe Scrivano [mailto:gscri...@redhat.com] Sent: Wednesday, January 28, 2015 5:21 PM To: Chen, Hanxiao/陈 晗霄 Cc: virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH 1/3] virt-clone: introduce --reflink for btrfs COW copy Chen Hanxiao chenhanx...@cn.fujitsu.com writes: libvirt commit 466b29c8c3593b2dac92acad5dd8ec923c428259 introduce btrfsCloneFile() for COW copy. This patch add support for --reflink option for virt-clone. When specified --reflink, if src and dst images all on a btrfs fs, we could take advantage of COW copy. If not, error out. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- virt-clone | 4 +++- virtinst/cloner.py | 5 +++-- virtinst/devicedisk.py | 4 ++-- virtinst/diskbackend.py | 14 -- virtinst/storage.py | 5 - 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/virtinst/storage.py b/virtinst/storage.py index bdbd064..fe7f9cb 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -723,7 +723,7 @@ class StorageVolume(_StorageObject): setting allocation equal to capacity)) self.allocation = self.capacity -def install(self, meter=None): +def install(self, meter=None, reflink=None): Build and install storage volume from xml @@ -748,6 +748,9 @@ class StorageVolume(_StorageObject): self.conn.SUPPORT_POOL_METADATA_PREALLOC, self.pool)): createflags |= libvirt.VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA +if reflink: +cloneflags |= libvirt.VIR_STORAGE_VOL_CREATE_REFLINK + you should check that the VIR_STORAGE_VOL_CREATE_REFLINK flag is defined before using it. You can do this in support.py. Right, thanks for your remind. Regards, -Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH 1/3] virt-clone: introduce --reflink for btrfs COW copy
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Thursday, January 29, 2015 3:02 AM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH 1/3] virt-clone: introduce --reflink for btrfs COW copy On 01/27/2015 11:12 PM, Chen Hanxiao wrote: libvirt commit 466b29c8c3593b2dac92acad5dd8ec923c428259 introduce btrfsCloneFile() for COW copy. This patch add support for --reflink option for virt-clone. When specified --reflink, if src and dst images all on a btrfs fs, we could take advantage of COW copy. If not, error out. Rather than pass reflink to disk.setup() and have to alter the call in a ton of places, I'd recommend: - Add a property StorageVolume.reflink. If it's set, use the REFLINK flag when creating the volume. - Add a property Cloner.reflink - Cloner should also get this: diff --git a/virtinst/cloner.py b/virtinst/cloner.py index 5e76413..9ccb97a 100644 --- a/virtinst/cloner.py +++ b/virtinst/cloner.py @@ -343,6 +343,7 @@ class Cloner(object): clone_vol_install.input_vol = orig_disk.get_vol_object() vol_install = clone_vol_install +vol_install.reflink = self.reflink clone_disk.set_vol_install(vol_install) elif orig_disk.path: clone_disk.set_local_disk_to_clone(orig_disk, self.clone_sparse) That's simpler, and closer to existing code conventions. Thanks for the comments, that's a much better solution. I'll send a v2 patch soon. Regards, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH 3/3] man: add man page for virt-clone --reflink
-Original Message- From: Giuseppe Scrivano [mailto:gscri...@redhat.com] Sent: Wednesday, January 28, 2015 5:25 PM To: Chen, Hanxiao/陈 晗霄 Cc: virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH 3/3] man: add man page for virt-clone --reflink Chen Hanxiao chenhanx...@cn.fujitsu.com writes: +=item --reflink + +When --reflink is specified, perform a lightweight copy. This is much faster +if source images and destination iamges are all on the same btrfs filesystem. +If COW copy is not possible, then virt-clone error out. + =back s/iamges/images/ s/error out/fails/ Sorry for that mistakes. Thanks, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH v2 1/2] virt-clone: introduce --reflink for btrfs COW copy
libvirt commit 466b29c8c3593b2dac92acad5dd8ec923c428259 introduce btrfsCloneFile() for COW copy. This patch add support for --reflink option for virt-clone. When specified --reflink, if src and dst images all on a btrfs fs, we could take advantage of COW copy. If not, error out. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- v2: rewrite patch based on Cole's sugguestion. virt-clone | 4 virtinst/cloner.py | 9 + virtinst/storage.py | 15 +++ virtinst/support.py | 3 +++ 4 files changed, 31 insertions(+) diff --git a/virt-clone b/virt-clone index e6699a0..3fc6a17 100755 --- a/virt-clone +++ b/virt-clone @@ -120,6 +120,8 @@ def parse_args(): geng.add_argument(-n, --name, dest=new_name, help=_(Name for the new guest)) geng.add_argument(-u, --uuid, dest=new_uuid, help=argparse.SUPPRESS) +geng.add_argument(--reflink, action=store_true, dest=reflink, +help=_(use btrfs COW lightweight copy)) stog = parser.add_argument_group(_(Storage Configuration)) stog.add_argument(-f, --file, dest=new_diskfile, action=append, @@ -178,6 +180,8 @@ def main(conn=None): get_clone_macaddr(options.new_mac, design) if options.new_uuid is not None: design.clone_uuid = options.new_uuid +if options.reflink is True: +design.reflink = True for i in options.target or []: design.force_target = i design.clone_sparse = options.sparse diff --git a/virtinst/cloner.py b/virtinst/cloner.py index 5e76413..68a5786 100644 --- a/virtinst/cloner.py +++ b/virtinst/cloner.py @@ -63,6 +63,7 @@ class Cloner(object): self._preserve = True self._clone_running = False self._replace = False +self._reflink = False # Default clone policy for back compat: don't clone readonly, # shareable, or empty disks @@ -259,6 +260,13 @@ class Cloner(object): replace = property(_get_replace, _set_replace, doc=If enabled, don't check for clone name collision, simply undefine any conflicting guest.) +def _get_reflink(self): +return self._reflink +def _set_reflink(self, reflink): +self._reflink = reflink +reflink = property(_get_reflink, _set_reflink, +doc=If true, use COW lightweight copy) + # Functional methods def setup_original(self): @@ -343,6 +351,7 @@ class Cloner(object): clone_vol_install.input_vol = orig_disk.get_vol_object() vol_install = clone_vol_install +vol_install.reflink = self.reflink clone_disk.set_vol_install(vol_install) elif orig_disk.path: clone_disk.set_local_disk_to_clone(orig_disk, self.clone_sparse) diff --git a/virtinst/storage.py b/virtinst/storage.py index bdbd064..98e76f4 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -557,6 +557,7 @@ class StorageVolume(_StorageObject): self._input_vol = None self._pool = None self._pool_xml = None +self._reflink = False # Indicate that the volume installation has finished. Used to # definitively tell the storage progress thread to stop polling. @@ -597,6 +598,17 @@ class StorageVolume(_StorageObject): doc=_(virStorageVolume pointer to clone/use as input.)) +def _get_reflink(self): +return self._reflink +def _set_reflink(self, reflink): +if not self.conn.check_support(self.conn.SUPPORT_POOL_REFLINK): +raise ValueError(_(Creating storage by btrfs COW copy is + not supported by this libvirt version.)) + +self._reflink = reflink +reflink = property(_get_reflink, _set_reflink, +doc=flags for VIR_STORAGE_VOL_CREATE_REFLINK) + def sync_input_vol(self): # Pull parameters from input vol into this class parsevol = StorageVolume(self.conn, @@ -748,6 +760,9 @@ class StorageVolume(_StorageObject): self.conn.SUPPORT_POOL_METADATA_PREALLOC, self.pool)): createflags |= libvirt.VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA +if self.reflink: +cloneflags |= libvirt.VIR_STORAGE_VOL_CREATE_REFLINK + try: self._install_finished = False diff --git a/virtinst/support.py b/virtinst/support.py index 440be55..adc7410 100644 --- a/virtinst/support.py +++ b/virtinst/support.py @@ -340,6 +340,9 @@ SUPPORT_POOL_LISTALLVOLUMES = _make( SUPPORT_POOL_METADATA_PREALLOC = _make( flag=VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, version=1.0.1) +SUPPORT_POOL_REFLINK = _make( +flag=VIR_STORAGE_VOL_CREATE_REFLINK, +version=1.2.13) # Interface checks -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH v2 0/2] add btrfs COW copy support for virt-clone
v2: modified based on Cole's comments: add reflink property to cloner and storage add flag check to support.py fix man page typo Chen Hanxiao (2): virt-clone: introduce --reflink for btrfs COW copy man: add man page for virt-clone --reflink man/virt-clone.pod | 6 ++ virt-clone | 4 virtinst/cloner.py | 9 + virtinst/storage.py | 15 +++ virtinst/support.py | 3 +++ 5 files changed, 37 insertions(+) -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH v2 2/2] man: add man page for virt-clone --reflink
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- man/virt-clone.pod | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/virt-clone.pod b/man/virt-clone.pod index 04d2e68..533689a 100644 --- a/man/virt-clone.pod +++ b/man/virt-clone.pod @@ -119,6 +119,12 @@ No storage is cloned: disk images specific by --file are preserved as is, and referenced in the new clone XML. This is useful if you want to clone a VM XML template, but not the storage contents. +=item --reflink + +When --reflink is specified, perform a lightweight copy. This is much faster +if source images and destination images are all on the same btrfs filesystem. +If COW copy is not possible, then virt-clone fails. + =back =head2 Networking Configuration -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] connetion details: add short-keys for Virtual Networks
-Original Message- From: Giuseppe Scrivano [mailto:gscri...@redhat.com] Sent: Tuesday, January 27, 2015 9:05 PM To: Chen, Hanxiao/陈 晗霄 Cc: virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] connetion details: add short-keys for Virtual Networks Chen Hanxiao chenhanx...@cn.fujitsu.com writes: Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- ui/host.ui | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/host.ui b/ui/host.ui index cc5201b..15d6a2e 100644 --- a/ui/host.ui +++ b/ui/host.ui @@ -878,8 +878,9 @@ ACK if you s/connetion/connection/ in the first line of the commit message. I amended the commit message and pushed. Thanks, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 1/3] virt-clone: introduce --reflink for btrfs COW copy
libvirt commit 466b29c8c3593b2dac92acad5dd8ec923c428259 introduce btrfsCloneFile() for COW copy. This patch add support for --reflink option for virt-clone. When specified --reflink, if src and dst images all on a btrfs fs, we could take advantage of COW copy. If not, error out. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- virt-clone | 4 +++- virtinst/cloner.py | 5 +++-- virtinst/devicedisk.py | 4 ++-- virtinst/diskbackend.py | 14 -- virtinst/storage.py | 5 - 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/virt-clone b/virt-clone index e6699a0..1e189f8 100755 --- a/virt-clone +++ b/virt-clone @@ -120,6 +120,8 @@ def parse_args(): geng.add_argument(-n, --name, dest=new_name, help=_(Name for the new guest)) geng.add_argument(-u, --uuid, dest=new_uuid, help=argparse.SUPPRESS) +geng.add_argument(--reflink, action=store_true, dest=reflink, +help=_(use btrfs lightweight copy)) stog = parser.add_argument_group(_(Storage Configuration)) stog.add_argument(-f, --file, dest=new_diskfile, action=append, @@ -198,7 +200,7 @@ def main(conn=None): else: # start cloning meter = progress.TextMeter(fo=sys.stdout) -design.start_duplicate(meter) +design.start_duplicate(meter, options.reflink) print_stdout() print_stdout(_(Clone '%s' created successfully.) % design.clone_name) diff --git a/virtinst/cloner.py b/virtinst/cloner.py index 5e76413..7d1ef3e 100644 --- a/virtinst/cloner.py +++ b/virtinst/cloner.py @@ -415,7 +415,7 @@ class Cloner(object): self.setup_original() self.setup_clone() -def start_duplicate(self, meter=None): +def start_duplicate(self, meter=None, reflink=None): Actually perform the duplication: cloning disks if needed and defining the new clone xml. @@ -436,7 +436,8 @@ class Cloner(object): if self.preserve: for dst_dev in self.clone_disks: -dst_dev.setup(meter=meter) +# seed for test reflink +dst_dev.setup(meter=meter, reflink=reflink) except Exception, e: logging.debug(Duplicate failed: %s, str(e)) if dom: diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py index ac03716..813cbfe 100644 --- a/virtinst/devicedisk.py +++ b/virtinst/devicedisk.py @@ -857,7 +857,7 @@ class VirtualDisk(VirtualDevice): self._storage_backend.validate(self) -def setup(self, meter=None): +def setup(self, meter=None, reflink=None): Build storage (if required) @@ -872,7 +872,7 @@ class VirtualDisk(VirtualDevice): if not self._storage_backend.will_create_storage(): return -vol_object = self._storage_backend.create(meter) +vol_object = self._storage_backend.create(meter, reflink) if not vol_object: return diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py index 2bcd064..2e1250a 100644 --- a/virtinst/diskbackend.py +++ b/virtinst/diskbackend.py @@ -202,7 +202,7 @@ class _StorageBase(object): # Storage creation routines def is_size_conflict(self): raise NotImplementedError() -def create(self, progresscb): +def create(self, progresscb, reflink): raise NotImplementedError() def will_create_storage(self): raise NotImplementedError() @@ -226,7 +226,7 @@ class _StorageCreator(_StorageBase): # Public API # ## -def create(self, progresscb): +def create(self, progresscb, reflink): raise NotImplementedError() def get_path(self): @@ -341,7 +341,8 @@ class CloneStorageCreator(_StorageCreator): ((need / (1024 * 1024)), (avail / (1024 * 1024 return (ret, msg) -def create(self, progresscb): +def create(self, progresscb, reflink): +ignore = reflink text = (_(Cloning %(srcfile)s) % {'srcfile' : os.path.basename(self._input_path)}) @@ -432,8 +433,8 @@ class ManagedStorageCreator(_StorageCreator): self._pool = vol_install.pool self._vol_install = vol_install -def create(self, progresscb): -return self._vol_install.install(meter=progresscb) +def create(self, progresscb, reflink=None): +return self._vol_install.install(meter=progresscb, reflink=reflink) def is_size_conflict(self): return self._vol_install.is_size_conflict() @@ -573,7 +574,8 @@ class StorageBackend(_StorageBase): return (False, None) def will_create_storage(self): return False -def create(self, progresscb): +def create(self, progresscb, reflink): ignore = progresscb +ignore = reflink raise RuntimeError(programming error: %s can't create storage % self.__class__.__name__) diff --git
[virt-tools-list] [virt-manager PATCH 2/3] devicedisk: disable arguments-differ pylint check for setup()
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- virtinst/devicedisk.py | 1 + 1 file changed, 1 insertion(+) diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py index 813cbfe..153138e 100644 --- a/virtinst/devicedisk.py +++ b/virtinst/devicedisk.py @@ -857,6 +857,7 @@ class VirtualDisk(VirtualDevice): self._storage_backend.validate(self) +# pylint: disable=arguments-differ def setup(self, meter=None, reflink=None): Build storage (if required) -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 0/3] add btrfs COW copy support for virt-clone
Chen Hanxiao (3): virt-clone: introduce --reflink for btrfs COW copy devicedisk: disable arguments-differ pylint check for setup() man: add man page for virt-clone --reflink man/virt-clone.pod | 6 ++ virt-clone | 4 +++- virtinst/cloner.py | 5 +++-- virtinst/devicedisk.py | 5 +++-- virtinst/diskbackend.py | 14 -- virtinst/storage.py | 5 - 6 files changed, 27 insertions(+), 12 deletions(-) -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH 3/3] man: add man page for virt-clone --reflink
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- man/virt-clone.pod | 6 ++ 1 file changed, 6 insertions(+) diff --git a/man/virt-clone.pod b/man/virt-clone.pod index 04d2e68..d307ee1 100644 --- a/man/virt-clone.pod +++ b/man/virt-clone.pod @@ -119,6 +119,12 @@ No storage is cloned: disk images specific by --file are preserved as is, and referenced in the new clone XML. This is useful if you want to clone a VM XML template, but not the storage contents. +=item --reflink + +When --reflink is specified, perform a lightweight copy. This is much faster +if source images and destination iamges are all on the same btrfs filesystem. +If COW copy is not possible, then virt-clone error out. + =back =head2 Networking Configuration -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] connetion details: add short-keys for Virtual Networks
Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- ui/host.ui | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/host.ui b/ui/host.ui index cc5201b..15d6a2e 100644 --- a/ui/host.ui +++ b/ui/host.ui @@ -878,8 +878,9 @@ object class=GtkLabel id=label27 property name=visibleTrue/property property name=can_focusFalse/property -property name=label translatable=yeslt;bgt;IPv4 configurationlt;/bgt;/property +property name=label translatable=yeslt;bgt;_IPv4 configurationlt;/bgt;/property property name=use_markupTrue/property +property name=use_underlineTrue/property /object /child /object @@ -1050,10 +1051,11 @@ property name=orientationvertical/property child object class=GtkCheckButton id=net-qos-inbound-enable -property name=label translatable=yesEnable inbound QoS/property +property name=label translatable=yesEnable i_nbound QoS/property property name=visibleTrue/property property name=can_focusTrue/property property name=receives_defaultFalse/property +property name=use_underlineTrue/property property name=xalign0/property property name=draw_indicatorTrue/property signal name=toggled handler=on_net_qos_inbound_enable_toggled swapped=no/ @@ -1148,10 +1150,11 @@ /child child object class=GtkCheckButton id=net-qos-outbound-enable -property name=label translatable=yesEnable outbound QoS/property +property name=label translatable=yesEnable ou_tbound QoS/property property name=visibleTrue/property property name=can_focusTrue/property property name=receives_defaultFalse/property +property name=use_underlineTrue/property property name=xalign0/property property name=draw_indicatorTrue/property signal name=toggled handler=on_net_qos_outbound_enable_toggled swapped=no/ @@ -1250,8 +1253,9 @@ object class=GtkLabel id=label38 property name=visibleTrue/property property name=can_focusFalse/property -property name=label translatable=yeslt;bgt;QoS configurationlt;/bgt;/property +property name=label translatable=yeslt;bgt;_QoS configurationlt;/bgt;/property property name=use_markupTrue/property +property name=use_underlineTrue/property /object /child /object -- 2.1.0 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager] How to enable USB
Hi, From: virt-tools-list-boun...@redhat.com [mailto:virt-tools-list-boun...@redhat.com] On Behalf Of KK Zhao Sent: Wednesday, January 21, 2015 2:52 PM To: virt-tools-list@redhat.com Subject: [virt-tools-list] [virt-manager] How to enable USB Hi Guys, I'm a newbie to this list. I use virt-manager to manage virtual machine. From the official website(http://virt-manager.org/), I see the Controller USB is listed in the screenshot. But I can't find this option in my virt-manager. I try to google about that, but there is not so much data about virt-manager. So, could anyone help to guide for the following items: 1 Where can I find the guide of the tools (virt-manager, virt-viewer, virsh) Try man XXX 2 How can I modify the boot parameter when boot image from virt-manager Try VM-details-Boot Options Or virsh edit VM 3 How can I do a search in the virt-tool-list's topics An answer from Cole: I'd just use google and do: site:redhat.com/archives mysearch or +virt-tools-list mysearch 4 Or the direct answer that how can I have the Controller USB displayed # virsh dumpxml VM | grep usb controller type='usb' index='0' model='ich9-ehci1' … If this kind of info existed, you should see it in virt-manager Details window; Or: use upstream virt-manger and then add a usb controller by: VM-Details-add hardware-controller-USB Thank you very much, guys. ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] storagebrowse: refresh storage pool when open browse window or selecting a new item
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Saturday, January 10, 2015 1:04 AM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] storagebrowse: refresh storage pool when open browse window or selecting a new item Please read this email I sent regarding refreshing pools: http://www.redhat.com/archives/virt-tools-list/2014-December/msg00036.html On 12/22/2014 10:59 PM, Chen Hanxiao wrote: do a refresh operation when: a) open 'Locate or create storage volume' window b) select a new item in 'Storage Pools' list refresh is supposed to be a potentially long running operation, so performing it every time a pool is selected is not acceptable. There's an explicit refresh button, people need to use that. Performing a refresh when launching the 'create volume' dialog should be okay, but stick it in createvol.py so it covers all cases I didn't follow that thread, sorry for the noise. BTW, do we have a search website for virt-tools mail archive? Thanks, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] storagebrowse: refresh storage pool when open browse window or selecting a new item
ping -Original Message- From: virt-tools-list-boun...@redhat.com [mailto:virt-tools-list-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Tuesday, December 23, 2014 12:00 PM To: virt-tools-list@redhat.com Subject: [virt-tools-list] [virt-manager PATCH] storagebrowse: refresh storage pool when open browse window or selecting a new item do a refresh operation when: a) open 'Locate or create storage volume' window b) select a new item in 'Storage Pools' list Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- virtManager/storagebrowse.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py index d4bd672..b69abb3 100644 --- a/virtManager/storagebrowse.py +++ b/virtManager/storagebrowse.py @@ -300,6 +300,8 @@ class vmmStorageBrowser(vmmGObjectUI): # Listeners def pool_selected(self, src_ignore=None): pool = self.current_pool() +if pool: +pool.refresh() can_new_vol = False tt = @@ -320,6 +322,7 @@ class vmmStorageBrowser(vmmGObjectUI): canchoose = bool(vol and vol[5]) self.widget(choose-volume).set_sensitive(canchoose) self.widget(vol-delete).set_sensitive(canchoose) +self.pool_refresh(vol) def refresh_current_pool(self, createvol=None): cp = self.current_pool() -- 1.9.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] ui: remove underline property of tpm device type in details
We could not modify tpm device type yet. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- Note: pushed as trivial. ui/details.ui | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/details.ui b/ui/details.ui index e8e6933..77c64fa 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -5602,8 +5602,7 @@ if you know what you are doing.lt;/smallgt;/property property name=visibleTrue/property property name=can_focusFalse/property property name=xalign1/property -property name=label translatable=yesT_ype:/property -property name=use_underlineTrue/property +property name=label translatable=yesType:/property /object packing property name=left_attach0/property -- 1.9.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] storagebrowse: refresh storage pool when open browse window or selecting a new item
do a refresh operation when: a) open 'Locate or create storage volume' window b) select a new item in 'Storage Pools' list Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- virtManager/storagebrowse.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py index d4bd672..b69abb3 100644 --- a/virtManager/storagebrowse.py +++ b/virtManager/storagebrowse.py @@ -300,6 +300,8 @@ class vmmStorageBrowser(vmmGObjectUI): # Listeners def pool_selected(self, src_ignore=None): pool = self.current_pool() +if pool: +pool.refresh() can_new_vol = False tt = @@ -320,6 +322,7 @@ class vmmStorageBrowser(vmmGObjectUI): canchoose = bool(vol and vol[5]) self.widget(choose-volume).set_sensitive(canchoose) self.widget(vol-delete).set_sensitive(canchoose) +self.pool_refresh(vol) def refresh_current_pool(self, createvol=None): cp = self.current_pool() -- 1.9.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] cloner: fix an doc typo
-Original Message- From: Eric Blake [mailto:ebl...@redhat.com] Sent: Tuesday, December 16, 2014 6:44 AM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] cloner: fix an doc typo On 12/14/2014 07:20 PM, Chen Hanxiao wrote: s/It/If s/an/a/ in the subject line... Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- Note: pushed as trivial. ...oh well. Always ironic when a typo fix patch itself has a typo. I've already noticed this after sending this patch.. So what I pushed to upstream yesterday is the amended one. Sorry for the carelessness. Regards, - Chen -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] cloner: fix an doc typo
s/It/If Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- Note: pushed as trivial. virtinst/cloner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtinst/cloner.py b/virtinst/cloner.py index 622aa64..5e76413 100644 --- a/virtinst/cloner.py +++ b/virtinst/cloner.py @@ -205,7 +205,7 @@ class Cloner(object): def get_preserve_dest_disks(self): return not self.preserve preserve_dest_disks = property(get_preserve_dest_disks, - doc=It true, preserve ALL disk devices for the + doc=If true, preserve ALL disk devices for the NEW guest. This means no storage cloning. This is a convenience access for (not Cloner.preserve)) -- 1.9.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] clitest: replace DIR from current pwd by '/var'
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Thursday, December 11, 2014 8:55 PM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] clitest: replace DIR from current pwd by '/var' On 12/10/2014 10:46 PM, Chen Hanxiao wrote: Introduced by f16dc4dd34f4f1aa326939cf79fcbdc204e2146f This will cause test case failure on different machines. Use '/var' to replace it. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/cli-test-xml/compare/virt-install-many-devices.xml | 2 +- tests/clitest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml index 292d304..b79db16 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -127,7 +127,7 @@ /disk disk type=dir device=floppy driver name=qemu/ - source dir=/home/crobinso/src/virt-manager/ + source dir=/var/ target dev=fda bus=fdc/ /disk controller type=usb index=0 model=ich9-ehci1 diff --git a/tests/clitest.py b/tests/clitest.py index f017792..b35fd43 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -97,7 +97,7 @@ test_files = { 'EXISTUPPER': /dev/default-pool/UPPER, 'POOL' : default-pool, 'VOL' : testvol1.img, -'DIR' : os.getcwd(), +'DIR' : /var, 'TREEDIR' : treedir, 'MANAGEDNEW1' : /dev/default-pool/clonevol, 'MANAGEDDISKNEW1' : /dev/disk-pool/newvol1.img, ACK Pushed. Thanks, - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] test_urls: remove commented fedora21 alpha urls
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Thursday, December 11, 2014 8:56 PM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] test_urls: remove commented fedora21 alpha urls On 12/10/2014 08:39 PM, Chen Hanxiao wrote: Discoverd by pep8 '# ' style check. introduced by 92b443df. Guess that you forgot to delete it. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/test_urls.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/test_urls.py b/tests/test_urls.py index c0d7b91..d0f440d 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -113,9 +113,6 @@ _add(OLD_FEDORA_URL % (19, x86_64), fedora19) _add(OLD_FEDORA_URL % (20, x86_64), fedora20) # Any Dev release _add(FEDORA_URL % (21, x86_64), fedora21, name=fedora21) -#_add( -#https://dl.fedoraproject.org/pub/alt/stage/21_Alpha_TC6/Server/x86_64/os/ , -#fedora21, name=fedora21-tc) # Rawhide w/ i686 test # XXX: Nowadays rawhide isn't a full install tree # _add(DEVFEDORA_URL % (rawhide, x86_64), fedora20, ACK Pushed, thanks. - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] test_urls: remove commented fedora21 alpha urls
Discoverd by pep8 '# ' style check. introduced by 92b443df. Guess that you forgot to delete it. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/test_urls.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/test_urls.py b/tests/test_urls.py index c0d7b91..d0f440d 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -113,9 +113,6 @@ _add(OLD_FEDORA_URL % (19, x86_64), fedora19) _add(OLD_FEDORA_URL % (20, x86_64), fedora20) # Any Dev release _add(FEDORA_URL % (21, x86_64), fedora21, name=fedora21) -#_add( -#https://dl.fedoraproject.org/pub/alt/stage/21_Alpha_TC6/Server/x86_64/os/;, -#fedora21, name=fedora21-tc) # Rawhide w/ i686 test # XXX: Nowadays rawhide isn't a full install tree # _add(DEVFEDORA_URL % (rawhide, x86_64), fedora20, -- 1.9.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] clitest: replace DIR from current pwd by '/var'
Introduced by f16dc4dd34f4f1aa326939cf79fcbdc204e2146f This will cause test case failure on different machines. Use '/var' to replace it. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- tests/cli-test-xml/compare/virt-install-many-devices.xml | 2 +- tests/clitest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml index 292d304..b79db16 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -127,7 +127,7 @@ /disk disk type=dir device=floppy driver name=qemu/ - source dir=/home/crobinso/src/virt-manager/ + source dir=/var/ target dev=fda bus=fdc/ /disk controller type=usb index=0 model=ich9-ehci1 diff --git a/tests/clitest.py b/tests/clitest.py index f017792..b35fd43 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -97,7 +97,7 @@ test_files = { 'EXISTUPPER': /dev/default-pool/UPPER, 'POOL' : default-pool, 'VOL' : testvol1.img, -'DIR' : os.getcwd(), +'DIR' : /var, 'TREEDIR' : treedir, 'MANAGEDNEW1' : /dev/default-pool/clonevol, 'MANAGEDDISKNEW1' : /dev/disk-pool/newvol1.img, -- 1.9.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
[virt-tools-list] [virt-manager PATCH] diskbackend: fix some comment typos
s/if/If s/a/an Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- Note: pushed as trivial. virtinst/diskbackend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py index 8e795b6..c77fa9f 100644 --- a/virtinst/diskbackend.py +++ b/virtinst/diskbackend.py @@ -297,8 +297,8 @@ class CloneStorageCreator(_StorageCreator): logging.debug(Source and destination are the same. Skipping.) return -# if a destination file exists and sparse flg is True, -# this priority takes a existing file. +# If a destination file exists and sparse flag is True, +# this priority takes an existing file. if (not os.path.exists(self._output_path) and self._sparse): clone_block_size = 4096 -- 1.9.3 ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] virt-clone: improve some error prompts
-Original Message- From: Giuseppe Scrivano [mailto:gscri...@redhat.com] Sent: Tuesday, December 09, 2014 4:08 PM To: Chen, Hanxiao/陈 晗霄 Cc: virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] virt-clone: improve some error prompts Chen Hanxiao chenhanx...@cn.fujitsu.com writes: Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- virt-clone | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) ACK Pushed, thanks. - Chen ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-manager PATCH] virt-clone: improve some error prompts
-Original Message- From: Cole Robinson [mailto:crobi...@redhat.com] Sent: Tuesday, December 09, 2014 8:05 PM To: Chen, Hanxiao/陈 晗霄; virt-tools-list@redhat.com Subject: Re: [virt-tools-list] [virt-manager PATCH] virt-clone: improve some error prompts On 12/09/2014 01:39 AM, Chen Hanxiao wrote: Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- virt-clone | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/virt-clone b/virt-clone index 4bd5ca3..78f7885 100755 --- a/virt-clone +++ b/virt-clone @@ -39,7 +39,8 @@ def get_clone_name(new_name, auto_clone, design): logging.debug(Auto-generated clone name '%s', new_name) if not new_name: -fail(_(A name is required for the new virtual machine.)) +fail(_(A name is required for the new virtual machine, + use '-n NAME' to specify one.)) design.clone_name = new_name @@ -57,7 +58,8 @@ def get_original_guest(guest_name, origfile, design): fail(e) if not guest_name: -fail(_(An original machine name or xml file is required.)) +fail(_(An original machine name or xml file is required.\n +Try '-o ORIGINAL_GUEST' or '--original-xml=ORIGINAL_XML'.)) design.original_guest = guest_name I'd rather not complicate the second error message with --original-xml, since that should be a very rarely used option. Also, I'd prefer documenting the long options instead, so --name and --original. Feel free to just push the updating patch Thanks for your comments. I updated it as the diff below and pushed. - Chen index 78f7885..6001bf7 100755 --- a/virt-clone +++ b/virt-clone @@ -40,7 +40,7 @@ def get_clone_name(new_name, auto_clone, design): if not new_name: fail(_(A name is required for the new virtual machine, - use '-n NAME' to specify one.)) + use '--name NEW_VM_NAME' to specify one.)) design.clone_name = new_name @@ -58,8 +58,8 @@ def get_original_guest(guest_name, origfile, design): fail(e) if not guest_name: -fail(_(An original machine name or xml file is required.\n -Try '-o ORIGINAL_GUEST' or '--original-xml=ORIGINAL_XML'.)) +fail(_(An original machine name is required, + use '--original ORIGINAL_GUEST' and try again.)) design.original_guest = guest_name ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list