diff options
Diffstat (limited to 'sampleData.go')
| -rw-r--r-- | sampleData.go | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sampleData.go b/sampleData.go index c87fcd0..d0388aa 100644 --- a/sampleData.go +++ b/sampleData.go @@ -40,6 +40,28 @@ func CreateSampleHypervisor(hostname string, mem int) *Hypervisor { return h } +func CreateSampleEvents(total int) *Events { + var e *Events + e = new(Events) + + // info := StorageInfo{Capacity: 64} + // e.Humantest = &info + if e.Humantest == nil { + var newInfo StorageInfo + newInfo = StorageInfo{Capacity: 64} + e.Humantest = &newInfo + } else { + e.Humantest.Capacity = SetGB(total * 32) + } + + for i := 0; i < total; i++ { + var newe *Event + newe = new(Event) + e.Events = append(e.Events, newe) + } + return e +} + func CreateSampleCluster(total int) *Cluster { var c *Cluster c = new(Cluster) @@ -53,8 +75,6 @@ func CreateSampleCluster(total int) *Cluster { d.Cpus = 16 d.Memory = SetGB(256) } - info := StorageInfo{Capacity: 64} - d.Humantest = &info c.Droplets = append(c.Droplets, d) } |
