summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-31 15:44:29 -0500
committerJeff Carr <[email protected]>2024-10-31 15:44:29 -0500
commit2b77b8a89d33576fb8cc0d55f36beddffca05bad (patch)
tree5013faa3f592e1ddb9ab651511c37be029662253
parent284e9161de174602d23c80c085e414ff4f0ee771 (diff)
AddDomainLocal()
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--add.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/add.go b/add.go
index e644fed..c650803 100644
--- a/add.go
+++ b/add.go
@@ -106,6 +106,20 @@ func (c *NewCluster) AddDropletSimple(uuid string, hostname string, cpus int, me
}
// This isn't for the marketing department
+func (c *NewCluster) AddDropletLocal(name string, hypername string) *Droplet {
+ d := &Droplet{
+ Hostname: name,
+ }
+ d.LocalOnly = hypername
+ d.Current = new(Current)
+ d.Current.Hypervisor = hypername
+ d.Current.State = DropletState_OFF
+
+ c.AddDroplet(d)
+ return d
+}
+
+// This isn't for the marketing department
// so this isn't going to use 'MiB' and 'GiB'
func HumanFormatBytes(b int64) string {
if b < 2000 {