3.3.4.79 UpdateBlock

This operation can be used to edit the settings of an existing address block in the IPAM data store.

 <wsdl:operation name="UpdateBlock">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateBlock" message="ipam:IIpamServer_UpdateBlock_InputMessage" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateBlockResponse" message="ipam:IIpamServer_UpdateBlock_OutputMessage" />
 </wsdl:operation>

Upon receiving the IIpamServer_UpdateBlock_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_UpdateBlock_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. Validate the IPBlock.RecordId is a valid entry by invoking the GetIPBlockFromTable procedure of ADM_IPBlocksTable by passing the IPBlock.RecordId as the Param_blockId and UpdateBlock.addressFamily as Param_addressfamily.

  2. If the result is null, the block specified is not present and is not processed further. Otherwise store result as the OldIPBlockData variable.

  3. If IPBlock.ModifiedProperties is empty, there are no updates to be performed and the block is not processed further.

  4. Validate the IPBlock by invoking the ValidateIPBlock passing the IPBlock as Param_IPBlock.

  5. If not all the validation requirements are met, an appropriate SOAP fault MUST be generated.

  6. If either of the following fields are modified, the block hierarchy can potentially change.

    • NetworkId

    • PrefixLength

    • StartIPAddress

    • EndIPAddress

  7. If the block hierarchy can change as computed in f. the following processing has to be done.

    1. Call GetIPBlockParentAndChildDepth procedure of ADM_IPBlocksTable by passing the StartIPAddress as Param_StartIPAddress, EndIPAddress as Param_EndIPAddress and RecordId as Param_RecordIdToExclude. If the result is greater than or equal to 9, an appropriate SOAP fault MUST be generated.

    2. Call GetOverlappingBlocks procedure of ADM_IPBlocksTable by passing the StartIPAddress as Param_StartIPAddress, EndIPAddress as Param_EndIPAddress, RecordId as Param_RecordIdToExclude and PrefixLength as Param_PrefixLength. If the Result_OverlappingBlocks is a non-empty list, an appropriate SOAP fault MUST be generated.

    3. Update the ParentIPBlockRecordId of IPBlock entries in the ADM_IPBlocksTable which are the children blocks of OldIPBlockData to the value of OldIPBlockData.ParentIPBlockRecordId.

    4. Update the ParentIPBlockRecordId of address ranges that have ParentIPBlockRecordId to be the RecordId of the address block to be updated in ADM_IPRangeTable to the OldIPBlockData.ParentIPBlockRecordId.

  8. Update the row in the ADM_IPBlocksTable with the values for the modified properties.

  9. If the block hierarchy can change as computed in f. the following processing has to be done.

    1. Call the procedure CalculateParentForIPBlock in ADM_IPBlocksTable by passing the StartIPAddress as Param_StartIPAddress, EndIPAddress as Param_EndIPAddress, RecordId as Param_RecordIdToExclude, AddressCategory as Param_AddressCategory and PrefixLength as Param_PrefixLength. Assign the result to IPBlock.ParentIPBlockRecordId and update the row in ADM_IPBlocksTable.

    2. Call the procedure AdjustChildIPBlocks by passing the StartIPAddress as Param_StartIPAddress, EndIPAddress as Param_EndIPAddress, RecordId as Param_RecordIdToExclude, AddressCategory as Param_AddressCategory and PrefixLength as Param_PrefixLength to calculate the existing blocks which might get mapped into the block being modified.

    3. Call the procedure AdjustChildRangesForBlock in ADM_IPRangeTable by passing the StartIPAddress as Param_StartIPAddress, EndIPAddress as Param_EndIPAddress, RecordId as Param_RecordIdToExclude, AddressCategory as Param_AddressCategory and PrefixLength as Param_PrefixLength.

  10. If the CustomFieldValues is also part of the ModifiedProperties of the IPBlock, call the procedure SetCustomFieldValues in ADM_CustomFieldValuesAssociationTable by passing the following parameters:

    1. Param_ObjectType is set to EnumerationObjectType.IPBlock.

    2. Param_addressFamily is set to Internet if the UpdateBlock.ipBlock is IPv4Block. It is set to InternetV6 if the UpdateBlock.ipBlock is IPv6Block.

    3. Param_ObjectRecordId is assigned the value of UpdateBlock.ipBlock.RecordId.

    4. Param_CustomFieldValuesCollection is assigned the value of UpdateBlock.ipBlock.CustomFieldValues.