diff options
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) |
