func (lb *dummyLBInterface) DeleteVLAN(vlan *seesaw.VLAN) error { if _, ok := lb.vlans[vlan.Key()]; !ok { return fmt.Errorf("deleting non-existent VLAN: %v", vlan) } delete(lb.vlans, vlan.Key()) return nil }
// AddVLAN adds a VLAN to a Seesaw Cluster. func (c *Cluster) AddVLAN(vlan *seesaw.VLAN) error { key := vlan.Key() if _, ok := c.VLANs[key]; ok { return fmt.Errorf("Cluster %q already contains VLAN %q", c.Site, key) } c.VLANs[key] = vlan return nil }
func (lb *dummyLBInterface) AddVLAN(vlan *seesaw.VLAN) error { lb.vlans[vlan.Key()] = true return nil }