3.3.4.32 DeleteRange

The DeleteRange operation is used to delete the specified address range from the IPAM data store.

 <wsdl:operation name="DeleteRange">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/DeleteRange" message="ipam:IIpamServer_DeleteRange_InputMessage" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/DeleteRangeResponse" message="ipam:IIpamServer_DeleteRange_OutputMessage" />
 </wsdl:operation>

Upon receiving the IIpamServer_DeleteRange_InputMessage request message, the server performs the following processing steps. Upon successful completion of the steps specified below, the server MUST respond with the IIpamServer_DeleteRange_OutputMessage message. In the event of a failure, an appropriate SOAP fault MUST be sent to the client as specified in section 2.2.2.1:

  1. Get the range information corresponding to the specified DeleteRange.rangeRecordId by calling the GetIPRangeFromTable of the ADM_IPRangeTable by passing the Param_id parameter with DeleteRange.rangeRecordId and the Param_addressfamily parameter with DeleteRange.addressFamily. Assign the range retrieved in result to rangeToBeDeleted.

  2. If rangeToBeDeleted is NULL, return as appropriate SOAP fault to the client as specified in section 2.2.2.1.

  3. Get the list of ranges overlapping with the rangeToBeDeleted and store them to PossibleOverlappingRanges. This is done by following the following steps:

    1. Call the GetOverlappingRanges procedure in ADM_IPRangeTable with the following input parameters.

      1. Param_StartIPAddress is assigned the value of rangeToBeDeleted.StartIPAddress.

      2. Param_EndIPAddress is assigned the value of rangeToBeDeleted.EndIPAddress.

      3. Param_ExclusionRanges is assigned the value of rangeToBeDeleted.ExclusionRanges.

      4. Param_AddressSpaceRecordId is assigned the value of rangeToBeDeleted.AddressSpaceRecordId.

      5. Param_RecordIdToExclude is assigned the value of the rangeToBeDeleted.RecordId.

    2. The Result_OverlappingRows having the overlapping ranges are assigned to PossibleOverlappingRanges.

  4. If DeleteRange.deleteMappedAddresses is set to TRUE, delete the rows from ADM_IPAddressTable which have the ParentIPRangeRecordId to be the rangeToBeDeleted.RecordId.

  5. Compute the ManagedByValue for the address range as the value of the custom field in rangeToBeDeleted.CustomFieldValues which have the record identifier to be ADM_ManagedByCustomFieldId.

  6. If the ManagedByValue of the address range is MSDHCP, delete the corresponding scope in the ADM_DHCPScopesTable. To perform this, look up the row in ADM_DHCPScopesTable that has the record identifier to be the rangeToBeDeleted.ScopeRecordId and delete the same.

  7. If the ManagedByValue of the address range is not MSDHCP, delete the address range from the ADM_IPRangeTable.

  8. Also delete the corresponding row from ADM_ IPRangeMultivaluedPropertiesTable.

  9. The deletion of the range will result in change to the IsOverlapping flag of the set of ranges which were earlier overlapping with the rangeToBeDeleted. If the rangeToBeDeleted is already mapped to an IP address block; that is, rangeToBeDeleted.UserForUtilization is set to TRUE, a new range from the overlapping set of ranges has to be chosen to be mapped to the corresponding IP address block. For this, the following steps are performed:

    1. For each range named overlappingRange in PossibleOverlappingRanges:

      1. Get the list of overlapping ranges for overlappingRange by calling the GetOverlappingRanges procedure of ADM_IPRangeTable with the following parameters:

        1. Pass overlappingRange.StartIPAddress as Param_StartIPAddress.

        2. Pass overlappingRange.EndAddress as Param_EndIPAddress.

        3. Pass overlappingRange.AddressSpaceRecordId as Param_AddressSpaceRecordId.

        4. Pass overlappingRange.ExclusionRange as Param_ExclusionRange.

        5. Pass overlappingRange.RecordId as Param_RecordIdToExclude.

    2. If there are overlapping ranges still present, leave the IsOverlapping flag of overlappingRange to TRUE.

    3. If there are no overlapping ranges present, set the IsOverlapping flag of overlappingRange to FALSE.

    4. If there are any ranges still present that have UseForUtilization as TRUE, then leave UseForUtilization of overlappingRange as FALSE. Else set it to TRUE.

    5. If either overlapping flag or UseForUtilization flag of the overlapping range has changed, then update the ADM_IPRangeTable.

  10. Delete the access scope associations related to rangeToBeDeleted by calling DeleteAssociationEntry of ADM_AccessScopeAssociationTable with following parameters:

    1. Pass rangeToBeDeleted.RecordId as Param_objectId.

    2. Pass EnumerationObjectType.IPRange as Param_objectType.