summaryrefslogtreecommitdiff
path: root/add.go
diff options
context:
space:
mode:
Diffstat (limited to 'add.go')
-rw-r--r--add.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/add.go b/add.go
index ce3285c..28d103c 100644
--- a/add.go
+++ b/add.go
@@ -9,7 +9,7 @@ import (
)
/*
-func (c *Cluster) InitDroplet(hostname string) (*Droplet, error) {
+func (c *OldCluster) InitDroplet(hostname string) (*Droplet, error) {
var d *Droplet
d = new(Droplet)
d.Current = new(Current)
@@ -50,7 +50,7 @@ func (x *Hypervisor) SetMemoryGB(gb int) {
x.Memory = int64(gb * 1024 * 1024 * 1024)
}
-func (c *Cluster) FindDropletByName(name string) *Droplet {
+func (c *OldCluster) FindDropletByName(name string) *Droplet {
loop := c.d.All() // get the list of droplets
for loop.Scan() {
d := loop.Next()
@@ -61,7 +61,7 @@ func (c *Cluster) FindDropletByName(name string) *Droplet {
return nil
}
-func (c *Cluster) FindHypervisorByName(name string) *Hypervisor {
+func (c *OldCluster) FindHypervisorByName(name string) *Hypervisor {
for _, h := range c.H.Hypervisors {
if h.Hostname == name {
return h
@@ -70,7 +70,7 @@ func (c *Cluster) FindHypervisorByName(name string) *Hypervisor {
return nil
}
-func (c *Cluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor {
+func (c *OldCluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor {
h := c.FindHypervisorByName(hostname)
if h != nil {
return h
@@ -91,7 +91,7 @@ func (c *Cluster) AddHypervisor(hostname string, cpus int, mem int) *Hypervisor
return h
}
-func (c *Cluster) AddEvent(e *Event) {
+func (c *OldCluster) AddEvent(e *Event) {
c.e.Events = append(c.e.Events, e)
}
@@ -109,7 +109,7 @@ func NewDefaultDroplet(hostname string) *Droplet {
return d
}
-func (c *Cluster) AddDropletSimple(uuid string, hostname string, cpus int, mem int) *Droplet {
+func (c *OldCluster) AddDropletSimple(uuid string, hostname string, cpus int, mem int) *Droplet {
d := c.FindDropletByName(hostname)
if d != nil {
return d
@@ -131,7 +131,7 @@ func (c *Cluster) AddDropletSimple(uuid string, hostname string, cpus int, mem i
}
// This isn't for the marketing department
-func (c *Cluster) AddDropletLocal(name string, hypername string) *Droplet {
+func (c *OldCluster) AddDropletLocal(name string, hypername string) *Droplet {
d := &Droplet{
Hostname: name,
}
@@ -149,7 +149,7 @@ func (c *Cluster) AddDropletLocal(name string, hypername string) *Droplet {
return d
}
-func (c *Cluster) BlankFields() {
+func (c *OldCluster) BlankFields() {
loop := c.d.All() // get the list of droplets
for loop.Scan() {
d := loop.Next()
@@ -161,7 +161,7 @@ func (epb *Events) AppendEvent(e *Event) {
epb.Events = append(epb.Events, e)
}
-func (c *Cluster) ClusterStable() (bool, string) {
+func (c *OldCluster) ClusterStable() (bool, string) {
last := time.Since(c.Unstable.AsTime())
if last > c.UnstableTimeout.AsDuration() {
// the cluster has not been stable for 133 seconds
@@ -173,7 +173,7 @@ func (c *Cluster) ClusterStable() (bool, string) {
}
// check the cluster and droplet to make sure it's ready to start
-func (c *Cluster) DropletReady(d *Droplet) (bool, string) {
+func (c *OldCluster) DropletReady(d *Droplet) (bool, string) {
if c == nil {
return false, "cluster == nil"
}