3.1.1.1.43.2.2 GetChildrensForObject

The GetChildrensForObject procedure can be used to create an appropriate association entry for the objects on which access scope associations can be done.

The following are the input parameters to this procedure:

Param_objectId: Of type signed 64-bit integer that specifies the RecordId of the corresponding object for which the association entry needs to be done.

Param_objectType: This is of type IpamObjectType and identifies the object type of the entity for which the association entry needs to be done.

The following is the output parameter from this procedure:

Result_childObjects: This is a collection of tuples with the following members:

ObjectId: This is of type signed 64-bit integer that specifies the RecordId of the child object.

ObjectType: This is of type IpamObjectType and identifies the object type of the child object.

The following processing steps are performed:

  1. Assign NULL to Result_childObjects.

  2. If Param_objectType is IpamObjectType.IPv4Range or IpamObjectType.IPv6Range, return Result_childObjects.

  3. If Param_objectType is IpamObjectType.DNSForwardLookupZone or IpamObjectType.DnsReverseLookupZone, return Result_childObjects.

  4. If Param_objectType is IpamObjectType.DHCPScopev4 or IpamObjectType.DHCPScopev6, return Result_childObjects.

  5. Initialize Result_childObjects to Collection<Tuple<long,IpamObjectType>>.

  6. If Param_objectType is IpamObjectType.IPv4AddressSpace, perform the following steps:

  7. Call procedure GetAllSubnetsForAddressSpace by assigning Param_objectId to Param_AddresSpaceRecordId and setting Param_addressFamily to InterNetwork.

  8. Process the output from the procedure Result_Subnets. For each entry Subnet in the Result_Subnets collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Subnet.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.IPv4Subnet. Add child to Result_childObjects collection.

  9. If Param_objectType is IpamObjectType.IPv6AddressSpace, perform the following steps:

  10. Call procedure GetAllSubnetsForAddressSpace by assigning Param_objectId to Param_AddresSpaceRecordId and setting Param_addressFamily to InterNetworkV6.

  11. Process the output from the procedure Result_Subnets. For each entry Subnet in the Result_Subnets collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Subnet.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.IPv6Subnet. Add child to Result_childObjects collection.

  12. If Param_objectType is IpamObjectType.IPv4Block, perform the following steps:

    1. Call the procedure GetChildIPBlocksForBlock by assigning Param_objectId to Param_blockId and setting Param_addressFamily to InterNetwork.

    2. Process the output from the procedure Result_childBlocks. For each entry block in the Result_childBlocks collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Block.RecordId to child.ObjectId. If child.IsSubnet is equal to 1, set child.ObjectType to IpamObjectType.IPv4Subnet, otherwise set child.ObjectType to IpamObjectType.IPv4Block. Add child to Result_childObjects collection.

  13. If Param_objectType is IpamObjectType.IPv6Block, perform the following steps:

    1. Call procedure GetChildIPBlocksForBlock by assigning Param_objectId to Param_blockId and setting Param_addressFamily to InterNetworkV6.

    2. Process the output from the procedure Result_childBlocks. For each entry block in the Result_childBlocks collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Block.RecordId to child.ObjectId. If child.IsSubnet is equal to 1, set child.ObjectType to IpamObjectType.IPv6Subnet, otherwise set child.ObjectType to IpamObjectType.IPv6Block. Add child to Result_childObjects collection.

  14. If Param_objectType is IpamObjectType.IPv4Subnet, perform the following steps:

    1. Call procedure GetChildRangesForBlock by assigning Param_objectId to Param_blockId and setting Param_addressFamily to InterNetwork.

    2. Process the output from the procedure Result_childRanges. For each entry Range in the Result_childRanges collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Range.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.IPv4Range. Add child to Result_childObjects collection.

  15. If Param_objectType is IpamObjectType.IPv6Subnet, perform the following steps:

    1. Call procedure GetChildRangesForBlock by assigning Param_objectId to Param_blockId and setting Param_addressFamily to InterNetworkV6.

    2. Process the output from the procedure Result_childRanges. For each entry Range in the Result_childRanges collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Range.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.IPv6Range. Add child to Result_childObjects collection.

  16. If Param_objectType is IpamObjectType.DhcpServerv4, perform the following steps:

    1. Call procedure GetSuperscopesForServer of ADM_DhcpSuperscopeTable by assigning Param_objectId to Param_serverId.

    2. Process the output from the procedure Result_Superscopes. For each entry Superscope in the Result_Superscopes collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Superscope.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.DHCPSuperscopeV4. Add child to Result_childObjects collection. 

    3. Call procedure GetScopesForServer of ADM_DHCPScopesTable by assigning Param_objectId to Param_serverId and setting Param_addressFamily to InterNetwork.

    4. Process the output from the procedure Result_Scopes. For each entry Scope in the Result_Scopes collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Scope.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.DHCPScopeV4. Add child to Result_childObjects collection.

  17. If Param_objectType is IpamObjectType.DhcpServerv6, perform the following steps:

    1. Call procedure GetScopesForServer of ADM_DHCPScopesTable by assigning Param_objectId to Param_serverId and setting Param_addressFamily to InterNetworkV6.

    2. Process the output from the procedure Result_Scopes. For each entry Scope in the Result_Scopes collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Scope.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.DHCPScopeV6. Add child to Result_childObjects collection.

  18. If Param_objectType is IpamObjectType.DHCPSuperscopeV4, perform the following steps:

    1. Call procedure GetScopesForSuperscope of ADM_DHCPScopesTable by assigning Param_objectId to Param_superscopeId.

    2. Process the output from the procedure Result_Scopes. For each entry Scope in the Result_Scopes collection, initialize an instance child of type Tuple<long,IpamObjectType>. Assign Scope.RecordId to child.ObjectId and set child.ObjectType to IpamObjectType.DHCPScopeV4. Add child to Result_childObjects collection. 

  19. Return Result_childObjects as the output from the procedure.