summaryrefslogtreecommitdiff
path: root/dumpNonStandardXML.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-01 08:31:13 -0500
committerJeff Carr <[email protected]>2024-11-01 08:31:13 -0500
commiteab1a35ca532d8e938bb1599de84c00e3dc85843 (patch)
tree8a281cb9948e56faf84d49539a520a0835186040 /dumpNonStandardXML.go
parent53a88a1c5c591bb36543c6faf2cb0f753d1a8a23 (diff)
import worked
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'dumpNonStandardXML.go')
-rw-r--r--dumpNonStandardXML.go31
1 files changed, 31 insertions, 0 deletions
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)
}