3.1.1.1.4.2.7 DeleteBlockTree

The DeleteBlockTree procedure can be used to delete a hierarchy of address blocks starting with the block with a particular record identifier. The input parameters for this are as follows:

Param_BlockId: The RecordId of the block whose entire chain of the hierarchy has to be deleted.

Param_addressfamily: The address family to specify the table against which the block deletion has to be performed.

There are no output parameters for this procedure. The rows belonging to the entire child block hierarchy is removed.

The following are the steps involved. If the Param_addressfamily is InterNetwork, the following processing is done against the IPv4-specific table. Otherwise the following processing is done against the IPv6-specific table:

  1. Delete the rows in ADM_IPBlocksTable whose ParentBlockRecordId is the same as Param_BlockId by calling the DeleteBlockTree and passing the row.RecordId and Param_addressfamily as parameters.

  2. Delete the block with RecordId being Param_BlockId.

  3. Delete the AccessScopeAssociation entry for this block by calling the DeleteAssociationEntry procedure of ADM_AccessScopeAssociationTable and passing the following parameters:

    1. Param_objectId is set to Param_blockId.

    2. Param_objectType is set to IpamObjectType.IPv4Block if addressfamily is InterNetwork or IpamObjectType.IPv6Block if addressfamily is InterNetworkv6.