summaryrefslogtreecommitdiff
path: root/addDroplet.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-26 09:38:02 -0500
committerJeff Carr <[email protected]>2024-10-26 09:38:02 -0500
commita50f387b96f5bf3e466a91ddd02804a2289090cc (patch)
treeb8526e7f4135091914e7c878a519c7dbbcc256d2 /addDroplet.go
parent161bfe395ea8c12bbfcc66901e8532a4e6f7e061 (diff)
more common code. it might work again. would be nice
to have a kuma check, but no. I fucking deleted it. and of course with no backup or memory of where I mapped it to. kuma needs an undelete! or an event log of changes to kuma. ironic since all it does is track changes in state but it doesn't track it's own changes Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'addDroplet.go')
-rw-r--r--addDroplet.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/addDroplet.go b/addDroplet.go
index 7c0bb59..7903348 100644
--- a/addDroplet.go
+++ b/addDroplet.go
@@ -111,12 +111,12 @@ func updateDroplet(d *pb.Droplet, domcfg *libvirtxml.Domain) ([]*pb.Event, error
// OS Type: &{Arch:x86_64 Machine:pc-i440fx-5.2 Type:hvm}
t := domcfg.OS.Type
if d.QemuArch != t.Arch {
- e := NewChangeEvent(d, "Droplet.QemuArch", d.QemuArch, t.Arch)
+ e := d.NewChangeEvent("Droplet.QemuArch", d.QemuArch, t.Arch)
alle = append(alle, e)
d.QemuArch = t.Arch
}
if d.QemuMachine != t.Machine {
- e := NewChangeEvent(d, "Droplet.QemuMachine", d.QemuMachine, t.Machine)
+ e := d.NewChangeEvent("Droplet.QemuMachine", d.QemuMachine, t.Machine)
alle = append(alle, e)
d.QemuMachine = t.Machine
}
@@ -126,7 +126,7 @@ func updateDroplet(d *pb.Droplet, domcfg *libvirtxml.Domain) ([]*pb.Event, error
if d.Cpus != int64(domcfg.VCPU.Value) {
// fmt.Printf("cpus changed. VCPU = %+v\n", domcfg.VCPU)
fmt.Printf("cpus changed. from %d to %d\n", d.Cpus, domcfg.VCPU.Value)
- alle = append(alle, NewChangeEvent(d, "Droplet.Cpus", d.Cpus, domcfg.VCPU.Value))
+ alle = append(alle, d.NewChangeEvent("Droplet.Cpus", d.Cpus, domcfg.VCPU.Value))
d.Cpus = int64(domcfg.VCPU.Value)
}
@@ -146,7 +146,7 @@ func updateDroplet(d *pb.Droplet, domcfg *libvirtxml.Domain) ([]*pb.Event, error
// print out, but ignore the port number
d.SpicePort = int64(s.Port)
fmt.Printf("Spice Port set to = %d\n", s.Port)
- alle = append(alle, NewChangeEvent(d, "Droplet.SpicePort", d.SpicePort, s.Port))
+ alle = append(alle, d.NewChangeEvent("Droplet.SpicePort", d.SpicePort, s.Port))
}
}
}
@@ -324,7 +324,7 @@ func updateNetwork(d *pb.Droplet, domcfg *libvirtxml.Domain) ([]*pb.Event, error
}
eth.Name = brname
d.Networks = append(d.Networks, eth)
- allEvents = append(allEvents, NewChangeEvent(d, "Droplet NewNetwork", "", mac+" "+brname))
+ allEvents = append(allEvents, d.NewChangeEvent("Droplet NewNetwork", "", mac+" "+brname))
}
}