Hello,
One of our teams is trying to create an applet that will assign IP address reservations directly to the IPAM tables. His script is as follows:
UPDATEIPAM_NodeSetStatus= 1,Description='Assigned by Automation'
WHEREIPAddress='xxx.xxx.xxx.xxx'
Also, the script below is designed to flag IP addresses as Avalable.
SELECTR.AddressasSubnetAddress,R.CIDR,R.FriendlyName,R.PercentUsed,
(SELECTTOP 1 I2.IpAddressFROMIPAM_NodeasI2WITH (NOLOCK)WHEREI2.Status=2 ANDI2.SubnetId=R.GroupID)ASFreeIpAddress
FROMIPAM_GroupasRWITH (NOLOCK)
WHERER.GroupType='8'ANDR.AddressLIKE'xxx.xxx.xxx.%'
The script seemed to work fine at first, with the required IP address showing as Used. However, when I look at the subnet utlization, it shows 0 IP's used. So, it seems that the there is another table that needs to be update. Do any of you know which additional table(s) need to be updated as well? Thanks in advance.