diff --git a/api/ipam.go b/api/ipam.go index 3de18937..9f1687dd 100644 --- a/api/ipam.go +++ b/api/ipam.go @@ -38,8 +38,8 @@ func (client *Client) ClaimIP(ID string, addr net.IP) error { return err } -// release an IP which is no longer needed -func (client *Client) ReleaseIP(ID string) error { +// release all IPs owned by an ID +func (client *Client) ReleaseIPsFor(ID string) error { _, err := client.ipamOp(ID, "DELETE") return err } diff --git a/plugin/ipam/driver.go b/plugin/ipam/driver.go index 6dca9712..0a965abb 100644 --- a/plugin/ipam/driver.go +++ b/plugin/ipam/driver.go @@ -92,7 +92,7 @@ func (i *ipam) RequestAddress(poolID string, address net.IP, options map[string] func (i *ipam) ReleaseAddress(poolID string, address net.IP) error { Log.Debugln("ReleaseAddress", poolID, address) - return i.weave.ReleaseIP(address.String()) + return i.weave.ReleaseIPsFor(address.String()) } // Functions required by ipamapi "contract" but not actually used.