3.3.4.152 UpdateRange

The UpdateRange operation is used to modify an existing IP address range in the IPAM data store.

 <wsdl:operation name="UpdateRange">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateRange" message="ipam:IIpamServer_UpdateRange_InputMessage" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateRangeResponse" message="ipam:IIpamServer_UpdateRange_OutputMessage" />
 </wsdl:operation>

Upon receiving the IIpamServer_UpdateRange_InputMessage request message, the server performs the following processing steps. Upon successful completion of these steps, the server MUST respond with the IIpamServer_UpdateRange_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. Set the updatedRange to UpdateRange.range.

  2. Identify the list of modified properties in the updatedRange by seeing the number of properties modified in updatedRange.ModifiedProperties. If there are no property modifications, no further processing is required.

  3. Validate the updatedRange by performing the processing rules listed under the section ValidateIPRange.

  4. Fetch the existing range data by invoking GetIPRangeFromTable procedure of ADM_IPRangeTable by passing the updatedRange.RecordId as the Param_id field. The Param_addressfamily is set to the InterNetwork if the updatedRange is IPv4Range and InterNetworkV6 if the updatedRange is IPv6Range.

  5. Store the result in currentRange, which is a temporary store.

  6. Compare the values of the properties listed in updatedRange.ModifiedProperties to their corresponding values in currentRange. Only those values that have changed will be used to update the values in the data store.

  7. Identify if any of the following properties is modified:

  8. SubnetId

  9. PrefixLength

  10. StartIPAddress

  11. EndIPAddress

  12. AddressSpaceRecordId

  13. ManagedByValue:  This is a computed field of the updatedRange. This is the value of the custom field whose record identifier is ADM_ManagedByCustomFieldId retrieved from updatedRange.CustomFieldValues.

  14. ManagedByEntityValue: This is a computed field of the updatedRange. This is the value of the custom field whose record identifier is ADM_ManagedByEntityCustomFieldId retrieved from updatedRange.CustomFieldValues.

  15. If any of the previous fields has changed and are different from the values in currentRange, the following additional processing is done:

  16. If the AddressSpaceRecordId has changed, remap to the modified range all the addresses that currently map to currentRange. For this, perform the following:

  17. Get all addresses mapping to current range by calling GetIPAddressForRange of ADM_IPAddressTable by passing currentRange.RecordId as param_RangeId. Assign these to a temp store currentMappedAddresses.

  18. For each mappedAddress from currentMappedAddresses:

  19. Calculate the custom fields ManagedByValue and ManagedByEntityValue for this IP Address as custom field whose record identifier is ADM_ManagedByCustomFieldId and ADM_ManagedByEntityCustomFIeldId respectively from mappedAddress.CustomFieldValues.

  20. If the IPAddress lies between updatedRange.StartIPAddress and updatedRange.EndIPAddress and the custom fields ManagedByEntity and ManagedByEntityValue set on mappedAddress is the same as that on updatedRange, set the AddressSpaceRecordId and VirtualizationType of the mappedAddress to updatedRange.AddressSpaceRecordId and updatedRange.VirtualizationType.

  21. The IsOverlapping field and the IP address mapping to the range will need to be reset. This is done by invoking the ResetCurrentIPRangeMapping procedure of the ADM_IPRangeTable with the Param_range parameter set to currentRange.

  22. The IsOverlapping field has to be recalculated for the address ranges based on the new address range. Also the addresses in ADM_IPAddressTable have to be recalculated based on the new range. This is done by performing the steps listed under SetIPRangeMapping by passing the updatedRange as the currentRange parameter.

  23. If none of the properties listed in step 7 are being modified, update the modified fields of the address range to the ADM_IPRangeTable by looking up the row with the record identifier being updatedRange.RecordId. Also update the corresponding modified properties in ADM_IPRangeMultivaluedPropertiesTable with corresponding values from updatedRange.

  24. Validate the updatedRange.CustomFieldValues as specified in the section ValidateCustomFieldValues. If the custom field values are valid, call the SetCustomFieldValues procedure of ADM_CustomFieldValuesAssociationTable with the following parameters:

  25. Param_ObjectRecordId is assigned the value of updatedRange.RecordId.

  26. Param_CustomFieldValuesCollection is assigned the updatedRange.CustomFieldValues.

  27. Param_ObjectType is assigned the value of EnumeratedObjectType.IPRange.

  28. Param_addressFamily is assigned InterNetwork if UpdateRange.range is IPv4Range.  Otherwise it is assigned the value of InterNetworkV6.

  29. If the Range/Address mapping can change as computed in step 7. Call CreateAssociationEntry procedure of ADM_AccessScopeAssociationTable with the following parameters to adjust the access scope associations:

  30. Param_ObjectType is set to EnumerationObjectType.IPRange.

  31. Param_ObjectId is assigned the value of UpdateRange.range.RecordId.