diff --git a/addDroplet.go b/addDroplet.go index b6e29fa..7f6a40a 100644 --- a/addDroplet.go +++ b/addDroplet.go @@ -3,6 +3,7 @@ package main import ( + "encoding/xml" "errors" "fmt" @@ -244,15 +245,27 @@ func updateNetwork(d *DropletT, domcfg *libvirtxml.Domain) ([]*pb.Event, error) hwaddr = iface.MAC.Address } if iface.Source == nil { - fmt.Printf("non-standard network: %+v\n", iface) + // fmt.Printf("non-standard network: %+v\n", iface) + updatedXML, _ := xml.MarshalIndent(domcfg.Devices.Interfaces, "", " ") + log.Info("Non-Standard Network XML Start") + fmt.Println(string(updatedXML)) + log.Info("Non-Standard Network XML End") return nil, errors.New("non-standard network") } if iface.Source.Bridge == nil { - fmt.Printf("non-standard network: %+v\n", iface) + // fmt.Printf("non-standard network: %+v\n", iface) + updatedXML, _ := xml.MarshalIndent(domcfg.Devices.Interfaces, "", " ") + log.Info("Non-Standard Network XML Start") + fmt.Println(string(updatedXML)) + log.Info("Non-Standard Network XML End") return nil, errors.New("bridge is blank nil and no mac address") } if iface.Source.Bridge.Bridge == "" { + updatedXML, _ := xml.MarshalIndent(domcfg.Devices.Interfaces, "", " ") + log.Info("Non-Standard Network XML Start") + fmt.Println(string(updatedXML)) + log.Info("Non-Standard Network XML End") return nil, errors.New("bridge is blank and no mac address") } // log.Info("network has bridge:", iface.Source.Bridge.Bridge)