From eab1a35ca532d8e938bb1599de84c00e3dc85843 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 1 Nov 2024 08:31:13 -0500 Subject: import worked Signed-off-by: Jeff Carr --- dumpNonStandardXML.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'dumpNonStandardXML.go') diff --git a/dumpNonStandardXML.go b/dumpNonStandardXML.go index e92d44b..3feba22 100644 --- a/dumpNonStandardXML.go +++ b/dumpNonStandardXML.go @@ -475,5 +475,36 @@ func DumpNonStandardXML(domcfg *libvirtxml.Domain) (string, error) { domcfg.Devices.Videos = nil } + var normalAudio bool = true + if domcfg.Devices.Audios != nil { + for _, a := range domcfg.Devices.Audios { + if a.SPICE != nil { + // nothing to do for this + } else { + fmt.Printf("? Audio: %+v\n", a) + normalAudio = false + } + } + } + if normalAudio { + domcfg.Devices.Audios = nil + } + + var normalWatchdog bool = true + if domcfg.Devices.Watchdogs != nil { + for _, dog := range domcfg.Devices.Watchdogs { + // fmt.Printf("? Watchdog: %+v\n", dog) + if dog.Model == "itco" { + // nothing to do for this + } else { + fmt.Printf("? Watchdog: %+v\n", dog) + normalWatchdog = false + } + } + } + if normalWatchdog { + domcfg.Devices.Watchdogs = nil + } + return finalEmptyCheck(domcfg) } -- cgit v1.2.3