diff options
Diffstat (limited to 'dumpNonStandardXML.go')
| -rw-r--r-- | dumpNonStandardXML.go | 31 |
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) } |
