3.1.1.1.43.2.1 GetParentForObject

The GetParentForObject 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 are the output parameters from this procedure:

Param_ParentObjectId: This is of type signed 64-bit integer that specifies the RecordId of the parent of the specified object.

Param_ParentObjectType: This is of type IpamObjectType and identifies the object type of the parent of the specified object.

The following are the processing steps involved:

  1. Assign NULL to Param_ParentObjectId and Param_ParentObjectType.

  2. If Param_objectType is IpamObjectType.IPv4AddressSpace or IpamObjectType.IPv6AddressSpace, return.

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

  4. If Param_objectType is IpamObjectType.DHCPServerv4 or IpamObjectType.DHCPServerv6, return.

  5. If Param_objectType is IpamObjectType.IPv4Block, then look up the IPv4-specific simple table of ADM_IPBlocksTable for the row that has RecordId equal to Param_ObjectId. If such a row exists and ParentBlockRecordId for this row is not NULL, then assign ParentBlockRecordId to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv4Block. Return from the procedure.

  6. If Param_objectType is IpamObjectType.IPv6Block, then look up the IPv6-specific simple table of ADM_IPBlocksTable for the row that has RecordId equal to Param_ObjectId. If such a row exists and ParentBlockRecordId for this row is not NULL, then assign ParentBlockRecordId to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv6Block. Return from the procedure.

  7. If Param_objectType is IpamObjectType.IPv4Subnet, then look up the IPv4-specific simple table of ADM_IPBlocksTable for the row that has RecordId equal to Param_ObjectId. If such a row exists and ParentBlockRecordId for this row is not NULL, then assign ParentBlockRecordId to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv4Block. If ParentBlockRecordId for the row is NULL, then assign AddressSpaceRecordId of the row to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv4AddressSpace. Return from the procedure.

  8. If Param_objectType is IpamObjectType.IPv6Subnet, then look up the IPv6-specific simple table of ADM_IPBlocksTable for the row that has RecordId equal to Param_ObjectId. If such a row exists and ParentBlockRecordId for this row is not NULL, then assign ParentBlockRecordId to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv6Block. If ParentBlockRecordId for the row is NULL, then assign AddressSpaceRecordId of the row to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv6AddressSpace. Return from the procedure.

  9. If Param_objectType is IpamObjectType.IPv4Range, then look up the IPv4-specific simple table of ADM_IPRangeTable for the row that has RecordId equal to Param_ObjectId. If such a row exists and ParentIPBlockRecordId for this row is not NULL, then assign ParentIPBlockRecordId to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv4Subnet. Return from the procedure.

  10. If Param_objectType is IpamObjectType.IPv6Range, then look up the IPv6-specific simple table of ADM_IPRangeTable for the row that has RecordId equal to Param_ObjectId. If such a row exists and ParentIPBlockRecordId for this row is not NULL, then assign ParentIPBlockRecordId to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.IPv6Subnet. Return from the procedure.

  11. If Param_objectType is IpamObjectType.DHCPSuperscopev4, then look up the ADM_DhcpSuperScopeTable for the row that has RecordId equal to Param_ObjectId. If such a row exists, then assign Server of row to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.DHCPServerv4. Return from the procedure.

  12. If Param_objectType is IpamObjectType.DHCPScopev4, then look up the IPv4-specific simple table of ADM_DHCPScopesTable for the row that has RecordId equal to Param_ObjectId. If such a row exists and SuperscopeId for this row is not NULL, then assign SuperscopeId to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.DHCPSuperscopeV4. If SuperscopeId for the row is NULL, then assign DHCPServerRecordId of row to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.DHCPServerv4. Return from the procedure.

  13. If Param_objectType is IpamObjectType.DHCPScopev6, then look up the IPv6-specific simple table of ADM_DHCPScopesTable for the row that has RecordId equal to Param_ObjectId. If such a row exists, then assign DHCPServerRecordId of row to Param_ParentObjectId and set Param_ParentObjectType to IpamObjectType.DHCPServerv6. Return from the procedure.

  14. Return from the procedure.