Claim IP takes CIDR not IP

This commit is contained in:
Bryan Boreham committed 2016-03-16 14:22:39 +00:00
1 parent d2d1d2b43a
commit eee77d49d1
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -33,8 +33,8 @@ func (client *Client) LookupIP(ID string) (*net.IPNet, error) {
}
// Claim a specific IP on behalf of the ID
func (client *Client) ClaimIP(ID string, addr net.IP) error {
_, err := client.httpVerb("PUT", fmt.Sprintf("/ip/%s/%s", ID, addr), nil)
func (client *Client) ClaimIP(ID string, cidr *net.IPNet) error {
_, err := client.httpVerb("PUT", fmt.Sprintf("/ip/%s/%s", ID, cidr), nil)
return err
}