added some xml files

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-23 06:06:38 -05:00
parent e807365ee9
commit caf84a6326
2 changed files with 14 additions and 10 deletions

View File

@ -24,6 +24,8 @@ func addDomainDroplet(domcfg *libvirtxml.Domain) (*DropletT, error) {
d = new(DropletT) d = new(DropletT)
d.pb = me.cluster.AddDroplet(domcfg.UUID, domcfg.Name, 2, 2*1024*1024) d.pb = me.cluster.AddDroplet(domcfg.UUID, domcfg.Name, 2, 2*1024*1024)
d.pb.StartState = "off"
me.droplets = append(me.droplets, d) me.droplets = append(me.droplets, d)
me.changed = true me.changed = true

22
main.go
View File

@ -81,19 +81,21 @@ func main() {
} }
} }
} }
if me.changed { if len(argv.Xml) != 0 {
if argv.Save { if me.changed {
writeConfigFile() if argv.Save {
writeConfigFileDroplets() writeConfigFile()
} else { writeConfigFileDroplets()
log.Info("Not saving changes (use --save to save)") } else {
log.Info("Not saving changes (use --save to save)")
}
}
if !ok {
log.Info("adding xml files failed")
os.Exit(-1)
} }
os.Exit(0) os.Exit(0)
} }
if !ok {
log.Info("adding xml files failed")
os.Exit(-1)
}
/* /*
log.Info("command line hypervisors:", argv.Hosts) log.Info("command line hypervisors:", argv.Hosts)