3.1.1.1.15.2.2 GetRootLogicalGroupNodesForLogicalGroup

This procedure can be used to create the LogicalGroupNode instances for the root-level of the specified logical group. The following are the input parameters to this procedure:

Param_logicalGroup: This is the RecordId of the logical group for which the root-level logical group nodes are being requested.

The following is the output parameter of this procedure.

Result_logicalGroupNodes: This is the collection of LogicalGroupNode instances that form the root-level hierarchy for the logical group.

The following table specifies the logical group type, the object type associated, the type of the logical group nodes, and the address family associated with the logical group type.

LogicalGroup Type

AddressFamily

ObjectType EnumerationObjectType

LogicalGroupNode Type

IPv4RangeLogicalGroup

Internet

IPRange

IPv4RangeLogicalGroupNode

IPv6RangeLogicalGroup

InternetV6

IPRange

IPv6RangeLogicalGroupNode

IpamIPv4AddressLogicalGroup

Internet

IPAddress

IpamIPv4AddressLogicalGroupNode

IpamIPv6AddressLogicalGroup

InternetV6

IPAddress

IpamIPv6AddressLogicalGroupNode

ActiveServerV4LogicalGroup

Not Specified

ServerInfo

ActiveServerV4LogicalGroupNode

ActiveServerV6LogicalGroup

Not Specified

ServerInfo

ActiveServerV6LogicalGroupNode

The following are the processing steps involved.

  1. Enumerate the rows in ADM_CustomFieldValuesAssociationTable that meet the following criteria.

    • CustomFieldId is equal to Param_logicalGroup.Fields[0].CustomFieldRecordId.

    • ObjectType is equal to the ObjectType for the Param_logicalGroup based on the table above.

    • AddressFamily is equal to the AddressFamily for the Param_logicalGroup based on the table above.

  2. From the set of rows above, create a unique list of CustomFieldValueId that will form the basis for creating the LogicalGroupNode.

  3. For each unique CustomFieldValueId enumerated from the above step, perform the following steps.

    1. Create a new instance of logical group node based on the type for the logical group as specified in the table above. Let this be referred to as logicalGroupNode.

    2. Set logicalGroupNode.AncestorNodes to null.

    3. Set logicalGroupNode.CustomFieldRecordId to Param_logicalGroup.Fields[0].CustomFieldRecordId.

    4. Set logicalGroupNode.NodeLevel to Param_logicalGroup.Fields[0].RecordId.

    5. Lookup the ADM_CustomFieldValuesTable with the RecordId equal to CustomFieldValueId being iterated. Assign the CustomFieldValueDetails.Value to logicalGroupNode.NodeValue.

    6. If the logicalGroupNode is either IPv4RangeLogicalGroupNode is IPv6RangeLogicalGroupNode, the logicalGroupNode.UtilizationStatistics will be set with the utilization statistics for the ranges which form the part of the logical group. Call the procedure GetUtilizationForLogicalGroupNode passing logicalGroupNode as Param_logicalGroupNode, AddressFamily as Param_addressfamily. Assign Result_utilization to logicalGroupNode.UtilizationStatistics.

    7. Add logicalGroupNode to Result_logicalGroupNodes.

  4. Return Result_logicalGroupNodes as the output parameter for this procedure.