summaryrefslogtreecommitdiff
path: root/sampleData.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-31 13:21:10 -0500
committerJeff Carr <[email protected]>2024-10-31 13:21:10 -0500
commit9ad173a845216488a397d5b9d8f7bc15a64c96cb (patch)
treed66a5f2644f386500dfe231c1d756227ff63b2e3 /sampleData.go
parente8834578fbecc48b133e6550829de4766bc309a8 (diff)
expose cluster.Hypervisors
Signed-off-by: Jeff Carr <[email protected]>
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