start to deprecate dumb droplets file
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
b1a943fa3d
commit
e2d872f088
|
@ -22,9 +22,22 @@ func readConfigFile() {
|
||||||
}
|
}
|
||||||
err = me.cluster.UnmarshalJSON(pfile)
|
err = me.cluster.UnmarshalJSON(pfile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Info("create json failed", err)
|
log.Info("read json failed", err)
|
||||||
|
os.Exit(-1)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
for _, pbd := range me.cluster.Droplets {
|
||||||
|
d := findDroplet(pbd.Hostname)
|
||||||
|
if d != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// this is a new unknown droplet (not in the config file)
|
||||||
|
d = new(DropletT)
|
||||||
|
d.pb = pbd
|
||||||
|
me.droplets = append(me.droplets, d)
|
||||||
|
log.Log(EVENT, "config new droplet", d.pb.Hostname, d.pb.StartState, d.pb.PreferredHypervisor)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeConfigFile() {
|
func writeConfigFile() {
|
||||||
|
|
Loading…
Reference in New Issue