3.3.4.127 SaveBlock

The SaveBlock operation creates a new address block in the IPAM data store.

 <wsdl:operation name="SaveBlock">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SaveBlock" message="ipam:IIpamServer_SaveBlock_InputMessage" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SaveBlockResponse" message="ipam:IIpamServer_SaveBlock_OutputMessage" />
 </wsdl:operation>

Upon receiving the IIpamServer_SaveBlock_InputMessage request message, the server performs the following processing steps. Upon successful completion of these steps, the server MUST respond with the IIpamServer_SaveBlock_OutputMessage. 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. If the SaveBlock.ipBlock is IPv4Block, the address family for the simple table selection within ADM_IPBlocksTable is InterNetwork. If it is IPv6Block, the address family InterNetworkV6 is used for the table selection.

  2. Validate the IPBlock in SaveBlock.ipBlock by invoking ValidateIPBlock passing the SaveBlock.ipBlock as Param_IPBlock.

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

  4. Call the 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.

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

  6. Add the new row into the ADM_IPBlocksTable by using the values from SaveBlock.ipBlock. Assign the RecordId of the new row added to SaveBlockResponse.SaveBlockResult.

  7. 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.

  8. Add the new row into the ADM_IPBlocksTable by using the values from SaveBlock.ipBlock. Assign the RecordId of the new row added to SaveBlockResponse.SaveBlockResult. Insert a row in ADM_IPBlockMultivaluedPropertiesTable with corresponding values from SaveBlock.ipBlock. The applicable properties are described in ADM_IPBlockMultivaluedPropertiesTable.

  9. 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.

  10. Validate the SaveBlock.block.CustomFieldValues by performing the processing rules listed in ValidateCustomFieldValues. If the CustomFieldValues are valid, 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 InterNetwork if the SaveBlock.ipBlock is IPv4Block. It is set to InterNetworkV6 if the SaveBlock.ipBlock is IPv6Block. 

    3. Param_ObjectRecordId is assigned the value of SaveBlockResponse.SaveBlockResult.

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

  11. Call CreateAssociationEntry procedure of ADM_AccessScopeAssociationTable to add access scopes for the new Block. Pass the following parameters:

    1. Param_ObjectType is set to EnumerationObjectType.IPBlock.

    2. Param_ObjectId is assigned the value of SaveBlock.ipBlock.RecordId.