diff options
| author | Jeff Carr <[email protected]> | 2024-10-23 06:37:08 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-23 06:37:08 -0500 |
| commit | 5868daa09ec40ec38ce0c54ca18132f11bbc3763 (patch) | |
| tree | 23b1559acb284dc3d95fe86b1e1e6226d95aa140 /helpers.go | |
| parent | 7cff6fef316f4a9cf9f256e1e5e8739197de78dc (diff) | |
update AddDroplet()v0.0.2
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'helpers.go')
| -rw-r--r-- | helpers.go | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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), } |
