summaryrefslogtreecommitdiff
path: root/configfiles.go
diff options
context:
space:
mode:
Diffstat (limited to 'configfiles.go')
-rw-r--r--configfiles.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/configfiles.go b/configfiles.go
index 927f328..dad2421 100644
--- a/configfiles.go
+++ b/configfiles.go
@@ -61,17 +61,17 @@ func readDropletFile(filename string) {
if d == nil {
// this is a new unknown droplet (not in the config file)
d = new(DropletT)
+ d.pb = me.cluster.AddDroplet(name, 16, 256)
if len(fields) > 1 && fields[1] != "ON" {
- d.ConfigState = "OFF"
+ d.pb.StartState = "OFF"
} else {
- d.ConfigState = "ON"
+ d.pb.StartState = "ON"
}
if len(fields) >= 3 {
d.hyperPreferred = fields[2]
}
- d.pb = me.cluster.AddDroplet(name, 16, 256)
me.droplets = append(me.droplets, d)
- log.Log(EVENT, "config new droplet", d.pb.Hostname, d.ConfigState, d.hyperPreferred)
+ log.Log(EVENT, "config new droplet", d.pb.Hostname, d.pb.StartState, d.hyperPreferred)
} else {
log.Info("not sure what to do here. duplicate droplet", name, "in config file")
}
@@ -99,9 +99,9 @@ func readHypervisorFile(filename string) {
name := fields[0]
h := addHypervisor(name)
if len(fields) < 2 || fields[1] != "active" {
- h.Active = false
+ h.pb.Active = false
} else {
- h.Active = true
+ h.pb.Active = true
}
}
}
@@ -115,13 +115,13 @@ func addHypervisor(name string) *HyperT {
}
log.Log(EVENT, "config new hypervisor", name)
h = new(HyperT)
- h.Autoscan = true
h.Delay = 5 * time.Second
h.lastpoll = time.Now()
h.Scan = func() {
h.pollHypervisor()
}
h.pb = me.cluster.AddHypervisor(name, 16, 256)
+ h.pb.Autoscan = true
me.hypers = append(me.hypers, h)
return h
}