Project

General

Profile

Feature #11223

Make subnets/freeip available through the API

Added by John Brooker about 4 years ago. Updated about 4 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

When I update a hosts interface to reflect that it is now in the build subnet for a given smart-proxy node I would like to be able to query out a freeIP address to assign to it via the API.

I can do this via the GUI by going to the host and setting the subnet and then having it suggest a free IP address but I'm using the API to configure hosts.

something like this would be nice (ignoring the lack of AUTH)

curl -k "https://FOREMANURL/api/subnets/freeip" --data "subnet_id=1&host_mac=44:1e:a1:6f:25:6c&taken_ips=1.1.1.1"

returns: {"ip":"10.240.4.25"}


Related issues

Related to Foreman - Feature #7285: add ability to allocate an IP address via the APINew2014-08-27
Is duplicate of Foreman - Feature #9110: Add freeip route to APIClosed2015-01-26

History

#1 Updated by Dominic Cleal about 4 years ago

#2 Updated by Dominic Cleal about 4 years ago

  • Related to Feature #7285: add ability to allocate an IP address via the API added

#3 Updated by Dominic Cleal about 4 years ago

  • Status changed from New to Duplicate

Thanks for the report, we're tracking this under #9110 and I think the API should probably support doing this automatically too (like it does for hosts) via #7285.

Also available in: Atom PDF