diff options
| author | Jeff Carr <[email protected]> | 2024-10-22 04:18:40 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-22 04:18:40 -0500 |
| commit | e256f02cf8caf7459269ebdba90c43936feb60bd (patch) | |
| tree | 5572fc182d2a35d3a5dd9e23ebf6ea1acd61ff0e /sampleData.go | |
| parent | 8cab0857fda04a5e9b06860aec15d05342b747f1 (diff) | |
this is weird
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'sampleData.go')
| -rw-r--r-- | sampleData.go | 5 |
1 files changed, 3 insertions, 2 deletions
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) |
