From 5868daa09ec40ec38ce0c54ca18132f11bbc3763 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 23 Oct 2024 06:37:08 -0500 Subject: [PATCH] update AddDroplet() Signed-off-by: Jeff Carr --- helpers.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/helpers.go b/helpers.go index 01ac4b6..faef03e 100644 --- a/helpers.go +++ b/helpers.go @@ -89,16 +89,14 @@ func (c *Cluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor return h } -func (c *Cluster) AddDroplet(hostname string, cpus int, mem int) *Droplet { +func (c *Cluster) AddDroplet(uuid string, hostname string, cpus int, mem int) *Droplet { d := c.FindDroplet(hostname) if d != nil { return d } - // Generate a new UUID - id := uuid.New() d = &Droplet{ - Uuid: id.String(), + Uuid: uuid, Hostname: hostname, Cpus: int64(cpus), }