[PATCH 2/3] virtinst: Get rid of the s390x-specific cd detection function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move the s390x-specific code into the generic cd detection function.

Signed-off-by: Viktor Mihajlovski <mihajlov@xxxxxxxxxxxxxxxxxx>
---
 virtinst/urlfetcher.py | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
index e657def..a32c2d6 100644
--- a/virtinst/urlfetcher.py
+++ b/virtinst/urlfetcher.py
@@ -1267,33 +1267,16 @@ class UbuntuDistro(DebianDistro):
         if not self._check_info(".disk/info"):
             return False
 
-        kernel_initrd_pair = ("linux", "initrd.gz")
+        if not self.arch == "s390x":
+            kernel_initrd_pair = ("linux", "initrd.gz")
+        else:
+            kernel_initrd_pair = ("boot/kernel.ubuntu", "boot/initrd.ubuntu")
 
         self._hvm_kernel_paths += [kernel_initrd_pair]
         self._xen_kernel_paths += [kernel_initrd_pair]
 
         return True
 
-    def _is_install_cd_s390x(self):
-        # For install CDs (s390x)
-        if not self.arch == "s390x":
-            return False
-
-        if not self._check_info(".disk/info"):
-            return False
-
-        self._hvm_kernel_paths += [("boot/kernel.ubuntu", "boot/initrd.ubuntu")]
-        self._xen_kernel_paths += [("boot/kernel.ubuntu", "boot/initrd.ubuntu")]
-
-        return True
-
-    def isValidStore(self):
-        return any(check() for check in [
-            self._is_regular_tree,
-            self._is_tree_iso,
-            self._is_install_cd,
-            self._is_install_cd_s390x,
-            ])
 
 
 class MandrivaDistro(Distro):
-- 
1.9.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux