3.5.4.8.1.53 IpamIPSubnetsByBlockIdEnumerationParameters

The IpamIPSubnetsByBlockIdEnumerationParameters processing is done when the EnumInputParameters contains data of type IpamIPSubnetsByBlockIdEnumerationParameters. The ObjectType MUST be EnumerationObjectType.IPSubnet. This is used to enumerate all IP subnets in the IPAM data store belonging to the specified address family and IP block.

The following are the steps involved in identifying the rows to be returned as a part of the enumeration:

  1. Find the row in ADM_IPBlocksTable whose RecordId is IpamIPSubnetsByBlockIdEnumerationParameters.ParentBlockRecordId. Note its StartIPAddress, EndIPAddress, PrefixLength and AddressSpaceRecordId.

  2. Enumerate all rows of ADM_IPBlocksTable whose StartIPAddress, EndIPAddress fall within the boundary of the noted value and PrefixLength and AddressSpaceRecordId match the noted values and whose ParentBlockRecordId is not NULL.

  3. For each enumerated row, call GetSubnetById of ADM_SubnetTable with RecordId as the Param_SubnetId and IpamIPSubnetsByBlockIdEnumerationParameters.AddressFamily as Param_addressfamily.

  4. Collect the returned IPSubnet object into EnumOutputData.