- Upstream bug fixes (bsc#1027942)
3b769643-dont-add-URI-into-params-for-tunneled-migration.patch 6dfc4de1-add-support-for-parsing-formatting-SR-IOV-VFs.patch 083dfcc8-Show-details-about-the-network-of-SR-IOV-VF-pool.patch - Add Recommends: python3-virt-bootstrap Change 'Requires: libvirt-python' to 'Requires: python-libvirt-python' virt-manager.spec - Add corrections to sle15 detection (bsc#1054986) OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=372
This commit is contained in:
parent
828fa8338e
commit
dc258c8290
226
083dfcc8-Show-details-about-the-network-of-SR-IOV-VF-pool.patch
Normal file
226
083dfcc8-Show-details-about-the-network-of-SR-IOV-VF-pool.patch
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
Subject: host: Show details about the network of SR-IOV VF pool
|
||||||
|
From: Lin Ma lma@suse.com Fri Sep 22 19:39:10 2017 +0800
|
||||||
|
Date: Mon Oct 9 10:22:48 2017 +0200:
|
||||||
|
Git: 083dfcc8ec9e684052c999b79bb3508a5e9d3c03
|
||||||
|
|
||||||
|
Signed-off-by: Lin Ma <lma@suse.com>
|
||||||
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/ui/host.ui b/ui/host.ui
|
||||||
|
index 2e5ea496..f5ea3905 100644
|
||||||
|
--- a/ui/host.ui
|
||||||
|
+++ b/ui/host.ui
|
||||||
|
@@ -1117,6 +1117,108 @@
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkExpander" id="net-sriov-expander">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">True</property>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkBox" id="net-sriov-box">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">False</property>
|
||||||
|
+ <property name="orientation">vertical</property>
|
||||||
|
+ <property name="spacing">3</property>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkGrid" id="pf-table">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">False</property>
|
||||||
|
+ <property name="row_spacing">5</property>
|
||||||
|
+ <property name="column_spacing">6</property>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkLabel" id="pf-name">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">False</property>
|
||||||
|
+ <property name="halign">start</property>
|
||||||
|
+ <property name="label">label</property>
|
||||||
|
+ <property name="selectable">True</property>
|
||||||
|
+ </object>
|
||||||
|
+ <packing>
|
||||||
|
+ <property name="left_attach">1</property>
|
||||||
|
+ <property name="top_attach">0</property>
|
||||||
|
+ </packing>
|
||||||
|
+ </child>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkLabel" id="pf-name-label">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">False</property>
|
||||||
|
+ <property name="halign">start</property>
|
||||||
|
+ <property name="label" translatable="yes">Physical Function:</property>
|
||||||
|
+ </object>
|
||||||
|
+ <packing>
|
||||||
|
+ <property name="left_attach">0</property>
|
||||||
|
+ <property name="top_attach">0</property>
|
||||||
|
+ </packing>
|
||||||
|
+ </child>
|
||||||
|
+ </object>
|
||||||
|
+ <packing>
|
||||||
|
+ <property name="expand">False</property>
|
||||||
|
+ <property name="fill">True</property>
|
||||||
|
+ <property name="position">0</property>
|
||||||
|
+ </packing>
|
||||||
|
+ </child>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkLabel" id="vf-scroll-label">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">False</property>
|
||||||
|
+ <property name="halign">start</property>
|
||||||
|
+ <property name="label" translatable="yes">Virtual Functions:</property>
|
||||||
|
+ <property name="use_markup">True</property>
|
||||||
|
+ </object>
|
||||||
|
+ <packing>
|
||||||
|
+ <property name="expand">False</property>
|
||||||
|
+ <property name="fill">True</property>
|
||||||
|
+ <property name="position">1</property>
|
||||||
|
+ </packing>
|
||||||
|
+ </child>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkScrolledWindow" id="vf-scroll">
|
||||||
|
+ <property name="height_request">144</property>
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">True</property>
|
||||||
|
+ <property name="shadow_type">in</property>
|
||||||
|
+ <child>
|
||||||
|
+ <object class="GtkTreeView" id="vf-list">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">True</property>
|
||||||
|
+ <child internal-child="selection">
|
||||||
|
+ <object class="GtkTreeSelection" id="vf-selection"/>
|
||||||
|
+ </child>
|
||||||
|
+ </object>
|
||||||
|
+ </child>
|
||||||
|
+ </object>
|
||||||
|
+ <packing>
|
||||||
|
+ <property name="expand">True</property>
|
||||||
|
+ <property name="fill">True</property>
|
||||||
|
+ <property name="position">2</property>
|
||||||
|
+ </packing>
|
||||||
|
+ </child>
|
||||||
|
+ </object>
|
||||||
|
+ </child>
|
||||||
|
+ <child type="label">
|
||||||
|
+ <object class="GtkLabel" id="net-sriov-expander-label">
|
||||||
|
+ <property name="visible">True</property>
|
||||||
|
+ <property name="can_focus">False</property>
|
||||||
|
+ <property name="label" translatable="yes"><b>_SR-IOV information</b></property>
|
||||||
|
+ <property name="use_markup">True</property>
|
||||||
|
+ <property name="use_underline">True</property>
|
||||||
|
+ </object>
|
||||||
|
+ </child>
|
||||||
|
+ </object>
|
||||||
|
+ <packing>
|
||||||
|
+ <property name="expand">True</property>
|
||||||
|
+ <property name="fill">True</property>
|
||||||
|
+ <property name="position">4</property>
|
||||||
|
+ </packing>
|
||||||
|
+ </child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
diff --git a/virtManager/host.py b/virtManager/host.py
|
||||||
|
index 84e8865c..560bc0a6 100644
|
||||||
|
--- a/virtManager/host.py
|
||||||
|
+++ b/virtManager/host.py
|
||||||
|
@@ -24,6 +24,7 @@ from gi.repository import GObject
|
||||||
|
from gi.repository import Gtk
|
||||||
|
|
||||||
|
from virtinst import Interface
|
||||||
|
+from virtinst import NodeDevice
|
||||||
|
from virtinst import util
|
||||||
|
|
||||||
|
from . import uiutil
|
||||||
|
@@ -167,6 +168,20 @@ class vmmHost(vmmGObjectUI):
|
||||||
|
self.widget("net-list").append_column(netCol)
|
||||||
|
netListModel.set_sort_column_id(1, Gtk.SortType.ASCENDING)
|
||||||
|
|
||||||
|
+ # Virtual Function list
|
||||||
|
+ # [vf-name]
|
||||||
|
+ vf_list = self.widget("vf-list")
|
||||||
|
+ vf_list_model = Gtk.ListStore(str)
|
||||||
|
+ vf_list.set_model(vf_list_model)
|
||||||
|
+ vf_list.set_headers_visible(False)
|
||||||
|
+
|
||||||
|
+ vfTextCol = Gtk.TreeViewColumn()
|
||||||
|
+ vf_txt = Gtk.CellRendererText()
|
||||||
|
+ vfTextCol.pack_start(vf_txt, True)
|
||||||
|
+ vfTextCol.add_attribute(vf_txt, 'text', 0)
|
||||||
|
+ vf_list.append_column(vfTextCol)
|
||||||
|
+
|
||||||
|
+
|
||||||
|
def init_storage_state(self):
|
||||||
|
self.storagelist = vmmStorageList(self.conn, self.builder, self.topwin)
|
||||||
|
self.widget("storage-align").add(self.storagelist.top_box)
|
||||||
|
@@ -398,6 +413,7 @@ class vmmHost(vmmGObjectUI):
|
||||||
|
return
|
||||||
|
|
||||||
|
logging.debug("Stopping network '%s'", net.get_name())
|
||||||
|
+ self.widget("vf-list").get_model().clear()
|
||||||
|
vmmAsyncJob.simple_async_noshow(net.stop, [], self,
|
||||||
|
_("Error stopping network '%s'") % net.get_name())
|
||||||
|
|
||||||
|
@@ -613,6 +629,35 @@ class vmmHost(vmmGObjectUI):
|
||||||
|
self.widget("qos-outbound-peak").set_text(qos.outbound_peak or "")
|
||||||
|
self.widget("qos-outbound-burst").set_text(qos.outbound_burst or "")
|
||||||
|
|
||||||
|
+ def _populate_sriov_state(self, net):
|
||||||
|
+ (is_vf_pool, pf_name, vfs) = net.get_sriov_vf_networks()
|
||||||
|
+
|
||||||
|
+ self.widget("net-sriov-expander").set_visible(is_vf_pool)
|
||||||
|
+ if not pf_name:
|
||||||
|
+ self.widget("pf-name").set_text("N/A")
|
||||||
|
+ return
|
||||||
|
+
|
||||||
|
+ self.widget("pf-name").set_text(pf_name)
|
||||||
|
+
|
||||||
|
+ vf_list_model = self.widget("vf-list").get_model()
|
||||||
|
+ vf_list_model.clear()
|
||||||
|
+ for vf in vfs:
|
||||||
|
+ addrStr = "%x:%x:%x.%x" % (vf.domain, vf.bus, vf.slot, vf.function)
|
||||||
|
+ pcidev = NodeDevice.lookupNodedevFromString(self.conn.get_backend(),
|
||||||
|
+ addrStr)
|
||||||
|
+
|
||||||
|
+ vf_name = None
|
||||||
|
+
|
||||||
|
+ netdevs = self.conn.filter_nodedevs("net")
|
||||||
|
+ for netdev in netdevs:
|
||||||
|
+ logging.debug(netdev.xmlobj.parent)
|
||||||
|
+ if pcidev.name == netdev.xmlobj.parent:
|
||||||
|
+ vf_name = netdev.xmlobj.interface
|
||||||
|
+ break
|
||||||
|
+
|
||||||
|
+ vf_list_model.append([vf_name or addrStr])
|
||||||
|
+
|
||||||
|
+
|
||||||
|
def populate_net_state(self, net):
|
||||||
|
active = net.is_active()
|
||||||
|
|
||||||
|
@@ -642,6 +687,7 @@ class vmmHost(vmmGObjectUI):
|
||||||
|
self._populate_net_ipv4_state(net)
|
||||||
|
self._populate_net_ipv6_state(net)
|
||||||
|
self._populate_qos_state(net)
|
||||||
|
+ self._populate_sriov_state(net)
|
||||||
|
|
||||||
|
|
||||||
|
def reset_net_state(self):
|
||||||
|
diff --git a/virtManager/network.py b/virtManager/network.py
|
||||||
|
index cb260497..4c937e0e 100644
|
||||||
|
--- a/virtManager/network.py
|
||||||
|
+++ b/virtManager/network.py
|
||||||
|
@@ -182,3 +182,15 @@ class vmmNetwork(vmmLibvirtObject):
|
||||||
|
def get_ipv6_network(self):
|
||||||
|
ret = self._get_network("ipv6")
|
||||||
|
return ret + [self._get_static_route("ipv6")]
|
||||||
|
+
|
||||||
|
+ def get_sriov_vf_networks(self):
|
||||||
|
+ xmlobj = self.get_xmlobj()
|
||||||
|
+ pf_name = None
|
||||||
|
+ vfs = None
|
||||||
|
+ ret = False
|
||||||
|
+ if xmlobj.forward.mode == "hostdev":
|
||||||
|
+ ret = True
|
||||||
|
+ if xmlobj.forward.pf:
|
||||||
|
+ pf_name = xmlobj.forward.pf[0].dev
|
||||||
|
+ vfs = xmlobj.forward.vfs
|
||||||
|
+ return (ret, pf_name, vfs)
|
@ -0,0 +1,22 @@
|
|||||||
|
Subject: domain: don't add URI into params for tunneled migration
|
||||||
|
From: Pavel Hrdina phrdina@redhat.com Tue Oct 3 12:24:39 2017 +0200
|
||||||
|
Date: Tue Oct 3 12:24:39 2017 +0200:
|
||||||
|
Git: 3b769643657f906dc2b53c568d7fe748155d9b2b
|
||||||
|
|
||||||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1456185
|
||||||
|
|
||||||
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/virtManager/domain.py b/virtManager/domain.py
|
||||||
|
index 6fb54bc..724f83f 100644
|
||||||
|
--- a/virtManager/domain.py
|
||||||
|
+++ b/virtManager/domain.py
|
||||||
|
@@ -1596,7 +1596,7 @@ class vmmDomain(vmmLibvirtObject):
|
||||||
|
start_job_progress_thread(self, meter, _("Migrating domain"))
|
||||||
|
|
||||||
|
params = {}
|
||||||
|
- if dest_uri:
|
||||||
|
+ if dest_uri and not tunnel:
|
||||||
|
params[libvirt.VIR_MIGRATE_PARAM_URI] = dest_uri
|
||||||
|
|
||||||
|
if tunnel:
|
83
6dfc4de1-add-support-for-parsing-formatting-SR-IOV-VFs.patch
Normal file
83
6dfc4de1-add-support-for-parsing-formatting-SR-IOV-VFs.patch
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
Subject: network: add support for parsing/formatting SR-IOV VFs
|
||||||
|
From: Lin Ma lma@suse.com Fri Sep 22 19:39:09 2017 +0800
|
||||||
|
Date: Mon Oct 9 10:22:48 2017 +0200:
|
||||||
|
Git: 6dfc4de125022c43cb6e60e2f9e0c395ece159d6
|
||||||
|
|
||||||
|
Signed-off-by: Lin Ma <lma@suse.com>
|
||||||
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/tests/xmlparse-xml/network-vf-pool-in.xml b/tests/xmlparse-xml/network-vf-pool-in.xml
|
||||||
|
index 821aa075..542757de 100644
|
||||||
|
--- a/tests/xmlparse-xml/network-vf-pool-in.xml
|
||||||
|
+++ b/tests/xmlparse-xml/network-vf-pool-in.xml
|
||||||
|
@@ -1,5 +1,7 @@
|
||||||
|
<network>
|
||||||
|
<name>passthrough</name>
|
||||||
|
<forward mode="hostdev" managed="yes">
|
||||||
|
+ <pf dev="eth3"/>
|
||||||
|
+ <address type="pci" domain="0x0000" bus="0x03" slot="0x10" function="0x0"/>
|
||||||
|
</forward>
|
||||||
|
</network>
|
||||||
|
diff --git a/tests/xmlparse-xml/network-vf-pool-out.xml b/tests/xmlparse-xml/network-vf-pool-out.xml
|
||||||
|
index 62a73050..83644118 100644
|
||||||
|
--- a/tests/xmlparse-xml/network-vf-pool-out.xml
|
||||||
|
+++ b/tests/xmlparse-xml/network-vf-pool-out.xml
|
||||||
|
@@ -2,5 +2,6 @@
|
||||||
|
<name>new-foo</name>
|
||||||
|
<forward mode="hostdev" managed="yes">
|
||||||
|
<pf dev="eth3"/>
|
||||||
|
+ <address type="pci" domain="0x0000" bus="0x03" slot="0x10" function="0x0"/>
|
||||||
|
</forward>
|
||||||
|
</network>
|
||||||
|
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
|
||||||
|
index cc29eadc..1cceebce 100644
|
||||||
|
--- a/tests/xmlparse.py
|
||||||
|
+++ b/tests/xmlparse.py
|
||||||
|
@@ -1332,11 +1332,16 @@ class XMLParseTest(unittest.TestCase):
|
||||||
|
check("mode", "hostdev")
|
||||||
|
check("managed", "yes")
|
||||||
|
|
||||||
|
- r = net.forward.add_pf()
|
||||||
|
- r.dev = "eth3"
|
||||||
|
- check = self._make_checker(r)
|
||||||
|
+ check = self._make_checker(net.forward.pf[0])
|
||||||
|
check("dev", "eth3")
|
||||||
|
|
||||||
|
+ check = self._make_checker(net.forward.vfs[0])
|
||||||
|
+ check("type", "pci")
|
||||||
|
+ check("domain", 0x0000)
|
||||||
|
+ check("bus", 0x03)
|
||||||
|
+ check("slot", 0x10)
|
||||||
|
+ check("function", 0x0)
|
||||||
|
+
|
||||||
|
utils.diff_compare(net.get_xml_config(), outfile)
|
||||||
|
utils.test_create(conn, net.get_xml_config(), "networkDefineXML")
|
||||||
|
|
||||||
|
diff --git a/virtinst/network.py b/virtinst/network.py
|
||||||
|
index 183b0e3a..1cc71118 100644
|
||||||
|
--- a/virtinst/network.py
|
||||||
|
+++ b/virtinst/network.py
|
||||||
|
@@ -77,6 +77,15 @@ class _NetworkForwardPf(XMLBuilder):
|
||||||
|
dev = XMLProperty("./@dev")
|
||||||
|
|
||||||
|
|
||||||
|
+class _NetworkForwardAddress(XMLBuilder):
|
||||||
|
+ _XML_ROOT_NAME = "address"
|
||||||
|
+ type = XMLProperty("./@type")
|
||||||
|
+ domain = XMLProperty("./@domain", is_int=True)
|
||||||
|
+ bus = XMLProperty("./@bus", is_int=True)
|
||||||
|
+ slot = XMLProperty("./@slot", is_int=True)
|
||||||
|
+ function = XMLProperty("./@function", is_int=True)
|
||||||
|
+
|
||||||
|
+
|
||||||
|
class _NetworkForward(XMLBuilder):
|
||||||
|
_XML_ROOT_NAME = "forward"
|
||||||
|
|
||||||
|
@@ -84,6 +93,7 @@ class _NetworkForward(XMLBuilder):
|
||||||
|
dev = XMLProperty("./@dev")
|
||||||
|
managed = XMLProperty("./@managed")
|
||||||
|
pf = XMLChildProperty(_NetworkForwardPf)
|
||||||
|
+ vfs = XMLChildProperty(_NetworkForwardAddress)
|
||||||
|
|
||||||
|
def add_pf(self):
|
||||||
|
r = _NetworkForwardPf(self.conn)
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 11 13:58:55 MDT 2017 - carnold@suse.com
|
||||||
|
|
||||||
|
- Upstream bug fixes (bsc#1027942)
|
||||||
|
3b769643-dont-add-URI-into-params-for-tunneled-migration.patch
|
||||||
|
6dfc4de1-add-support-for-parsing-formatting-SR-IOV-VFs.patch
|
||||||
|
083dfcc8-Show-details-about-the-network-of-SR-IOV-VF-pool.patch
|
||||||
|
- Add Recommends: python3-virt-bootstrap
|
||||||
|
Change 'Requires: libvirt-python' to 'Requires: python-libvirt-python'
|
||||||
|
virt-manager.spec
|
||||||
|
- Add corrections to sle15 detection (bsc#1054986)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 20 08:21:01 MDT 2017 - carnold@suse.com
|
Wed Sep 20 08:21:01 MDT 2017 - carnold@suse.com
|
||||||
|
|
||||||
|
@ -38,6 +38,9 @@ Source1: virt-install.rb
|
|||||||
Source2: virt-install.desktop
|
Source2: virt-install.desktop
|
||||||
Source3: virt-manager-supportconfig
|
Source3: virt-manager-supportconfig
|
||||||
# Upstream Patches
|
# Upstream Patches
|
||||||
|
Patch1: 3b769643-dont-add-URI-into-params-for-tunneled-migration.patch
|
||||||
|
Patch2: 6dfc4de1-add-support-for-parsing-formatting-SR-IOV-VFs.patch
|
||||||
|
Patch3: 083dfcc8-Show-details-about-the-network-of-SR-IOV-VF-pool.patch
|
||||||
# SUSE Only
|
# SUSE Only
|
||||||
Patch70: virtman-desktop.patch
|
Patch70: virtman-desktop.patch
|
||||||
Patch71: virtman-kvm.patch
|
Patch71: virtman-kvm.patch
|
||||||
@ -124,11 +127,12 @@ Group: System/Monitoring
|
|||||||
# This version not strictly required: virt-manager should work with older,
|
# This version not strictly required: virt-manager should work with older,
|
||||||
# however varying amounts of functionality will not be enabled.
|
# however varying amounts of functionality will not be enabled.
|
||||||
Requires: libosinfo >= 0.2.10
|
Requires: libosinfo >= 0.2.10
|
||||||
Requires: libvirt-python >= 0.7.0
|
|
||||||
Requires: python-ipaddr
|
Requires: python-ipaddr
|
||||||
|
Requires: python-libvirt-python >= 0.7.0
|
||||||
Requires: python-libxml2
|
Requires: python-libxml2
|
||||||
Requires: python-urlgrabber
|
Requires: python-urlgrabber
|
||||||
Requires: typelib(LibvirtGLib)
|
Requires: typelib(LibvirtGLib)
|
||||||
|
Recommends: python3-virt-bootstrap
|
||||||
BuildRequires: gobject-introspection
|
BuildRequires: gobject-introspection
|
||||||
# No AppIndicator package on SLE
|
# No AppIndicator package on SLE
|
||||||
%if 0%{?is_opensuse} == 0
|
%if 0%{?is_opensuse} == 0
|
||||||
@ -162,6 +166,9 @@ machine).
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
# Upstream Patches
|
# Upstream Patches
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
# SUSE Only
|
# SUSE Only
|
||||||
%patch70 -p1
|
%patch70 -p1
|
||||||
%patch71 -p1
|
%patch71 -p1
|
||||||
|
@ -21,7 +21,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
|||||||
+ pbuf = fetcher.acquireFileContent("media.1/products").strip()
|
+ pbuf = fetcher.acquireFileContent("media.1/products").strip()
|
||||||
+ pbuf = pbuf.split(' ', 1)[1].strip()
|
+ pbuf = pbuf.split(' ', 1)[1].strip()
|
||||||
+ # The media.1/products file naming convention changed between SLE11 and SLE12
|
+ # The media.1/products file naming convention changed between SLE11 and SLE12
|
||||||
+ if pbuf.startswith('SLE') or pbuf.startswith('leanos'):
|
+ if pbuf.startswith('SLE'):
|
||||||
+ pbuf = pbuf.split(' ')[0]
|
+ pbuf = pbuf.split(' ')[0]
|
||||||
+ pbuf = " ".join(re.split('(\d+)', pbuf, 1))
|
+ pbuf = " ".join(re.split('(\d+)', pbuf, 1))
|
||||||
+ cbuf = "\nDISTRO ," + pbuf.replace('-', ' ')
|
+ cbuf = "\nDISTRO ," + pbuf.replace('-', ' ')
|
||||||
@ -35,17 +35,16 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
|||||||
|
|
||||||
distribution = None
|
distribution = None
|
||||||
distro_version = None
|
distro_version = None
|
||||||
@@ -465,7 +481,8 @@ def _distroFromSUSEContent(fetcher, arch
|
@@ -465,7 +481,7 @@ def _distroFromSUSEContent(fetcher, arch
|
||||||
dclass = GenericDistro
|
dclass = GenericDistro
|
||||||
if distribution:
|
if distribution:
|
||||||
if re.match(".*SUSE Linux Enterprise Server*", distribution[1]) or \
|
if re.match(".*SUSE Linux Enterprise Server*", distribution[1]) or \
|
||||||
- re.match(".*SUSE SLES*", distribution[1]):
|
- re.match(".*SUSE SLES*", distribution[1]):
|
||||||
+ re.match(".*SUSE SLES*", distribution[1]) or re.match("SLES*", distribution[1]) or \
|
+ re.match(".*SUSE SLES*", distribution[1]) or re.match("SLES*", distribution[1]):
|
||||||
+ re.match("leanos*", distribution[1]):
|
|
||||||
dclass = SLESDistro
|
dclass = SLESDistro
|
||||||
if distro_version is None:
|
if distro_version is None:
|
||||||
distro_version = _parse_sle_distribution(distribution)
|
distro_version = _parse_sle_distribution(distribution)
|
||||||
@@ -481,7 +498,7 @@ def _distroFromSUSEContent(fetcher, arch
|
@@ -481,7 +497,7 @@ def _distroFromSUSEContent(fetcher, arch
|
||||||
dclass = CAASPDistro
|
dclass = CAASPDistro
|
||||||
if distro_version is None:
|
if distro_version is None:
|
||||||
distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[6]]
|
distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[6]]
|
||||||
@ -54,7 +53,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
|||||||
dclass = OpensuseDistro
|
dclass = OpensuseDistro
|
||||||
if distro_version is None:
|
if distro_version is None:
|
||||||
distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]]
|
distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]]
|
||||||
@@ -1003,6 +1020,7 @@ class SLDistro(RHELDistro):
|
@@ -1003,6 +1019,7 @@ class SLDistro(RHELDistro):
|
||||||
|
|
||||||
class SuseDistro(Distro):
|
class SuseDistro(Distro):
|
||||||
name = "SUSE"
|
name = "SUSE"
|
||||||
@ -62,7 +61,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
|||||||
|
|
||||||
_boot_iso_paths = ["boot/boot.iso"]
|
_boot_iso_paths = ["boot/boot.iso"]
|
||||||
|
|
||||||
@@ -1040,8 +1058,11 @@ class SuseDistro(Distro):
|
@@ -1040,8 +1057,11 @@ class SuseDistro(Distro):
|
||||||
self._xen_kernel_paths = [("boot/%s/vmlinuz-xenpae" % self.arch,
|
self._xen_kernel_paths = [("boot/%s/vmlinuz-xenpae" % self.arch,
|
||||||
"boot/%s/initrd-xenpae" % self.arch)]
|
"boot/%s/initrd-xenpae" % self.arch)]
|
||||||
else:
|
else:
|
||||||
@ -76,7 +75,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
|||||||
|
|
||||||
def _variantFromVersion(self):
|
def _variantFromVersion(self):
|
||||||
distro_version = self.version_from_content[1].strip()
|
distro_version = self.version_from_content[1].strip()
|
||||||
@@ -1053,7 +1074,7 @@ class SuseDistro(Distro):
|
@@ -1053,7 +1073,7 @@ class SuseDistro(Distro):
|
||||||
if len(distro_version.split('.', 1)) == 2:
|
if len(distro_version.split('.', 1)) == 2:
|
||||||
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||||
self.os_variant += version
|
self.os_variant += version
|
||||||
@ -85,7 +84,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
|||||||
self.os_variant += sp_version
|
self.os_variant += sp_version
|
||||||
elif self.os_variant.startswith("opensuse"):
|
elif self.os_variant.startswith("opensuse"):
|
||||||
if len(version) == 8:
|
if len(version) == 8:
|
||||||
@@ -1077,6 +1098,24 @@ class SuseDistro(Distro):
|
@@ -1077,6 +1097,24 @@ class SuseDistro(Distro):
|
||||||
self.os_variant += "9"
|
self.os_variant += "9"
|
||||||
|
|
||||||
def isValidStore(self):
|
def isValidStore(self):
|
||||||
@ -110,7 +109,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py
|
|||||||
# self.version_from_content is the VERSION line from the contents file
|
# self.version_from_content is the VERSION line from the contents file
|
||||||
if (not self.version_from_content or
|
if (not self.version_from_content or
|
||||||
self.version_from_content[1] is None):
|
self.version_from_content[1] is None):
|
||||||
@@ -1128,8 +1167,6 @@ class OESDistro(SuseDistro):
|
@@ -1128,8 +1166,6 @@ class OESDistro(SuseDistro):
|
||||||
urldistro = "oes"
|
urldistro = "oes"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user