add droplet defaults to start state = off

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-31 22:14:52 -05:00
parent 2b77b8a89d
commit b6f5594fe6
1 changed files with 2 additions and 0 deletions

2
add.go
View File

@ -101,6 +101,7 @@ func (c *NewCluster) AddDropletSimple(uuid string, hostname string, cpus int, me
d.Cpus = 1 d.Cpus = 1
} }
d.Memory = SetGB(mem * 32) d.Memory = SetGB(mem * 32)
d.StartState = DropletState_OFF
c.AddDroplet(d) c.AddDroplet(d)
return d return d
} }
@ -113,6 +114,7 @@ func (c *NewCluster) AddDropletLocal(name string, hypername string) *Droplet {
d.LocalOnly = hypername d.LocalOnly = hypername
d.Current = new(Current) d.Current = new(Current)
d.Current.Hypervisor = hypername d.Current.Hypervisor = hypername
d.StartState = DropletState_OFF
d.Current.State = DropletState_OFF d.Current.State = DropletState_OFF
c.AddDroplet(d) c.AddDroplet(d)