summaryrefslogtreecommitdiff
path: root/dump.go
diff options
context:
space:
mode:
Diffstat (limited to 'dump.go')
-rw-r--r--dump.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/dump.go b/dump.go
index dcec8a8..d481438 100644
--- a/dump.go
+++ b/dump.go
@@ -30,19 +30,29 @@ func dumpCluster(w http.ResponseWriter) {
}
// list running droplets and droplets that should be running
-func dumpDroplets(w http.ResponseWriter) {
+func dumpDroplets(w http.ResponseWriter, full bool) {
for i, d := range me.cluster.Droplets {
var macs []string
for _, n := range d.Networks {
macs = append(macs, n.Mac)
}
arp := strings.Join(macs, " ")
+
+ var filenames string
+ for _, disk := range d.Disks {
+ filenames += disk.Filename
+ }
+
if d.CurrentState == pb.DropletState_ON {
fmt.Fprintln(w, i, "droplet:", arp, d.Hostname, d.StartState, d.CurrentState, d.CurrentHypervisor)
continue
}
if d.StartState == pb.DropletState_ON {
fmt.Fprintln(w, i, "droplet:", arp, d.Hostname, d.StartState, d.CurrentState, "(should be on)")
+ continue
+ }
+ if full {
+ fmt.Fprintln(w, i, "droplet:", arp, d.Hostname, d.StartState, d.CurrentState, filenames)
}
}
}