IPAM getNextAvailableIPRange RRS feed

  • Question

  • I'm trying to rewrite some code that my company uses to get IP addresses for servers that are automatically built to order.  The current code makes a call to IPAM using getNextAvailableIP4Address which does return the next IP that IPAM has listed as free.  However the next part of the code does a ping test to see if the address is in use, which in this case it is.  It then keeps doing ping tests of each IP address up from that one it received from IPAM until it comes across one that doesn't respond, then checks with IPAM to see if that one is free (searchByObjectTypes).  IPAM typically response back that it is already registered then the code keeps checking the next IP address over and over.  This sometimes takes hours.

    I want to call IPAM and just get back a set of available IP address, say 20 or 30, then the code can just ping those with out making calls to IPAM over and over and over.  I looked through the WSDL and found these calls listed: getNextAvailableIPRange and getNextAvailableIPRanges however the documentation on the parameters that these calls need is what I'm having issues with:  

    <message name="ProteusAPI_getNextAvailableIPRange">
    <part name="parentId" type="xsd:long"/>
    <part name="size" type="xsd:long"/>
    <part name="type" type="xsd:string"/>
    <part name="properties" type="xsd:string"/>

    <message name="ProteusAPI_getNextAvailableIPRanges">
    <part name="parentId" type="xsd:long"/>
    <part name="size" type="xsd:long"/>
    <part name="type" type="xsd:string"/>
    <part name="count" type="xsd:int"/>
    <part name="properties" type="xsd:string"/>

    I can guess that the parentID is the ID for the subnet I need the range from, and I don't know what the size would be, and I tried 'IP4Network' for the type, and count I'm guessing it something like '20', and no idea for properties.  I've been looking for documentation for this for a while but have come up short.  Any help is appreciated!

    Tuesday, February 9, 2016 2:35 PM