Improve naming of 'release' function in IPAM API
This commit is contained in:
1 parent
b83f4a00ed
commit
0009b05635
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -38,8 +38,8 @@ func (client *Client) ClaimIP(ID string, addr net.IP) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// release an IP which is no longer needed
|
// release all IPs owned by an ID
|
||||||
func (client *Client) ReleaseIP(ID string) error {
|
func (client *Client) ReleaseIPsFor(ID string) error {
|
||||||
_, err := client.ipamOp(ID, "DELETE")
|
_, err := client.ipamOp(ID, "DELETE")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
func (i *ipam) ReleaseAddress(poolID string, address net.IP) error {
|
||||||
Log.Debugln("ReleaseAddress", poolID, address)
|
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.
|
// Functions required by ipamapi "contract" but not actually used.
|
||||||
|
|||||||
Reference in new issue
Block a user