summaryrefslogtreecommitdiff
path: root/sampleData.go
diff options
context:
space:
mode:
Diffstat (limited to 'sampleData.go')
-rw-r--r--sampleData.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/sampleData.go b/sampleData.go
index dedd7c0..3d9f544 100644
--- a/sampleData.go
+++ b/sampleData.go
@@ -68,11 +68,7 @@ func CreateSampleEvents(total int) *Events {
}
func CreateSampleCluster(total int) *NewCluster {
- var c *NewCluster
- c = new(NewCluster)
- c.d = new(Droplets)
- c.h = new(Hypervisors)
- c.e = new(Events)
+ c := InitCluster()
for i := 0; i < total; i++ {
hostname := fmt.Sprintf("bmath%d.wit.com", i)
@@ -91,7 +87,7 @@ func CreateSampleCluster(total int) *NewCluster {
h := CreateSampleHypervisor(hostname, i+1)
h.Comment = fmt.Sprintf("Sample hypervisor %d", i)
- c.h.Hypervisors = append(c.h.Hypervisors, h)
+ c.H.Hypervisors = append(c.H.Hypervisors, h)
}
return c