ignore apparmor in the xml files

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-23 18:37:07 -05:00
parent e4c089f70e
commit f15148b63e
1 changed files with 19 additions and 0 deletions

19
xml.go
View File

@ -315,6 +315,25 @@ func dumpNonStandardXML(domcfg *libvirtxml.Domain) {
fmt.Printf("? CPU Mode: %+v\n", domcfg.CPU.Mode)
}
// this goes away if SecLabel is zero'd out?
//if domcfg.Metadata != nil {
// fmt.Printf("? Metadata: %+v\n", domcfg.Metadata)
//}
var secnormal bool = true
if len(domcfg.SecLabel) != 0 {
for _, sec := range domcfg.SecLabel {
if sec.Model == "apparmor" {
} else {
fmt.Printf("? SecLabel: %+v\n", sec)
fmt.Printf("? SecLabel.Model: %+v\n", sec.Model)
secnormal = false
}
}
}
if secnormal {
domcfg.SecLabel = nil
}
// this will move elsewhere in the protobuf someday
if domcfg.OnPoweroff == "destroy" {
domcfg.OnPoweroff = ""