diff options
| author | Jeff Carr <[email protected]> | 2024-10-24 17:12:05 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-24 17:12:05 -0500 |
| commit | 19a8dfe13d4f60e7617497821eafb57641d75c11 (patch) | |
| tree | 735ab31063a1046b1af6df408df9522b7adb2e75 /sampleData.go | |
| parent | 87b7bc17b313c04806981408943923d8e66f960a (diff) | |
don't do experiements anymore in droplets.proto
Signed-off-by: Jeff Carr <[email protected]>
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) } |
