diff options
Diffstat (limited to 'start.go')
| -rw-r--r-- | start.go | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -29,7 +29,7 @@ func isClusterStable() (string, error) { // for now, because sometimes this should write to stdout and // sometimes to http socket, it returns a string -func Start(name string) (string, error) { +func Start(id string) (string, error) { var result string if s, err := isClusterStable(); err != nil { @@ -38,9 +38,9 @@ func Start(name string) (string, error) { } // lookup the droplet by name - d := me.cluster.FindDropletByName(name) + d := me.cluster.FindDropletByName(id) if d == nil { - result = "can't start unknown droplet: " + name + result = "can't start unknown droplet: " + id return result, errors.New(result) } @@ -66,12 +66,12 @@ func Start(name string) (string, error) { if ok { return result + b, nil } - return result + b, errors.New("start " + name + " on hypervisor " + h.pb.Hostname) + return result + b, errors.New("start " + d.Hostname + " on hypervisor " + h.pb.Hostname) } // skip hypervisors marked inactive if h.pb.Active != true { - result += fmt.Sprintln("hypervisor is inactive:", name, "for", h.pb.Hostname, h.pb.Active) + result += fmt.Sprintln("hypervisor is inactive:", d.Hostname, "for", h.pb.Hostname, h.pb.Active) continue } @@ -82,10 +82,10 @@ func Start(name string) (string, error) { if ok { return result + b, nil } - return result + b, errors.New("start " + name + " on hypervisor " + h.pb.Hostname) + return result + b, errors.New("start " + d.Hostname + " on hypervisor " + h.pb.Hostname) } - result += fmt.Sprintln("hypervisor ready:", name, "for", h.pb.Hostname, h.pb.Active) + result += fmt.Sprintln("hypervisor ready:", d.Hostname, "for", h.pb.Hostname, h.pb.Active) pool = append(pool, h) } @@ -106,5 +106,5 @@ func Start(name string) (string, error) { if ok { return result + output, nil } - return result + output, errors.New("start " + name + " on hypervisor " + h.pb.Hostname) + return result + output, errors.New("start " + d.Hostname + " on hypervisor " + h.pb.Hostname) } |
