Project

General

Profile

Actions

Feature #11223

closed

Make subnets/freeip available through the API

Added by John Brooker over 9 years ago. Updated over 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
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 2 (1 open1 closed)

Related to Foreman - Feature #7285: add ability to allocate an IP address via the APINew08/27/2014Actions
Is duplicate of Foreman - Feature #9110: Add freeip route to APIClosedTimo Goebel01/26/2015Actions
Actions

Also available in: Atom PDF