diff options
Diffstat (limited to 'sampleData.go')
| -rw-r--r-- | sampleData.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sampleData.go b/sampleData.go index 0085822..dedd7c0 100644 --- a/sampleData.go +++ b/sampleData.go @@ -67,9 +67,12 @@ func CreateSampleEvents(total int) *Events { return e } -func CreateSampleCluster(total int) *Cluster { - var c *Cluster - c = new(Cluster) +func CreateSampleCluster(total int) *NewCluster { + var c *NewCluster + c = new(NewCluster) + c.d = new(Droplets) + c.h = new(Hypervisors) + c.e = new(Events) for i := 0; i < total; i++ { hostname := fmt.Sprintf("bmath%d.wit.com", i) @@ -80,7 +83,7 @@ func CreateSampleCluster(total int) *Cluster { d.Memory = SetGB(256) } - c.Droplets = append(c.Droplets, d) + c.d.Droplets = append(c.d.Droplets, d) } for i := 0; i < 3; i++ { @@ -88,7 +91,7 @@ func CreateSampleCluster(total int) *Cluster { h := CreateSampleHypervisor(hostname, i+1) h.Comment = fmt.Sprintf("Sample hypervisor %d", i) - c.Hypervisors = append(c.Hypervisors, h) + c.h.Hypervisors = append(c.h.Hypervisors, h) } return c |
