summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.go b/main.go
index 6f7bbf7..a93af29 100644
--- a/main.go
+++ b/main.go
@@ -56,6 +56,7 @@ func main() {
// sanity check the droplets
checkDroplets(false)
+ var newEvents []*pb.Event
for _, filename := range argv.Xml {
domcfg, err := readXml(filename)
if err != nil {
@@ -68,15 +69,22 @@ func main() {
}
// this is a new droplet. add it to the cluster
log.Info("Add XML Droplet here", domcfg.Name)
- _, err = addDomainDroplet(domcfg)
+ d, newe, err := addDomainDroplet(domcfg)
if err != nil {
+ log.Info("addDomainDroplet() error d =", d)
log.Info("addDomainDroplet() error", filename)
log.Info("addDomainDroplet() error", err)
log.Info("libvirt XML will have to be fixed by hand")
os.Exit(-1)
}
+ for _, e := range newe {
+ newEvents = append(newEvents, e)
+ }
}
if len(argv.Xml) != 0 {
+ for i, e := range newEvents {
+ log.Info(i, "Event:", e.Droplet, e.FieldName, "orig:", e.OrigVal, "new:", e.NewVal)
+ }
if me.changed {
if argv.Save {
writeConfigFile()