-
Re: IPAM + PowerShell
RichardLettsAug 1, 2014 7:00 PM (in response to atwood.kevin)
The IPAM product doesn't support Update or create operations.
We're going to be looking at alternatives in the next year because the lack of a full API for IPAM has become a show-stopper.
-
Re: IPAM + PowerShell
bluefunelementalAug 1, 2014 7:33 PM (in response to RichardLetts)
I just started reading up on our Infoblox API...
Thanks,
Christian
-
Re: IPAM + PowerShell
atwood.kevin Aug 1, 2014 10:08 PM (in response to RichardLetts)How is that possible?
-
Re: IPAM + PowerShell
chrisheartland Aug 7, 2014 9:36 PM (in response to RichardLetts)Are you saying that with the sdk you can see which IP's are available but cannot set them as used? What are people supposed to do for auto provisioning with private clouds and such that use solarwinds?
-
Re: IPAM + PowerShell
RichardLettsAug 8, 2014 2:52 AM (in response to chrisheartland)
1 of 1 people found this helpfulYes.
Buy another product?
I don't know what other answer to give, and I've given up trying to persuade the product manager of this as a need.
/RjL
-
Re: IPAM + PowerShell
Jan Pelousek Aug 8, 2014 3:56 AM (in response to RichardLetts)Well guys,
I could only advise you to raise your hands and create IPAM support tickets with feature requests on the IPAM API supportability. I believe it could be achieved this way if more people show they need it. Things are usually being implemented based on customer needs, but it's good to know about it.
Regards,
Honza
-
Re: IPAM + PowerShell
dusting Jun 29, 2015 1:06 PM (in response to Jan Pelousek)Does anyone know if this capability exists now?
Thanks,Dustin
-
Re: IPAM + PowerShell
tdanner Jun 29, 2015 4:43 PM (in response to dusting)No, this has not been implemented yet.
-
Re: IPAM + PowerShell
jbishop87 May 19, 2016 12:16 PM (in response to tdanner)A year later, can anyone confirm if there is still no IPAM API ability to create or modify records? Only search?
-
Re: IPAM + PowerShell
tdanner May 19, 2016 12:30 PM (in response to jbishop87)2 of 2 people found this helpfulConfirmed in 2016.
-
-
-
-
-
-
-
-
Re: IPAM + PowerShell
jgates13 Oct 12, 2016 1:52 PM (in response to atwood.kevin)Registered on the site just so I could post...
Straight up asinine that IPAM doesn't yet have full-featured built-in automation capabilities. I'll recommend strongly against this product.
-
Re: IPAM + PowerShell
squinsey Oct 12, 2016 2:47 PM (in response to jgates13)1 of 1 people found this helpfulding has recently updated What are we working on for IPAM (Updated on February 14, 2018) noting:
- Extended API support
- VMware integration
- Support for web-based alerting and reporting
- Bug fixes
Hopefully this will address your capability requirements jgates13
To assist though, what kind of automations are you after?
Keen to find out how other people are working as we have the product but attempting to make people use it smarter also.
Thanks.
-
-
Re: IPAM + PowerShell
tylerwinfield Jan 3, 2017 9:23 AM (in response to atwood.kevin)1 of 1 people found this helpfulFWIW, this is currently achievable by emulating a browser session that uses the "edit IP address" page. I'm using two separate PowerShell scripts to get and set the IP reservation information (both run via VMware Orchestrator). I consider it somewhat of a hack simply because the "set" operations MUST run in a local session. This means the script has to be stored as a .ps1 file on the system that will be running it while the 'get' can be done through a remote session. In my use case, the orchestrator application hides this subtle difference from those using the workflows so its not a big issue. I would prefer proper IPAM APIs of course though. That said, here's the scripts I use.
The 'get' operation is pretty standard and requires the PowerOrion module be installed, but its important that the "SubnetId" and "Ordinal" (or whatever you keys you choose to store them as) are retained for the 'set' operation. I added more data to the PowerOrion module query for the next available IP address from a subnet. The modified SELECT statement for Get-OrionNextAvailableIPAddress returns the following data values: SELECT TOP 1 I.IpNodeId , I.Uri , I.DisplayName , I.SubnetId , I.IPOrdinal , I.IPAddress , I.Subnet.Address , I.Subnet.AddressMask , I.Subnet.DisplayName as Subnet FROM IPAM.IPNode I. In my specific case, writing the data to the host output made it easy to collect and parse with VMware Orchestrator.
Param([Parameter(Mandatory=$true)][string]$IPAMHostname,
[Parameter(Mandatory=$true)][string]$IPAMUsername,
[Parameter(Mandatory=$true)][string]$IPAMPassword,
[Parameter(Mandatory=$true)][string]$Subnet)
Import-Module PowerOrion
$SwisConnection = Connect-Swis -UserName "$IPAMUsername" -Password "$IPAMPassword" -Hostname $IPAMHostname
$IPAddress = Get-OrionNextAvailableIPAddress -swisconnection $SwisConnection -Subnet "$Subnet"
Write-Host "IPAddress=$($IPAddress.IPAddress)"
Write-Host "SubnetMask=$($IPAddress.AddressMask)"
Write-Host "Gateway=$($IPAddress.Address)"
Write-Host "Uri=$($IPAddress.Uri)"
Write-Host "SubnetId=$($IPAddress.SubnetId)"
Write-Host "Ordinal=$($IPAddress.IPOrdinal)"The 'set' operation MUST be stored as a .ps1 file on the system intended to run the script. The 'SubnetId' and 'SubnetOrdinal' are required to identify the address being reserved.
Param([Parameter(Mandatory=$true)][string]$IPAMHostname,
[Parameter(Mandatory=$true)][string]$IPAMUsername,
[Parameter(Mandatory=$true)][string]$IPAMPassword,
[Parameter(Mandatory=$true)][string]$SubnetId,
[Parameter(Mandatory=$true)][string]$SubnetOrdinal,
[Parameter(Mandatory=$true)][string]$Status,
[string]$Alias="")
$postParams = @{__EVENTTARGET='ctl00$BodyContent$ctl05';__EVENTARGUMENT='';'ctl00$BodyContent$Username'="$IPAMUsername";'ctl00$BodyContent$Password'="$IPAMPassword"}
Invoke-WebRequest -Uri "http://$IPAMHostname/Orion/Login.aspx?autologin=no" -Method POST -SessionVariable LocalSession -Body $postParams -MaximumRedirection 3
$EditPage = Invoke-WebRequest -Uri "http://$IPAMHostname/Orion/IPAM/ip.edit.aspx?SubnetId=$SubnetId&ipOrdinal=$SubnetOrdinal" -UseBasicParsing -Method GET -WebSession $LocalSession -MaximumRedirection 3
$ViewState = $($EditPage.InputFields | Where-Object { $_.id -eq "__VIEWSTATE" } | Select Value).Value
$ViewStateGenerator = $($EditPage.InputFields | Where-Object { $_.id -eq "__VIEWSTATEGENERATOR" } | Select Value).Value
$postParams = @{__VIEWSTATE=$ViewState;__VIEWSTATEGENERATOR=$ViewStateGenerator;__EVENTTARGET='ctl00$ctl00$ctl00$BodyContent$ContentPlaceHolder1$main$MsgListener';__EVENTARGUMENT='Save';'ctl00$ctl00$ctl00$BodyContent$ContentPlaceHolder1$main$ddlStatus'="$Status";'ctl00$ctl00$ctl00$BodyContent$ContentPlaceHolder1$main$txtAlias'="$Alias"}
Invoke-WebRequest -Uri "http://$IPAMHostname/Orion/IPAM/ip.edit.aspx?SubnetId=$SubnetId&ipOrdinal=$SubnetOrdinal" -UseBasicParsing -Method POST -WebSession $LocalSession -Body $postParams -MaximumRedirection 3Our networking team requested we add the hostname of the server reserving the IP in the "alias" field. The same should work for other fields in the ip.edit.aspx form by adding the field ID and value to the $postParams before the final web request.