[virt-install PATCH v2 1/7] osdict: Add get_network_install_resources()

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

 



get_network_install_resources() is going to be used when performing a
network based installations where more RAM is needed during the
installation time than the recommended one, which is the case of some
distros as CentOS, RHEL, (some versions of) Silverblue and (some
versions of) Fedora.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 virtinst/osdict.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 4ffcfa29..c49c45e4 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -483,6 +483,21 @@ class _OsVariant(object):
 
         return ret
 
+    def get_network_install_resources(self, guest):
+        ret = {}
+
+        if not self._os:
+            return ret
+
+        resources = self._os.get_network_install_resources()
+        for r in _OsinfoIter(resources):
+            arch = r.get_architecture()
+            if arch == guest.os.arch or arch == "all":
+                ret["ram"] = r.get_ram()
+                break
+
+        return ret
+
     def get_kernel_url_arg(self):
         """
         Kernel argument name the distro's installer uses to reference
-- 
2.20.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