- virtinst: interface: add support for backend.hostname and backend.fqdn (RHEL-95370) - maint: use constants instead of strings for boot devices (RHEL-71842) - virtinst: rework get_boot_order (RHEL-71842) - virtinst: guest: introduce can_use_device_boot_order (RHEL-71842) - virtinst: remove legacy attribute from set_boot_order/get_boot_order (RHEL-71842) - installer: add support to use device boot order (RHEL-71842) Resolves: RHEL-71842, RHEL-95370
79 lines
3.2 KiB
Diff
79 lines
3.2 KiB
Diff
From 936016b96d195eb07e730f90caa1084e62edd208 Mon Sep 17 00:00:00 2001
|
|
Message-ID: <936016b96d195eb07e730f90caa1084e62edd208.1764872379.git.phrdina@redhat.com>
|
|
From: Pavel Hrdina <phrdina@redhat.com>
|
|
Date: Fri, 21 Nov 2025 10:11:34 +0100
|
|
Subject: [PATCH] virtinst: interface: add support for backend.hostname and
|
|
backend.fqdn
|
|
|
|
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
(cherry picked from commit d57e2e738f37444a48c1e762ee63114583d6348f)
|
|
|
|
Resolves: https://issues.redhat.com/browse/RHEL-95370
|
|
|
|
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
---
|
|
tests/data/cli/compare/virt-install-many-devices.xml | 5 +++++
|
|
tests/test_cli.py | 1 +
|
|
virtinst/cli.py | 2 ++
|
|
virtinst/devices/interface.py | 2 ++
|
|
4 files changed, 10 insertions(+)
|
|
|
|
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
|
|
index 9b8b3c6ba..5edca096d 100644
|
|
--- a/tests/data/cli/compare/virt-install-many-devices.xml
|
|
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
|
|
@@ -680,6 +680,11 @@
|
|
<range start="5000" end="6000" to="5"/>
|
|
</portForward>
|
|
</interface>
|
|
+ <interface type="user">
|
|
+ <backend type="passt" hostname="test" fqdn="test.example.com"/>
|
|
+ <mac address="00:11:22:33:44:55"/>
|
|
+ <model type="virtio"/>
|
|
+ </interface>
|
|
<interface type="hostdev">
|
|
<mac address="00:11:22:33:44:55"/>
|
|
<model type="virtio"/>
|
|
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
|
index daf6e2a80..90f6ab983 100644
|
|
--- a/tests/test_cli.py
|
|
+++ b/tests/test_cli.py
|
|
@@ -675,6 +675,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
|
|
--network passt,portForward=8080
|
|
--network passt,portForward0=7000-8000/udp,portForward1=127.0.0.1:2222:22
|
|
--network passt,portForward0=2001:db8:ac10:fd01::1:10:3000-4000:30,portForward1=127.0.0.1:5000-6000:5
|
|
+--network passt,backend.hostname=test,backend.fqdn=test.example.com
|
|
--network type=hostdev,source.address.type=pci,source.address.domain=0x0,source.address.bus=0x00,source.address.slot=0x07,source.address.function=0x0
|
|
--network hostdev=pci_0000_00_09_0
|
|
--network hostdev=0:0:4.0
|
|
diff --git a/virtinst/cli.py b/virtinst/cli.py
|
|
index 1203b0c8d..ed97e8809 100644
|
|
--- a/virtinst/cli.py
|
|
+++ b/virtinst/cli.py
|
|
@@ -4272,6 +4272,8 @@ class ParserNetwork(VirtCLIParser):
|
|
# Standard XML options
|
|
cls.add_arg("type", "type", cb=cls.set_type_cb)
|
|
cls.add_arg("backend.type", "backend.type")
|
|
+ cls.add_arg("backend.hostname", "backend.hostname")
|
|
+ cls.add_arg("backend.fqdn", "backend.fqdn")
|
|
cls.add_arg("backend.logFile", "backend.logFile")
|
|
cls.add_arg("trustGuestRxFilters", "trustGuestRxFilters", is_onoff=True)
|
|
|
|
diff --git a/virtinst/devices/interface.py b/virtinst/devices/interface.py
|
|
index 333b92eca..9d82ab586 100644
|
|
--- a/virtinst/devices/interface.py
|
|
+++ b/virtinst/devices/interface.py
|
|
@@ -132,6 +132,8 @@ class _Backend(XMLBuilder):
|
|
XML_NAME = "backend"
|
|
|
|
type = XMLProperty("./@type")
|
|
+ hostname = XMLProperty("./@hostname")
|
|
+ fqdn = XMLProperty("./@fqdn")
|
|
logFile = XMLProperty("./@logFile", do_abspath=True)
|
|
|
|
|
|
--
|
|
2.52.0
|