[virt-tools-list] [virt-install PATCH 1/4] osdict: Add get_network_install_resources()

Fabiano Fidêncio fidencio at redhat.com
Fri Mar 8 16:20:56 UTC 2019


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 at redhat.com>
---
 virtinst/osdict.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 08176976..12f625ba 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -478,6 +478,20 @@ 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):
+            if r.get_architecture() == guest.os.arch or r.get_architecture() == "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




More information about the virt-tools-list mailing list