move this into a common package?

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-26 10:11:39 -05:00
parent a50f387b96
commit 34b6891507
2 changed files with 3 additions and 1 deletions

View File

@ -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")

View File

@ -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 {