From 34b6891507a5651043c71a7ada754a8bceb7ef55 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 26 Oct 2024 10:11:39 -0500 Subject: move this into a common package? Signed-off-by: Jeff Carr --- addDroplet.go | 2 +- validate.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addDroplet.go b/addDroplet.go index 7903348..9d7fbfa 100644 --- a/addDroplet.go +++ b/addDroplet.go @@ -311,7 +311,7 @@ func updateNetwork(d *pb.Droplet, domcfg *libvirtxml.Domain) ([]*pb.Event, error } } if !found { - if checkUniqueMac(mac) { + if virtigoxml.CheckUniqueMac(me.cluster, mac) { } else { log.Info("droplet", d.Hostname, "duplicate mac address", mac) return nil, errors.New("duplicate mac address") diff --git a/validate.go b/validate.go index 3822c2a..7f074de 100644 --- a/validate.go +++ b/validate.go @@ -24,6 +24,7 @@ import ( "go.wit.com/log" ) +/* // will make sure the mac address is unique func checkUniqueMac(mac string) bool { for _, d := range me.cluster.Droplets { @@ -36,6 +37,7 @@ func checkUniqueMac(mac string) bool { } return true } +*/ // records all the known paths. this should go in the protobuf func addClusterFilepath(dir string) *pb.Event { -- cgit v1.2.3