aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Skultety <eskultet@redhat.com>2023-05-18 15:28:24 +0200
committerErik Skultety <eskultet@redhat.com>2023-06-22 12:05:04 +0000
commitf8883bead9dc1520763dbd566912e7bd584cd231 (patch)
tree33e998e5f14cf0e8120eff38436b3119419650fe
parentb970b0236dc4f8919f8970c3aed306fd19859ce5 (diff)
downloadlibvirt-ci-f8883bead9dc1520763dbd566912e7bd584cd231.zip
libvirt-ci-f8883bead9dc1520763dbd566912e7bd584cd231.tar.gz
libvirt-ci-f8883bead9dc1520763dbd566912e7bd584cd231.tar.bz2
install: Introduce 'from_template_image' class method
Analogically to from_vendor_image this class method prepares a VirtInstall runner object tailored to the user template base image scenario. Signed-off-by: Erik Skultety <eskultet@redhat.com>
-rw-r--r--lcitool/install/install.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lcitool/install/install.py b/lcitool/install/install.py
index a6ef147..61db4f2 100644
--- a/lcitool/install/install.py
+++ b/lcitool/install/install.py
@@ -73,6 +73,13 @@ class VirtInstall:
runner = cls(name, facts)
return cls._from_image(runner, config, image.path)
+ @classmethod
+ def from_template_image(cls, name, config, facts, template_path):
+ """ Shortcut constructor for a template image-based installation. """
+
+ runner = cls(name, facts)
+ return cls._from_image(runner, config, Path(template_path))
+
def __init__(self, name, facts):
"""
Instantiates the virt-install installer backend.