From e256f02cf8caf7459269ebdba90c43936feb60bd Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 22 Oct 2024 04:18:40 -0500 Subject: this is weird Signed-off-by: Jeff Carr --- sampleData.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sampleData.go') diff --git a/sampleData.go b/sampleData.go index eaf4cb7..806e1f9 100644 --- a/sampleData.go +++ b/sampleData.go @@ -25,7 +25,7 @@ func CreateSampleDroplet(hostname string) *Droplet { return d } -func CreateSampleHypervisor(hostname string) *Hypervisor { +func CreateSampleHypervisor(hostname string, mem int) *Hypervisor { // Generate a new UUID id := uuid.New() h := &Hypervisor{ @@ -35,6 +35,7 @@ func CreateSampleHypervisor(hostname string) *Hypervisor { Memory: 256, Comment: "this is a fake hypervisor", } + h.SetMemory(mem * 32) return h } @@ -53,7 +54,7 @@ func CreateSampleCluster(total int) *Cluster { for i := 0; i < 3; i++ { hostname := fmt.Sprintf("farm%d", i) - h := CreateSampleHypervisor(hostname) + h := CreateSampleHypervisor(hostname, i + 1) h.Comment = fmt.Sprintf("Sample hypervisor %d", i) c.Hypervisors = append(c.Hypervisors, h) -- cgit v1.2.3