- Update to virt-manager 2.0.0 (bsc#1027942)
virt-manager-2.0.0.tar.bz2 * Finish port to Python 3 (Radostin Stoyanov, Cole Robinson) * Improved VM defaults for supported OS: q35 PCIe, usb3, CPU host-model * Search based OS selection UI for new VMs (Daniel P. Berrangé, Cole Robinson) * Track OS name for lifetime of domain in XML * Host interface management UI has been completely removed * Show domain IP on interface details page (Lin Ma, Cole Robinson) * More efficient stats polling with AllDomainStats (Simon Kobyda, Cole Robinson) * TPM device model and backend UI (Marc-André Lureau, Stefan Berger) * Show connection state in UI (Lin Ma) * Show attached devices in UI (Lin Ma) * UI option to plug/unplug VM nic link (Simon Kobyda) * UI support for disk discard and detect_zeroes (Povilas Kanapickas, Lin Ma) * Improved SUSE –location URL/ISO detection (Charles Arnold) * cli and UI support for SCSI persistent reservations (Lin Ma) * cli: Add –network mtu.size= option (Anya Harter) * cli: Add –disk driver.copy_on_read (Anya Harter) * cli: Add –disk geometry support (Anya Harter) * cli: Add –sound codec support (Anya Harter) * cli: Add –hostdev net/char/block for LXC (Lubomir Rintel) * cli: Add –memorybacking access_mode and source_type (Marc-André Lureau) * cli: Add –boot rebootTimout (Yossi Ovadia) * cli: Add –boot bootloader= * cli: Add –destroy-on-exit - Drop patches contained in new tarball or not required 0004-virtinst-python3-use-binary-mode-for-kernel.patch 27d4b167-virtinst-update-location-for-opensuse.patch 5a7698c7-fix-select-network-vol.patch d15b78ab-virtinst-read-CPU-model-from-domain-capabilities.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=437
This commit is contained in:
parent
98383b940e
commit
674d49879e
@ -14,11 +14,11 @@ TypeError: '>' not supported between instances of 'NoneType' and 'int'
|
||||
virtinst/progress.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/virtinst/progress.py b/virtinst/progress.py
|
||||
index e07591a14fa0..eef3f7613506 100644
|
||||
--- a/virtinst/progress.py
|
||||
+++ b/virtinst/progress.py
|
||||
@@ -339,7 +339,7 @@ class RateEstimator:
|
||||
Index: virt-manager-2.0.0/virtinst/progress.py
|
||||
===================================================================
|
||||
--- virt-manager-2.0.0.orig/virtinst/progress.py
|
||||
+++ virt-manager-2.0.0/virtinst/progress.py
|
||||
@@ -321,7 +321,7 @@ class RateEstimator:
|
||||
self.start_time = now
|
||||
self.last_update_time = now
|
||||
self.last_amount_read = 0
|
||||
@ -27,7 +27,7 @@ index e07591a14fa0..eef3f7613506 100644
|
||||
|
||||
def update(self, amount_read, now=None):
|
||||
if now is None: now = time.time()
|
||||
@@ -351,7 +351,7 @@ class RateEstimator:
|
||||
@@ -333,7 +333,7 @@ class RateEstimator:
|
||||
# if we just started this file, all bets are off
|
||||
self.last_update_time = now
|
||||
self.last_amount_read = amount_read
|
||||
@ -36,6 +36,3 @@ index e07591a14fa0..eef3f7613506 100644
|
||||
return
|
||||
|
||||
#print 'times', now, self.last_update_time
|
||||
--
|
||||
2.15.1
|
||||
|
||||
|
@ -12,27 +12,24 @@ Avoids the following error:
|
||||
virtinst/progress.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virtinst/progress.py b/virtinst/progress.py
|
||||
index eef3f7613506..bea4fad98938 100644
|
||||
--- a/virtinst/progress.py
|
||||
+++ b/virtinst/progress.py
|
||||
@@ -30,6 +30,7 @@ import math
|
||||
Index: virt-manager-2.0.0/virtinst/progress.py
|
||||
===================================================================
|
||||
--- virt-manager-2.0.0.orig/virtinst/progress.py
|
||||
+++ virt-manager-2.0.0/virtinst/progress.py
|
||||
@@ -16,6 +16,7 @@ import math
|
||||
import fcntl
|
||||
import struct
|
||||
import termios
|
||||
+from six import integer_types
|
||||
|
||||
# Code from http://mail.python.org/pipermail/python-list/2000-May/033365.html
|
||||
# Code from https://mail.python.org/pipermail/python-list/2000-May/033365.html
|
||||
def terminal_width(fd=1):
|
||||
@@ -481,7 +482,7 @@ def format_number(number, SI=0, space=' '):
|
||||
@@ -464,7 +465,7 @@ def format_number(number, SI=0, space='
|
||||
depth = depth + 1
|
||||
number = number / step
|
||||
|
||||
- if isinstance(number, int) or isinstance(number, int):
|
||||
- if isinstance(number, int):
|
||||
+ if isinstance(number, integer_types):
|
||||
# it's an int or a long, which means it didn't get divided,
|
||||
# which means it's already short enough
|
||||
fmt = '%i%s%s'
|
||||
--
|
||||
2.15.1
|
||||
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 1e38d32429205ed8fbd088bcfe2dfea4229544b6 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Thu, 7 Dec 2017 12:42:45 +0100
|
||||
Subject: [PATCH 4/4] virtinst: python3: use binary mode for kernel
|
||||
|
||||
This avoids the following error:
|
||||
|
||||
File "/usr/share/virt-manager/virtinst/kernelupload.py", line 146, in upload_kernel_initrd
|
||||
kvol = _upload_file(conn, meter, pool, kernel)
|
||||
File "/usr/share/virt-manager/virtinst/kernelupload.py", line 105, in _upload_file
|
||||
data = fileobj.read(blocksize)
|
||||
File "/usr/lib64/python3.6/codecs.py", line 321, in decode
|
||||
(result, consumed) = self._buffer_decode(data, self.errors, final)
|
||||
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xea in position 2: invalid continuation byte
|
||||
---
|
||||
virtinst/kernelupload.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virtinst/kernelupload.py b/virtinst/kernelupload.py
|
||||
index 80bb9c6d1143..5caeb51c4100 100644
|
||||
--- a/virtinst/kernelupload.py
|
||||
+++ b/virtinst/kernelupload.py
|
||||
@@ -93,7 +93,7 @@ def _upload_file(conn, meter, destpool, src):
|
||||
vol.upload(stream, offset, length, flags)
|
||||
|
||||
# Open source file
|
||||
- fileobj = open(src, "r")
|
||||
+ fileobj = open(src, "rb")
|
||||
|
||||
# Start transfer
|
||||
total = 0
|
||||
--
|
||||
2.15.1
|
||||
|
@ -1,21 +0,0 @@
|
||||
Subject: Update --location for OpenSUSE
|
||||
From: Nicolas Bock nicolas.bock@suse.com Tue Mar 6 15:54:23 2018 -0700
|
||||
Date: Wed Mar 7 09:27:38 2018 +0100:
|
||||
Git: 27d4b167d5572ade0246cf9340abae88ad5097eb
|
||||
|
||||
OpenSUSE is currently at Leap 42.3. This change updates the man page
|
||||
for virt-install to point to the current repository.
|
||||
|
||||
diff --git a/man/virt-install.pod b/man/virt-install.pod
|
||||
index 00f8d125..712386fc 100644
|
||||
--- a/man/virt-install.pod
|
||||
+++ b/man/virt-install.pod
|
||||
@@ -429,7 +429,7 @@ http://us.archive.ubuntu.com/ubuntu/dists/wily/main/installer-amd64/
|
||||
|
||||
=item Suse
|
||||
|
||||
-http://download.opensuse.org/distribution/11.0/repo/oss/
|
||||
+http://download.opensuse.org/pub/opensuse/distribution/leap/42.3/repo/oss/
|
||||
|
||||
=item Mandriva
|
||||
|
@ -1,65 +0,0 @@
|
||||
commit 5a7698c7998d673e0742046478630824162966b4
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Oct 9 14:30:09 2018 -0600
|
||||
|
||||
Fix selection of network volumes
|
||||
|
||||
When creating a new VM and selecting a volume from a network-based
|
||||
storage pool such as rbd, the volume is not recognized as network-based
|
||||
and is treated as a volume from a directory storage pool.
|
||||
|
||||
This patch adds a method to check if the volume's path points to a
|
||||
network-based volume, then uses the method to avoid actions like
|
||||
setting unix file permissions on the volume, which doesn't make
|
||||
sense for a network-based volume.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
|
||||
(crobinso: rebase, tweak lookup logic)
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/diskbackend.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/diskbackend.py
|
||||
+++ virt-manager-1.5.1/virtinst/diskbackend.py
|
||||
@@ -156,7 +156,7 @@ def manage_path(conn, path):
|
||||
if not path:
|
||||
return None, None
|
||||
|
||||
- if not path_is_url(path):
|
||||
+ if not path_is_url(path) and not path_is_network_vol(conn, path):
|
||||
path = os.path.abspath(path)
|
||||
vol, pool = check_if_path_managed(conn, path)
|
||||
if vol or pool or not _can_auto_manage(path):
|
||||
@@ -188,6 +188,19 @@ def path_is_url(path):
|
||||
return bool(re.match("[a-zA-Z]+(\+[a-zA-Z]+)?://.*", path))
|
||||
|
||||
|
||||
+def path_is_network_vol(conn, path):
|
||||
+ """
|
||||
+ Detect if path is a network volume such as rbd, gluster, etc
|
||||
+ """
|
||||
+ if not path:
|
||||
+ return False
|
||||
+
|
||||
+ for volxml in conn.fetch_all_vols():
|
||||
+ if volxml.target_path == path:
|
||||
+ return volxml.type == "network"
|
||||
+ return False
|
||||
+
|
||||
+
|
||||
def _get_dev_type(path, vol_xml, vol_object, pool_xml, remote):
|
||||
"""
|
||||
Try to get device type for volume.
|
||||
Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
|
||||
+++ virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
@@ -216,6 +216,8 @@ class VirtualDisk(VirtualDevice):
|
||||
return []
|
||||
if diskbackend.path_is_url(path):
|
||||
return []
|
||||
+ if diskbackend.path_is_network_vol(conn, path):
|
||||
+ return []
|
||||
|
||||
try:
|
||||
# Get UID for string name
|
@ -1,193 +0,0 @@
|
||||
Subject: virtinst: read CPU model from domain capabilities
|
||||
From: Charles Arnold carnold@suse.com Wed Mar 28 13:45:29 2018 -0600
|
||||
Date: Tue Apr 3 10:57:15 2018 -0400:
|
||||
Git: d15b78ab0d7b9e73261a19fafc841a4ee206d413
|
||||
|
||||
Add functionality to acquire the CPU model from the
|
||||
libvirt domain capabilities. This is used to compare
|
||||
with the host CPU model.
|
||||
|
||||
(crobinso: add test coverage, rework domcaps layout a bit)
|
||||
|
||||
Index: virt-manager-1.5.0/tests/capabilities-xml/kvm-x86_64-domcaps.xml
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/capabilities-xml/kvm-x86_64-domcaps.xml
|
||||
+++ virt-manager-1.5.0/tests/capabilities-xml/kvm-x86_64-domcaps.xml
|
||||
@@ -18,6 +18,68 @@
|
||||
</enum>
|
||||
</loader>
|
||||
</os>
|
||||
+ <cpu>
|
||||
+ <mode name='host-passthrough' supported='yes'/>
|
||||
+ <mode name='host-model' supported='yes'>
|
||||
+ <model fallback='forbid'>Broadwell</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='vme'/>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='f16c'/>
|
||||
+ <feature policy='require' name='rdrand'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='arat'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='xsaveopt'/>
|
||||
+ <feature policy='require' name='pdpe1gb'/>
|
||||
+ <feature policy='require' name='abm'/>
|
||||
+ <feature policy='require' name='invtsc'/>
|
||||
+ </mode>
|
||||
+ <mode name='custom' supported='yes'>
|
||||
+ <model usable='yes'>qemu64</model>
|
||||
+ <model usable='yes'>qemu32</model>
|
||||
+ <model usable='no'>phenom</model>
|
||||
+ <model usable='yes'>pentium3</model>
|
||||
+ <model usable='yes'>pentium2</model>
|
||||
+ <model usable='yes'>pentium</model>
|
||||
+ <model usable='yes'>n270</model>
|
||||
+ <model usable='yes'>kvm64</model>
|
||||
+ <model usable='yes'>kvm32</model>
|
||||
+ <model usable='yes'>coreduo</model>
|
||||
+ <model usable='yes'>core2duo</model>
|
||||
+ <model usable='no'>athlon</model>
|
||||
+ <model usable='yes'>Westmere</model>
|
||||
+ <model usable='no'>Westmere-IBRS</model>
|
||||
+ <model usable='no'>Skylake-Server</model>
|
||||
+ <model usable='no'>Skylake-Server-IBRS</model>
|
||||
+ <model usable='no'>Skylake-Client</model>
|
||||
+ <model usable='no'>Skylake-Client-IBRS</model>
|
||||
+ <model usable='yes'>SandyBridge</model>
|
||||
+ <model usable='no'>SandyBridge-IBRS</model>
|
||||
+ <model usable='yes'>Penryn</model>
|
||||
+ <model usable='no'>Opteron_G5</model>
|
||||
+ <model usable='yes'>Opteron_G4</model>
|
||||
+ <model usable='no'>Opteron_G3</model>
|
||||
+ <model usable='yes'>Opteron_G2</model>
|
||||
+ <model usable='yes'>Opteron_G1</model>
|
||||
+ <model usable='yes'>Nehalem</model>
|
||||
+ <model usable='no'>Nehalem-IBRS</model>
|
||||
+ <model usable='yes'>IvyBridge</model>
|
||||
+ <model usable='no'>IvyBridge-IBRS</model>
|
||||
+ <model usable='yes'>Haswell</model>
|
||||
+ <model usable='yes'>Haswell-noTSX</model>
|
||||
+ <model usable='no'>Haswell-noTSX-IBRS</model>
|
||||
+ <model usable='no'>Haswell-IBRS</model>
|
||||
+ <model usable='no'>EPYC</model>
|
||||
+ <model usable='no'>EPYC-IBPB</model>
|
||||
+ <model usable='yes'>Conroe</model>
|
||||
+ <model usable='yes'>Broadwell</model>
|
||||
+ <model usable='yes'>Broadwell-noTSX</model>
|
||||
+ <model usable='no'>Broadwell-noTSX-IBRS</model>
|
||||
+ <model usable='no'>Broadwell-IBRS</model>
|
||||
+ <model usable='yes'>486</model>
|
||||
+ </mode>
|
||||
+ </cpu>
|
||||
<devices>
|
||||
<disk supported='yes'>
|
||||
<enum name='diskDevice'>
|
||||
@@ -32,8 +94,25 @@
|
||||
<value>scsi</value>
|
||||
<value>virtio</value>
|
||||
<value>usb</value>
|
||||
+ <value>sata</value>
|
||||
</enum>
|
||||
</disk>
|
||||
+ <graphics supported='yes'>
|
||||
+ <enum name='type'>
|
||||
+ <value>sdl</value>
|
||||
+ <value>vnc</value>
|
||||
+ <value>spice</value>
|
||||
+ </enum>
|
||||
+ </graphics>
|
||||
+ <video supported='yes'>
|
||||
+ <enum name='modelType'>
|
||||
+ <value>vga</value>
|
||||
+ <value>cirrus</value>
|
||||
+ <value>vmvga</value>
|
||||
+ <value>qxl</value>
|
||||
+ <value>virtio</value>
|
||||
+ </enum>
|
||||
+ </video>
|
||||
<hostdev supported='yes'>
|
||||
<enum name='mode'>
|
||||
<value>subsystem</value>
|
||||
@@ -50,11 +129,10 @@
|
||||
<value>scsi</value>
|
||||
</enum>
|
||||
<enum name='capsType'/>
|
||||
- <enum name='pciBackend'>
|
||||
- <value>default</value>
|
||||
- <value>kvm</value>
|
||||
- <value>vfio</value>
|
||||
- </enum>
|
||||
+ <enum name='pciBackend'/>
|
||||
</hostdev>
|
||||
</devices>
|
||||
+ <features>
|
||||
+ <gic supported='no'/>
|
||||
+ </features>
|
||||
</domainCapabilities>
|
||||
Index: virt-manager-1.5.0/tests/capabilities.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/capabilities.py
|
||||
+++ virt-manager-1.5.0/tests/capabilities.py
|
||||
@@ -131,6 +131,16 @@ class TestCapabilities(unittest.TestCase
|
||||
self.assertEqual(caps.os.loader.get_enum("type").get_values(),
|
||||
["rom", "pflash"])
|
||||
|
||||
+ def testDomainCapabilitiesx86(self):
|
||||
+ xml = open("tests/capabilities-xml/kvm-x86_64-domcaps.xml").read()
|
||||
+ caps = DomainCapabilities(utils.URIs.open_testdriver_cached(), xml)
|
||||
+
|
||||
+ custom_mode = caps.cpu.get_mode("custom")
|
||||
+ self.assertTrue(bool(custom_mode))
|
||||
+ cpu_model = custom_mode.get_model("Opteron_G4")
|
||||
+ self.assertTrue(bool(cpu_model))
|
||||
+ self.assertTrue(cpu_model.usable)
|
||||
+
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Index: virt-manager-1.5.0/virtinst/domcapabilities.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/domcapabilities.py
|
||||
+++ virt-manager-1.5.0/virtinst/domcapabilities.py
|
||||
@@ -76,6 +76,33 @@ class _Features(_CapsBlock):
|
||||
gic = XMLChildProperty(_make_capsblock("gic"), is_single=True)
|
||||
|
||||
|
||||
+
|
||||
+class _CPUModel(XMLBuilder):
|
||||
+ _XML_ROOT_NAME = "model"
|
||||
+ model = XMLProperty(".")
|
||||
+ usable = XMLProperty("./@usable", is_yesno=True)
|
||||
+
|
||||
+
|
||||
+class _CPUMode(XMLBuilder):
|
||||
+ _XML_ROOT_NAME = "mode"
|
||||
+ name = XMLProperty("./@name")
|
||||
+ models = XMLChildProperty(_CPUModel)
|
||||
+
|
||||
+ def get_model(self, name):
|
||||
+ for model in self.models:
|
||||
+ if model.model == name:
|
||||
+ return model
|
||||
+
|
||||
+class _CPU(XMLBuilder):
|
||||
+ _XML_ROOT_NAME = "cpu"
|
||||
+ modes = XMLChildProperty(_CPUMode)
|
||||
+
|
||||
+ def get_mode(self, name):
|
||||
+ for mode in self.modes:
|
||||
+ if mode.name == name:
|
||||
+ return mode
|
||||
+
|
||||
+
|
||||
class DomainCapabilities(XMLBuilder):
|
||||
@staticmethod
|
||||
def build_from_params(conn, emulator, arch, machine, hvtype):
|
||||
@@ -163,6 +190,7 @@ class DomainCapabilities(XMLBuilder):
|
||||
|
||||
_XML_ROOT_NAME = "domainCapabilities"
|
||||
os = XMLChildProperty(_OS, is_single=True)
|
||||
+ cpu = XMLChildProperty(_CPU, is_single=True)
|
||||
devices = XMLChildProperty(_Devices, is_single=True)
|
||||
|
||||
arch = XMLProperty("./arch")
|
@ -1,81 +0,0 @@
|
||||
Subject: virtinst: compare host and domain cpu models
|
||||
From: Charles Arnold carnold@suse.com Wed Mar 28 13:45:30 2018 -0600
|
||||
Date: Tue Apr 3 10:57:49 2018 -0400:
|
||||
Git: fd6a8154408fb462e5437dc920afe4d80da3c1f8
|
||||
|
||||
Lookup the domain capabilities CPU model and compare with
|
||||
the host capabilities CPU model and if they are not equal
|
||||
set the guest's CPU model to None.
|
||||
|
||||
(crobinso: compare against 'custom' list not 'host-model', move
|
||||
to separate function)
|
||||
|
||||
Index: virt-manager-1.5.0/tests/cli-test-xml/compare/virt-install-boot-uefi.xml
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/cli-test-xml/compare/virt-install-boot-uefi.xml
|
||||
+++ virt-manager-1.5.0/tests/cli-test-xml/compare/virt-install-boot-uefi.xml
|
||||
@@ -15,9 +15,7 @@
|
||||
<smm state="on"/>
|
||||
<vmport state="off"/>
|
||||
</features>
|
||||
- <cpu mode="custom" match="exact">
|
||||
- <model>Opteron_G4</model>
|
||||
- </cpu>
|
||||
+ <cpu mode="custom" match="exact"/>
|
||||
<clock offset="utc">
|
||||
<timer name="rtc" tickpolicy="catchup"/>
|
||||
<timer name="pit" tickpolicy="delay"/>
|
||||
Index: virt-manager-1.5.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.5.0/virtinst/guest.py
|
||||
@@ -880,6 +880,33 @@ class Guest(XMLBuilder):
|
||||
else:
|
||||
self.emulator = "/usr/lib/xen/bin/qemu-dm"
|
||||
|
||||
+ def _set_cpu_x86_kvm_default(self):
|
||||
+ if self.os.arch != self.conn.caps.host.cpu.arch:
|
||||
+ return
|
||||
+
|
||||
+ self.cpu.set_special_mode(self.x86_cpu_default)
|
||||
+ if self.x86_cpu_default != self.cpu.SPECIAL_MODE_HOST_MODEL_ONLY:
|
||||
+ return
|
||||
+ if not self.cpu.model:
|
||||
+ return
|
||||
+
|
||||
+ # It's possible that the value HOST_MODEL_ONLY gets from
|
||||
+ # <capabilities> is not actually supported by qemu/kvm
|
||||
+ # combo which will be reported in <domainCapabilities>
|
||||
+ domcaps = DomainCapabilities.build_from_guest(self)
|
||||
+ domcaps_mode = domcaps.cpu.get_mode("custom")
|
||||
+ if not domcaps_mode:
|
||||
+ return
|
||||
+
|
||||
+ cpu_model = domcaps_mode.get_model(self.cpu.model)
|
||||
+ if cpu_model and cpu_model.usable:
|
||||
+ return
|
||||
+
|
||||
+ logging.debug("Host capabilities CPU '%s' is not supported "
|
||||
+ "according to domain capabilities. Unsetting CPU model",
|
||||
+ self.cpu.model)
|
||||
+ self.cpu.model = None
|
||||
+
|
||||
def _set_cpu_defaults(self):
|
||||
self.cpu.set_topology_defaults(self.vcpus)
|
||||
|
||||
@@ -898,14 +925,11 @@ class Guest(XMLBuilder):
|
||||
self.cpu.model = "cortex-a57"
|
||||
|
||||
elif self.os.is_x86() and self.type == "kvm":
|
||||
- if self.os.arch != self.conn.caps.host.cpu.arch:
|
||||
- return
|
||||
+ self._set_cpu_x86_kvm_default()
|
||||
|
||||
- self.cpu.set_special_mode(self.x86_cpu_default)
|
||||
if self._os_object.broken_x2apic():
|
||||
self.cpu.add_feature("x2apic", policy="disable")
|
||||
|
||||
-
|
||||
def _hyperv_supported(self):
|
||||
if (self.os.loader_type == "pflash" and
|
||||
self.os_variant in ("win2k8r2", "win7")):
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:df7d2519d54e77b98d5d96b2b012311dae10eaf2c19e2c8019dbbb36f66e7d46
|
||||
size 1548321
|
3
virt-manager-2.0.0.tar.bz2
Normal file
3
virt-manager-2.0.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:097aaf409c9d4d7a325deb34de40b6dd570c2671cb3d5720ed7183995b46aa8c
|
||||
size 1484896
|
@ -1,8 +1,52 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 22 11:33:51 UTC 2018 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
Tue Oct 30 15:37:09 MDT 2018 - carnold@suse.com
|
||||
|
||||
- boo#1112729 - Add missing python3-six dep introduced by patch
|
||||
0003-virtinst-python3-avoid-using-long-type.patch
|
||||
- Update to virt-manager 2.0.0 (bsc#1027942)
|
||||
virt-manager-2.0.0.tar.bz2
|
||||
* Finish port to Python 3 (Radostin Stoyanov, Cole Robinson)
|
||||
* Improved VM defaults for supported OS: q35 PCIe, usb3, CPU host-model
|
||||
* Search based OS selection UI for new VMs (Daniel P. Berrangé, Cole Robinson)
|
||||
* Track OS name for lifetime of domain in XML
|
||||
* Host interface management UI has been completely removed
|
||||
* Show domain IP on interface details page (Lin Ma, Cole Robinson)
|
||||
* More efficient stats polling with AllDomainStats (Simon Kobyda, Cole Robinson)
|
||||
* TPM device model and backend UI (Marc-André Lureau, Stefan Berger)
|
||||
* Show connection state in UI (Lin Ma)
|
||||
* Show attached devices in UI (Lin Ma)
|
||||
* UI option to plug/unplug VM nic link (Simon Kobyda)
|
||||
* UI support for disk discard and detect_zeroes (Povilas Kanapickas, Lin Ma)
|
||||
* Improved SUSE –location URL/ISO detection (Charles Arnold)
|
||||
* cli and UI support for SCSI persistent reservations (Lin Ma)
|
||||
* cli: Add –network mtu.size= option (Anya Harter)
|
||||
* cli: Add –disk driver.copy_on_read (Anya Harter)
|
||||
* cli: Add –disk geometry support (Anya Harter)
|
||||
* cli: Add –sound codec support (Anya Harter)
|
||||
* cli: Add –hostdev net/char/block for LXC (Lubomir Rintel)
|
||||
* cli: Add –memorybacking access_mode and source_type (Marc-André Lureau)
|
||||
* cli: Add –boot rebootTimout (Yossi Ovadia)
|
||||
* cli: Add –boot bootloader=
|
||||
* cli: Add –destroy-on-exit
|
||||
- Drop patches contained in new tarball or not required
|
||||
0004-virtinst-python3-use-binary-mode-for-kernel.patch
|
||||
27d4b167-virtinst-update-location-for-opensuse.patch
|
||||
5a7698c7-fix-select-network-vol.patch
|
||||
d15b78ab-virtinst-read-CPU-model-from-domain-capabilities.patch
|
||||
fd6a8154-virtinst-compare-host-and-domain-cpu-models.patch
|
||||
5a7698c7-fix-select-network-vol.patch
|
||||
virtcli-python2-to-python3-conversion.patch
|
||||
virtinst-add-ppc64-arch-support.patch
|
||||
virtinst-check-date-format.patch
|
||||
virtinst-fix-sle-distro-parsing.patch
|
||||
virtinst-handle-tumbleweed-treeinfo-file.patch
|
||||
virtinst-nfs-install-sanitize.patch
|
||||
virtinst-no-usb-tablet-for-xenpv.patch
|
||||
virtinst-set-qemu-emulator.patch
|
||||
virtinst-storage-ocfs2.patch
|
||||
virtman-add-connect-default.patch
|
||||
virtman-fix-missing-translations.patch
|
||||
virtman-libvirtd-not-running.patch
|
||||
virtman-packages.patch
|
||||
virtmisc-python2-to-python3-conversion.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 16 02:24:29 UTC 2018 - James Fehlig <jfehlig@suse.com>
|
||||
|
@ -12,22 +12,16 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define with_guestfs 0
|
||||
%define askpass_package "openssh-askpass"
|
||||
%define qemu_user "qemu"
|
||||
%define libvirt_kvm_packages ""
|
||||
%define libvirt_xen_packages ""
|
||||
%define preferred_distros "sles15,opensuse15"
|
||||
%define kvm_packages ""
|
||||
%define _version 1.5.1
|
||||
%define _release 0
|
||||
%global __python %{__python3}
|
||||
%global with_guestfs 0
|
||||
%global default_hvs "qemu,xen,lxc"
|
||||
|
||||
Name: virt-manager
|
||||
Version: 1.5.1
|
||||
Version: 2.0.0
|
||||
Release: 0
|
||||
Summary: Virtual Machine Manager
|
||||
License: GPL-2.0-or-later
|
||||
@ -38,35 +32,25 @@ Source1: virt-install.rb
|
||||
Source2: virt-install.desktop
|
||||
Source3: virt-manager-supportconfig
|
||||
# Upstream Patches
|
||||
Patch1: 27d4b167-virtinst-update-location-for-opensuse.patch
|
||||
Patch2: d15b78ab-virtinst-read-CPU-model-from-domain-capabilities.patch
|
||||
Patch3: fd6a8154-virtinst-compare-host-and-domain-cpu-models.patch
|
||||
Patch4: 5a7698c7-fix-select-network-vol.patch
|
||||
# SUSE Only
|
||||
Patch70: virtman-desktop.patch
|
||||
Patch71: virtman-kvm.patch
|
||||
Patch72: virtman-keycombo.patch
|
||||
Patch73: virtman-show-suse-install-repos.patch
|
||||
Patch74: virtman-libvirtd-not-running.patch
|
||||
Patch75: virtman-dont-allow-grub.xen-to-be-deleted.patch
|
||||
Patch76: virtinst-pvgrub2-bootloader.patch
|
||||
Patch77: virtinst-nfs-install-sanitize.patch
|
||||
Patch74: virtman-dont-allow-grub.xen-to-be-deleted.patch
|
||||
Patch75: virtinst-pvgrub2-bootloader.patch
|
||||
# Features or Enhancements
|
||||
Patch101: virtman-default-guest-from-host-os.patch
|
||||
Patch102: virtman-default-to-xen-pv.patch
|
||||
Patch103: virtman-packages.patch
|
||||
Patch104: virtman-load-stored-uris.patch
|
||||
Patch105: virtman-add-connect-default.patch
|
||||
Patch120: virtinst-storage-ocfs2.patch
|
||||
Patch121: virtinst-default-xen-to-qcow2-format.patch
|
||||
Patch122: virtinst-detect-oes-distros.patch
|
||||
Patch123: virtinst-modify-gui-defaults.patch
|
||||
Patch124: virtinst-vol-default-nocow.patch
|
||||
Patch125: virtinst-set-cache-mode-unsafe-for-install.patch
|
||||
Patch126: virtinst-set-qemu-emulator.patch
|
||||
Patch127: virtinst-add-ppc64-arch-support.patch
|
||||
Patch128: virtinst-s390x-disable-graphics.patch
|
||||
Patch129: virtinst-add-caasp-support.patch
|
||||
Patch103: virtman-load-stored-uris.patch
|
||||
Patch120: virtinst-default-xen-to-qcow2-format.patch
|
||||
Patch121: virtinst-detect-oes-distros.patch
|
||||
Patch122: virtinst-modify-gui-defaults.patch
|
||||
Patch123: virtinst-vol-default-nocow.patch
|
||||
Patch124: virtinst-set-cache-mode-unsafe-for-install.patch
|
||||
Patch125: virtinst-s390x-disable-graphics.patch
|
||||
Patch126: virtinst-add-caasp-support.patch
|
||||
Patch127: virtinst-add-sle15-detection-support.patch
|
||||
# Bug Fixes
|
||||
Patch150: virtman-prevent-double-click-starting-vm-twice.patch
|
||||
Patch151: virtman-increase-setKeepAlive-count.patch
|
||||
@ -74,32 +58,23 @@ Patch152: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
|
||||
Patch153: virtman-check-for-valid-display.patch
|
||||
Patch154: virtman-allow-creating-i686-vm.patch
|
||||
Patch155: virtman-dont-specify-vte-version.patch
|
||||
Patch156: virtman-fix-missing-translations.patch
|
||||
Patch160: virtinst-xen-drive-type.patch
|
||||
Patch161: virtinst-xenbus-disk-index-fix.patch
|
||||
Patch162: virtinst-refresh_before_fetch_pool.patch
|
||||
Patch163: virtinst-use-xenpae-kernel-for-32bit.patch
|
||||
Patch164: virtinst-use-qemu-for-cdrom-device.patch
|
||||
Patch165: virtinst-fix-sle-distro-parsing.patch
|
||||
Patch166: virtinst-check-date-format.patch
|
||||
Patch167: virtinst-no-usb-tablet-for-xenpv.patch
|
||||
Patch168: virtinst-add-sle15-detection-support.patch
|
||||
Patch169: virtinst-keep-install-iso-attached.patch
|
||||
Patch170: virtinst-osdict-get_supported.patch
|
||||
Patch171: virtinst-dont-use-special-copy-cpu-features.patch
|
||||
Patch172: virtinst-use-latest-opensuse-version-when-unknown-media.patch
|
||||
Patch173: virtinst-handle-tumbleweed-treeinfo-file.patch
|
||||
Patch165: virtinst-keep-install-iso-attached.patch
|
||||
Patch166: virtinst-osdict-get_supported.patch
|
||||
Patch167: virtinst-dont-use-special-copy-cpu-features.patch
|
||||
Patch168: virtinst-use-latest-opensuse-version-when-unknown-media.patch
|
||||
# Python2 to Python3 patches
|
||||
Patch200: virtmisc-python2-to-python3-conversion.patch
|
||||
Patch201: virtcli-python2-to-python3-conversion.patch
|
||||
Patch202: virtconv-python2-to-python3-conversion.patch
|
||||
Patch203: virtinst-python2-to-python3-conversion.patch
|
||||
Patch204: virtman-python2-to-python3-conversion.patch
|
||||
Patch205: virttests-python2-to-python3-conversion.patch
|
||||
Patch206: 0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
|
||||
Patch207: 0003-virtinst-python3-avoid-using-long-type.patch
|
||||
Patch208: 0004-virtinst-python3-use-binary-mode-for-kernel.patch
|
||||
Patch209: virtman-register-delete-event-for-details-dialog.patch
|
||||
Patch200: virtconv-python2-to-python3-conversion.patch
|
||||
Patch201: virtinst-python2-to-python3-conversion.patch
|
||||
Patch202: virtman-python2-to-python3-conversion.patch
|
||||
Patch203: virttests-python2-to-python3-conversion.patch
|
||||
Patch204: 0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
|
||||
Patch205: 0003-virtinst-python3-avoid-using-long-type.patch
|
||||
Patch206: virtman-register-delete-event-for-details-dialog.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -109,8 +84,6 @@ Requires: dbus-1-x11
|
||||
Requires: dconf
|
||||
Requires: gtk3
|
||||
Requires: python3-gobject-Gdk
|
||||
# Patch 0003-virtinst-python3-avoid-using-long-type.patch adds a python3-six dependency. Drop it when dropping the patch.
|
||||
Requires: python3-six
|
||||
# For console widget
|
||||
Requires: python3-cairo
|
||||
Requires: python3-gobject-cairo
|
||||
@ -186,10 +159,6 @@ machine).
|
||||
%prep
|
||||
%setup -q
|
||||
# Upstream Patches
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
# SUSE Only
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
@ -197,14 +166,10 @@ machine).
|
||||
%patch73 -p1
|
||||
%patch74 -p1
|
||||
%patch75 -p1
|
||||
%patch76 -p1
|
||||
%patch77 -p1
|
||||
# Enhancements
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch120 -p1
|
||||
%patch121 -p1
|
||||
%patch122 -p1
|
||||
@ -213,8 +178,6 @@ machine).
|
||||
%patch125 -p1
|
||||
%patch126 -p1
|
||||
%patch127 -p1
|
||||
%patch128 -p1
|
||||
%patch129 -p1
|
||||
# Bug Fixes
|
||||
%patch150 -p1
|
||||
%patch151 -p1
|
||||
@ -222,7 +185,6 @@ machine).
|
||||
%patch153 -p1
|
||||
%patch154 -p1
|
||||
%patch155 -p1
|
||||
%patch156 -p1
|
||||
%patch160 -p1
|
||||
%patch161 -p1
|
||||
%patch162 -p1
|
||||
@ -232,11 +194,6 @@ machine).
|
||||
%patch166 -p1
|
||||
%patch167 -p1
|
||||
%patch168 -p1
|
||||
%patch169 -p1
|
||||
%patch170 -p1
|
||||
%patch171 -p1
|
||||
%patch172 -p1
|
||||
%patch173 -p1
|
||||
# Python2 to Python3 patches
|
||||
%patch200 -p1
|
||||
%patch201 -p1
|
||||
@ -245,45 +202,16 @@ machine).
|
||||
%patch204 -p1
|
||||
%patch205 -p1
|
||||
%patch206 -p1
|
||||
%patch207 -p1
|
||||
%patch208 -p1
|
||||
%patch209 -p1
|
||||
|
||||
%build
|
||||
%if %{qemu_user}
|
||||
%define _qemu_user --qemu-user=%{qemu_user}
|
||||
%endif
|
||||
|
||||
%if %{kvm_packages}
|
||||
%define _kvm_packages --kvm-package-names=%{kvm_packages}
|
||||
%endif
|
||||
|
||||
%if %{preferred_distros}
|
||||
%define _preferred_distros --preferred-distros=%{preferred_distros}
|
||||
%endif
|
||||
|
||||
%if %{libvirt_kvm_packages}
|
||||
%define _libvirt_kvm_packages --libvirt-kvm-package-names=%{libvirt_kvm_packages}
|
||||
%endif
|
||||
|
||||
%if %{libvirt_xen_packages}
|
||||
%define _libvirt_xen_packages --libvirt-xen-package-names=%{libvirt_xen_packages}
|
||||
%endif
|
||||
|
||||
%if %{askpass_package}
|
||||
%define _askpass_package --askpass-package-names=%{askpass_package}
|
||||
%if %{default_hvs}
|
||||
%global _default_hvs --default-hvs %{default_hvs}
|
||||
%endif
|
||||
|
||||
python3 setup.py configure \
|
||||
--prefix=%{_prefix} \
|
||||
--default-graphics="spice" \
|
||||
%{?_qemu_user} \
|
||||
%{?_kvm_packages} \
|
||||
%{?_libvirt_kvm_packages} \
|
||||
%{?_libvirt_xen_packages} \
|
||||
%{?_askpass_package} \
|
||||
%{?_preferred_distros} \
|
||||
%{?_default_graphics}
|
||||
%{?_default_hvs}
|
||||
|
||||
%install
|
||||
python3 setup.py \
|
||||
@ -338,7 +266,6 @@ fi
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/applications/YaST2/virt-install.desktop
|
||||
%{_datadir}/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.xml
|
||||
%{_datadir}/GConf/gsettings/org.virt-manager.virt-manager.convert
|
||||
%dir /usr/lib/supportconfig
|
||||
%dir /usr/lib/supportconfig/plugins
|
||||
/usr/lib/supportconfig/plugins/virt_manager
|
||||
@ -365,8 +292,6 @@ fi
|
||||
%dir %{_datadir}/YaST2
|
||||
%dir %{_datadir}/YaST2/clients
|
||||
%dir %{_datadir}/applications/YaST2
|
||||
%dir %{_datadir}/GConf
|
||||
%dir %{_datadir}/GConf/gsettings
|
||||
%dir %{_datadir}/appdata
|
||||
%{_datadir}/YaST2/clients/virt-install.rb
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
Index: virt-manager-1.4.3/virtcli/cliconfig.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtcli/cliconfig.py
|
||||
+++ virt-manager-1.4.3/virtcli/cliconfig.py
|
||||
@@ -21,11 +21,11 @@
|
||||
Configuration variables that can be set at build time
|
||||
"""
|
||||
|
||||
-import ConfigParser
|
||||
+import configparser
|
||||
import os
|
||||
|
||||
|
||||
-_cfg = ConfigParser.ConfigParser()
|
||||
+_cfg = configparser.ConfigParser()
|
||||
_filepath = os.path.abspath(__file__)
|
||||
_srcdir = os.path.abspath(os.path.join(os.path.dirname(_filepath), ".."))
|
||||
_cfgpath = os.path.join(os.path.dirname(_filepath), "cli.cfg")
|
||||
@@ -46,7 +46,7 @@ def _get_param(name, default):
|
||||
return default
|
||||
try:
|
||||
return _cfg.get("config", name)
|
||||
- except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
|
||||
+ except (configparser.NoOptionError, configparser.NoSectionError):
|
||||
return default
|
||||
|
||||
|
@ -1,18 +1,8 @@
|
||||
Index: virt-manager-1.4.3/virt-convert
|
||||
Index: virt-manager-2.0.0/virtconv/vmx.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virt-convert
|
||||
+++ virt-manager-1.4.3/virt-convert
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python2
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright 2008, 2013, 2014 Red Hat, Inc.
|
||||
# Joey Boggs <jboggs@redhat.com>
|
||||
Index: virt-manager-1.4.3/virtconv/vmx.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtconv/vmx.py
|
||||
+++ virt-manager-1.4.3/virtconv/vmx.py
|
||||
@@ -271,7 +271,7 @@ class vmx_parser(parser_class):
|
||||
--- virt-manager-2.0.0.orig/virtconv/vmx.py
|
||||
+++ virt-manager-2.0.0/virtconv/vmx.py
|
||||
@@ -259,7 +259,7 @@ class vmx_parser(parser_class):
|
||||
|
||||
def _find_keys(prefixes):
|
||||
ret = []
|
||||
@ -21,29 +11,3 @@ Index: virt-manager-1.4.3/virtconv/vmx.py
|
||||
for p in util.listify(prefixes):
|
||||
if key.startswith(p):
|
||||
ret.append((key, value))
|
||||
Index: virt-manager-1.4.3/virtconv/ovf.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtconv/ovf.py
|
||||
+++ virt-manager-1.4.3/virtconv/ovf.py
|
||||
@@ -90,7 +90,7 @@ def node_list(node):
|
||||
child = node.children
|
||||
while child:
|
||||
child_list.append(child)
|
||||
- child = child.next
|
||||
+ child = child.__next__
|
||||
return child_list
|
||||
|
||||
|
||||
Index: virt-manager-1.4.3/virtconv/formats.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtconv/formats.py
|
||||
+++ virt-manager-1.4.3/virtconv/formats.py
|
||||
@@ -19,7 +19,7 @@
|
||||
# MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
from distutils.spawn import find_executable
|
||||
import logging
|
||||
|
@ -1,40 +1,43 @@
|
||||
References: bsc#1010060
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
Index: virt-manager-2.0.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
@@ -490,6 +490,12 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
dclass = OESDistro
|
||||
if distro_version is None:
|
||||
distro_version = _parse_sle_distribution(distribution)
|
||||
+ elif re.match(".*SUSE Container as a Service Platform*", distribution[1]) or \
|
||||
+ re.match(".*SUSE CaaS Platform*", distribution[1]):
|
||||
+ dclass = CAASPDistro
|
||||
+ if distro_version is None:
|
||||
+ dparts = distribution[1].strip().rsplit(' ')
|
||||
+ distro_version = ['VERSION', dparts[len(dparts)-1]]
|
||||
elif re.match(".*openSUSE.*", distribution[1]):
|
||||
dclass = OpensuseDistro
|
||||
if distro_version is None:
|
||||
@@ -1076,6 +1082,8 @@ class SuseDistro(Distro):
|
||||
self.os_variant += major_version + 'sp' + sp_version
|
||||
else:
|
||||
self.os_variant += major_version
|
||||
+ elif self.os_variant.startswith("caasp"):
|
||||
+ self.os_variant = "caasp" + distro_version
|
||||
else:
|
||||
self.os_variant += "9"
|
||||
|
||||
@@ -1122,6 +1130,11 @@ class SLESDistro(SuseDistro):
|
||||
class SLEDDistro(SuseDistro):
|
||||
urldistro = "sled"
|
||||
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.0.0/virtinst/urldetect.py
|
||||
@@ -235,6 +235,12 @@ class _SUSEContent(object):
|
||||
self.product_name.strip().rsplit(' ')[5][2])
|
||||
distro_version = sle_version
|
||||
|
||||
+ # SUSE Container as a Service Platform
|
||||
+ if "Container" in self.product_name:
|
||||
+ distro_version = self.product_name.strip().rsplit(' ')[6]
|
||||
+ elif "CaaS" in self.product_name:
|
||||
+ distro_version = self.product_name.strip().rsplit(' ')[3]
|
||||
+
|
||||
return distro_version
|
||||
|
||||
|
||||
@@ -567,6 +573,9 @@ class SuseDistro(Distro):
|
||||
# Tumbleweed 8 digit date
|
||||
return "opensusetumbleweed"
|
||||
|
||||
+ if self._variant_prefix.startswith(("caasp")):
|
||||
+ return self._variant_prefix + distro_version
|
||||
+
|
||||
if int(version) < 10:
|
||||
return self._variant_prefix + "9"
|
||||
|
||||
@@ -642,6 +651,13 @@ class OpensuseDistro(SuseDistro):
|
||||
famregex = ".*openSUSE.*"
|
||||
|
||||
|
||||
+class CAASPDistro(SuseDistro):
|
||||
+ urldistro = "caasp"
|
||||
+ PRETTY_NAME = "SLES"
|
||||
+ _variant_prefix = "caasp"
|
||||
+ _suse_regex = [".*SUSE Container as a Service Platform*", ".*SUSE CaaS Platform*"]
|
||||
+ famregex = ".*SUSE Container as a Service Platform.*"
|
||||
+
|
||||
+
|
||||
class OESDistro(SuseDistro):
|
||||
urldistro = "oes"
|
||||
|
||||
PRETTY_NAME = "OES"
|
||||
_variant_prefix = "oes"
|
||||
|
@ -1,32 +0,0 @@
|
||||
Reference: bnc#869024
|
||||
Add s390x and ppc64 support
|
||||
Index: virt-manager-1.5.0/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.0/virtinst/urlfetcher.py
|
||||
@@ -464,6 +464,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
arch = "i586"
|
||||
elif cbuf.find("s390x") != -1:
|
||||
arch = "s390x"
|
||||
+ elif cbuf.find("ppc64") != -1:
|
||||
+ arch = "ppc64"
|
||||
+ elif cbuf.find("ppc64le") != -1:
|
||||
+ arch = "ppc64le"
|
||||
|
||||
def _parse_sle_distribution(d):
|
||||
sle_version = d[1].strip().rsplit(' ')[4]
|
||||
@@ -1022,10 +1026,12 @@ class SuseDistro(Distro):
|
||||
oldkern += "64"
|
||||
oldinit += "64"
|
||||
|
||||
- if self.arch == "s390x":
|
||||
+ if self.arch == "s390x" or \
|
||||
+ self.arch == "ppc64" or self.arch == "ppc64le":
|
||||
+
|
||||
self._hvm_kernel_paths = [("boot/%s/linux" % self.arch,
|
||||
"boot/%s/initrd" % self.arch)]
|
||||
- # No Xen on s390x
|
||||
+ # No Xen on s390x or ppc64
|
||||
self._xen_kernel_paths = []
|
||||
else:
|
||||
# Tested with Opensuse >= 10.2, 11, and sles 10
|
@ -1,143 +1,20 @@
|
||||
References: bsc#1054986
|
||||
With SLE15 and openSUSE 15 the content file has been removed from the media.
|
||||
This file was used for SUSE distro version and arch detection. Now detection
|
||||
must be done by parsing the .treeinfo file.
|
||||
We must continue to keep the content parsing code for the older distros.
|
||||
As a fallback, detection is also setup to look at the media.1/products and
|
||||
media.1/build files.
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
Index: virt-manager-2.0.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
@@ -416,7 +416,23 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
try:
|
||||
cbuf = fetcher.acquireFileContent("content")
|
||||
except ValueError:
|
||||
- return None
|
||||
+ try:
|
||||
+ # If no content file, try media.1/products and media.1/build and create
|
||||
+ # a cbuf with enough info for the content file parsing code below to work
|
||||
+ pbuf = fetcher.acquireFileContent("media.1/products").strip()
|
||||
+ pbuf = pbuf.split(' ', 1)[1].strip()
|
||||
+ # The media.1/products file naming convention changed between SLE11 and SLE12
|
||||
+ if pbuf.startswith('SLE'):
|
||||
+ pbuf = pbuf.split(' ')[0]
|
||||
+ pbuf = " ".join(re.split('(\d+)', pbuf, 1))
|
||||
+ cbuf = "\nDISTRO ," + pbuf.replace('-', ' ')
|
||||
+ try:
|
||||
+ bbuf = fetcher.acquireFileContent("media.1/build").split('-')
|
||||
+ except:
|
||||
+ bbuf = ["x86_64"]
|
||||
+ cbuf = cbuf + "\n" + " ".join(bbuf)
|
||||
+ except ValueError:
|
||||
+ return None
|
||||
|
||||
distribution = None
|
||||
distro_version = None
|
||||
@@ -489,7 +505,7 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
dclass = GenericDistro
|
||||
if distribution:
|
||||
if re.match(".*SUSE Linux Enterprise Server*", distribution[1]) or \
|
||||
- re.match(".*SUSE SLES*", distribution[1]):
|
||||
+ re.match(".*SUSE SLES*", distribution[1]) or re.match("SLES*", distribution[1]):
|
||||
dclass = SLESDistro
|
||||
if distro_version is None:
|
||||
distro_version = _parse_sle_distribution(distribution)
|
||||
@@ -507,10 +523,13 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
if distro_version is None:
|
||||
dparts = distribution[1].strip().rsplit(' ')
|
||||
distro_version = ['VERSION', dparts[len(dparts)-1]]
|
||||
- elif re.match(".*openSUSE.*", distribution[1]):
|
||||
+ elif re.match(".*openSUSE.*", distribution[1]) or re.match("openSUSE *", distribution[1]):
|
||||
dclass = OpensuseDistro
|
||||
if distro_version is None:
|
||||
- distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]]
|
||||
+ if ':' in distribution[0]:
|
||||
+ distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]]
|
||||
+ else:
|
||||
+ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[2]]
|
||||
|
||||
if distro_version is None:
|
||||
return None
|
||||
@@ -1029,6 +1048,7 @@ class SLDistro(RHELDistro):
|
||||
|
||||
class SuseDistro(Distro):
|
||||
name = "SUSE"
|
||||
+ uses_treeinfo = True
|
||||
|
||||
_boot_iso_paths = ["boot/boot.iso"]
|
||||
|
||||
@@ -1066,8 +1086,11 @@ class SuseDistro(Distro):
|
||||
self._xen_kernel_paths = [("boot/%s/vmlinuz-xenpae" % self.arch,
|
||||
"boot/%s/initrd-xenpae" % self.arch)]
|
||||
else:
|
||||
- self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
|
||||
- "boot/%s/initrd-xen" % self.arch)]
|
||||
+ self._xen_kernel_paths = [("boot/%s/loader/linux" % self.arch,
|
||||
+ "boot/%s/loader/initrd" % self.arch)]
|
||||
+ # By appending this gets searched for first
|
||||
+ self._xen_kernel_paths.append(("boot/%s/vmlinuz-xen" % self.arch,
|
||||
+ "boot/%s/initrd-xen" % self.arch))
|
||||
|
||||
def _variantFromVersion(self):
|
||||
distro_version = self.version_from_content[1].strip()
|
||||
@@ -1075,11 +1098,11 @@ class SuseDistro(Distro):
|
||||
self.os_variant = self.urldistro
|
||||
|
||||
sp_version = None
|
||||
- if self.os_variant.startswith(("sles", "sled")):
|
||||
+ if self.os_variant.startswith(("sle")):
|
||||
if len(distro_version.split('.', 1)) == 2:
|
||||
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
self.os_variant += version
|
||||
- if sp_version:
|
||||
+ if sp_version and sp_version != 'sp0':
|
||||
self.os_variant += sp_version
|
||||
elif self.os_variant.startswith("opensuse"):
|
||||
if len(version) == 8:
|
||||
@@ -1103,6 +1126,24 @@ class SuseDistro(Distro):
|
||||
self.os_variant += "9"
|
||||
|
||||
def isValidStore(self):
|
||||
+ if self.treeinfo:
|
||||
+ ret = False
|
||||
+ if self.urldistro:
|
||||
+ family = self.treeinfo.get("general", "family")
|
||||
+ if "SUSE Linux Enterprise Server" in family and 'sles' in self.urldistro or \
|
||||
+ "SUSE Linux Enterprise Desktop" in family and 'sled' in self.urldistro or \
|
||||
+ "SUSE Linux Enterprise" in family and 'sle' in self.urldistro or \
|
||||
+ "SUSE Containers" in family and 'caasp' in self.urldistro or \
|
||||
+ "openSUSE" in family and 'opensuse' in self.urldistro or \
|
||||
+ "Open Enterprise" in family and 'oes' in self.urldistro:
|
||||
+ ret = True
|
||||
+ if ret:
|
||||
+ version = self.treeinfo.get("general", "version")
|
||||
+ distro_version = ['VERSION', version]
|
||||
+ self.version_from_content = distro_version
|
||||
+ self._variantFromVersion()
|
||||
+ return ret
|
||||
+
|
||||
# self.version_from_content is the VERSION line from the contents file
|
||||
if (not self.version_from_content or
|
||||
self.version_from_content[1] is None):
|
||||
@@ -1138,6 +1179,10 @@ class SuseDistro(Distro):
|
||||
return self.os_variant
|
||||
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.0.0/virtinst/urldetect.py
|
||||
@@ -627,6 +627,13 @@ class SuseDistro(Distro):
|
||||
return "install"
|
||||
|
||||
|
||||
+class SLEDistro(SuseDistro):
|
||||
+ urldistro = "sle"
|
||||
+ PRETTY_NAME = "SLE"
|
||||
+ _variant_prefix = "sle"
|
||||
+ _suse_regex = ["SUSE Linux Enterprise$"]
|
||||
+ famregex = "SUSE Linux Enterprise$"
|
||||
+
|
||||
+
|
||||
class SLESDistro(SuseDistro):
|
||||
urldistro = "sles"
|
||||
|
||||
@@ -1154,8 +1199,6 @@ class OESDistro(SuseDistro):
|
||||
urldistro = "oes"
|
||||
|
||||
|
||||
-# Suse image store is harder - we fetch the kernel RPM and a helper
|
||||
-# RPM and then munge bits together to generate a initrd
|
||||
class OpensuseDistro(SuseDistro):
|
||||
urldistro = "opensuse"
|
||||
|
||||
PRETTY_NAME = "SLES"
|
||||
matching_distros = ["sles"]
|
||||
|
@ -1,21 +0,0 @@
|
||||
Fixes a bug caused by a bogus EOL date in an osinfo database file.
|
||||
The bad date caused an exception in strptime.
|
||||
|
||||
Index: virt-manager-1.4.2/virtinst/osdict.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.2.orig/virtinst/osdict.py
|
||||
+++ virt-manager-1.4.2/virtinst/osdict.py
|
||||
@@ -363,8 +363,11 @@ class _OsVariant(object):
|
||||
eol_date = self._os.get_eol_date_string()
|
||||
|
||||
if eol_date:
|
||||
- return (datetime.datetime.strptime(eol_date, "%Y-%m-%d") >
|
||||
- datetime.datetime.now())
|
||||
+ try:
|
||||
+ eol_valid = datetime.datetime.strptime(eol_date, "%Y-%m-%d")
|
||||
+ return (eol_valid > datetime.datetime.now())
|
||||
+ except Exception:
|
||||
+ pass
|
||||
|
||||
if self.name == "fedora-unknown":
|
||||
return False
|
@ -1,15 +1,15 @@
|
||||
Reference: bnc#885380
|
||||
Allow Xen based VMs to default to using qcow2
|
||||
Index: virt-manager-1.4.3/virtinst/support.py
|
||||
Index: virt-manager-2.0.0/virtinst/support.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtinst/support.py
|
||||
+++ virt-manager-1.4.3/virtinst/support.py
|
||||
@@ -259,7 +259,7 @@ SUPPORT_CONN_DISK_SD = _make(version="1.
|
||||
--- virt-manager-2.0.0.orig/virtinst/support.py
|
||||
+++ virt-manager-2.0.0/virtinst/support.py
|
||||
@@ -233,7 +233,7 @@ SUPPORT_CONN_WORKING_XEN_EVENTS = _make(
|
||||
# This is an arbitrary check to say whether it's a good idea to
|
||||
# default to qcow2. It might be fine for xen or qemu older than the versions
|
||||
# here, but until someone tests things I'm going to be a bit conservative.
|
||||
SUPPORT_CONN_DEFAULT_QCOW2 = _make(
|
||||
- version="0.8.0", hv_version={"qemu": "1.2.0", "test": 0})
|
||||
+ version="0.8.0", hv_version={"qemu": "1.2.0", "all": 0})
|
||||
SUPPORT_CONN_DEFAULT_USB2 = _make(
|
||||
version="0.9.7", hv_version={"qemu": "1.0.0", "test": 0})
|
||||
SUPPORT_CONN_CAN_ACPI = _make(hv_version={"xen": "3.1.0", "all": 0})
|
||||
-SUPPORT_CONN_DEFAULT_QCOW2 = _make(hv_version={"qemu": "1.2.0", "test": 0})
|
||||
+SUPPORT_CONN_DEFAULT_QCOW2 = _make(hv_version={"qemu": "1.2.0", "all": 0})
|
||||
SUPPORT_CONN_AUTOSOCKET = _make(hv_libvirt_version={"qemu": "1.0.6"})
|
||||
SUPPORT_CONN_PM_DISABLE = _make(hv_version={"qemu": "1.2.0", "test": 0})
|
||||
SUPPORT_CONN_QCOW2_LAZY_REFCOUNTS = _make(
|
||||
|
@ -1,71 +1,29 @@
|
||||
Enhancement to correctly detect Open Enterprise Server media is
|
||||
selected as the installation source.
|
||||
Index: virt-manager-1.5.0/virtinst/urlfetcher.py
|
||||
Index: virt-manager-2.0.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.0/virtinst/urlfetcher.py
|
||||
@@ -482,6 +482,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
dclass = SLEDDistro
|
||||
if distro_version is None:
|
||||
distro_version = _parse_sle_distribution(distribution)
|
||||
+ elif re.match(".*Open Enterprise Server*", distribution[1]):
|
||||
+ dclass = OESDistro
|
||||
+ if distro_version is None:
|
||||
+ distro_version = _parse_sle_distribution(distribution)
|
||||
elif re.match(".*openSUSE.*", distribution[1]):
|
||||
dclass = OpensuseDistro
|
||||
if distro_version is None:
|
||||
@@ -1042,20 +1046,30 @@ class SuseDistro(Distro):
|
||||
distro_version = self.version_from_content[1].strip()
|
||||
version = distro_version.split('.', 1)[0].strip()
|
||||
self.os_variant = self.urldistro
|
||||
- if int(version) >= 10:
|
||||
- if self.os_variant.startswith(("sles", "sled")):
|
||||
- sp_version = None
|
||||
- if len(distro_version.split('.', 1)) == 2:
|
||||
- sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
- self.os_variant += version
|
||||
- if sp_version:
|
||||
- self.os_variant += sp_version
|
||||
+
|
||||
+ sp_version = None
|
||||
+ if self.os_variant.startswith(("sles", "sled")):
|
||||
+ if len(distro_version.split('.', 1)) == 2:
|
||||
+ sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
+ self.os_variant += version
|
||||
+ if sp_version:
|
||||
+ self.os_variant += sp_version
|
||||
+ elif self.os_variant.startswith("opensuse"):
|
||||
+ if len(version) == 8:
|
||||
+ self.os_variant += "tumbleweed"
|
||||
else:
|
||||
- # Tumbleweed 8 digit date
|
||||
- if len(version) == 8:
|
||||
- self.os_variant += "tumbleweed"
|
||||
- else:
|
||||
- self.os_variant += distro_version
|
||||
+ self.os_variant += distro_version
|
||||
+ elif self.os_variant.startswith("oes"):
|
||||
+ versions = distro_version.split('.')
|
||||
+ major_version = versions[0]
|
||||
+ if len(versions) == 3:
|
||||
+ sp_version = versions[2]
|
||||
+ elif len(versions) == 2:
|
||||
+ sp_version = versions[1]
|
||||
+ if sp_version:
|
||||
+ self.os_variant += major_version + 'sp' + sp_version
|
||||
+ else:
|
||||
+ self.os_variant += major_version
|
||||
else:
|
||||
self.os_variant += "9"
|
||||
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.0.0/virtinst/urldetect.py
|
||||
@@ -570,7 +570,7 @@ class SuseDistro(Distro):
|
||||
if int(version) < 10:
|
||||
return self._variant_prefix + "9"
|
||||
|
||||
- if str(self._variant_prefix).startswith(("sles", "sled")):
|
||||
+ if str(self._variant_prefix).startswith(("sles", "sled", "oes")):
|
||||
sp_version = ""
|
||||
if len(distro_version.split('.', 1)) == 2:
|
||||
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
@@ -642,6 +642,13 @@ class OpensuseDistro(SuseDistro):
|
||||
famregex = ".*openSUSE.*"
|
||||
|
||||
@@ -1102,6 +1116,9 @@ class SLESDistro(SuseDistro):
|
||||
class SLEDDistro(SuseDistro):
|
||||
urldistro = "sled"
|
||||
|
||||
+class OESDistro(SuseDistro):
|
||||
+ urldistro = "oes"
|
||||
+ PRETTY_NAME = "OES"
|
||||
+ _variant_prefix = "oes"
|
||||
+ _suse_regex = [".*Open Enterprise Server*"]
|
||||
+ famregex = ".*Open Enterprise Server.*"
|
||||
+
|
||||
|
||||
# Suse image store is harder - we fetch the kernel RPM and a helper
|
||||
# RPM and then munge bits together to generate a initrd
|
||||
+
|
||||
class DebianDistro(Distro):
|
||||
# ex. http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/
|
||||
# daily builds: https://d-i.debian.org/daily-images/amd64/
|
||||
|
@ -12,13 +12,13 @@ It should be noted that selecting "Customize configuration before install"
|
||||
and "CPUs" -> "Copy host CPU definition" also inserts 'host-model' so
|
||||
this change mirrors what is already done there.
|
||||
|
||||
Index: virt-manager-1.5.0/virtinst/cpu.py
|
||||
Index: virt-manager-2.0.0/virtinst/domain/cpu.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/cpu.py
|
||||
+++ virt-manager-1.5.0/virtinst/cpu.py
|
||||
@@ -98,12 +98,16 @@ class CPU(XMLBuilder):
|
||||
SPECIAL_MODE_HOST_PASSTHROUGH, SPECIAL_MODE_CLEAR]
|
||||
def set_special_mode(self, val):
|
||||
--- virt-manager-2.0.0.orig/virtinst/domain/cpu.py
|
||||
+++ virt-manager-2.0.0/virtinst/domain/cpu.py
|
||||
@@ -88,12 +88,16 @@ class DomainCpu(XMLBuilder):
|
||||
val = self.SPECIAL_MODE_HOST_MODEL
|
||||
|
||||
if (val == self.SPECIAL_MODE_HOST_MODEL or
|
||||
- val == self.SPECIAL_MODE_HOST_PASSTHROUGH):
|
||||
+ val == self.SPECIAL_MODE_HOST_PASSTHROUGH or
|
||||
@ -27,10 +27,10 @@ Index: virt-manager-1.5.0/virtinst/cpu.py
|
||||
self.vendor = None
|
||||
self.model_fallback = None
|
||||
for f in self.features:
|
||||
self.remove_feature(f)
|
||||
self.remove_child(f)
|
||||
+ if val == self.SPECIAL_MODE_HOST_COPY:
|
||||
+ val = self.SPECIAL_MODE_HOST_MODEL
|
||||
+ self.match = "exact"
|
||||
self.mode = val
|
||||
elif val == self.SPECIAL_MODE_HOST_COPY:
|
||||
self.copy_host_cpu()
|
||||
self.copy_host_cpu(guest)
|
||||
|
@ -1,30 +0,0 @@
|
||||
References: bsc#1042709
|
||||
|
||||
Index: virt-manager-1.5.0/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.0/virtinst/urlfetcher.py
|
||||
@@ -470,9 +470,20 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
arch = "ppc64le"
|
||||
|
||||
def _parse_sle_distribution(d):
|
||||
- sle_version = d[1].strip().rsplit(' ')[4]
|
||||
- if len(d[1].strip().rsplit(' ')) > 5:
|
||||
- sle_version = sle_version + '.' + d[1].strip().rsplit(' ')[5][2]
|
||||
+ d_list = d[1].strip().rsplit(' ')
|
||||
+ d_len = len(d_list)
|
||||
+ sle_version = 12
|
||||
+ counter = 0
|
||||
+ while counter < d_len:
|
||||
+ item = d_list[counter].strip()
|
||||
+ if item.isdigit():
|
||||
+ sle_version = item
|
||||
+ if counter+1 < d_len:
|
||||
+ item = d_list[counter+1].strip()
|
||||
+ if item[2].isdigit():
|
||||
+ sle_version = sle_version + '.' + item[2]
|
||||
+ break
|
||||
+ counter += 1
|
||||
return ['VERSION', sle_version]
|
||||
|
||||
dclass = GenericDistro
|
@ -1,19 +0,0 @@
|
||||
References: bsc#1091113
|
||||
In Tumbleweed the .treeinfo file has no version as it is mostly meaningless.
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
@@ -1138,7 +1138,10 @@ class SuseDistro(Distro):
|
||||
"Open Enterprise" in family and 'oes' in self.urldistro:
|
||||
ret = True
|
||||
if ret:
|
||||
- version = self.treeinfo.get("general", "version")
|
||||
+ if 'Tumbleweed' not in family:
|
||||
+ version = self.treeinfo.get("general", "version")
|
||||
+ else:
|
||||
+ version = "tmblweed"
|
||||
distro_version = ['VERSION', version]
|
||||
self.version_from_content = distro_version
|
||||
self._variantFromVersion()
|
@ -2,17 +2,17 @@ Older SLE guests have a two stage installation that need the ISO.
|
||||
Newer SLE PV guests hang when a cdrom device is attached without
|
||||
an ISO file.
|
||||
|
||||
Index: virt-manager-1.4.3/virtinst/guest.py
|
||||
Index: virt-manager-2.0.0/virtinst/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.4.3/virtinst/guest.py
|
||||
@@ -805,7 +805,8 @@ class Guest(XMLBuilder):
|
||||
# install.
|
||||
if (dev.is_cdrom() and
|
||||
getattr(dev, "installer_media", False) and
|
||||
- not self._os_object.is_windows()):
|
||||
+ not self._os_object.is_windows() and
|
||||
+ not self.os_variant.startswith(("sles", "sled", "opensuse"))):
|
||||
dev.path = None
|
||||
|
||||
def _set_defaults(self):
|
||||
--- virt-manager-2.0.0.orig/virtinst/installer.py
|
||||
+++ virt-manager-2.0.0/virtinst/installer.py
|
||||
@@ -103,7 +103,8 @@ class Installer(object):
|
||||
return
|
||||
if self.livecd:
|
||||
return
|
||||
- if guest.osinfo.is_windows():
|
||||
+ if (guest.osinfo.is_windows() or
|
||||
+ guest.osinfo.name.startswith(("sles", "sled", "opensuse"))):
|
||||
# Keep media attached for windows which has a multi stage install
|
||||
return
|
||||
self._install_cdrom_device.path = None
|
||||
|
@ -1,11 +1,11 @@
|
||||
Enhancement for the following GUI wizard installation option.
|
||||
1) If Xen, leave 'Architecture options' expanded so users know PV
|
||||
is the default
|
||||
Index: virt-manager-1.4.2/virtManager/create.py
|
||||
Index: virt-manager-2.0.0/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.2.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.2/virtManager/create.py
|
||||
@@ -397,8 +397,20 @@ class vmmCreate(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/create.py
|
||||
+++ virt-manager-2.0.0/virtManager/create.py
|
||||
@@ -346,8 +346,20 @@ class vmmCreate(vmmGObjectUI):
|
||||
self.widget("method-local").set_active(True)
|
||||
self.widget("create-conn").set_active(-1)
|
||||
activeconn = self._populate_conn_list(urihint)
|
||||
|
@ -1,69 +0,0 @@
|
||||
Reference: bnc#888251
|
||||
A fix for accessing nfs mounted media. A comment in the code states,
|
||||
"Convert RFC compliant NFS nfs://server/path/to/distro
|
||||
to what mount/anaconda expect nfs:server:/path/to/distro
|
||||
and carry the latter form around internally"
|
||||
We need the RFC version to work correctly whereas redhat's anaconda
|
||||
needs their own modified version.
|
||||
Index: virt-manager-1.5.1/virtinst/util.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/util.py
|
||||
+++ virt-manager-1.5.1/virtinst/util.py
|
||||
@@ -369,3 +369,22 @@ def getInstallRepos():
|
||||
return (0, [])
|
||||
return lookupZypperRepos(getHostInstallSource())
|
||||
|
||||
+def sanitize_url(url):
|
||||
+ """
|
||||
+ Do nothing for http or ftp, but make sure nfs is in the expected format
|
||||
+ """
|
||||
+ if url.startswith("nfs://"):
|
||||
+ # Convert RFC compliant NFS nfs://server/path/to/distro
|
||||
+ # to what mount/anaconda expect nfs:server:/path/to/distro
|
||||
+ # and carry the latter form around internally
|
||||
+ url = "nfs:" + url[6:]
|
||||
+
|
||||
+ # If we need to add the : after the server
|
||||
+ index = url.find("/", 4)
|
||||
+ if index == -1:
|
||||
+ raise ValueError(_("Invalid NFS format: No path specified."))
|
||||
+ if url[index - 1] != ":":
|
||||
+ url = url[:index] + ":" + url[index:]
|
||||
+
|
||||
+ return url
|
||||
+
|
||||
Index: virt-manager-1.5.1/virtinst/distroinstaller.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/distroinstaller.py
|
||||
+++ virt-manager-1.5.1/virtinst/distroinstaller.py
|
||||
@@ -44,6 +44,8 @@ def _sanitize_url(url):
|
||||
"""
|
||||
Do nothing for http or ftp, but make sure nfs is in the expected format
|
||||
"""
|
||||
+ # This sanitize will be done later
|
||||
+ return url
|
||||
if url.startswith("nfs://"):
|
||||
# Convert RFC compliant NFS nfs://server/path/to/distro
|
||||
# to what mount/anaconda expect nfs:server:/path/to/distro
|
||||
Index: virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
@@ -33,6 +33,7 @@ import urlparse
|
||||
import requests
|
||||
|
||||
from .osdict import OSDB
|
||||
+from virtinst import util
|
||||
|
||||
|
||||
#########################################################################
|
||||
@@ -301,7 +302,8 @@ class _MountedURLFetcher(_LocalURLFetche
|
||||
mountcmd = "/bin/mount"
|
||||
|
||||
logging.debug("Preparing mount at " + self._srcdir)
|
||||
- cmd = [mountcmd, "-o", "ro", self.location[4:], self._srcdir]
|
||||
+ url = util.sanitize_url(self.location)
|
||||
+ cmd = [mountcmd, "-o", "ro", url[4:], self._srcdir]
|
||||
|
||||
logging.debug("mount cmd: %s", cmd)
|
||||
if not self._in_test_suite:
|
@ -1,16 +0,0 @@
|
||||
With 1.4.2 the code no longer checks for xenpv when adding
|
||||
a usb tablet which is only supported on xen hvm.
|
||||
|
||||
Index: virt-manager-1.4.3/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.4.3/virtinst/guest.py
|
||||
@@ -660,7 +660,7 @@ class Guest(XMLBuilder):
|
||||
|
||||
usb_tablet = False
|
||||
usb_keyboard = False
|
||||
- if self.os.is_x86():
|
||||
+ if self.os.is_x86() and not self.os.is_xenpv():
|
||||
usb_tablet = self._os_object.supports_usbtablet()
|
||||
if self.os.is_arm_machvirt():
|
||||
usb_tablet = True
|
@ -3,20 +3,16 @@ to be supported through LTSS contracts for others. Hence the EOL
|
||||
date in the osinfo-db file may be past but we want the distro to
|
||||
continue to show up in the list.
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/osdict.py
|
||||
Index: virt-manager-2.0.0/virtinst/osdict.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/osdict.py
|
||||
+++ virt-manager-1.5.1/virtinst/osdict.py
|
||||
@@ -376,8 +376,11 @@ class _OsVariant(object):
|
||||
# EOL date. So assume None == EOL, add some manual work arounds.
|
||||
# We should fix this in a new libosinfo version, and then drop
|
||||
# this hack
|
||||
+ # SUSE: How to handle EOL distros that still have LTSS support
|
||||
if self._is_related_to(["fedora24", "rhel7.0", "debian6",
|
||||
- "ubuntu13.04", "win8", "win2k12", "mageia5", "centos7.0"],
|
||||
+ "ubuntu13.04", "win8", "win2k12", "mageia5", "centos7.0",
|
||||
+ "sle15", "sles12sp3", "sles12sp2", "sles12sp1", "sles11sp4",
|
||||
+ "tumbleweed", "opensuse15", "opensuse42.3" ],
|
||||
check_clones=False, check_derives=False):
|
||||
return True
|
||||
--- virt-manager-2.0.0.orig/virtinst/osdict.py
|
||||
+++ virt-manager-2.0.0/virtinst/osdict.py
|
||||
@@ -337,7 +337,7 @@ class _OsVariant(object):
|
||||
|
||||
# If no EOL is present, assume EOL if release was > 5 years ago
|
||||
if rel is not None:
|
||||
- rel5 = _glib_to_datetime(rel) + datetime.timedelta(days=365 * 5)
|
||||
+ rel5 = _glib_to_datetime(rel) + datetime.timedelta(days=365 * 10)
|
||||
return now > rel5
|
||||
return False
|
||||
|
||||
|
@ -1,53 +1,29 @@
|
||||
Reference: bnc#863821
|
||||
grub.xen is required to boot PV VMs that use the BTRFS filesystem.
|
||||
This patch forces the use of grub.xen (instead of using pygrub) for
|
||||
newer suse distros like SLE12 and openSUSE 13.2.
|
||||
Index: virt-manager-1.4.3/virtinst/guest.py
|
||||
suse distros SLE12GA, openSUSE 13.2, and newer.
|
||||
Index: virt-manager-2.0.0/virtinst/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.4.3/virtinst/guest.py
|
||||
@@ -366,8 +366,20 @@ class Guest(XMLBuilder):
|
||||
if (not install and
|
||||
self.os.is_xenpv() and
|
||||
not self.os.kernel):
|
||||
- self.bootloader = "/usr/bin/pygrub"
|
||||
- self.os.clear()
|
||||
+ os_ver = self._get_os_variant()
|
||||
+ if self.os.arch != 'x86_64' or os_ver.startswith("sles9") or \
|
||||
--- virt-manager-2.0.0.orig/virtinst/installer.py
|
||||
+++ virt-manager-2.0.0/virtinst/installer.py
|
||||
@@ -307,6 +307,20 @@ class Installer(object):
|
||||
install_xml = None
|
||||
if self.has_install_phase():
|
||||
install_xml = self._get_install_xml(guest)
|
||||
+ if (guest.os.is_xenpv() and
|
||||
+ not guest.os.kernel):
|
||||
+ os_ver = guest.osinfo.name
|
||||
+ if guest.os.arch != 'x86_64' or os_ver.startswith("sles9") or \
|
||||
+ os_ver.startswith("sles10") or os_ver.startswith("sled10") or \
|
||||
+ os_ver.startswith("opensuse10") or os_ver.startswith("opensuse11"):
|
||||
+ self.bootloader = "pygrub"
|
||||
+ self.os.clear()
|
||||
+ guest.os.bootloader = "pygrub"
|
||||
+ else:
|
||||
+ self.installer._install_kernel = "/usr/lib/grub2/x86_64-xen/grub.xen"
|
||||
+ self.installer._install_initrd = None
|
||||
+ self.installer.extraargs = None
|
||||
+ # alter_bootconfig won't update the osxml unless it thinks
|
||||
+ # we are in an install phase. Add force_update param to call
|
||||
+ self.installer.alter_bootconfig(self, True, True)
|
||||
+ guest.os.bootloader = None
|
||||
+ self._install_kernel = "/usr/lib/grub2/x86_64-xen/grub.xen"
|
||||
+ self._install_initrd = None
|
||||
+ self.extraargs = None
|
||||
+ logging.info("Using grub.xen to boot guest")
|
||||
+ self._alter_bootconfig(guest)
|
||||
final_xml = guest.get_xml()
|
||||
|
||||
return self.get_xml_config()
|
||||
|
||||
Index: virt-manager-1.4.3/virtinst/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtinst/installer.py
|
||||
+++ virt-manager-1.4.3/virtinst/installer.py
|
||||
@@ -99,7 +99,7 @@ class Installer(object):
|
||||
break
|
||||
return bootorder
|
||||
|
||||
- def alter_bootconfig(self, guest, isinstall):
|
||||
+ def alter_bootconfig(self, guest, isinstall, force_update=False):
|
||||
"""
|
||||
Generate the portion of the guest xml that determines boot devices
|
||||
and parameters. (typically the <os></os> block)
|
||||
@@ -110,7 +110,7 @@ class Installer(object):
|
||||
'post-install' phase.
|
||||
@type isinstall: C{bool}
|
||||
"""
|
||||
- if isinstall and not self.has_install_phase():
|
||||
+ if isinstall and not force_update and not self.has_install_phase():
|
||||
return
|
||||
|
||||
bootorder = guest.os.bootorder
|
||||
logging.debug("Generated install XML: %s",
|
||||
|
@ -1,270 +1,35 @@
|
||||
Index: virt-manager-1.5.1/virt-install
|
||||
Index: virt-manager-2.0.0/virtinst/osdict.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virt-install
|
||||
+++ virt-manager-1.5.1/virt-install
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python2
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright 2005-2014 Red Hat, Inc.
|
||||
#
|
||||
Index: virt-manager-1.5.1/virtinst/uri.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/uri.py
|
||||
+++ virt-manager-1.5.1/virtinst/uri.py
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
import logging
|
||||
import re
|
||||
-import urllib
|
||||
+import urllib.request, urllib.parse, urllib.error
|
||||
|
||||
from .cli import parse_optstr_tuples
|
||||
|
||||
@@ -47,7 +47,7 @@ class URI(object):
|
||||
"""
|
||||
def __init__(self, uri):
|
||||
self.uri = uri
|
||||
- unquoted_uri = urllib.unquote(uri)
|
||||
+ unquoted_uri = urllib.parse.unquote(uri)
|
||||
|
||||
(self.scheme, self.username, self.hostname,
|
||||
self.path, self.query, self.fragment) = self._split(unquoted_uri)
|
||||
Index: virt-manager-1.5.1/virtinst/hostkeymap.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/hostkeymap.py
|
||||
+++ virt-manager-1.5.1/virtinst/hostkeymap.py
|
||||
@@ -20,6 +20,7 @@
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
+import functools
|
||||
|
||||
|
||||
_ETC_VCONSOLE = "/etc/vconsole.conf"
|
||||
@@ -202,7 +203,7 @@ def sanitize_keymap(kt):
|
||||
return len(b) - len(a)
|
||||
|
||||
clean_kt = kt.replace("-", "").replace("_", "")
|
||||
- sorted_keys = sorted(keytable.keys(), len_cmp)
|
||||
+ sorted_keys = sorted(list(keytable.keys()), key=functools.cmp_to_key(len_cmp))
|
||||
|
||||
for key in sorted_keys:
|
||||
origkey = key
|
||||
Index: virt-manager-1.5.1/virtinst/support.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/support.py
|
||||
+++ virt-manager-1.5.1/virtinst/support.py
|
||||
@@ -167,7 +167,7 @@ class _SupportCheck(object):
|
||||
self.hv_version = hv_version or {}
|
||||
self.hv_libvirt_version = hv_libvirt_version or {}
|
||||
|
||||
- versions = ([self.version] + self.hv_libvirt_version.values())
|
||||
+ versions = ([self.version] + list(self.hv_libvirt_version.values()))
|
||||
for vstr in versions:
|
||||
v = _version_str_to_int(vstr)
|
||||
if vstr is not None and v != 0 and v < 7009:
|
||||
Index: virt-manager-1.5.1/virtinst/osdict.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/osdict.py
|
||||
+++ virt-manager-1.5.1/virtinst/osdict.py
|
||||
@@ -79,7 +79,7 @@ def _sort(tosort, sortpref=None, limit_p
|
||||
--- virt-manager-2.0.0.orig/virtinst/osdict.py
|
||||
+++ virt-manager-2.0.0/virtinst/osdict.py
|
||||
@@ -51,7 +51,7 @@ def _sort(tosort):
|
||||
distro_mappings = {}
|
||||
retlist = []
|
||||
sortpref = sortpref or []
|
||||
|
||||
- for key, osinfo in tosort.items():
|
||||
+ for key, osinfo in list(tosort.items()):
|
||||
# Libosinfo has some duplicate version numbers here, so append .1
|
||||
# if there's a collision
|
||||
sortby = osinfo.sortby
|
||||
@@ -98,12 +98,12 @@ def _sort(tosort, sortpref=None, limit_p
|
||||
# debian5, debian4, fedora14, fedora13
|
||||
# rather than
|
||||
# debian4, debian5, fedora13, fedora14
|
||||
- for distro_list in distro_mappings.values():
|
||||
+ for distro_list in list(distro_mappings.values()):
|
||||
distro_list.sort()
|
||||
distro_list.reverse()
|
||||
|
||||
# Move the sortpref values to the front of the list
|
||||
- sorted_distro_list = distro_mappings.keys()
|
||||
+ sorted_distro_list = list(distro_mappings.keys())
|
||||
sorted_distro_list.sort()
|
||||
sortpref.reverse()
|
||||
for prefer in sortpref:
|
||||
@@ -264,7 +264,7 @@ class _OSDB(object):
|
||||
"""
|
||||
sortmap = {}
|
||||
|
||||
- for name, osobj in self._all_variants.items():
|
||||
+ for name, osobj in list(self._all_variants.items()):
|
||||
if typename and typename != osobj.get_typename():
|
||||
continue
|
||||
if only_supported and not osobj.get_supported():
|
||||
Index: virt-manager-1.5.1/virtinst/guest.py
|
||||
sortby = _sortby(osinfo)
|
||||
Index: virt-manager-2.0.0/virtinst/installertreemedia.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.5.1/virtinst/guest.py
|
||||
@@ -434,7 +434,7 @@ class Guest(XMLBuilder):
|
||||
domain.undefine()
|
||||
except Exception:
|
||||
pass
|
||||
- raise exc_info[0], exc_info[1], exc_info[2]
|
||||
+ raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
|
||||
--- virt-manager-2.0.0.orig/virtinst/installertreemedia.py
|
||||
+++ virt-manager-2.0.0/virtinst/installertreemedia.py
|
||||
@@ -22,7 +22,7 @@ from .osdict import OSDB
|
||||
# Enum of the various install media types we can have
|
||||
(MEDIA_DIR,
|
||||
MEDIA_ISO,
|
||||
- MEDIA_URL) = range(1, 4)
|
||||
+ MEDIA_URL) = list(range(1, 4))
|
||||
|
||||
if install_xml and install_xml != final_xml:
|
||||
domain = self.conn.defineXML(final_xml)
|
||||
@@ -1099,7 +1099,7 @@ class Guest(XMLBuilder):
|
||||
(str(d), str(addresses[addrstr][addr.function])))
|
||||
addresses[addrstr][addr.function] = d
|
||||
|
||||
- for devs in addresses.values():
|
||||
+ for devs in list(addresses.values()):
|
||||
if len(devs) > 1 and 0 in devs:
|
||||
devs[0].address.multifunction = True
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/distroinstaller.py
|
||||
def _is_url(url):
|
||||
Index: virt-manager-2.0.0/virtinst/xmlbuilder.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/distroinstaller.py
|
||||
+++ virt-manager-1.5.1/virtinst/distroinstaller.py
|
||||
@@ -68,7 +68,7 @@ def _sanitize_url(url):
|
||||
MEDIA_LOCATION_URL,
|
||||
MEDIA_CDROM_PATH,
|
||||
MEDIA_CDROM_URL,
|
||||
- MEDIA_CDROM_IMPLIED) = range(1, 7)
|
||||
+ MEDIA_CDROM_IMPLIED) = list(range(1, 7))
|
||||
|
||||
|
||||
class DistroInstaller(Installer):
|
||||
Index: virt-manager-1.5.1/virtinst/cli.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/cli.py
|
||||
+++ virt-manager-1.5.1/virtinst/cli.py
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
@@ -294,7 +294,7 @@ def _do_creds_authname(creds):
|
||||
|
||||
res = cred[retindex]
|
||||
if credtype == libvirt.VIR_CRED_AUTHNAME:
|
||||
- res = raw_input(prompt)
|
||||
+ res = input(prompt)
|
||||
elif credtype == libvirt.VIR_CRED_PASSPHRASE:
|
||||
import getpass
|
||||
res = getpass.getpass(prompt)
|
||||
@@ -1193,7 +1193,7 @@ class VirtCLIParser(object):
|
||||
passed an invalid argument such as --disk idontexist=foo
|
||||
"""
|
||||
if optdict:
|
||||
- fail(_("Unknown options %s") % optdict.keys())
|
||||
+ fail(_("Unknown options %s") % list(optdict.keys()))
|
||||
|
||||
def _parse(self, inst):
|
||||
"""
|
||||
@@ -1681,7 +1681,7 @@ class ParserBoot(VirtCLIParser):
|
||||
def _parse(self, inst):
|
||||
# Build boot order
|
||||
boot_order = []
|
||||
- for cliname in self.optdict.keys():
|
||||
+ for cliname in list(self.optdict.keys()):
|
||||
if cliname not in inst.os.BOOT_DEVICES:
|
||||
continue
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/xmlbuilder.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/xmlbuilder.py
|
||||
+++ virt-manager-1.5.1/virtinst/xmlbuilder.py
|
||||
@@ -327,7 +327,7 @@ class XMLChildProperty(property):
|
||||
|
||||
def _findpropname(self, xmlbuilder):
|
||||
if self._propname is None:
|
||||
- for key, val in xmlbuilder._all_child_props().items():
|
||||
+ for key, val in list(xmlbuilder._all_child_props().items()):
|
||||
if val is self:
|
||||
self._propname = key
|
||||
break
|
||||
@@ -475,7 +475,7 @@ class XMLProperty(property):
|
||||
as in the XMLBuilder class. This is just for debug purposes.
|
||||
"""
|
||||
if self._propname is None:
|
||||
- for key, val in xmlbuilder._all_xml_props().items():
|
||||
+ for key, val in list(xmlbuilder._all_xml_props().items()):
|
||||
if val is self:
|
||||
self._propname = key
|
||||
break
|
||||
@@ -832,7 +832,7 @@ class XMLBuilder(object):
|
||||
self.conn = conn
|
||||
|
||||
if self._XML_SANITIZE:
|
||||
- parsexml = parsexml.decode('ascii', 'ignore').encode('ascii')
|
||||
+ #parsexml = parsexml.decode('ascii', 'ignore').encode('ascii')
|
||||
parsexml = "".join([c for c in parsexml if c in string.printable])
|
||||
|
||||
self._propstore = {}
|
||||
@@ -846,7 +846,7 @@ class XMLBuilder(object):
|
||||
def _initial_child_parse(self):
|
||||
# Walk the XML tree and hand of parsing to any registered
|
||||
# child classes
|
||||
- for xmlprop in self._all_child_props().values():
|
||||
+ for xmlprop in list(self._all_child_props().values()):
|
||||
if xmlprop.is_single:
|
||||
child_class = xmlprop.child_classes[0]
|
||||
prop_path = xmlprop.get_prop_xpath(self, child_class)
|
||||
@@ -888,7 +888,7 @@ class XMLBuilder(object):
|
||||
|
||||
# XMLChildProperty stores a list in propstore, which dict shallow
|
||||
# copy won't fix for us.
|
||||
- for name, value in ret._propstore.items():
|
||||
+ for name, value in list(ret._propstore.items()):
|
||||
if not isinstance(value, list):
|
||||
continue
|
||||
ret._propstore[name] = [obj.copy() for obj in ret._propstore[name]]
|
||||
@@ -929,8 +929,8 @@ class XMLBuilder(object):
|
||||
if leave_stub:
|
||||
_top_node = _get_xpath_node(self._xmlstate.xml_ctx,
|
||||
self.get_root_xpath())
|
||||
- props = self._all_xml_props().values()
|
||||
- props += self._all_child_props().values()
|
||||
+ props = list(self._all_xml_props().values())
|
||||
+ props += list(self._all_child_props().values())
|
||||
for prop in props:
|
||||
prop.clear(self)
|
||||
finally:
|
||||
@@ -993,7 +993,7 @@ class XMLBuilder(object):
|
||||
if not hasattr(self.__class__, cachename):
|
||||
ret = {}
|
||||
for c in reversed(type.mro(self.__class__)[:-1]):
|
||||
- for key, val in c.__dict__.items():
|
||||
+ for key, val in list(c.__dict__.items()):
|
||||
if isinstance(val, checkclass):
|
||||
ret[key] = val
|
||||
setattr(self.__class__, cachename, ret)
|
||||
@@ -1028,7 +1028,7 @@ class XMLBuilder(object):
|
||||
|
||||
def _find_child_prop(self, child_class, return_single=False):
|
||||
xmlprops = self._all_child_props()
|
||||
- for xmlprop in xmlprops.values():
|
||||
+ for xmlprop in list(xmlprops.values()):
|
||||
if xmlprop.is_single and not return_single:
|
||||
continue
|
||||
if child_class in xmlprop.child_classes:
|
||||
@@ -1087,7 +1087,7 @@ class XMLBuilder(object):
|
||||
Return a list of all XML child objects with the passed class
|
||||
"""
|
||||
ret = []
|
||||
- for prop in self._all_child_props().values():
|
||||
+ for prop in list(self._all_child_props().values()):
|
||||
ret += [obj for obj in util.listify(prop._get(self))
|
||||
if obj.__class__ == klass]
|
||||
return ret
|
||||
@@ -1110,7 +1110,7 @@ class XMLBuilder(object):
|
||||
xpaths point at their particular element
|
||||
--- virt-manager-2.0.0.orig/virtinst/xmlbuilder.py
|
||||
+++ virt-manager-2.0.0/virtinst/xmlbuilder.py
|
||||
@@ -625,7 +625,7 @@ class XMLBuilder(object):
|
||||
whenever child objects are added or removed
|
||||
"""
|
||||
typecount = {}
|
||||
- for propname, xmlprop in self._all_child_props().items():
|
||||
@ -272,29 +37,11 @@ Index: virt-manager-1.5.1/virtinst/xmlbuilder.py
|
||||
for obj in util.listify(getattr(self, propname)):
|
||||
idxstr = ""
|
||||
if not xmlprop.is_single:
|
||||
@@ -1168,7 +1168,7 @@ class XMLBuilder(object):
|
||||
xmlprops = self._all_xml_props()
|
||||
childprops = self._all_child_props()
|
||||
|
||||
- for prop in xmlprops.values():
|
||||
+ for prop in list(xmlprops.values()):
|
||||
prop._set_default(self)
|
||||
|
||||
# Set up preferred XML ordering
|
||||
@@ -1183,7 +1183,7 @@ class XMLBuilder(object):
|
||||
elif key in childprops:
|
||||
do_order.insert(0, key)
|
||||
|
||||
- for key in childprops.keys():
|
||||
+ for key in list(childprops.keys()):
|
||||
if key not in do_order:
|
||||
do_order.append(key)
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/domcapabilities.py
|
||||
Index: virt-manager-2.0.0/virtinst/domcapabilities.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/domcapabilities.py
|
||||
+++ virt-manager-1.5.1/virtinst/domcapabilities.py
|
||||
@@ -166,7 +166,7 @@ class DomainCapabilities(XMLBuilder):
|
||||
--- virt-manager-2.0.0.orig/virtinst/domcapabilities.py
|
||||
+++ virt-manager-2.0.0/virtinst/domcapabilities.py
|
||||
@@ -202,7 +202,7 @@ class DomainCapabilities(XMLBuilder):
|
||||
return _("BIOS")
|
||||
return _("None")
|
||||
|
||||
@ -303,29 +50,11 @@ Index: virt-manager-1.5.1/virtinst/domcapabilities.py
|
||||
for pattern in patterns:
|
||||
if re.match(pattern, path):
|
||||
return (_("UEFI %(arch)s: %(path)s") %
|
||||
@@ -178,7 +178,7 @@ class DomainCapabilities(XMLBuilder):
|
||||
"""
|
||||
Return True if we know how to setup UEFI for the passed arch
|
||||
"""
|
||||
- return self.arch in self._uefi_arch_patterns.keys()
|
||||
+ return self.arch in list(self._uefi_arch_patterns.keys())
|
||||
|
||||
def supports_uefi_xml(self):
|
||||
"""
|
||||
Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
Index: virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
|
||||
+++ virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
@@ -87,7 +87,7 @@ def _is_dir_searchable(uid, username, pa
|
||||
logging.debug("Cmd '%s' failed: %s", cmd, err)
|
||||
return False
|
||||
|
||||
- return bool(re.search("user:%s:..x" % username, out))
|
||||
+ return bool(re.search("user:%s:..x" % username, out.decode()))
|
||||
|
||||
|
||||
class _Host(XMLBuilder):
|
||||
@@ -455,7 +455,7 @@ class VirtualDisk(VirtualDevice):
|
||||
--- virt-manager-2.0.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
@@ -327,7 +327,7 @@ class DeviceDisk(Device):
|
||||
digit = 1
|
||||
|
||||
seen_valid = True
|
||||
@ -334,7 +63,7 @@ Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
|
||||
return gen_t
|
||||
|
||||
@@ -1056,11 +1056,11 @@ class VirtualDisk(VirtualDevice):
|
||||
@@ -918,11 +918,11 @@ class DeviceDisk(Device):
|
||||
def get_target():
|
||||
first_found = None
|
||||
|
||||
@ -348,266 +77,11 @@ Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
|
||||
for i in ran:
|
||||
postfix = self.num_to_target(i + 1)
|
||||
Index: virt-manager-1.5.1/virtinst/storage.py
|
||||
Index: virt-manager-2.0.0/virtinst/pollhelpers.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/storage.py
|
||||
+++ virt-manager-1.5.1/virtinst/storage.py
|
||||
@@ -130,7 +130,7 @@ class StoragePool(_StorageObject):
|
||||
"""
|
||||
Return list of appropriate pool types
|
||||
"""
|
||||
- return StoragePool._descs.keys()
|
||||
+ return list(StoragePool._descs.keys())
|
||||
|
||||
@staticmethod
|
||||
def get_pool_type_desc(pool_type):
|
||||
Index: virt-manager-1.5.1/virtinst/devicegraphics.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/devicegraphics.py
|
||||
+++ virt-manager-1.5.1/virtinst/devicegraphics.py
|
||||
@@ -84,7 +84,7 @@ class VirtualGraphics(VirtualDevice):
|
||||
"""
|
||||
from . import hostkeymap
|
||||
|
||||
- orig_list = hostkeymap.keytable.values()
|
||||
+ orig_list = list(hostkeymap.keytable.values())
|
||||
sort_list = []
|
||||
|
||||
orig_list.sort()
|
||||
Index: virt-manager-1.5.1/virtinst/util.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/util.py
|
||||
+++ virt-manager-1.5.1/virtinst/util.py
|
||||
@@ -147,7 +147,7 @@ def generate_name(base, collision_cb, su
|
||||
else:
|
||||
return collision_cb(tryname)
|
||||
|
||||
- numrange = range(start_num, start_num + 100000)
|
||||
+ numrange = list(range(start_num, start_num + 100000))
|
||||
if not force_num:
|
||||
numrange = [None] + numrange
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
-import ConfigParser
|
||||
+import configparser
|
||||
import ftplib
|
||||
import io
|
||||
import logging
|
||||
@@ -27,8 +27,8 @@ import os
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
-import urllib2
|
||||
-import urlparse
|
||||
+import urllib.request, urllib.error, urllib.parse
|
||||
+import urllib.parse
|
||||
|
||||
import requests
|
||||
|
||||
@@ -220,9 +220,13 @@ class _FTPURLFetcher(_URLFetcher):
|
||||
return
|
||||
|
||||
try:
|
||||
- parsed = urlparse.urlparse(self.location)
|
||||
+ parsed = urllib.parse.urlparse(self.location)
|
||||
self._ftp = ftplib.FTP()
|
||||
- self._ftp.connect(parsed.hostname, parsed.port)
|
||||
+ if parsed.port is None:
|
||||
+ port = 0
|
||||
+ else:
|
||||
+ port = parsed.port
|
||||
+ self._ftp.connect(parsed.hostname, port)
|
||||
self._ftp.login()
|
||||
# Force binary mode
|
||||
self._ftp.voidcmd("TYPE I")
|
||||
@@ -234,9 +238,9 @@ class _FTPURLFetcher(_URLFetcher):
|
||||
"""
|
||||
Use urllib2 and ftplib to grab the file
|
||||
"""
|
||||
- request = urllib2.Request(url)
|
||||
- urlobj = urllib2.urlopen(request)
|
||||
- size = self._ftp.size(urlparse.urlparse(url)[2])
|
||||
+ request = urllib.request.Request(url)
|
||||
+ urlobj = urllib.request.urlopen(request)
|
||||
+ size = self._ftp.size(urllib.parse.urlparse(url)[2])
|
||||
return urlobj, size
|
||||
|
||||
|
||||
@@ -252,7 +256,7 @@ class _FTPURLFetcher(_URLFetcher):
|
||||
self._ftp = None
|
||||
|
||||
def _hasFile(self, url):
|
||||
- path = urlparse.urlparse(url)[2]
|
||||
+ path = urllib.parse.urlparse(url)[2]
|
||||
|
||||
try:
|
||||
try:
|
||||
@@ -277,7 +281,7 @@ class _LocalURLFetcher(_URLFetcher):
|
||||
return os.path.exists(url)
|
||||
|
||||
def _grabber(self, url):
|
||||
- urlobj = open(url, "r")
|
||||
+ urlobj = open(url, "rb")
|
||||
size = os.path.getsize(url)
|
||||
return urlobj, size
|
||||
|
||||
@@ -358,6 +362,7 @@ class _ISOURLFetcher(_URLFetcher):
|
||||
|
||||
logging.debug("Running isoinfo: %s", cmd)
|
||||
output = subprocess.check_output(cmd)
|
||||
+ output = output.decode()
|
||||
|
||||
self._cache_file_list = output.splitlines(False)
|
||||
|
||||
@@ -395,14 +400,14 @@ def _grabTreeinfo(fetcher):
|
||||
return None
|
||||
|
||||
try:
|
||||
- treeinfo = ConfigParser.SafeConfigParser()
|
||||
+ treeinfo = configparser.SafeConfigParser()
|
||||
treeinfo.read(tmptreeinfo)
|
||||
finally:
|
||||
os.unlink(tmptreeinfo)
|
||||
|
||||
try:
|
||||
treeinfo.get("general", "family")
|
||||
- except ConfigParser.NoSectionError:
|
||||
+ except configparser.NoSectionError:
|
||||
logging.debug("Did not find 'family' section in treeinfo")
|
||||
return None
|
||||
|
||||
@@ -415,11 +420,13 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
# None if no content, GenericDistro if unknown label type.
|
||||
try:
|
||||
cbuf = fetcher.acquireFileContent("content")
|
||||
+ cbuf = cbuf.decode()
|
||||
except ValueError:
|
||||
try:
|
||||
# If no content file, try media.1/products and media.1/build and create
|
||||
# a cbuf with enough info for the content file parsing code below to work
|
||||
pbuf = fetcher.acquireFileContent("media.1/products").strip()
|
||||
+ pbuf = pbuf.decode()
|
||||
pbuf = pbuf.split(' ', 1)[1].strip()
|
||||
# The media.1/products file naming convention changed between SLE11 and SLE12
|
||||
if pbuf.startswith('SLE'):
|
||||
@@ -428,6 +435,7 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
cbuf = "\nDISTRO ," + pbuf.replace('-', ' ')
|
||||
try:
|
||||
bbuf = fetcher.acquireFileContent("media.1/build").split('-')
|
||||
+ bbuf = bbuf.decode()
|
||||
except:
|
||||
bbuf = ["x86_64"]
|
||||
cbuf = cbuf + "\n" + " ".join(bbuf)
|
||||
@@ -647,7 +655,7 @@ class Distro(object):
|
||||
try:
|
||||
kernelpath = self._getTreeinfoMedia("kernel")
|
||||
initrdpath = self._getTreeinfoMedia("initrd")
|
||||
- except ConfigParser.NoSectionError:
|
||||
+ except configparser.NoSectionError:
|
||||
pass
|
||||
|
||||
if not kernelpath or not initrdpath:
|
||||
@@ -714,6 +722,7 @@ class Distro(object):
|
||||
# Fetch 'filename' and return True/False if it matches the regex
|
||||
try:
|
||||
content = self.fetcher.acquireFileContent(filename)
|
||||
+ content = content.decode()
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
@@ -783,15 +792,15 @@ class GenericDistro(Distro):
|
||||
self._valid_kernel_path = (
|
||||
self._getTreeinfoMedia("kernel"),
|
||||
self._getTreeinfoMedia("initrd"))
|
||||
- except (ConfigParser.NoSectionError,
|
||||
- ConfigParser.NoOptionError) as e:
|
||||
+ except (configparser.NoSectionError,
|
||||
+ configparser.NoOptionError) as e:
|
||||
logging.debug(e)
|
||||
|
||||
if self.treeinfo.has_section(isoSection):
|
||||
try:
|
||||
self._valid_iso_path = self.treeinfo.get(isoSection,
|
||||
"boot.iso")
|
||||
- except ConfigParser.NoOptionError as e:
|
||||
+ except configparser.NoOptionError as e:
|
||||
logging.debug(e)
|
||||
|
||||
if self.type == "xen":
|
||||
@@ -1481,7 +1490,7 @@ class ALTLinuxDistro(Distro):
|
||||
# Build list of all *Distro classes
|
||||
def _build_distro_list():
|
||||
allstores = []
|
||||
- for obj in globals().values():
|
||||
+ for obj in list(globals().values()):
|
||||
if isinstance(obj, type) and issubclass(obj, Distro) and obj.name:
|
||||
allstores.append(obj)
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/diskbackend.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/diskbackend.py
|
||||
+++ virt-manager-1.5.1/virtinst/diskbackend.py
|
||||
@@ -404,7 +404,7 @@ class CloneStorageCreator(_StorageCreato
|
||||
else:
|
||||
vfs = os.statvfs(os.path.dirname(self._path))
|
||||
avail = vfs.f_frsize * vfs.f_bavail
|
||||
- need = long(self._size * 1024 * 1024 * 1024)
|
||||
+ need = int(self._size * 1024 * 1024 * 1024)
|
||||
if need > avail:
|
||||
if self._sparse:
|
||||
msg = _("The filesystem will not have enough free space"
|
||||
@@ -424,7 +424,7 @@ class CloneStorageCreator(_StorageCreato
|
||||
text = (_("Cloning %(srcfile)s") %
|
||||
{'srcfile': os.path.basename(self._input_path)})
|
||||
|
||||
- size_bytes = long(self.get_size() * 1024 * 1024 * 1024)
|
||||
+ size_bytes = int(self.get_size() * 1024 * 1024 * 1024)
|
||||
progresscb.start(filename=self._output_path, size=size_bytes,
|
||||
text=text)
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/progress.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/progress.py
|
||||
+++ virt-manager-1.5.1/virtinst/progress.py
|
||||
@@ -481,7 +481,7 @@ def format_number(number, SI=0, space='
|
||||
depth = depth + 1
|
||||
number = number / step
|
||||
|
||||
- if isinstance(number, int) or isinstance(number, long):
|
||||
+ if isinstance(number, int) or isinstance(number, int):
|
||||
# it's an int or a long, which means it didn't get divided,
|
||||
# which means it's already short enough
|
||||
fmt = '%i%s%s'
|
||||
Index: virt-manager-1.5.1/virtinst/pollhelpers.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/pollhelpers.py
|
||||
+++ virt-manager-1.5.1/virtinst/pollhelpers.py
|
||||
@@ -50,7 +50,7 @@ def _new_poll_helper(origmap, typename,
|
||||
current[connkey] = origmap[connkey]
|
||||
del(origmap[connkey])
|
||||
|
||||
- return (origmap.values(), new.values(), current.values())
|
||||
+ return (list(origmap.values()), list(new.values()), list(current.values()))
|
||||
|
||||
|
||||
def _old_poll_helper(origmap, typename,
|
||||
@@ -108,7 +108,7 @@ def _old_poll_helper(origmap, typename,
|
||||
except Exception:
|
||||
logging.exception("Couldn't fetch %s '%s'", typename, name)
|
||||
|
||||
- return (origmap.values(), new.values(), current.values())
|
||||
+ return (list(origmap.values()), list(new.values()), list(current.values()))
|
||||
|
||||
|
||||
def fetch_nets(backend, origmap, build_func):
|
||||
@@ -143,7 +143,7 @@ def fetch_pools(backend, origmap, build_
|
||||
--- virt-manager-2.0.0.orig/virtinst/pollhelpers.py
|
||||
+++ virt-manager-2.0.0/virtinst/pollhelpers.py
|
||||
@@ -131,7 +131,7 @@ def fetch_pools(backend, origmap, build_
|
||||
for obj in objs:
|
||||
try:
|
||||
obj.refresh(0)
|
||||
@ -616,21 +90,3 @@ Index: virt-manager-1.5.1/virtinst/pollhelpers.py
|
||||
pass
|
||||
|
||||
return _new_poll_helper(origmap, name,
|
||||
@@ -222,7 +222,7 @@ def _old_fetch_vms(backend, origmap, bui
|
||||
new = {}
|
||||
|
||||
# Build list of previous vms with proper id/name mappings
|
||||
- for vm in origmap.values():
|
||||
+ for vm in list(origmap.values()):
|
||||
if vm.is_active():
|
||||
oldActiveIDs[vm.get_id()] = vm
|
||||
else:
|
||||
@@ -285,7 +285,7 @@ def _old_fetch_vms(backend, origmap, bui
|
||||
except Exception:
|
||||
logging.exception("Couldn't fetch domain '%s'", name)
|
||||
|
||||
- return (origmap.values(), new.values(), current.values())
|
||||
+ return (list(origmap.values()), list(new.values()), list(current.values()))
|
||||
|
||||
|
||||
def fetch_vms(backend, origmap, build_func):
|
||||
|
@ -13,11 +13,11 @@ status affects the hypervisor connection.
|
||||
|
||||
Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
||||
|
||||
Index: virt-manager-1.4.3/virtinst/pollhelpers.py
|
||||
Index: virt-manager-2.0.0/virtinst/pollhelpers.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtinst/pollhelpers.py
|
||||
+++ virt-manager-1.4.3/virtinst/pollhelpers.py
|
||||
@@ -133,6 +133,19 @@ def fetch_pools(backend, origmap, build_
|
||||
--- virt-manager-2.0.0.orig/virtinst/pollhelpers.py
|
||||
+++ virt-manager-2.0.0/virtinst/pollhelpers.py
|
||||
@@ -121,6 +121,19 @@ def fetch_pools(backend, origmap, build_
|
||||
|
||||
if backend.check_support(
|
||||
backend.SUPPORT_CONN_LISTALLSTORAGEPOOLS) and not FORCE_OLD_POLL:
|
||||
|
@ -1,10 +1,10 @@
|
||||
Reference: bnc#869024
|
||||
Disable graphics on s390x
|
||||
Index: virt-manager-1.5.0/virtinst/guest.py
|
||||
Index: virt-manager-2.0.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.5.0/virtinst/guest.py
|
||||
@@ -126,7 +126,10 @@ class Guest(XMLBuilder):
|
||||
--- virt-manager-2.0.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-2.0.0/virtinst/guest.py
|
||||
@@ -159,7 +159,10 @@ class Guest(XMLBuilder):
|
||||
self.skip_default_channel = False
|
||||
self.skip_default_sound = False
|
||||
self.skip_default_usbredir = False
|
||||
@ -14,36 +14,9 @@ Index: virt-manager-1.5.0/virtinst/guest.py
|
||||
+ else:
|
||||
+ self.skip_default_graphics = False
|
||||
self.skip_default_rng = False
|
||||
self.x86_cpu_default = self.cpu.SPECIAL_MODE_HOST_MODEL_ONLY
|
||||
self.x86_cpu_default = self.cpu.SPECIAL_MODE_APP_DEFAULT
|
||||
|
||||
@@ -687,7 +690,7 @@ class Guest(XMLBuilder):
|
||||
self.add_device(dev)
|
||||
|
||||
def add_default_video_device(self):
|
||||
- if self.os.is_container():
|
||||
+ if self.os.is_container() or self.os.is_s390x():
|
||||
return
|
||||
if self.get_devices("video"):
|
||||
return
|
||||
@@ -742,6 +745,8 @@ class Guest(XMLBuilder):
|
||||
dev.target_type = "virtio"
|
||||
dev.target_name = dev.CHANNEL_NAME_QEMUGA
|
||||
self.add_device(dev)
|
||||
+ elif self.os.is_s390x():
|
||||
+ dev.target_type = "sclp"
|
||||
|
||||
def add_default_graphics(self):
|
||||
if self.skip_default_graphics:
|
||||
@@ -750,7 +755,7 @@ class Guest(XMLBuilder):
|
||||
return
|
||||
if self.os.is_container() and not self.conn.is_vz():
|
||||
return
|
||||
- if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le"]:
|
||||
+ if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "s390x"]:
|
||||
return
|
||||
self.add_device(VirtualGraphics(self.conn))
|
||||
|
||||
@@ -1110,7 +1115,7 @@ class Guest(XMLBuilder):
|
||||
@@ -289,7 +292,7 @@ class Guest(XMLBuilder):
|
||||
if not os_support:
|
||||
return False
|
||||
|
||||
@ -51,4 +24,22 @@ Index: virt-manager-1.5.0/virtinst/guest.py
|
||||
+ if self.os.is_x86() or self.os.is_s390x():
|
||||
return True
|
||||
|
||||
if (self.os.is_arm_vexpress() and
|
||||
return False
|
||||
@@ -592,7 +595,7 @@ class Guest(XMLBuilder):
|
||||
self.add_device(dev)
|
||||
|
||||
def _add_default_video_device(self):
|
||||
- if self.os.is_container():
|
||||
+ if self.os.is_container() or self.os.is_s390x():
|
||||
return
|
||||
if self.devices.video:
|
||||
return
|
||||
@@ -656,7 +659,7 @@ class Guest(XMLBuilder):
|
||||
return
|
||||
if self.os.is_container() and not self.conn.is_vz():
|
||||
return
|
||||
- if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le"]:
|
||||
+ if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "s390x"]:
|
||||
return
|
||||
self.add_device(DeviceGraphics(self.conn))
|
||||
|
||||
|
@ -1,36 +1,28 @@
|
||||
Set cache mode for target installation disk to unsafe for better
|
||||
performance.
|
||||
Index: virt-manager-1.4.3/virtinst/guest.py
|
||||
Index: virt-manager-2.0.0/virtinst/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.4.3/virtinst/guest.py
|
||||
@@ -362,6 +362,17 @@ class Guest(XMLBuilder):
|
||||
|
||||
self._set_osxml_defaults()
|
||||
--- virt-manager-2.0.0.orig/virtinst/installer.py
|
||||
+++ virt-manager-2.0.0/virtinst/installer.py
|
||||
@@ -294,10 +294,21 @@ class Installer(object):
|
||||
guest.os.kernel_args, guest.on_reboot) = data
|
||||
|
||||
def _get_install_xml(self, guest):
|
||||
+ # At install time set the target disk to 'unsafe' for
|
||||
+ # better performance if the target is not a block device
|
||||
+ saved_cache = "None"
|
||||
+ if install:
|
||||
+ disk_devices = self.get_devices("disk")
|
||||
+ if disk_devices:
|
||||
+ target_disk = self.get_devices("disk")[0]
|
||||
+ saved_cache = target_disk.driver_cache
|
||||
+ if target_disk.type != VirtualDisk.TYPE_BLOCK:
|
||||
+ target_disk.driver_cache = VirtualDisk.CACHE_MODE_UNSAFE
|
||||
+ if guest.devices.disk:
|
||||
+ target_disk = guest.devices.disk[0]
|
||||
+ saved_cache = target_disk.driver_cache
|
||||
+ if target_disk.type != DeviceDisk.TYPE_BLOCK:
|
||||
+ target_disk.driver_cache = DeviceDisk.CACHE_MODE_UNSAFE
|
||||
+
|
||||
self.bootloader = None
|
||||
if (not install and
|
||||
self.os.is_xenpv() and
|
||||
@@ -381,7 +392,10 @@ class Guest(XMLBuilder):
|
||||
self.installer.alter_bootconfig(self, True, True)
|
||||
logging.info("Using grub.xen to boot guest")
|
||||
|
||||
- return self.get_xml_config()
|
||||
+ xml_config = self.get_xml_config()
|
||||
+ if install and saved_cache != "None":
|
||||
+ target_disk.driver_cache = saved_cache
|
||||
+ return xml_config
|
||||
|
||||
|
||||
###########################
|
||||
data = self._prepare_get_install_xml(guest)
|
||||
try:
|
||||
self._alter_bootconfig(guest)
|
||||
ret = guest.get_xml()
|
||||
+ if saved_cache != "None":
|
||||
+ target_disk.driver_cache = saved_cache
|
||||
return ret
|
||||
finally:
|
||||
self._remove_install_cdrom_media(guest)
|
||||
|
@ -1,26 +0,0 @@
|
||||
Use the correct qemu emulator based on the architecture.
|
||||
We want to get away from using the old qemu-dm emulator
|
||||
for Xen HVM guests so default to qemu-system-i386.
|
||||
Index: virt-manager-1.5.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.5.0/virtinst/guest.py
|
||||
@@ -897,14 +897,11 @@ class Guest(XMLBuilder):
|
||||
self.emulator = None
|
||||
return
|
||||
|
||||
- if self.emulator:
|
||||
- return
|
||||
-
|
||||
if self.os.is_hvm() and self.type == "xen":
|
||||
- if self.conn.caps.host.cpu.arch == "x86_64":
|
||||
- self.emulator = "/usr/lib64/xen/bin/qemu-dm"
|
||||
- else:
|
||||
- self.emulator = "/usr/lib/xen/bin/qemu-dm"
|
||||
+ # Force not using Xen's old qemu-dm except for remote
|
||||
+ # connections where we don't know the Xen version
|
||||
+ if not self.conn.is_remote() or not self.emulator:
|
||||
+ self.emulator = "/usr/lib/xen/bin/qemu-system-i386"
|
||||
|
||||
def _set_cpu_x86_kvm_default(self):
|
||||
if self.os.arch != self.conn.caps.host.cpu.arch:
|
@ -1,14 +0,0 @@
|
||||
Enhancement to add ocfs2 as a supported FS type
|
||||
Index: virt-manager-1.5.0/virtinst/storage.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/storage.py
|
||||
+++ virt-manager-1.5.0/virtinst/storage.py
|
||||
@@ -460,7 +460,7 @@ class StoragePool(_StorageObject):
|
||||
def list_formats(self):
|
||||
if self.type == self.TYPE_FS:
|
||||
return ["auto", "ext2", "ext3", "ext4", "ufs", "iso9660", "udf",
|
||||
- "gfs", "gfs2", "vfat", "hfs+", "xfs"]
|
||||
+ "gfs", "gfs2", "vfat", "hfs+", "xfs", "ocfs2"]
|
||||
if self.type == self.TYPE_NETFS:
|
||||
return ["auto", "nfs", "glusterfs"]
|
||||
if self.type == self.TYPE_DISK:
|
@ -5,11 +5,11 @@ detect the version of openSUSE ISO media (it changes with every build).
|
||||
When 'opensuse-unknown' is detected, look up the most current version
|
||||
of openSUSE and default to that. This is the same way fedora does it.
|
||||
|
||||
Index: virt-manager-1.5.0/virtinst/osdict.py
|
||||
Index: virt-manager-2.0.0/virtinst/osdict.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/osdict.py
|
||||
+++ virt-manager-1.5.0/virtinst/osdict.py
|
||||
@@ -241,6 +241,12 @@ class _OSDB(object):
|
||||
--- virt-manager-2.0.0.orig/virtinst/osdict.py
|
||||
+++ virt-manager-2.0.0/virtinst/osdict.py
|
||||
@@ -214,6 +214,12 @@ class _OSDB(object):
|
||||
"Converting that to the latest fedora OS version=%s",
|
||||
location, osname)
|
||||
|
||||
@ -21,10 +21,10 @@ Index: virt-manager-1.5.0/virtinst/osdict.py
|
||||
+
|
||||
return osname
|
||||
|
||||
def list_types(self):
|
||||
@@ -275,6 +281,16 @@ class _OSDB(object):
|
||||
# First fedora* occurrence should be the newest
|
||||
return osinfo.name
|
||||
def list_os(self):
|
||||
@@ -239,6 +245,16 @@ class _OSDB(object):
|
||||
def latest_fedora_version(self):
|
||||
return self.latest_regex("fedora[0-9]+")
|
||||
|
||||
+ def latest_opensuse_version(self):
|
||||
+ os_info = None
|
||||
|
@ -2,11 +2,11 @@ References: bsc#989639
|
||||
When the device added is a cdrom device (/dev/sr0), don't use
|
||||
"phy" as the driver name but instead use "qemu".
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
Index: virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
|
||||
+++ virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
@@ -563,7 +563,8 @@ class VirtualDisk(VirtualDevice):
|
||||
--- virt-manager-2.0.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
@@ -435,7 +435,8 @@ class DeviceDisk(Device):
|
||||
# Recommended xen defaults from here:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1171550#c9
|
||||
# If type block, use name=phy. Otherwise do the same as qemu
|
||||
|
@ -4,22 +4,25 @@ a non pae version. The sles10 sp4 32bit kernel will only boot para-
|
||||
virtualized if the pae kernel is selected.
|
||||
Note that sles12 and newer has no 32bit release.
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
Index: virt-manager-2.0.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.5.1/virtinst/urlfetcher.py
|
||||
@@ -1051,8 +1051,12 @@ class SuseDistro(Distro):
|
||||
"boot/%s/initrd" % self.arch))
|
||||
|
||||
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.0.0/virtinst/urldetect.py
|
||||
@@ -538,9 +538,14 @@ class SuseDistro(Distro):
|
||||
self._kernel_paths = []
|
||||
if self.type == "xen":
|
||||
# Matches Opensuse > 10.2 and sles 10
|
||||
- self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
|
||||
- "boot/%s/initrd-xen" % self.arch)]
|
||||
- self._kernel_paths.append(
|
||||
- ("boot/%s/vmlinuz-xen" % tree_arch,
|
||||
- "boot/%s/initrd-xen" % tree_arch))
|
||||
+ if self.arch == "i386":
|
||||
+ self._xen_kernel_paths = [("boot/%s/vmlinuz-xenpae" % self.arch,
|
||||
+ "boot/%s/initrd-xenpae" % self.arch)]
|
||||
+ self._kernel_paths.append(
|
||||
+ ("boot/%s/vmlinuz-xen" % tree_arch,
|
||||
+ "boot/%s/initrd-xen" % tree_arch))
|
||||
+ else:
|
||||
+ self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
|
||||
+ "boot/%s/initrd-xen" % self.arch)]
|
||||
+ self._kernel_paths.append(
|
||||
+ ("boot/%s/vmlinuz-xenpae" % tree_arch,
|
||||
+ "boot/%s/initrd-xenpae" % tree_arch))
|
||||
|
||||
def _variantFromVersion(self):
|
||||
distro_version = self.version_from_content[1].strip()
|
||||
if (tree_arch == "s390x" and
|
||||
(self._os_variant == "sles11" or self._os_variant == "sled11")):
|
||||
|
@ -4,33 +4,32 @@ issue on btrfs.
|
||||
|
||||
Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
||||
|
||||
Index: virt-manager-1.5.0/virtinst/storage.py
|
||||
Index: virt-manager-2.0.0/virtinst/storage.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/storage.py
|
||||
+++ virt-manager-1.5.0/virtinst/storage.py
|
||||
@@ -701,6 +701,12 @@ class StorageVolume(_StorageObject):
|
||||
--- virt-manager-2.0.0.orig/virtinst/storage.py
|
||||
+++ virt-manager-2.0.0/virtinst/storage.py
|
||||
@@ -618,6 +618,11 @@ class StorageVolume(_StorageObject):
|
||||
return self._pool_xml.get_disk_type()
|
||||
file_type = property(_get_vol_type)
|
||||
|
||||
+ def _nocow_default_cb(self):
|
||||
+ return self.conn.check_support(
|
||||
+ self.conn.SUPPORT_CONN_NOCOW)
|
||||
+ nocow = XMLProperty("./target/nocow",
|
||||
+ is_bool=True, default_cb=_nocow_default_cb)
|
||||
+ nocow = XMLProperty("./target/nocow", is_bool=True)
|
||||
+
|
||||
|
||||
##################
|
||||
# XML properties #
|
||||
Index: virt-manager-1.5.0/virtinst/support.py
|
||||
Index: virt-manager-2.0.0/virtinst/support.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtinst/support.py
|
||||
+++ virt-manager-1.5.0/virtinst/support.py
|
||||
@@ -326,6 +326,8 @@ SUPPORT_CONN_USB3_PORTS = _make(version=
|
||||
--- virt-manager-2.0.0.orig/virtinst/support.py
|
||||
+++ virt-manager-2.0.0/virtinst/support.py
|
||||
@@ -267,6 +267,8 @@ SUPPORT_CONN_USB3_PORTS = _make(version=
|
||||
SUPPORT_CONN_MACHVIRT_PCI_DEFAULT = _make(version="3.0.0")
|
||||
SUPPORT_CONN_QEMU_XHCI = _make(version="3.3.0")
|
||||
SUPPORT_CONN_QEMU_XHCI = _make(version="3.3.0", hv_version={"qemu": "2.9.0"})
|
||||
SUPPORT_CONN_VNC_NONE_AUTH = _make(hv_version={"qemu": "2.9.0"})
|
||||
+SUPPORT_CONN_NOCOW = _make(
|
||||
+ version="1.2.18", hv_version={"qemu": "2.2.0", "test": 0})
|
||||
|
||||
|
||||
# This is for disk <driver name=qemu>. xen supports this, but it's
|
||||
# We choose qemu 2.11.0 as the first version to target for q35 default.
|
||||
# That's not really based on anything except reasonably modern at the
|
||||
|
@ -2,12 +2,12 @@ Reference: bnc#813082
|
||||
Virt-manager on Xen doesn't fill in any type thereby defaulting to
|
||||
'raw'. This patch will generate the correct XML on Xen.
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
Index: virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
|
||||
+++ virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
@@ -581,6 +581,10 @@ class VirtualDisk(VirtualDevice):
|
||||
http://lists.gnu.org/archive/html/qemu-devel/2008-04/msg00675.html
|
||||
--- virt-manager-2.0.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
@@ -453,6 +453,10 @@ class DeviceDisk(Device):
|
||||
https://lists.gnu.org/archive/html/qemu-devel/2008-04/msg00675.html
|
||||
"""
|
||||
if self.driver_name != self.DRIVER_NAME_QEMU:
|
||||
+ if self.driver_name and \
|
||||
|
@ -6,12 +6,12 @@ types (ide vs xen) it added xvda with hda. These disks were then
|
||||
passed to qemu where it error'ed out with the disks having the same
|
||||
index (in this case both are 0).
|
||||
|
||||
Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
Index: virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/devicedisk.py
|
||||
+++ virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
@@ -1038,6 +1038,17 @@ class VirtualDisk(VirtualDevice):
|
||||
@rtype C{str}
|
||||
--- virt-manager-2.0.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-2.0.0/virtinst/devices/disk.py
|
||||
@@ -900,6 +900,17 @@ class DeviceDisk(Device):
|
||||
:returns: generated target
|
||||
"""
|
||||
prefix, maxnode = self.get_target_prefix(skip_targets)
|
||||
+ postfix_targets = []
|
||||
@ -28,7 +28,7 @@ Index: virt-manager-1.5.1/virtinst/devicedisk.py
|
||||
skip_targets = [t for t in skip_targets if t and t.startswith(prefix)]
|
||||
skip_targets.sort()
|
||||
|
||||
@@ -1051,7 +1062,12 @@ class VirtualDisk(VirtualDevice):
|
||||
@@ -913,7 +924,12 @@ class DeviceDisk(Device):
|
||||
ran = range(pref_ctrl * 7, (pref_ctrl + 1) * 7)
|
||||
|
||||
for i in ran:
|
||||
|
@ -1,29 +0,0 @@
|
||||
Enhancement for when no hypervisor can be found locally it opens
|
||||
the new connection dialog.
|
||||
Index: virt-manager-1.5.0/virtManager/engine.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/engine.py
|
||||
+++ virt-manager-1.5.0/virtManager/engine.py
|
||||
@@ -239,9 +239,6 @@ class vmmEngine(vmmGObject):
|
||||
except Exception:
|
||||
logging.exception("Error talking to PackageKit")
|
||||
|
||||
- if tryuri is None:
|
||||
- tryuri = "qemu:///system"
|
||||
-
|
||||
warnmsg = _("The 'libvirtd' service will need to be started.\n\n"
|
||||
"After that, virt-manager will connect to libvirt on\n"
|
||||
"the next application start up.")
|
||||
@@ -255,7 +252,11 @@ class vmmEngine(vmmGObject):
|
||||
if not connected and do_start:
|
||||
manager.err.ok(_("Libvirt service must be started"), warnmsg)
|
||||
|
||||
- self.idle_add(idle_connect)
|
||||
+ # If there is no default URI to be found, show the new connection dialog
|
||||
+ if tryuri is None:
|
||||
+ self._do_show_connect(self.windowManager)
|
||||
+ else:
|
||||
+ self.idle_add(idle_connect)
|
||||
|
||||
|
||||
def load_stored_uris(self):
|
@ -1,11 +1,11 @@
|
||||
References: bsc#919692
|
||||
Because openSUSE repos combine 32 and 64 bit sources we need to
|
||||
continue showing the 'Architecture' pop-up.
|
||||
Index: virt-manager-1.5.0/virtManager/create.py
|
||||
Index: virt-manager-2.0.0/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/create.py
|
||||
+++ virt-manager-1.5.0/virtManager/create.py
|
||||
@@ -849,11 +849,6 @@ class vmmCreate(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/create.py
|
||||
+++ virt-manager-2.0.0/virtManager/create.py
|
||||
@@ -774,11 +774,6 @@ class vmmCreate(vmmGObjectUI):
|
||||
for guest in self.conn.caps.guests:
|
||||
if guest.os_type == self._capsinfo.os_type:
|
||||
archs.append(guest.arch)
|
||||
|
@ -6,11 +6,11 @@ Steps to get a KVM VM in the crashed state:
|
||||
4) Edit the VM's /etc/default/grub file and remove the crashkernel information
|
||||
and then run grub2-mkconfig /boot/grub2/grub.cfg.
|
||||
5) Start the VM and within the VM's terminal type "echo 'c' > /proc/sysrq-trigger"
|
||||
Index: virt-manager-1.5.0/virtManager/manager.py
|
||||
Index: virt-manager-2.0.0/virtManager/manager.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/manager.py
|
||||
+++ virt-manager-1.5.0/virtManager/manager.py
|
||||
@@ -844,7 +844,7 @@ class vmmManager(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/manager.py
|
||||
+++ virt-manager-2.0.0/virtManager/manager.py
|
||||
@@ -789,7 +789,7 @@ class vmmManager(vmmGObjectUI):
|
||||
show_pause = bool(vm and vm.is_unpauseable())
|
||||
else:
|
||||
show_pause = bool(vm and vm.is_pauseable())
|
||||
@ -19,11 +19,11 @@ Index: virt-manager-1.5.0/virtManager/manager.py
|
||||
|
||||
if vm and vm.managedsave_supported:
|
||||
self.change_run_text(vm.has_managed_save())
|
||||
Index: virt-manager-1.5.0/virtManager/vmmenu.py
|
||||
Index: virt-manager-2.0.0/virtManager/vmmenu.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/vmmenu.py
|
||||
+++ virt-manager-1.5.0/virtManager/vmmenu.py
|
||||
@@ -31,6 +31,7 @@ class _VMMenu(Gtk.Menu):
|
||||
--- virt-manager-2.0.0.orig/virtManager/vmmenu.py
|
||||
+++ virt-manager-2.0.0/virtManager/vmmenu.py
|
||||
@@ -21,6 +21,7 @@ class _VMMenu(Gtk.Menu):
|
||||
self._parent = src
|
||||
self._current_vm_cb = current_vm_cb
|
||||
self._show_open = show_open
|
||||
@ -31,7 +31,7 @@ Index: virt-manager-1.5.0/virtManager/vmmenu.py
|
||||
|
||||
self._init_state()
|
||||
|
||||
@@ -92,6 +93,7 @@ class VMShutdownMenu(_VMMenu):
|
||||
@@ -84,6 +85,7 @@ class VMShutdownMenu(_VMMenu):
|
||||
name = getattr(child, "vmm_widget_name", None)
|
||||
if name in statemap:
|
||||
child.set_sensitive(statemap[name])
|
||||
@ -39,17 +39,17 @@ Index: virt-manager-1.5.0/virtManager/vmmenu.py
|
||||
|
||||
if name == "reset":
|
||||
child.set_tooltip_text(None)
|
||||
@@ -108,7 +110,8 @@ class VMActionMenu(_VMMenu):
|
||||
self._add_action(_("_Pause"), "suspend", Gtk.STOCK_MEDIA_PAUSE)
|
||||
self._add_action(_("R_esume"), "resume", Gtk.STOCK_MEDIA_PAUSE)
|
||||
s = self._add_action(_("_Shut Down"), "shutdown", addcb=False)
|
||||
@@ -106,7 +108,8 @@ class VMActionMenu(_VMMenu):
|
||||
self._add_action(_("R_esume"), "resume", VMActionUI.resume,
|
||||
Gtk.STOCK_MEDIA_PAUSE)
|
||||
s = self._add_action(_("_Shut Down"), "shutdown", None)
|
||||
- s.set_submenu(VMShutdownMenu(self._parent, self._current_vm_cb))
|
||||
+ self._shutdown = VMShutdownMenu(self._parent, self._current_vm_cb)
|
||||
+ s.set_submenu(self._shutdown)
|
||||
|
||||
self.add(Gtk.SeparatorMenuItem())
|
||||
self._add_action(_("Clone..."), "clone", None)
|
||||
@@ -124,7 +127,7 @@ class VMActionMenu(_VMMenu):
|
||||
self._add_action(_("Clone..."), "clone",
|
||||
@@ -126,7 +129,7 @@ class VMActionMenu(_VMMenu):
|
||||
def update_widget_states(self, vm):
|
||||
statemap = {
|
||||
"run": bool(vm and vm.is_runable()),
|
||||
@ -58,7 +58,7 @@ Index: virt-manager-1.5.0/virtManager/vmmenu.py
|
||||
"suspend": bool(vm and vm.is_stoppable()),
|
||||
"resume": bool(vm and vm.is_paused()),
|
||||
"migrate": bool(vm and vm.is_stoppable()),
|
||||
@@ -141,6 +144,8 @@ class VMActionMenu(_VMMenu):
|
||||
@@ -143,6 +146,8 @@ class VMActionMenu(_VMMenu):
|
||||
child.get_submenu().update_widget_states(vm)
|
||||
if name in statemap:
|
||||
child.set_sensitive(statemap[name])
|
||||
|
@ -1,10 +1,10 @@
|
||||
References: bnc#907958
|
||||
Sanity check for those who forget '-X' on ssh and try to start virt-manager
|
||||
Index: virt-manager-1.4.2/virt-manager
|
||||
Index: virt-manager-2.0.0/virt-manager
|
||||
===================================================================
|
||||
--- virt-manager-1.4.2.orig/virt-manager
|
||||
+++ virt-manager-1.4.2/virt-manager
|
||||
@@ -81,8 +81,11 @@ def _import_gtk(leftovers):
|
||||
--- virt-manager-2.0.0.orig/virt-manager
|
||||
+++ virt-manager-2.0.0/virt-manager
|
||||
@@ -66,8 +66,11 @@ def _import_gtk(leftovers):
|
||||
print("gtk3 3.14.0 or later is required.")
|
||||
sys.exit(1)
|
||||
|
||||
@ -15,6 +15,6 @@ Index: virt-manager-1.4.2/virt-manager
|
||||
+ Gtk.Window()
|
||||
+ else:
|
||||
+ raise Exception("Error starting virt-manager: No graphical display found")
|
||||
|
||||
globals()["Gtk"] = Gtk
|
||||
import virtManager.config
|
||||
|
||||
# This ensures we can init gsettings correctly
|
||||
|
@ -1,10 +1,10 @@
|
||||
Enhancement to default to the host os version when creating a VM
|
||||
and media detection of the install source is turned off.
|
||||
Index: virt-manager-1.5.1/virtManager/create.py
|
||||
Index: virt-manager-2.0.0/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtManager/create.py
|
||||
+++ virt-manager-1.5.1/virtManager/create.py
|
||||
@@ -24,6 +24,9 @@ import pkgutil
|
||||
--- virt-manager-2.0.0.orig/virtManager/create.py
|
||||
+++ virt-manager-2.0.0/virtManager/create.py
|
||||
@@ -10,6 +10,9 @@ import pkgutil
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
@ -12,16 +12,16 @@ Index: virt-manager-1.5.1/virtManager/create.py
|
||||
+import os
|
||||
+import re
|
||||
|
||||
from gi.repository import GObject
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Gtk
|
||||
@@ -1511,6 +1514,63 @@ class vmmCreate(vmmGObjectUI):
|
||||
def _cdrom_changed(self, src):
|
||||
self._detectable_media_widget_changed(src)
|
||||
@@ -1183,6 +1186,63 @@ class vmmCreate(vmmGObjectUI):
|
||||
def _iso_activated_cb(self, mediacombo, entry):
|
||||
self._detectable_media_widget_changed(entry, checkfocus=False)
|
||||
|
||||
+ def _lookup_host_os(self):
|
||||
+ def _lookup_sp(line):
|
||||
+ sp = ""
|
||||
+ m = re.search(' SP[1234] ', line)
|
||||
+ m = re.search(' SP[12345] ', line)
|
||||
+ if m:
|
||||
+ sp = m.group(0).strip().lower()
|
||||
+ return sp
|
||||
@ -44,7 +44,7 @@ Index: virt-manager-1.5.1/virtManager/create.py
|
||||
+ if "SUSE Linux Enterprise Server 11" in line:
|
||||
+ return 'linux', ('sles11' + _lookup_sp(line))
|
||||
+ if "SUSE Linux Enterprise Desktop 15" in line:
|
||||
+ return 'linux', ('sle15' + _lookup_sp(line))
|
||||
+ return 'linux', ('sled15' + _lookup_sp(line))
|
||||
+ if "SUSE Linux Enterprise Desktop 12" in line:
|
||||
+ return 'linux', ('sled12' + _lookup_sp(line))
|
||||
+ if "SUSE Linux Enterprise Desktop 11" in line:
|
||||
@ -75,15 +75,15 @@ Index: virt-manager-1.5.1/virtManager/create.py
|
||||
+ break
|
||||
+ index += 1
|
||||
+
|
||||
def _toggle_detect_os(self, src):
|
||||
dodetect = src.get_active()
|
||||
|
||||
@@ -1523,6 +1583,8 @@ class vmmCreate(vmmGObjectUI):
|
||||
self.widget("install-os-version-entry").set_text("")
|
||||
def _detect_os_toggled_cb(self, src):
|
||||
if not src.is_visible():
|
||||
return
|
||||
@@ -1193,6 +1253,8 @@ class vmmCreate(vmmGObjectUI):
|
||||
if dodetect:
|
||||
self._os_already_detected_for_media = False
|
||||
self._start_detect_os_if_needed()
|
||||
+ else:
|
||||
+ self.detect_host_os()
|
||||
|
||||
def _selected_os_row(self):
|
||||
return uiutil.get_list_selected_row(self.widget("install-os-type"))
|
||||
def _browse_oscontainer(self, ignore):
|
||||
self._browse_file("install-oscontainer-fs", is_dir=True)
|
||||
|
@ -1,9 +1,9 @@
|
||||
Enhancement to default to PV instead of HVM on Xen host.
|
||||
Index: virt-manager-1.5.0/virtManager/create.py
|
||||
Index: virt-manager-2.0.0/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/create.py
|
||||
+++ virt-manager-1.5.0/virtManager/create.py
|
||||
@@ -759,7 +759,12 @@ class vmmCreate(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/create.py
|
||||
+++ virt-manager-2.0.0/virtManager/create.py
|
||||
@@ -683,7 +683,12 @@ class vmmCreate(vmmGObjectUI):
|
||||
if gtype is None:
|
||||
# If none specified, prefer HVM so install options aren't limited
|
||||
# with a default PV choice.
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: virt-manager-1.4.0/data/virt-manager.desktop.in
|
||||
Index: virt-manager-2.0.0/data/virt-manager.desktop.in
|
||||
===================================================================
|
||||
--- virt-manager-1.4.0.orig/data/virt-manager.desktop.in
|
||||
+++ virt-manager-1.4.0/data/virt-manager.desktop.in
|
||||
--- virt-manager-2.0.0.orig/data/virt-manager.desktop.in
|
||||
+++ virt-manager-2.0.0/data/virt-manager.desktop.in
|
||||
@@ -1,8 +1,19 @@
|
||||
[Desktop Entry]
|
||||
_Name=Virtual Machine Manager
|
||||
|
@ -1,11 +1,11 @@
|
||||
Reference: bnc#885094
|
||||
grub.xen is required to boot Xen PV VMs using BTRFS. It belongs to
|
||||
the grub2-x86_64-xen RPM and should never be deleted.
|
||||
Index: virt-manager-1.4.3/virtManager/delete.py
|
||||
Index: virt-manager-2.0.0/virtManager/delete.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtManager/delete.py
|
||||
+++ virt-manager-1.4.3/virtManager/delete.py
|
||||
@@ -241,7 +241,7 @@ def populate_storage_list(storage_list,
|
||||
--- virt-manager-2.0.0.orig/virtManager/delete.py
|
||||
+++ virt-manager-2.0.0/virtManager/delete.py
|
||||
@@ -246,7 +246,7 @@ def populate_storage_list(storage_list,
|
||||
diskdata.append(("dtb", vm.get_xmlobj().os.dtb, True, False, True))
|
||||
|
||||
for target, path, ro, shared, is_media in diskdata:
|
||||
|
@ -2,9 +2,11 @@ Creates a problem for gobject-introspection identifying what
|
||||
version of vte is really allowed. Vte 2.91 is installed on the
|
||||
host but the RPM is built requiring 2.90.
|
||||
|
||||
--- virt-manager-1.4.0/virtManager/serialcon.py.orig 2016-06-21 15:35:45.109272839 -0600
|
||||
+++ virt-manager-1.4.0/virtManager/serialcon.py 2016-06-21 15:35:56.637272738 -0600
|
||||
@@ -32,12 +32,12 @@ from gi.repository import Gtk
|
||||
Index: virt-manager-2.0.0/virtManager/serialcon.py
|
||||
===================================================================
|
||||
--- virt-manager-2.0.0.orig/virtManager/serialcon.py
|
||||
+++ virt-manager-2.0.0/virtManager/serialcon.py
|
||||
@@ -12,12 +12,12 @@ from gi.repository import Gtk
|
||||
|
||||
# We can use either 2.91 or 2.90. This is just to silence runtime warnings
|
||||
# pylint: disable=wrong-import-position
|
||||
|
@ -1,23 +0,0 @@
|
||||
References: bsc#1081544
|
||||
|
||||
Index: virt-manager-1.5.1/po/de.po
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/po/de.po
|
||||
+++ virt-manager-1.5.1/po/de.po
|
||||
@@ -3922,7 +3922,6 @@ msgid "Storage Pools"
|
||||
msgstr "Speicher-Pools"
|
||||
|
||||
#: ../virtManager/storagelist.py:342
|
||||
-#, fuzzy, python-format
|
||||
msgid "%s Free / <i>%s In Use</i>"
|
||||
msgstr "%s frei / <i>%s belegt</i>"
|
||||
|
||||
@@ -6191,7 +6190,7 @@ msgstr "URL:"
|
||||
|
||||
#: ../ui/create.ui.h:28
|
||||
msgid "Kerne_l options:"
|
||||
-msgstr "Kernel Options:"
|
||||
+msgstr "Kernel-Optionen:"
|
||||
|
||||
#: ../ui/create.ui.h:29
|
||||
msgid "URL _Options"
|
@ -2,11 +2,11 @@ References: bnc#892003
|
||||
For very large memory VMs Xen takes a long time scrubbing memory
|
||||
which causes the libvirt connection to timeout. Upstream was not
|
||||
interested in making this a preferences option (4/11/2015)
|
||||
Index: virt-manager-1.4.3/virtManager/connection.py
|
||||
Index: virt-manager-2.0.0/virtManager/connection.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtManager/connection.py
|
||||
+++ virt-manager-1.4.3/virtManager/connection.py
|
||||
@@ -1088,7 +1088,7 @@ class vmmConnection(vmmGObject):
|
||||
--- virt-manager-2.0.0.orig/virtManager/connection.py
|
||||
+++ virt-manager-2.0.0/virtManager/connection.py
|
||||
@@ -1059,7 +1059,7 @@ class vmmConnection(vmmGObject):
|
||||
self.caps.get_cpu_values(self.caps.host.cpu.arch)
|
||||
|
||||
try:
|
||||
|
@ -1,9 +1,9 @@
|
||||
Enhancement adding Send Keys for mostly NetWare and also Windows
|
||||
Index: virt-manager-1.4.0/virtManager/console.py
|
||||
Index: virt-manager-2.0.0/virtManager/console.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.0.orig/virtManager/console.py
|
||||
+++ virt-manager-1.4.0/virtManager/console.py
|
||||
@@ -218,6 +218,16 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/console.py
|
||||
+++ virt-manager-2.0.0/virtManager/console.py
|
||||
@@ -204,6 +204,16 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
make_item("Ctrl+Alt+_Backspace", ["Control_L", "Alt_L", "BackSpace"])
|
||||
make_item("Ctrl+Alt+_Delete", ["Control_L", "Alt_L", "Delete"])
|
||||
menu.add(Gtk.SeparatorMenuItem())
|
||||
|
@ -1,10 +1,10 @@
|
||||
/usr/bin/kvm doesn't exist on suse distros so check instead for
|
||||
/usr/bin/qemu-system-x86_64
|
||||
Index: virt-manager-1.5.0/virtManager/connect.py
|
||||
Index: virt-manager-2.0.0/virtManager/connect.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/connect.py
|
||||
+++ virt-manager-1.5.0/virtManager/connect.py
|
||||
@@ -117,7 +117,7 @@ class vmmConnect(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/connect.py
|
||||
+++ virt-manager-2.0.0/virtManager/connect.py
|
||||
@@ -66,7 +66,7 @@ class vmmConnect(vmmGObjectUI):
|
||||
|
||||
if (os.path.exists("/usr/bin/qemu") or
|
||||
os.path.exists("/usr/bin/qemu-kvm") or
|
||||
|
@ -1,16 +0,0 @@
|
||||
Use the correct systemd to start libvirt.
|
||||
Index: virt-manager-1.4.2/virtManager/packageutils.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.2.orig/virtManager/packageutils.py
|
||||
+++ virt-manager-1.4.2/virtManager/packageutils.py
|
||||
@@ -145,8 +145,8 @@ def start_libvirtd():
|
||||
logging.debug("libvirtd not running, asking system-config-services "
|
||||
"to start it")
|
||||
scs = Gio.DBusProxy.new_sync(bus, 0, None,
|
||||
- "org.fedoraproject.Config.Services",
|
||||
- "/org/fedoraproject/Config/Services/systemd1",
|
||||
+ "org.freedesktop.systemd1",
|
||||
+ "/org/freedesktop/systemd1",
|
||||
"org.freedesktop.systemd1.Manager", None)
|
||||
scs.StartUnit("(ss)", unitname, "replace")
|
||||
time.sleep(2)
|
@ -1,27 +1,31 @@
|
||||
Index: virt-manager-1.5.0/virtManager/engine.py
|
||||
If booted Xen, don't try connecting to local qemu
|
||||
Likewise if booted native, don't try connecting to local xen
|
||||
|
||||
Index: virt-manager-2.0.0/virtManager/connmanager.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/engine.py
|
||||
+++ virt-manager-1.5.0/virtManager/engine.py
|
||||
@@ -260,9 +260,22 @@ class vmmEngine(vmmGObject):
|
||||
--- virt-manager-2.0.0.orig/virtManager/connmanager.py
|
||||
+++ virt-manager-2.0.0/virtManager/connmanager.py
|
||||
@@ -26,12 +26,23 @@ class vmmConnectionManager(vmmGObject):
|
||||
|
||||
def load_stored_uris(self):
|
||||
uris = self.config.get_conn_uris() or []
|
||||
def __init__(self):
|
||||
vmmGObject.__init__(self)
|
||||
+ from .connect import vmmConnect
|
||||
+ tryuri = vmmConnect.default_uri()
|
||||
+ found_uri = None
|
||||
for uri in uris:
|
||||
+ # If booted Xen, don't try connecting to local qemu
|
||||
+ # Likewise if booted native, don't try connecting to local xen
|
||||
+ found_uri = False
|
||||
|
||||
self._conns = {}
|
||||
|
||||
# Load URIs from gsettings
|
||||
for uri in self.config.get_conn_uris():
|
||||
+ if uri == 'xen:///' or uri == 'qemu:///system':
|
||||
+ if tryuri and tryuri != uri:
|
||||
+ logging.debug("Skipping %s because it is incompatible with local host", uri)
|
||||
+ continue
|
||||
+ found_uri = True
|
||||
conn = self.make_conn(uri)
|
||||
self.register_conn(conn, skip_config=True)
|
||||
+ if tryuri and found_uri is None:
|
||||
+ logging.debug("Didn't connect with anything, try default %s", tryuri)
|
||||
+ conn = self.make_conn(tryuri)
|
||||
+ self.register_conn(conn, skip_config=False)
|
||||
self.add_conn(uri)
|
||||
+ if tryuri and found_uri is False:
|
||||
+ logging.debug("CEA:: Didn't connect with anything, use default %s", tryuri)
|
||||
+ self.add_conn(tryuri)
|
||||
|
||||
def autostart_conns(self):
|
||||
"""
|
||||
def _cleanup(self):
|
||||
for conn in self._conns.values():
|
||||
|
@ -1,108 +0,0 @@
|
||||
Reference: bnc#866287
|
||||
This patch is for when virt-manager is installed but not libvirt
|
||||
This is not a normal situation on a suse distro. Split out required
|
||||
libvirt packages (kvm vs xen). Only install those libvirt packages
|
||||
for which the host is booted. This patch has a corresponding spec
|
||||
file change (%define libvirt_kvm_packages and %define libvirt_xen_packages).
|
||||
Index: virt-manager-1.5.0/setup.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/setup.py
|
||||
+++ virt-manager-1.5.0/setup.py
|
||||
@@ -308,8 +308,11 @@ class configure(distutils.core.Command):
|
||||
("prefix=", None, "installation prefix"),
|
||||
("qemu-user=", None,
|
||||
"user libvirt uses to launch qemu processes (default=root)"),
|
||||
- ("libvirt-package-names=", None,
|
||||
- "list of libvirt distro packages virt-manager will check for on "
|
||||
+ ("libvirt-kvm-package-names=", None,
|
||||
+ "list of libvirt kvm distro packages virt-manager will check for on "
|
||||
+ "first run. comma separated string (default=none)"),
|
||||
+ ("libvirt-xen-package-names=", None,
|
||||
+ "list of libvirt xen distro packages virt-manager will check for on "
|
||||
"first run. comma separated string (default=none)"),
|
||||
("kvm-package-names=", None,
|
||||
"recommended kvm packages virt-manager will check for on first run "
|
||||
@@ -335,7 +338,8 @@ class configure(distutils.core.Command):
|
||||
def initialize_options(self):
|
||||
self.prefix = sysprefix
|
||||
self.qemu_user = None
|
||||
- self.libvirt_package_names = None
|
||||
+ self.libvirt_kvm_package_names = None
|
||||
+ self.libvirt_xen_package_names = None
|
||||
self.kvm_package_names = None
|
||||
self.askpass_package_names = None
|
||||
self.preferred_distros = None
|
||||
@@ -350,8 +354,10 @@ class configure(distutils.core.Command):
|
||||
template += "prefix = %s\n" % self.prefix
|
||||
if self.qemu_user is not None:
|
||||
template += "default_qemu_user = %s\n" % self.qemu_user
|
||||
- if self.libvirt_package_names is not None:
|
||||
- template += "libvirt_packages = %s\n" % self.libvirt_package_names
|
||||
+ if self.libvirt_kvm_package_names is not None:
|
||||
+ template += "libvirt_kvm_packages = %s\n" % self.libvirt_kvm_package_names
|
||||
+ if self.libvirt_xen_package_names is not None:
|
||||
+ template += "libvirt_xen_packages = %s\n" % self.libvirt_xen_package_names
|
||||
if self.kvm_package_names is not None:
|
||||
template += "hv_packages = %s\n" % self.kvm_package_names
|
||||
if self.askpass_package_names is not None:
|
||||
Index: virt-manager-1.5.0/virtcli/cliconfig.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtcli/cliconfig.py
|
||||
+++ virt-manager-1.5.0/virtcli/cliconfig.py
|
||||
@@ -83,7 +83,8 @@ class _CLIConfig(object):
|
||||
_get_param("preferred_distros", ""))
|
||||
self.hv_packages = _split_list(_get_param("hv_packages", ""))
|
||||
self.askpass_package = _split_list(_get_param("askpass_packages", ""))
|
||||
- self.libvirt_packages = _split_list(_get_param("libvirt_packages", ""))
|
||||
+ self.libvirt_kvm_packages = _split_list(_get_param("libvirt_kvm_packages", ""))
|
||||
+ self.libvirt_xen_packages = _split_list(_get_param("libvirt_xen_packages", ""))
|
||||
self.default_graphics = _get_param("default_graphics", "spice")
|
||||
self.default_hvs = _split_list(_get_param("default_hvs", ""))
|
||||
|
||||
Index: virt-manager-1.5.0/virtManager/config.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/config.py
|
||||
+++ virt-manager-1.5.0/virtManager/config.py
|
||||
@@ -183,7 +183,8 @@ class vmmConfig(object):
|
||||
self.default_qemu_user = CLIConfig.default_qemu_user
|
||||
self.preferred_distros = CLIConfig.preferred_distros
|
||||
self.hv_packages = CLIConfig.hv_packages
|
||||
- self.libvirt_packages = CLIConfig.libvirt_packages
|
||||
+ self.libvirt_kvm_packages = CLIConfig.libvirt_kvm_packages
|
||||
+ self.libvirt_xen_packages = CLIConfig.libvirt_xen_packages
|
||||
self.askpass_package = CLIConfig.askpass_package
|
||||
self.default_graphics_from_config = CLIConfig.default_graphics
|
||||
self.default_hvs = CLIConfig.default_hvs
|
||||
Index: virt-manager-1.5.0/virtManager/engine.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/engine.py
|
||||
+++ virt-manager-1.5.0/virtManager/engine.py
|
||||
@@ -229,22 +229,18 @@ class vmmEngine(vmmGObject):
|
||||
|
||||
ret = None
|
||||
try:
|
||||
- libvirt_packages = self.config.libvirt_packages
|
||||
- packages = self.config.hv_packages + libvirt_packages
|
||||
+ tryuri = vmmConnect.default_uri()
|
||||
+ if tryuri and tryuri.startswith('xen'):
|
||||
+ packages = self.config.libvirt_xen_packages
|
||||
+ else:
|
||||
+ packages = self.config.libvirt_kvm_packages + self.config.hv_packages
|
||||
|
||||
ret = packageutils.check_packagekit(manager, manager.err, packages)
|
||||
except Exception:
|
||||
logging.exception("Error talking to PackageKit")
|
||||
|
||||
- tryuri = None
|
||||
- if ret:
|
||||
- tryuri = "qemu:///system"
|
||||
- elif not self.config.test_first_run:
|
||||
- tryuri = vmmConnect.default_uri()
|
||||
-
|
||||
if tryuri is None:
|
||||
- manager.set_startup_error(msg)
|
||||
- return
|
||||
+ tryuri = "qemu:///system"
|
||||
|
||||
warnmsg = _("The 'libvirtd' service will need to be started.\n\n"
|
||||
"After that, virt-manager will connect to libvirt on\n"
|
@ -3,17 +3,17 @@ When the 'Power on virtual machine' button is double clicked,
|
||||
virt-manager issues two start commands to start the VM which
|
||||
results in a failure. There is code elsewhere to desensitize the
|
||||
button but this patch does it earlier.
|
||||
Index: virt-manager-1.4.3/virtManager/details.py
|
||||
Index: virt-manager-2.0.0/virtManager/details.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtManager/details.py
|
||||
+++ virt-manager-1.4.3/virtManager/details.py
|
||||
@@ -1449,6 +1449,9 @@ class vmmDetails(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/details.py
|
||||
+++ virt-manager-2.0.0/virtManager/details.py
|
||||
@@ -1489,6 +1489,9 @@ class vmmDetails(vmmGObjectUI):
|
||||
def control_vm_run(self, src_ignore):
|
||||
if self.has_unapplied_changes(self.get_hw_row()):
|
||||
return
|
||||
+ # De-sensitize widget so a double click on the icon won't attempt to
|
||||
+ # start the VM twice
|
||||
+ self.widget("control-run").set_sensitive(False)
|
||||
self.emit("action-run-domain",
|
||||
self.vm.conn.get_uri(), self.vm.get_connkey())
|
||||
vmmenu.VMActionUI.run(self, self.vm)
|
||||
|
||||
def control_vm_shutdown(self, src_ignore):
|
||||
|
@ -1,14 +1,8 @@
|
||||
Index: virt-manager-1.5.0/virt-manager
|
||||
Index: virt-manager-2.0.0/virt-manager
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virt-manager
|
||||
+++ virt-manager-1.5.0/virt-manager
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python2
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright (C) 2006, 2014 Red Hat, Inc.
|
||||
# Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com>
|
||||
@@ -81,7 +81,7 @@ def _import_gtk(leftovers):
|
||||
--- virt-manager-2.0.0.orig/virt-manager
|
||||
+++ virt-manager-2.0.0/virt-manager
|
||||
@@ -66,7 +66,7 @@ def _import_gtk(leftovers):
|
||||
print("gtk3 3.14.0 or later is required.")
|
||||
sys.exit(1)
|
||||
|
||||
@ -17,11 +11,11 @@ Index: virt-manager-1.5.0/virt-manager
|
||||
# This will error if Gtk wasn't correctly initialized
|
||||
Gtk.Window()
|
||||
else:
|
||||
Index: virt-manager-1.5.0/virtManager/network.py
|
||||
Index: virt-manager-2.0.0/virtManager/network.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/network.py
|
||||
+++ virt-manager-1.5.0/virtManager/network.py
|
||||
@@ -103,7 +103,7 @@ class vmmNetwork(vmmLibvirtObject):
|
||||
--- virt-manager-2.0.0.orig/virtManager/network.py
|
||||
+++ virt-manager-2.0.0/virtManager/network.py
|
||||
@@ -110,7 +110,7 @@ class vmmNetwork(vmmLibvirtObject):
|
||||
def set_qos(self, **kwargs):
|
||||
xmlobj = self._make_xmlobj_to_define()
|
||||
q = xmlobj.bandwidth
|
||||
@ -30,73 +24,11 @@ Index: virt-manager-1.5.0/virtManager/network.py
|
||||
setattr(q, key, val)
|
||||
|
||||
self._redefine_xmlobj(xmlobj)
|
||||
Index: virt-manager-1.5.0/virtManager/inspection.py
|
||||
Index: virt-manager-2.0.0/virtManager/console.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/inspection.py
|
||||
+++ virt-manager-1.5.0/virtManager/inspection.py
|
||||
@@ -17,8 +17,9 @@
|
||||
# MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
-from Queue import Queue
|
||||
+from queue import Queue
|
||||
from threading import Thread
|
||||
+import functools
|
||||
import logging
|
||||
|
||||
from guestfs import GuestFS # pylint: disable=import-error
|
||||
@@ -212,7 +213,7 @@ class vmmInspection(vmmGObject):
|
||||
return 0
|
||||
else:
|
||||
return -1
|
||||
- mps.sort(compare)
|
||||
+ mps.sort(key=functools.cmp_to_key(compare))
|
||||
|
||||
for mp_dev in mps:
|
||||
try:
|
||||
@@ -263,7 +264,7 @@ class vmmInspection(vmmGObject):
|
||||
data.product_name = str(product_name)
|
||||
data.product_variant = str(product_variant)
|
||||
data.icon = icon
|
||||
- data.applications = list(apps)
|
||||
+ data.applications = apps if apps is None else list(apps)
|
||||
data.error = False
|
||||
|
||||
return data
|
||||
Index: virt-manager-1.5.0/virtManager/systray.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/systray.py
|
||||
+++ virt-manager-1.5.0/virtManager/systray.py
|
||||
@@ -199,13 +199,13 @@ class vmmSystray(vmmGObject):
|
||||
|
||||
def repopulate_menu_list(self):
|
||||
# Build sorted connection list
|
||||
- connsort = self.conn_menuitems.keys()
|
||||
+ connsort = list(self.conn_menuitems.keys())
|
||||
connsort.sort()
|
||||
connsort.reverse()
|
||||
|
||||
# Empty conn list
|
||||
for child in self.systray_menu.get_children():
|
||||
- if child in self.conn_menuitems.values():
|
||||
+ if child in list(self.conn_menuitems.values()):
|
||||
self.systray_menu.remove(child)
|
||||
|
||||
# Build sorted conn list
|
||||
@@ -265,7 +265,7 @@ class vmmSystray(vmmGObject):
|
||||
for vm in conn.list_vms():
|
||||
vm_mappings[vm.get_name()] = vm.get_connkey()
|
||||
|
||||
- vm_names = vm_mappings.keys()
|
||||
+ vm_names = list(vm_mappings.keys())
|
||||
vm_names.sort()
|
||||
|
||||
if len(vm_names) == 0:
|
||||
Index: virt-manager-1.5.0/virtManager/console.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/console.py
|
||||
+++ virt-manager-1.5.0/virtManager/console.py
|
||||
@@ -35,7 +35,7 @@ from .viewers import SpiceViewer, VNCVie
|
||||
--- virt-manager-2.0.0.orig/virtManager/console.py
|
||||
+++ virt-manager-2.0.0/virtManager/console.py
|
||||
@@ -21,7 +21,7 @@ from .viewers import SpiceViewer, VNCVie
|
||||
(_CONSOLE_PAGE_UNAVAILABLE,
|
||||
_CONSOLE_PAGE_AUTHENTICATE,
|
||||
_CONSOLE_PAGE_SERIAL,
|
||||
@ -105,11 +37,11 @@ Index: virt-manager-1.5.0/virtManager/console.py
|
||||
|
||||
|
||||
class _TimedRevealer(vmmGObject):
|
||||
Index: virt-manager-1.5.0/virtManager/connection.py
|
||||
Index: virt-manager-2.0.0/virtManager/connection.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/connection.py
|
||||
+++ virt-manager-1.5.0/virtManager/connection.py
|
||||
@@ -198,7 +198,7 @@ class vmmConnection(vmmGObject):
|
||||
--- virt-manager-2.0.0.orig/virtManager/connection.py
|
||||
+++ virt-manager-2.0.0/virtManager/connection.py
|
||||
@@ -165,7 +165,7 @@ class vmmConnection(vmmGObject):
|
||||
|
||||
(_STATE_DISCONNECTED,
|
||||
_STATE_CONNECTING,
|
||||
@ -117,53 +49,12 @@ Index: virt-manager-1.5.0/virtManager/connection.py
|
||||
+ _STATE_ACTIVE) = list(range(1, 4))
|
||||
|
||||
def __init__(self, uri):
|
||||
vmmGObject.__init__(self)
|
||||
@@ -1215,35 +1215,35 @@ class vmmConnection(vmmGObject):
|
||||
def _update_nets(self, dopoll):
|
||||
keymap = dict((o.get_connkey(), o) for o in self.list_nets())
|
||||
if not dopoll or not self.is_network_capable():
|
||||
- return [], [], keymap.values()
|
||||
+ return [], [], list(keymap.values())
|
||||
return pollhelpers.fetch_nets(self._backend, keymap,
|
||||
(lambda obj, key: vmmNetwork(self, obj, key)))
|
||||
|
||||
def _update_pools(self, dopoll):
|
||||
keymap = dict((o.get_connkey(), o) for o in self.list_pools())
|
||||
if not dopoll or not self.is_storage_capable():
|
||||
- return [], [], keymap.values()
|
||||
+ return [], [], list(keymap.values())
|
||||
return pollhelpers.fetch_pools(self._backend, keymap,
|
||||
(lambda obj, key: vmmStoragePool(self, obj, key)))
|
||||
|
||||
def _update_interfaces(self, dopoll):
|
||||
keymap = dict((o.get_connkey(), o) for o in self.list_interfaces())
|
||||
if not dopoll or not self.is_interface_capable():
|
||||
- return [], [], keymap.values()
|
||||
+ return [], [], list(keymap.values())
|
||||
return pollhelpers.fetch_interfaces(self._backend, keymap,
|
||||
(lambda obj, key: vmmInterface(self, obj, key)))
|
||||
|
||||
def _update_nodedevs(self, dopoll):
|
||||
keymap = dict((o.get_connkey(), o) for o in self.list_nodedevs())
|
||||
if not dopoll or not self.is_nodedev_capable():
|
||||
- return [], [], keymap.values()
|
||||
+ return [], [], list(keymap.values())
|
||||
return pollhelpers.fetch_nodedevs(self._backend, keymap,
|
||||
(lambda obj, key: vmmNodeDevice(self, obj, key)))
|
||||
|
||||
def _update_vms(self, dopoll):
|
||||
keymap = dict((o.get_connkey(), o) for o in self.list_vms())
|
||||
if not dopoll:
|
||||
- return [], [], keymap.values()
|
||||
+ return [], [], list(keymap.values())
|
||||
return pollhelpers.fetch_vms(self._backend, keymap,
|
||||
(lambda obj, key: vmmDomain(self, obj, key)))
|
||||
|
||||
Index: virt-manager-1.5.0/virtManager/addhardware.py
|
||||
self._uri = uri
|
||||
Index: virt-manager-2.0.0/virtManager/addhardware.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/addhardware.py
|
||||
+++ virt-manager-1.5.0/virtManager/addhardware.py
|
||||
@@ -57,7 +57,7 @@ from .addstorage import vmmAddStorage
|
||||
--- virt-manager-2.0.0.orig/virtManager/addhardware.py
|
||||
+++ virt-manager-2.0.0/virtManager/addhardware.py
|
||||
@@ -41,7 +41,7 @@ from .addstorage import vmmAddStorage
|
||||
PAGE_USBREDIR,
|
||||
PAGE_TPM,
|
||||
PAGE_RNG,
|
||||
@ -171,9 +62,9 @@ Index: virt-manager-1.5.0/virtManager/addhardware.py
|
||||
+ PAGE_PANIC) = list(range(0, 17))
|
||||
|
||||
|
||||
class vmmAddHardware(vmmGObjectUI):
|
||||
@@ -1164,7 +1164,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self._dev = VirtualTPMDevice(self.conn.get_backend())
|
||||
def _build_combo(combo, values, default_value=None, sort=True):
|
||||
@@ -877,7 +877,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self._dev = DeviceTpm(self.conn.get_backend())
|
||||
self._dev.type = devtype
|
||||
|
||||
- for param_name, widget_name in tpm_widget_mappings.items():
|
||||
@ -181,84 +72,11 @@ Index: virt-manager-1.5.0/virtManager/addhardware.py
|
||||
make_visible = self._dev.supports_property(param_name)
|
||||
uiutil.set_grid_row_visible(self.widget(widget_name + "-label"),
|
||||
make_visible)
|
||||
@@ -1218,7 +1218,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
self._dev = char_class(self.conn.get_backend())
|
||||
self._dev.type = devtype
|
||||
|
||||
- for param_name, widget_name in char_widget_mappings.items():
|
||||
+ for param_name, widget_name in list(char_widget_mappings.items()):
|
||||
make_visible = self._dev.supports_property(param_name)
|
||||
uiutil.set_grid_row_visible(self.widget(widget_name + "-label"),
|
||||
make_visible)
|
||||
@@ -1671,7 +1671,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
try:
|
||||
self._dev = devclass
|
||||
|
||||
- for param_name, val in value_mappings.items():
|
||||
+ for param_name, val in list(value_mappings.items()):
|
||||
if self._dev.supports_property(param_name) and val is not None:
|
||||
setattr(self._dev, param_name, val)
|
||||
|
||||
@@ -1752,7 +1752,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
try:
|
||||
self._dev = VirtualTPMDevice(conn)
|
||||
self._dev.type = typ
|
||||
- for param_name, val in value_mappings.items():
|
||||
+ for param_name, val in list(value_mappings.items()):
|
||||
if self._dev.supports_property(param_name):
|
||||
setattr(self._dev, param_name, val)
|
||||
except Exception as e:
|
||||
@@ -1856,7 +1856,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
try:
|
||||
self._dev = virtinst.VirtualRNGDevice(self.conn.get_backend())
|
||||
self._dev.type = rtype
|
||||
- for param_name, val in value_mappings.items():
|
||||
+ for param_name, val in list(value_mappings.items()):
|
||||
if self._dev.supports_property(param_name):
|
||||
setattr(self._dev, param_name, val)
|
||||
except Exception as e:
|
||||
Index: virt-manager-1.5.0/virtManager/createinterface.py
|
||||
Index: virt-manager-2.0.0/virtManager/snapshots.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/createinterface.py
|
||||
+++ virt-manager-1.5.0/virtManager/createinterface.py
|
||||
@@ -387,7 +387,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||
Interface.INTERFACE_TYPE_VLAN: "vlan",
|
||||
}
|
||||
|
||||
- for key, value in type_dict.items():
|
||||
+ for key, value in list(type_dict.items()):
|
||||
do_show = (key == itype)
|
||||
self.widget("%s-label" % value).set_visible(do_show)
|
||||
self.widget("%s-box" % value).set_visible(do_show)
|
||||
@@ -544,7 +544,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||
active, None, iface.get_mac()]
|
||||
row_dict[name] = row
|
||||
|
||||
- for name, row in nodedevs.items():
|
||||
+ for name, row in list(nodedevs.items()):
|
||||
try:
|
||||
key = Interface(self.conn.get_backend())
|
||||
key.type = Interface.INTERFACE_TYPE_ETHERNET
|
||||
@@ -556,12 +556,12 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||
row[INTERFACE_ROW_KEY] = key
|
||||
row_dict[name] = row
|
||||
|
||||
- for row in row_dict.values():
|
||||
+ for row in list(row_dict.values()):
|
||||
name = row[INTERFACE_ROW_NAME]
|
||||
row[INTERFACE_ROW_IN_USE_BY] = self.iface_in_use_by(self.conn,
|
||||
name)
|
||||
|
||||
- for row in row_dict.values():
|
||||
+ for row in list(row_dict.values()):
|
||||
model.append(row)
|
||||
|
||||
def get_default_name(self):
|
||||
Index: virt-manager-1.5.0/virtManager/snapshots.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/snapshots.py
|
||||
+++ virt-manager-1.5.0/virtManager/snapshots.py
|
||||
@@ -44,7 +44,7 @@ mimemap = {
|
||||
--- virt-manager-2.0.0.orig/virtManager/snapshots.py
|
||||
+++ virt-manager-2.0.0/virtManager/snapshots.py
|
||||
@@ -30,7 +30,7 @@ mimemap = {
|
||||
|
||||
|
||||
def _mime_to_ext(val, reverse=False):
|
||||
@ -267,250 +85,37 @@ Index: virt-manager-1.5.0/virtManager/snapshots.py
|
||||
if val == m and not reverse:
|
||||
return e
|
||||
if val == e and reverse:
|
||||
@@ -507,7 +507,7 @@ class vmmSnapshotPage(vmmGObjectUI):
|
||||
basesn = os.path.join(cachedir, "snap-screenshot-%s" % name)
|
||||
|
||||
# Remove any pre-existing screenshots so we don't show stale data
|
||||
- for ext in mimemap.values():
|
||||
+ for ext in list(mimemap.values()):
|
||||
p = basesn + "." + ext
|
||||
if os.path.exists(basesn + "." + ext):
|
||||
os.unlink(p)
|
||||
Index: virt-manager-1.5.0/virtManager/graphwidgets.py
|
||||
Index: virt-manager-2.0.0/virtManager/engine.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/graphwidgets.py
|
||||
+++ virt-manager-1.5.0/virtManager/graphwidgets.py
|
||||
@@ -25,8 +25,8 @@ from gi.repository import Gtk
|
||||
|
||||
def rect_print(name, rect):
|
||||
# For debugging
|
||||
- print("%s: height=%d, width=%d, x=%d, y=%d" %
|
||||
- (name, rect.height, rect.width, rect.x, rect.y))
|
||||
+ print(("%s: height=%d, width=%d, x=%d, y=%d" %
|
||||
+ (name, rect.height, rect.width, rect.x, rect.y)))
|
||||
|
||||
|
||||
def _line_helper(cairo_ct, x, y, w, h, points, for_fill=False):
|
||||
Index: virt-manager-1.5.0/virtManager/host.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/host.py
|
||||
+++ virt-manager-1.5.0/virtManager/host.py
|
||||
@@ -43,11 +43,11 @@ EDIT_NET_IDS = (
|
||||
EDIT_NET_NAME,
|
||||
EDIT_NET_AUTOSTART,
|
||||
EDIT_NET_QOS,
|
||||
-) = range(3)
|
||||
+) = list(range(3))
|
||||
|
||||
EDIT_INTERFACE_IDS = (
|
||||
EDIT_INTERFACE_STARTMODE,
|
||||
-) = range(200, 201)
|
||||
+) = list(range(200, 201))
|
||||
|
||||
|
||||
class vmmHost(vmmGObjectUI):
|
||||
Index: virt-manager-1.5.0/virtManager/sshtunnels.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/sshtunnels.py
|
||||
+++ virt-manager-1.5.0/virtManager/sshtunnels.py
|
||||
@@ -20,7 +20,7 @@
|
||||
import functools
|
||||
import logging
|
||||
import os
|
||||
-import Queue
|
||||
+import queue
|
||||
import socket
|
||||
import signal
|
||||
import threading
|
||||
@@ -125,7 +125,7 @@ class _TunnelScheduler(object):
|
||||
"""
|
||||
def __init__(self):
|
||||
self._thread = None
|
||||
- self._queue = Queue.Queue()
|
||||
+ self._queue = queue.Queue()
|
||||
self._lock = threading.Lock()
|
||||
|
||||
def _handle_queue(self):
|
||||
Index: virt-manager-1.5.0/virtManager/engine.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/engine.py
|
||||
+++ virt-manager-1.5.0/virtManager/engine.py
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
import logging
|
||||
import re
|
||||
-import Queue
|
||||
+import queue
|
||||
import threading
|
||||
import traceback
|
||||
|
||||
@@ -60,7 +60,7 @@ DETAILS_CONFIG = 2
|
||||
DETAILS_CONSOLE = 3
|
||||
--- virt-manager-2.0.0.orig/virtManager/engine.py
|
||||
+++ virt-manager-2.0.0/virtManager/engine.py
|
||||
@@ -21,7 +21,7 @@ from .inspection import vmmInspection
|
||||
from .systray import vmmSystray
|
||||
|
||||
(PRIO_HIGH,
|
||||
- PRIO_LOW) = range(1, 3)
|
||||
+ PRIO_LOW) = list(range(1, 3))
|
||||
|
||||
|
||||
class vmmEngine(vmmGObject):
|
||||
@@ -105,7 +105,7 @@ class vmmEngine(vmmGObject):
|
||||
target=self._handle_tick_queue,
|
||||
args=())
|
||||
self._tick_thread.daemon = True
|
||||
- self._tick_queue = Queue.PriorityQueue(100)
|
||||
+ self._tick_queue = queue.PriorityQueue(100)
|
||||
|
||||
self.inspection = None
|
||||
self._create_inspection_thread()
|
||||
@@ -154,7 +154,7 @@ class vmmEngine(vmmGObject):
|
||||
self._application.add_action(action)
|
||||
|
||||
def _default_startup(self, skip_autostart, cliuri):
|
||||
- uris = self.conns.keys()
|
||||
+ uris = list(self.conns.keys())
|
||||
if not uris:
|
||||
logging.debug("No stored URIs found.")
|
||||
else:
|
||||
@@ -282,15 +282,15 @@ class vmmEngine(vmmGObject):
|
||||
"""
|
||||
We serialize conn autostart, so polkit/ssh-askpass doesn't spam
|
||||
"""
|
||||
- queue = Queue.Queue()
|
||||
+ local_queue = queue.Queue()
|
||||
auto_conns = [uri for uri in self.conns
|
||||
if self.conns[uri]["conn"].get_autoconnect()]
|
||||
|
||||
def add_next_to_queue():
|
||||
if not auto_conns:
|
||||
- queue.put(None)
|
||||
+ local_queue.put(None)
|
||||
else:
|
||||
- queue.put(auto_conns.pop(0))
|
||||
+ local_queue.put(auto_conns.pop(0))
|
||||
|
||||
def state_change_cb(conn):
|
||||
if conn.is_active():
|
||||
@@ -302,7 +302,7 @@ class vmmEngine(vmmGObject):
|
||||
|
||||
def handle_queue():
|
||||
while True:
|
||||
- uri = queue.get()
|
||||
+ uri = local_queue.get()
|
||||
if uri is None:
|
||||
return
|
||||
if uri not in self.conns:
|
||||
@@ -339,7 +339,7 @@ class vmmEngine(vmmGObject):
|
||||
|
||||
hvuri = conn.get_uri()
|
||||
|
||||
- for connkey in self.conns[hvuri]["windowDetails"].keys():
|
||||
+ for connkey in list(self.conns[hvuri]["windowDetails"].keys()):
|
||||
self.conns[hvuri]["windowDetails"][connkey].cleanup()
|
||||
del(self.conns[hvuri]["windowDetails"][connkey])
|
||||
|
||||
@@ -524,10 +524,10 @@ class vmmEngine(vmmGObject):
|
||||
focus, and use that
|
||||
"""
|
||||
windowlist = [self.windowManager]
|
||||
- for conndict in self.conns.values():
|
||||
- windowlist.extend(conndict["windowDetails"].values())
|
||||
+ for conndict in list(self.conns.values()):
|
||||
+ windowlist.extend(list(conndict["windowDetails"].values()))
|
||||
windowlist.extend(
|
||||
- [conndict["windowHost"] for conndict in self.conns.values()])
|
||||
+ [conndict["windowHost"] for conndict in list(self.conns.values())])
|
||||
|
||||
use_win = None
|
||||
for window in windowlist:
|
||||
@@ -603,7 +603,7 @@ class vmmEngine(vmmGObject):
|
||||
self.conns[uri]["windowClone"].cleanup()
|
||||
|
||||
details = self.conns[uri]["windowDetails"]
|
||||
- for win in details.values():
|
||||
+ for win in list(details.values()):
|
||||
win.cleanup()
|
||||
|
||||
self.conns[uri]["conn"].cleanup()
|
||||
@@ -623,7 +623,7 @@ class vmmEngine(vmmGObject):
|
||||
handle_id = vmmGObject.connect(self, name, callback, *args)
|
||||
|
||||
if name == "conn-added":
|
||||
- for conn_dict in self.conns.values():
|
||||
+ for conn_dict in list(self.conns.values()):
|
||||
self.emit("conn-added", conn_dict["conn"])
|
||||
|
||||
return handle_id
|
||||
@@ -773,7 +773,7 @@ class vmmEngine(vmmGObject):
|
||||
return self.connect_to_uri(uri, autoconnect, probe=True)
|
||||
|
||||
def cancelled(src):
|
||||
- if len(self.conns.keys()) == 0:
|
||||
+ if len(list(self.conns.keys())) == 0:
|
||||
self.exit_app(src)
|
||||
|
||||
obj = vmmConnect()
|
||||
Index: virt-manager-1.5.0/virtManager/mediacombo.py
|
||||
def _show_startup_error(fn):
|
||||
Index: virt-manager-2.0.0/virtManager/mediacombo.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/mediacombo.py
|
||||
+++ virt-manager-1.5.0/virtManager/mediacombo.py
|
||||
@@ -33,7 +33,7 @@ class vmmMediaCombo(vmmGObjectUI):
|
||||
(OPTICAL_DEV_PATH,
|
||||
OPTICAL_LABEL,
|
||||
OPTICAL_HAS_MEDIA,
|
||||
- OPTICAL_DEV_KEY) = range(OPTICAL_FIELDS)
|
||||
+ OPTICAL_DEV_KEY) = list(range(OPTICAL_FIELDS))
|
||||
--- virt-manager-2.0.0.orig/virtManager/mediacombo.py
|
||||
+++ virt-manager-2.0.0/virtManager/mediacombo.py
|
||||
@@ -22,7 +22,7 @@ class vmmMediaCombo(vmmGObjectUI):
|
||||
(MEDIA_FIELD_PATH,
|
||||
MEDIA_FIELD_LABEL,
|
||||
MEDIA_FIELD_HAS_MEDIA,
|
||||
- MEDIA_FIELD_KEY) = range(MEDIA_FIELDS_NUM)
|
||||
+ MEDIA_FIELD_KEY) = list(range(MEDIA_FIELDS_NUM))
|
||||
|
||||
def __init__(self, conn, builder, topwin, media_type):
|
||||
def __init__(self, conn, builder, topwin):
|
||||
vmmGObjectUI.__init__(self, None, None, builder=builder, topwin=topwin)
|
||||
Index: virt-manager-1.5.0/virtManager/clone.py
|
||||
Index: virt-manager-2.0.0/virtManager/manager.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/clone.py
|
||||
+++ virt-manager-1.5.0/virtManager/clone.py
|
||||
@@ -336,7 +336,7 @@ class vmmCloneVM(vmmGObjectUI):
|
||||
|
||||
build_net_row(label, mac, newmac)
|
||||
|
||||
- no_net = bool(len(self.net_list.keys()) == 0)
|
||||
+ no_net = bool(len(list(self.net_list.keys())) == 0)
|
||||
self.widget("clone-network-box").set_visible(not no_net)
|
||||
self.widget("clone-no-net").set_visible(no_net)
|
||||
|
||||
@@ -460,7 +460,7 @@ class vmmCloneVM(vmmGObjectUI):
|
||||
if cd.clone_name == newname:
|
||||
return
|
||||
|
||||
- for row in self.storage_list.values():
|
||||
+ for row in list(self.storage_list.values()):
|
||||
origpath = row[STORAGE_INFO_ORIG_PATH]
|
||||
if row[STORAGE_INFO_MANUAL_PATH]:
|
||||
continue
|
||||
@@ -599,7 +599,7 @@ class vmmCloneVM(vmmGObjectUI):
|
||||
# If any storage cannot be cloned or shared, don't allow cloning
|
||||
clone = True
|
||||
tooltip = ""
|
||||
- for row in self.storage_list.values():
|
||||
+ for row in list(self.storage_list.values()):
|
||||
can_clone = row[STORAGE_INFO_CAN_CLONE]
|
||||
can_share = row[STORAGE_INFO_CAN_SHARE]
|
||||
if not (can_clone or can_share):
|
||||
Index: virt-manager-1.5.0/virtManager/netlist.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/netlist.py
|
||||
+++ virt-manager-1.5.0/virtManager/netlist.py
|
||||
@@ -197,7 +197,7 @@ class vmmNetworkList(vmmGObjectUI):
|
||||
for slave in slave_names:
|
||||
netdevs.pop(slave, None)
|
||||
|
||||
- for name, is_bridge, slave_names in netdevs.values():
|
||||
+ for name, is_bridge, slave_names in list(netdevs.values()):
|
||||
if ((name in vnet_taps) or
|
||||
(name in [v + "-nic" for v in vnet_bridges]) or
|
||||
(name in skip_ifaces)):
|
||||
Index: virt-manager-1.5.0/virtManager/manager.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/manager.py
|
||||
+++ virt-manager-1.5.0/virtManager/manager.py
|
||||
@@ -48,7 +48,7 @@ ROW_IS_CONN_CONNECTED,
|
||||
--- virt-manager-2.0.0.orig/virtManager/manager.py
|
||||
+++ virt-manager-2.0.0/virtManager/manager.py
|
||||
@@ -36,7 +36,7 @@ ROW_IS_CONN_CONNECTED,
|
||||
ROW_IS_VM,
|
||||
ROW_IS_VM_RUNNING,
|
||||
ROW_COLOR,
|
||||
@ -519,7 +124,7 @@ Index: virt-manager-1.5.0/virtManager/manager.py
|
||||
|
||||
# Columns in the tree view
|
||||
(COL_NAME,
|
||||
@@ -56,7 +56,7 @@ COL_GUEST_CPU,
|
||||
@@ -44,7 +44,7 @@ COL_GUEST_CPU,
|
||||
COL_HOST_CPU,
|
||||
COL_MEM,
|
||||
COL_DISK,
|
||||
@ -528,28 +133,11 @@ Index: virt-manager-1.5.0/virtManager/manager.py
|
||||
|
||||
|
||||
def _style_get_prop(widget, propname):
|
||||
Index: virt-manager-1.5.0/virtManager/keyring.py
|
||||
Index: virt-manager-2.0.0/virtManager/addstorage.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/keyring.py
|
||||
+++ virt-manager-1.5.0/virtManager/keyring.py
|
||||
@@ -110,10 +110,10 @@ class vmmKeyring(object):
|
||||
label = iface.get_cached_property("Label").unpack().strip("'")
|
||||
dbusattrs = iface.get_cached_property("Attributes").unpack()
|
||||
|
||||
- secret = u"".join([unichr(c) for c in secretbytes])
|
||||
+ secret = "".join([chr(c) for c in secretbytes])
|
||||
|
||||
attrs = {}
|
||||
- for key, val in dbusattrs.items():
|
||||
+ for key, val in list(dbusattrs.items()):
|
||||
if key not in ["hvuri", "uuid"]:
|
||||
continue
|
||||
attrs["%s" % key] = "%s" % val
|
||||
Index: virt-manager-1.5.0/virtManager/addstorage.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/addstorage.py
|
||||
+++ virt-manager-1.5.0/virtManager/addstorage.py
|
||||
@@ -162,7 +162,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/addstorage.py
|
||||
+++ virt-manager-2.0.0/virtManager/addstorage.py
|
||||
@@ -148,7 +148,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||
errmsg = _("Errors were encountered changing permissions for the "
|
||||
"following directories:")
|
||||
details = ""
|
||||
@ -558,29 +146,20 @@ Index: virt-manager-1.5.0/virtManager/addstorage.py
|
||||
if p not in broken_paths:
|
||||
continue
|
||||
details += "%s : %s\n" % (p, error)
|
||||
@@ -174,7 +174,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||
_("Don't ask about these directories again."))
|
||||
|
||||
if chkres:
|
||||
- src.config.add_perms_fix_ignore(errors.keys())
|
||||
+ src.config.add_perms_fix_ignore(list(errors.keys()))
|
||||
|
||||
def reset_state(self):
|
||||
self._update_host_space()
|
||||
Index: virt-manager-1.5.0/virtManager/details.py
|
||||
Index: virt-manager-2.0.0/virtManager/details.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/details.py
|
||||
+++ virt-manager-1.5.0/virtManager/details.py
|
||||
@@ -106,7 +106,7 @@ from .graphwidgets import Sparkline
|
||||
--- virt-manager-2.0.0.orig/virtManager/details.py
|
||||
+++ virt-manager-2.0.0/virtManager/details.py
|
||||
@@ -101,7 +101,7 @@ from .storagebrowse import vmmStorageBro
|
||||
|
||||
EDIT_FS,
|
||||
|
||||
- EDIT_HOSTDEV_ROMBAR) = range(1, 49)
|
||||
+ EDIT_HOSTDEV_ROMBAR) = list(range(1, 49))
|
||||
- EDIT_HOSTDEV_ROMBAR) = range(1, 56)
|
||||
+ EDIT_HOSTDEV_ROMBAR) = list(range(1, 56))
|
||||
|
||||
|
||||
# Columns in hw list model
|
||||
@@ -114,7 +114,7 @@ from .graphwidgets import Sparkline
|
||||
@@ -109,7 +109,7 @@ from .storagebrowse import vmmStorageBro
|
||||
HW_LIST_COL_ICON_NAME,
|
||||
HW_LIST_COL_ICON_SIZE,
|
||||
HW_LIST_COL_TYPE,
|
||||
@ -589,7 +168,7 @@ Index: virt-manager-1.5.0/virtManager/details.py
|
||||
|
||||
# Types for the hw list model: numbers specify what order they will be listed
|
||||
(HW_LIST_TYPE_GENERAL,
|
||||
@@ -138,7 +138,7 @@ from .graphwidgets import Sparkline
|
||||
@@ -133,7 +133,7 @@ from .storagebrowse import vmmStorageBro
|
||||
HW_LIST_TYPE_REDIRDEV,
|
||||
HW_LIST_TYPE_TPM,
|
||||
HW_LIST_TYPE_RNG,
|
||||
@ -598,7 +177,7 @@ Index: virt-manager-1.5.0/virtManager/details.py
|
||||
|
||||
remove_pages = [HW_LIST_TYPE_NIC, HW_LIST_TYPE_INPUT,
|
||||
HW_LIST_TYPE_GRAPHICS, HW_LIST_TYPE_SOUND, HW_LIST_TYPE_CHAR,
|
||||
@@ -153,12 +153,12 @@ remove_pages = [HW_LIST_TYPE_NIC, HW_LIS
|
||||
@@ -148,12 +148,12 @@ remove_pages = [HW_LIST_TYPE_NIC, HW_LIS
|
||||
BOOT_LABEL,
|
||||
BOOT_ICON,
|
||||
BOOT_ACTIVE,
|
||||
@ -611,49 +190,13 @@ Index: virt-manager-1.5.0/virtManager/details.py
|
||||
- DETAILS_PAGE_SNAPSHOTS) = range(3)
|
||||
+ DETAILS_PAGE_SNAPSHOTS) = list(range(3))
|
||||
|
||||
_remove_tooltip = _("Remove this device from the virtual machine")
|
||||
|
||||
@@ -744,7 +744,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
rmHW.connect("activate", self.remove_xml_dev)
|
||||
|
||||
self._addhwmenuitems = {"add": addHW, "remove": rmHW}
|
||||
- for i in self._addhwmenuitems.values():
|
||||
+ for i in list(self._addhwmenuitems.values()):
|
||||
self.addhwmenu.add(i)
|
||||
|
||||
self.widget("hw-panel").set_show_tabs(False)
|
||||
@@ -1519,7 +1519,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
'tEXt::Generator Version': self.config.get_appversion(),
|
||||
}
|
||||
|
||||
- ret = image.save_to_bufferv('png', metadata.keys(), metadata.values())
|
||||
+ ret = image.save_to_bufferv('png', list(metadata.keys()), list(metadata.values()))
|
||||
# On Fedora 19, ret is (bool, str)
|
||||
# Someday the bindings might be fixed to just return the str, try
|
||||
# and future proof it a bit
|
||||
@@ -2835,7 +2835,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
set_visible("rng-bind-host", is_egd and (udp or bind))
|
||||
set_visible("rng-bind-service", is_egd and (udp or bind))
|
||||
|
||||
- for k, prop in values.items():
|
||||
+ for k, prop in list(values.items()):
|
||||
val = "-"
|
||||
if dev.supports_property(prop):
|
||||
val = getattr(dev, prop) or "-"
|
||||
@@ -3229,7 +3229,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
for dev in self.vm.get_panic_devices():
|
||||
update_hwlist(HW_LIST_TYPE_PANIC, dev)
|
||||
|
||||
- devs = range(len(hw_list_model))
|
||||
+ devs = list(range(len(hw_list_model)))
|
||||
devs.reverse()
|
||||
for i in devs:
|
||||
_iter = hw_list_model.iter_nth_child(None, i)
|
||||
Index: virt-manager-1.5.0/virtManager/create.py
|
||||
Index: virt-manager-2.0.0/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/create.py
|
||||
+++ virt-manager-1.5.0/virtManager/create.py
|
||||
@@ -55,7 +55,7 @@ DEFAULT_MEM = 1024
|
||||
--- virt-manager-2.0.0.orig/virtManager/create.py
|
||||
+++ virt-manager-2.0.0/virtManager/create.py
|
||||
@@ -43,7 +43,7 @@ DEFAULT_MEM = 1024
|
||||
PAGE_INSTALL,
|
||||
PAGE_MEM,
|
||||
PAGE_STORAGE,
|
||||
@ -662,7 +205,7 @@ Index: virt-manager-1.5.0/virtManager/create.py
|
||||
|
||||
(INSTALL_PAGE_ISO,
|
||||
INSTALL_PAGE_URL,
|
||||
@@ -63,13 +63,13 @@ DEFAULT_MEM = 1024
|
||||
@@ -51,13 +51,13 @@ DEFAULT_MEM = 1024
|
||||
INSTALL_PAGE_IMPORT,
|
||||
INSTALL_PAGE_CONTAINER_APP,
|
||||
INSTALL_PAGE_CONTAINER_OS,
|
||||
@ -678,16 +221,7 @@ Index: virt-manager-1.5.0/virtManager/create.py
|
||||
|
||||
|
||||
#####################
|
||||
@@ -953,7 +953,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
model.clear()
|
||||
|
||||
default = -1
|
||||
- for c in self.engine.conns.values():
|
||||
+ for c in list(self.engine.conns.values()):
|
||||
connobj = c["conn"]
|
||||
if not connobj.is_active():
|
||||
continue
|
||||
@@ -2587,7 +2587,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
@@ -2153,7 +2153,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
'insecure': self._get_config_oscontainer_isecure,
|
||||
'root_password': self._get_config_oscontainer_root_password,
|
||||
}
|
||||
@ -696,11 +230,11 @@ Index: virt-manager-1.5.0/virtManager/create.py
|
||||
bootstrap_args[key] = getter()
|
||||
|
||||
parentobj = self._customize_window or self
|
||||
Index: virt-manager-1.5.0/virtManager/preferences.py
|
||||
Index: virt-manager-2.0.0/virtManager/preferences.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/preferences.py
|
||||
+++ virt-manager-1.5.0/virtManager/preferences.py
|
||||
@@ -121,7 +121,7 @@ class vmmPreferences(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/preferences.py
|
||||
+++ virt-manager-2.0.0/virtManager/preferences.py
|
||||
@@ -127,7 +127,7 @@ class vmmPreferences(vmmGObjectUI):
|
||||
}
|
||||
model.append([-1, _("System default (%s)") %
|
||||
vals[self.config.default_console_resizeguest]])
|
||||
@ -709,11 +243,11 @@ Index: virt-manager-1.5.0/virtManager/preferences.py
|
||||
model.append([key, val])
|
||||
combo.set_model(model)
|
||||
uiutil.init_combo_text_column(combo, 1)
|
||||
Index: virt-manager-1.5.0/virtManager/migrate.py
|
||||
Index: virt-manager-2.0.0/virtManager/migrate.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/migrate.py
|
||||
+++ virt-manager-1.5.0/virtManager/migrate.py
|
||||
@@ -36,7 +36,7 @@ from .domain import vmmDomain
|
||||
--- virt-manager-2.0.0.orig/virtManager/migrate.py
|
||||
+++ virt-manager-2.0.0/virtManager/migrate.py
|
||||
@@ -23,7 +23,7 @@ from .domain import vmmDomain
|
||||
NUM_COLS = 3
|
||||
(COL_LABEL,
|
||||
COL_URI,
|
||||
@ -722,74 +256,11 @@ Index: virt-manager-1.5.0/virtManager/migrate.py
|
||||
|
||||
|
||||
class vmmMigrateDialog(vmmGObjectUI):
|
||||
@@ -313,7 +313,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
||||
model.clear()
|
||||
|
||||
rows = []
|
||||
- for conn in self._conns.values():
|
||||
+ for conn in list(self._conns.values()):
|
||||
rows.append(self._build_dest_row(conn))
|
||||
|
||||
if not any([row[COL_CAN_MIGRATE] for row in rows]):
|
||||
Index: virt-manager-1.5.0/virtManager/connect.py
|
||||
Index: virt-manager-2.0.0/virtManager/storagelist.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/connect.py
|
||||
+++ virt-manager-1.5.0/virtManager/connect.py
|
||||
@@ -22,7 +22,7 @@ import glob
|
||||
import os
|
||||
import logging
|
||||
import socket
|
||||
-import urllib
|
||||
+import urllib.request, urllib.parse, urllib.error
|
||||
|
||||
from gi.repository import Gio
|
||||
from gi.repository import GObject
|
||||
@@ -37,11 +37,11 @@ HV_LXC,
|
||||
HV_QEMU_SESSION,
|
||||
HV_BHYVE,
|
||||
HV_VZ,
|
||||
-HV_CUSTOM) = range(7)
|
||||
+HV_CUSTOM) = list(range(7))
|
||||
|
||||
(CONN_SSH,
|
||||
CONN_TCP,
|
||||
-CONN_TLS) = range(3)
|
||||
+CONN_TLS) = list(range(3))
|
||||
|
||||
|
||||
def current_user():
|
||||
@@ -409,7 +409,7 @@ class vmmConnect(vmmGObjectUI):
|
||||
|
||||
addrstr = ""
|
||||
if user:
|
||||
- addrstr += urllib.quote(user) + "@"
|
||||
+ addrstr += urllib.parse.quote(user) + "@"
|
||||
|
||||
if host.count(":") > 1:
|
||||
host = "[%s]" % host
|
||||
@@ -467,7 +467,7 @@ class vmmConnect(vmmGObjectUI):
|
||||
if host.startswith("linux-"):
|
||||
tmphost = host[6:]
|
||||
try:
|
||||
- long(tmphost)
|
||||
+ int(tmphost)
|
||||
host = ""
|
||||
except ValueError:
|
||||
pass
|
||||
Index: virt-manager-1.5.0/virtManager/storagelist.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/storagelist.py
|
||||
+++ virt-manager-1.5.0/virtManager/storagelist.py
|
||||
@@ -36,7 +36,7 @@ from .createvol import vmmCreateVolume
|
||||
EDIT_POOL_IDS = (
|
||||
EDIT_POOL_NAME,
|
||||
EDIT_POOL_AUTOSTART,
|
||||
-) = range(2)
|
||||
+) = list(range(2))
|
||||
|
||||
VOL_NUM_COLUMNS = 7
|
||||
(VOL_COLUMN_KEY,
|
||||
@@ -45,13 +45,13 @@ VOL_NUM_COLUMNS = 7
|
||||
--- virt-manager-2.0.0.orig/virtManager/storagelist.py
|
||||
+++ virt-manager-2.0.0/virtManager/storagelist.py
|
||||
@@ -30,13 +30,13 @@ VOL_NUM_COLUMNS = 7
|
||||
VOL_COLUMN_SIZESTR,
|
||||
VOL_COLUMN_FORMAT,
|
||||
VOL_COLUMN_INUSEBY,
|
||||
@ -805,11 +276,11 @@ Index: virt-manager-1.5.0/virtManager/storagelist.py
|
||||
|
||||
ICON_RUNNING = "state_running"
|
||||
ICON_SHUTOFF = "state_shutoff"
|
||||
Index: virt-manager-1.5.0/virtManager/createnet.py
|
||||
Index: virt-manager-2.0.0/virtManager/createnet.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/virtManager/createnet.py
|
||||
+++ virt-manager-1.5.0/virtManager/createnet.py
|
||||
@@ -35,7 +35,7 @@ from .baseclass import vmmGObjectUI
|
||||
--- virt-manager-2.0.0.orig/virtManager/createnet.py
|
||||
+++ virt-manager-2.0.0/virtManager/createnet.py
|
||||
@@ -20,7 +20,7 @@ from .baseclass import vmmGObjectUI
|
||||
(PAGE_NAME,
|
||||
PAGE_IPV4,
|
||||
PAGE_IPV6,
|
||||
|
@ -6,11 +6,11 @@ it is not recognized as a top level dialog on python3 and therefore we explicitl
|
||||
need to set the connection event. Not getting the event to cleanup leaves us in a
|
||||
bad state for when the details dialog is reopened.
|
||||
|
||||
Index: virt-manager-1.4.3/virtManager/details.py
|
||||
Index: virt-manager-2.0.0/virtManager/details.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virtManager/details.py
|
||||
+++ virt-manager-1.4.3/virtManager/details.py
|
||||
@@ -596,6 +596,9 @@ class vmmDetails(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/details.py
|
||||
+++ virt-manager-2.0.0/virtManager/details.py
|
||||
@@ -621,6 +621,9 @@ class vmmDetails(vmmGObjectUI):
|
||||
self.console.details_auth_login),
|
||||
})
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
Enhancement that gets installation repos from zypper.
|
||||
These locations are then presented as potential installation
|
||||
sources when creating a VM.
|
||||
Index: virt-manager-1.5.1/virtManager/create.py
|
||||
Index: virt-manager-2.0.0/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtManager/create.py
|
||||
+++ virt-manager-1.5.1/virtManager/create.py
|
||||
@@ -424,7 +424,13 @@ class vmmCreate(vmmGObjectUI):
|
||||
--- virt-manager-2.0.0.orig/virtManager/create.py
|
||||
+++ virt-manager-2.0.0/virtManager/create.py
|
||||
@@ -371,7 +371,13 @@ class vmmCreate(vmmGObjectUI):
|
||||
self.widget("install-url-entry").set_text("")
|
||||
self.widget("install-url-options").set_expanded(False)
|
||||
urlmodel = self.widget("install-url-combo").get_model()
|
||||
@ -17,14 +17,14 @@ Index: virt-manager-1.5.1/virtManager/create.py
|
||||
+ inst_repos.remove(u)
|
||||
+ media_urllist = urllist + inst_repos
|
||||
+ _populate_media_model(urlmodel, media_urllist)
|
||||
self._set_distro_labels("-", "-")
|
||||
|
||||
# Install import
|
||||
Index: virt-manager-1.5.1/virtinst/util.py
|
||||
self.widget("install-import-entry").set_text("")
|
||||
Index: virt-manager-2.0.0/virtinst/util.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.1.orig/virtinst/util.py
|
||||
+++ virt-manager-1.5.1/virtinst/util.py
|
||||
@@ -23,9 +23,12 @@ import os
|
||||
--- virt-manager-2.0.0.orig/virtinst/util.py
|
||||
+++ virt-manager-2.0.0/virtinst/util.py
|
||||
@@ -11,9 +11,12 @@ import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
@ -37,7 +37,7 @@ Index: virt-manager-1.5.1/virtinst/util.py
|
||||
|
||||
def listify(l):
|
||||
if l is None:
|
||||
@@ -312,3 +315,57 @@ def make_meter(quiet):
|
||||
@@ -292,3 +295,57 @@ def make_meter(quiet):
|
||||
if quiet:
|
||||
return progress.BaseMeter()
|
||||
return progress.TextMeter(fo=sys.stdout)
|
||||
|
@ -1,20 +0,0 @@
|
||||
Index: virt-manager-1.4.3/virt-clone
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virt-clone
|
||||
+++ virt-manager-1.4.3/virt-clone
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python2
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright(c) FUJITSU Limited 2007.
|
||||
#
|
||||
Index: virt-manager-1.4.3/virt-xml
|
||||
===================================================================
|
||||
--- virt-manager-1.4.3.orig/virt-xml
|
||||
+++ virt-manager-1.4.3/virt-xml
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python2
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright 2013-2014 Red Hat, Inc.
|
||||
# Cole Robinson <crobinso@redhat.com>
|
@ -1,111 +1,35 @@
|
||||
Index: virt-manager-1.5.0/tests/clitest.py
|
||||
Index: virt-manager-2.0.0/tests/clitest.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/clitest.py
|
||||
+++ virt-manager-1.5.0/tests/clitest.py
|
||||
@@ -223,7 +223,7 @@ class Command(object):
|
||||
--- virt-manager-2.0.0.orig/tests/clitest.py
|
||||
+++ virt-manager-2.0.0/tests/clitest.py
|
||||
@@ -176,7 +176,7 @@ class Command(object):
|
||||
|
||||
try:
|
||||
conn = None
|
||||
- for idx in reversed(range(len(self.argv))):
|
||||
+ for idx in reversed(list(range(len(self.argv)))):
|
||||
if self.argv[idx] == "--connect":
|
||||
conn = utils.openconn(self.argv[idx + 1])
|
||||
conn = utils.URIs.openconn(self.argv[idx + 1])
|
||||
break
|
||||
Index: virt-manager-1.5.0/tests/uitests/utils.py
|
||||
Index: virt-manager-2.0.0/tests/test_inject.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/uitests/utils.py
|
||||
+++ virt-manager-1.5.0/tests/uitests/utils.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-from __future__ import print_function
|
||||
+
|
||||
--- virt-manager-2.0.0.orig/tests/test_inject.py
|
||||
+++ virt-manager-2.0.0/tests/test_inject.py
|
||||
@@ -15,7 +15,7 @@ FEDORA_URL = "http://dl.fedoraproject.or
|
||||
|
||||
import logging
|
||||
import os
|
||||
Index: virt-manager-1.5.0/tests/utils.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/utils.py
|
||||
+++ virt-manager-1.5.0/tests/utils.py
|
||||
@@ -104,11 +104,11 @@ def openconn(uri):
|
||||
conn.fetch_all_nodedevs()
|
||||
|
||||
_conn_cache[uri] = {}
|
||||
- for key, value in conn._fetch_cache.items():
|
||||
+ for key, value in list(conn._fetch_cache.items()):
|
||||
_conn_cache[uri][key] = value[:]
|
||||
|
||||
# Prime the internal connection cache
|
||||
- for key, value in _conn_cache[uri].items():
|
||||
+ for key, value in list(_conn_cache[uri].items()):
|
||||
conn._fetch_cache[key] = value[:]
|
||||
|
||||
def cb_cache_new_pool(poolobj):
|
||||
Index: virt-manager-1.5.0/tests/test_inject.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/test_inject.py
|
||||
+++ virt-manager-1.5.0/tests/test_inject.py
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (C) 2013, 2014 Red Hat, Inc.
|
||||
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
import atexit
|
||||
import os
|
||||
@@ -30,7 +30,7 @@ FEDORA_URL = "http://dl.fedoraproject.or
|
||||
|
||||
(WARN_RHEL4,
|
||||
WARN_RHEL5,
|
||||
- WARN_LATEST) = range(1, 4)
|
||||
+ WARN_LATEST) = list(range(1, 4))
|
||||
(WARN_RHEL5,
|
||||
WARN_DEBIAN,
|
||||
- WARN_FEDORA) = range(1, 4)
|
||||
+ WARN_FEDORA) = list(range(1, 4))
|
||||
|
||||
|
||||
def prompt():
|
||||
@@ -186,7 +186,7 @@ def _make_tests():
|
||||
@@ -115,7 +115,7 @@ def _make_tests():
|
||||
return lambda s: _test_distro(_d)
|
||||
|
||||
idx = 0
|
||||
- for dname, dobj in _alldistros.items():
|
||||
+ for dname, dobj in list(_alldistros.items()):
|
||||
idx += 1
|
||||
setattr(FetchTests, "testFetch%.3d_%s" %
|
||||
(idx, dname.replace("-", "_")), _make_fetch_cb(dobj))
|
||||
Index: virt-manager-1.5.0/tests/test_urls.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/test_urls.py
|
||||
+++ virt-manager-1.5.0/tests/test_urls.py
|
||||
@@ -253,7 +253,7 @@ def _make_tests():
|
||||
vals.get("testshortcircuit", "0") == "1")
|
||||
urls[d.name] = d
|
||||
|
||||
- keys = urls.keys()
|
||||
+ keys = list(urls.keys())
|
||||
keys.sort()
|
||||
for key in keys:
|
||||
distroobj = urls[key]
|
||||
Index: virt-manager-1.5.0/tests/virtconvtest.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/virtconvtest.py
|
||||
+++ virt-manager-1.5.0/tests/virtconvtest.py
|
||||
@@ -15,7 +15,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
import glob
|
||||
import io
|
||||
Index: virt-manager-1.5.0/tests/nodedev.py
|
||||
===================================================================
|
||||
--- virt-manager-1.5.0.orig/tests/nodedev.py
|
||||
+++ virt-manager-1.5.0/tests/nodedev.py
|
||||
@@ -69,7 +69,7 @@ class TestNodeDev(unittest.TestCase):
|
||||
|
||||
def _testCompare(self, devname, vals, devxml=None):
|
||||
def _compare(dev, vals, root=""):
|
||||
- for attr in vals.keys():
|
||||
+ for attr in list(vals.keys()):
|
||||
expect = vals[attr]
|
||||
actual = getattr(dev, attr)
|
||||
if isinstance(expect, list):
|
||||
setattr(InjectTests, "testInitrd%.3d_%s" %
|
||||
(idx, dname.replace("-", "_")), _make_check_cb(dobj))
|
||||
|
Loading…
Reference in New Issue
Block a user