summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-23 06:06:38 -0500
committerJeff Carr <[email protected]>2024-10-23 06:06:38 -0500
commitcaf84a632694aad2a5295b38d3db79042f5fd167 (patch)
treea9d6b7c9fdab319fef09afce64ae6ee25c27681b
parente807365ee9e539befc627d1ed2f2c6f7038bed9c (diff)
added some xml files
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--addDroplet.go2
-rw-r--r--main.go22
2 files changed, 14 insertions, 10 deletions
diff --git a/addDroplet.go b/addDroplet.go
index ebdcaf1..f6baa8c 100644
--- a/addDroplet.go
+++ b/addDroplet.go
@@ -24,6 +24,8 @@ func addDomainDroplet(domcfg *libvirtxml.Domain) (*DropletT, error) {
d = new(DropletT)
d.pb = me.cluster.AddDroplet(domcfg.UUID, domcfg.Name, 2, 2*1024*1024)
+ d.pb.StartState = "off"
+
me.droplets = append(me.droplets, d)
me.changed = true
diff --git a/main.go b/main.go
index 5ed64dd..8f6d507 100644
--- a/main.go
+++ b/main.go
@@ -81,19 +81,21 @@ func main() {
}
}
}
- if me.changed {
- if argv.Save {
- writeConfigFile()
- writeConfigFileDroplets()
- } else {
- log.Info("Not saving changes (use --save to save)")
+ if len(argv.Xml) != 0 {
+ if me.changed {
+ if argv.Save {
+ writeConfigFile()
+ writeConfigFileDroplets()
+ } else {
+ log.Info("Not saving changes (use --save to save)")
+ }
+ }
+ if !ok {
+ log.Info("adding xml files failed")
+ os.Exit(-1)
}
os.Exit(0)
}
- if !ok {
- log.Info("adding xml files failed")
- os.Exit(-1)
- }
/*
log.Info("command line hypervisors:", argv.Hosts)