Integrating Foreman to SolarWinds IPAM RestAPI - get free IP


Most of our subnets work with Static IP allocations and we use SolarWinds IPAM to manually get IP from it,
In the latest Solar version there is a full REST API support.

Getting free IP is rather simple posting cURL with subnet range command will get you a response of an free IP
i saw several discussion here about Smart-Proxy etc… but is there any real quick and dirty way to get it working with Ruby maybe using random_db.rb or other form.

Any suggestions are welcome
my knowledge in Ruby is 0%, python is the favorable

foreman version: 1.20

btw, is Foreman hooks supports that kind of Orchestration ? before_create / create

Orchestration events

Only supported on these objects:

  • host/managed
  • nic/*

Foreman supports orchestration tasks for hosts and NICs (each network interface) which happen when the object is created, updated and destroyed