virt-manager/virtinst-add-caasp-support.patch
Charles Arnold 01fd92c135 - bsc#1143315 - virt-manager: Fix detection for SLE15
virtinst-add-sle15-detection-support.patch
  virtinst-add-caasp-support.patch
  virtinst-detect-oes-distros.patch
  virtinst-add-pvh-support.patch
  virtinst-s390x-disable-graphics.patch
  virtinst-set-qemu-emulator.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=480
2019-07-29 19:36:33 +00:00

53 lines
1.7 KiB
Diff

References: bsc#1010060
Index: virt-manager-2.2.1/virtinst/install/urldetect.py
===================================================================
--- virt-manager-2.2.1.orig/virtinst/install/urldetect.py
+++ virt-manager-2.2.1/virtinst/install/urldetect.py
@@ -273,6 +273,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
@@ -550,6 +556,9 @@ class _SuseDistro(_RHELDistro):
# 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"
@@ -622,6 +631,14 @@ class _OpensuseDistro(_SuseDistro):
famregex = ".*openSUSE.*"
+class _CAASPDistro(_SuseDistro):
+ PRETTY_NAME = "SLES"
+ matching_distros = ["caasp"]
+ _variant_prefix = "caasp"
+ _suse_regex = [".*SUSE Container as a Service Platform*", ".*SUSE CaaS Platform*"]
+ famregex = ".*(SUSE Container as a Service Platform|SUSE CaaS Platform).*"
+
+
class _OESDistro(_SuseDistro):
PRETTY_NAME = "OES"
matching_distros = ["oes"]
@@ -838,6 +855,7 @@ def _build_distro_list(osobj):
_SLESDistro,
_SLEDDistro,
_OpensuseDistro,
+ _CAASPDistro,
_OESDistro,
_DebianDistro,
_UbuntuDistro,