[virt-tools-list] [virt-install PATCH v2 08/14] osdict: Add methods for generating the script and its cmdline

Fabiano Fidêncio fidencio at redhat.com
Fri Feb 22 08:40:15 UTC 2019


generate_install_script_output() generates the install script,
accordingly to the config passed, in a specific directory.

generate_install_script_cmdline() generates the kernel command line that
has to be used in order to perform the unattended installation.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 virtinst/osdict.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index b9387a33..eb64ba08 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -700,4 +700,16 @@ class _OsVariant(object):
 
         return config
 
+    def generate_install_script_output(self, script, config, output_dir):
+        if not self._os:
+            return
+
+        script.generate_output(self._os, config, output_dir)
+
+    def generate_install_script_cmdline(self, script, config):
+        if not self._os:
+            return None
+
+        return script.generate_command_line(self._os, config)
+
 OSDB = _OSDB()
-- 
2.20.1




More information about the virt-tools-list mailing list