summaryrefslogtreecommitdiff
path: root/configfile/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'configfile/main.go')
-rw-r--r--configfile/main.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/configfile/main.go b/configfile/main.go
index 627649f..4e873fa 100644
--- a/configfile/main.go
+++ b/configfile/main.go
@@ -26,9 +26,15 @@ func main() {
log.Fatalln("Failed to parse droplet:", err)
}
- log.Println(aCluster)
- for i, d := range aCluster.Droplets {
- log.Println("\tdrop =", i, d)
+ // log.Println(aCluster)
+ // show the droplets to STDOUT
+ for _, d := range aCluster.Droplets {
+ log.Println("\tdroplet =", d.Hostname, "preffered host:", d.PreferredHypervisor)
+ }
+
+ // show the hypervisors to STDOUT
+ for _, h := range aCluster.Hypervisors {
+ log.Println("\thypervisor =", h.Hostname)
}
}
@@ -50,7 +56,7 @@ func marshalWriteToFile(myWriter *bufio.Writer, c *pb.Cluster) {
func TestWriteCluster() {
buf := new(bytes.Buffer)
- c := pb.CreateSampleCluster(3)
+ c := pb.CreateSampleCluster(7)
got := buf.String()
log.Println(got)