3.3.4.82 UpdateIpamIPAddress
This operation is used to modify an existing IP address in the IPAM data store.
-
<wsdl:operation name="UpdateIpamIPAddress"> <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateIpamIPAddress" message="ipam:IIpamServer_UpdateIpamIPAddress_InputMessage" /> <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/UpdateIpamIPAddressResponse" message="ipam:IIpamServer_UpdateIpamIPAddress_OutputMessage" /> </wsdl:operation>
Upon receiving the IIpamServer_UpdateIpamIPAddress_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_UpdateIpamIPAddress_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.
Set the updateIpAddress to UpdateIpamIPAddress.ipamIpAddress.
If updateIpAddress is NULL, an appropriate SOAP fault MUST be returned.
Validate the updateIpAddress using the processing rules listed under ValidateIpamIPAddress passing updateIpAddress as Param_address. If any of the processing rules are not met, an appropriate SOAP fault MUST be returned.
Identify the list of modified properties in the updateIpAddress by seeing the number of properties modified in updateIpAddress.ModifiedProperties. If there are none, no further processing is required and return successfully.
The addressfamily is set to the Internet if the updateIpAddress is IpamIPv4Address and InternetV6 if the updateIpAddress is IpamIPv6Address. If the addressFamily is Internet, the rest of the processing is done with the IPv4-specific tables. Otherwise IPv6-specific tables are used for further processing.
Fetch the existing IpamIPAddress data by invoking GetIPAddressFromTable procedure of ADM_IPAddressTable by passing the updateIpAddress.RecordId as the Param_id parameter and addressfamily as Param_addressfamily.
Store the result in currentIpAddress which is a temporary store.
Compare the values of the properties listed in updateIpAddress.ModifiedProperties to their corresponding values in currentIpAddress. Only those values which have changed will be used to update the values in the data store.
Identify if any of the following properties part of updateIPAddress.ModifiedProperties and there is a difference in value between the one present in currentIPAddress and updateIPaddress.
IPAddress
ManagedByValue – This is a computed field of the updateIpAddress. This is the value of the custom field whose record identifier is ADM_ManagedByCustomFieldId retrieved from updateIpAddress.CustomFieldValues.
ManagedByEntityValue – This is a computed field of the updateIpAddress. This is the value of the custom field whose record identifier is ManagedByEntityCustomFieldId retrieved from updateIpAddress.CustomFieldValues.
If any of the above fields have changed and are different from the values in currentIpAddress, the following additional processing has to be done.
Validate whether adding updateIpAddress can result in any invalid duplicate addresses in IPAM data store as follows:
Enumerate all rows in ADM_IPAddressTable where IPAddress value is the same as updateIpAddress.IPAddress.
For each row,
Calculate the ManagedBy value to be the custom field value whose custom field identifier is the same value as ADM_ManagedByCustomFieldId.
Calculate the ManagedByEntity value to be the custom field value whose custom field identifier is the same as the ADM_ManagedByEntityCustomFieldId.
If the ManagedBy and ManagedByEntity values of the row is same as updateIpAddress.ManagedByValue and updateIpAddress.ManagedByEntityValue respectively, then an appropriate SOAP fault MUST be returned.
The IsDuplicate field of the existing IP address will need to be reset for old currentIpamIPAddress. Enumerate all rows in IP address table, where value of IPAddress is same as currentIpamIPAddress.IPAddress and the RecordId is not the same as currentIpamIPAddress.RecordId to find the duplicate addresses of the address that got modified. If the number of rows found is 1, then there is only one duplicate address, and hence its duplicate status is to be reset. Update the IsDuplicate field of the only IpamIPAddress found thus as 0.
The IsDuplicate field of the recalculated for the addresses based on the new address updateIpAddress. Enumerate all rows in the table whose IPAddress value is same as updateIpAddress.IPAddress. If one or more rows are enumerated update the IsDuplicate field of all these rows as 1. Also update the IsDuplicate value of updateIpAddress to 1.
Update the modified fields of the address in the IP address table by looking up the row with the RecordId being updateIpAddress.RecordId.
If currentIpamIPAddress.DhcpScopeId is specified
Call the procedure AddOrUpdateReservation in ADM_DHCPReservationTable with the following parameters:
Param_addressfamily is set to addressfamily.
If currentIpamIPAddress.ReservationId is specified, set Param_reservationId to the value.
Param_scopeId is set to currentIpamIPAddress.DhcpScopeId.
Param_addressId is set to currentIpamIPAddress.RecordId.
Copy ReservationDetails from currentIpamIPAddress to Param_reservationDetails.
If the reservation detail is being added newly, assign Result_reservationId to currentipamIPAddress.ReservationId and store it in ADM_IPAddressTable.
Call the procedure AddOrUpdateAddressDNSForwardLookupTable ADM_AddressDNSForwardLookupTable with the following parameters:
Param_addressfamily is set to addressfamily.
Param_addressId is set to currentIpamIPAddress.RecordId.
Param_dnsZoneId is set to the value of currentIpamIPAddress.DnsZoneId.
Param_serverDnsZoneId is set to the value of currentIpamIPAddress.DnsForwardLookupZoneDnsServerId.
If currentIpamIPAddress.DnsForwardLookupZoneRecordId is specified assign it to Param_recordId.
On return, assign Result_recordId to currentIpamIPAddress.DnsForwardLookupZoneRecordId.
Call the procedure AddOrUpdateAddressDNSReverseLookup in ADM_AddressDNSReverseLookupTable with the following parameters:
Param_addressfamily is set to addressfamily.
Param_addressId is set to currentIpamIPAddress.RecordId.
Param_dnsZoneId is set to the value of currentIpamIPAddress.DnsReverseLookupZoneId.
Param_serverDnsZoneId is set to the value of currentIpamIPAddress.DnsReverseLookupZoneDnsServerId.
If currentIpamIPAddress.DnsReverseLookupZoneRecordId is specified assign it to Param_recordId.
On return, assign Result_recordId to currentIpamIPAddress.DnsReverseLookupZoneRecordId.
Validate the updateIpAddress.CustomFieldValues by performing the processing rules listed under ValidateCustomFieldValues section. If the custom field values are valid, call the SetCustomFieldValues procedure of ADM_CustomFieldValuesAssociationTable table with the following parameters.
Param_ObjectRecordId is assigned the value of updateIpAddress.RecordId.
Param_ObjectType is set to EnumerationObjectType.IPAddress
Param_addressFamily is set to the value of addressfamily.
Param_CustomFieldValuesCollection is set to the value of updateIpAddress.CustomFieldValues.
If the ADM_CommonProperties.ExpiryAlertThreshold is not 0, and if currentIpamIPAddress.ExpiryDate is modified, then set currentIpamIPAddress.InWarningPeriod to TRUE if the following conditions are satisfied. Otherwise InWarningPeriod is set to FALSE.
Current date and time is less than currentIpamIPAddress.ExpiryDate.
Current date and time + ADM_CommonProperties.ExpiryAlertThreshold is greater than currentIpamIPAddress.ExpiryDate.
If current date and time is greater than currentIpamIPAddress.ExpiryDate, set currentIpamIPAddress.IsExpired to TRUE. Otherwise currentIpamIPAddress.IsExpired is set to FALSE.