3.1.1.1.4.2.2 GetIPBlockFromTable
The GetIPBlockFromTable procedure is used to retrieve the IP address block information in the form of IPv4Block or IPv6Block. The type of the data returned being IPv4Block or IPv6Block is based on the simple table within ADM_IPBlocksTable compound table against which the processing steps are performed.
The following input parameters are used:
Param_blockId: This is a 64-bit signed integer that identifies the block for which the information is being retrieved.
Param_addressfamily: This is of type AddressFamily and it can be either InterNetwork or InterNetworkV6. The value InterNetwork is used to specify the processing to be done on the IPv4-specific simple tables for any compound table involved during the processing. The value InterNetworkV6 is used to specify the processing to be done on IPv6-specific simple tables for any compound table involved during the processing.
The following is the output parameter from this procedure.
result: This is the address block information in the form of IPv4Block or IPv6Block corresponding to the Param_blockId specified in the input parameter. If the Param_addressfamily is InterNetwork, the procedure returns IPv4Block and if it is InterNetworkV6, the procedure returns IPv6Block.
The following processing steps are performed:
Look up the ADM_IPBlocksTable for the row with the RecordId value being Param_blockId.
If the row is not found, return NULL. Otherwise, initialize result to IPv4Block if the Param_addressfamily is InterNetwork and IPv6Block if Param_addressfamily is InterNetworkV6.
Copy the BlockDetails to result.
Retrieve the custom field values for the address block object by calling the GetCustomFieldValues procedure of ADM_CustomFieldValuesAssociationTable passing the following parameters:
Param_ObjectType is set to EnumerationObjectType.IPBlock.
Param_addressFamily is passed as is.
Result.RecordId is passed as Param_ObjectRecordId.
Assign the Result_CustomFieldValueList to result.CustomFieldValues.
Assign the Result_CustomFieldPartialList to result.PartialCustomFieldValues.
Call GetMultivaluedPropertiesForBlock of ADM_IPBlockMultivaluedPropertiesTable with following parameters:
Param_blockId set to Param_blockId.
Param_addressfamily set to Param_addressfamily.
Process the output Param_resultBlockMultiValuedProperties to set values for IPBlock property VLAN.
Call GetAccessScopeForObjectIdAndType of ADM_AccessScopeAssociationTable passing the following parameters:
Param_objectId is set to Param_blockId.
Param_objectType is set to IpamObjectType.IPv4Block if addressfamily is InterNetwork or IpamObjectType.IPv6Block if addressfamily is InterNetworkv6.
Param_accessScopeId.
Param_objectInheritanceStatus.
Param_inheritanceId.
Assign Param_accessScopeId to result.AccessScopeId.
Assign Param_objectInheritanceStatus to result.IsInheritedAccessScope.
Return result as the output of the procedure.