virt-manager/virtinst-add-caasp-support.patch
Charles Arnold 686ee09506 - Upstream bug fixes (bsc#1027942)
b8aff280-virtinst-quickfix-ubuntu-net-preseed-insert-cdrom-error.patch
  25b88733-urldetect-Dont-overload-suse_content-variable.patch
  9308bae3-util-Fix-typo-vpcu-vcpu.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=438
2018-10-30 22:11:22 +00:00

44 lines
1.4 KiB
Diff

References: bsc#1010060
Index: virt-manager-2.0.0/virtinst/urldetect.py
===================================================================
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
+++ virt-manager-2.0.0/virtinst/urldetect.py
@@ -238,6 +238,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
@@ -570,6 +576,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"
@@ -645,6 +654,13 @@ class OpensuseDistro(SuseDistro):
famregex = ".*openSUSE.*"
+class CAASPDistro(SuseDistro):
+ 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):
PRETTY_NAME = "OES"
_variant_prefix = "oes"