3.3.4.70 SaveIpamIPAddress
This operation is used to create a new address object in the IPAM data store.
-
<wsdl:operation name="SaveIpamIPAddress"> <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SaveIpamIPAddress" message="ipam:IIpamServer_SaveIpamIPAddress_InputMessage" /> <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SaveIpamIPAddressResponse" message="ipam:IIpamServer_SaveIpamIPAddress_OutputMessage" /> </wsdl:operation>
Upon receiving the IIpamServer_SaveIpamIPAddress_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_SaveIpamIPAddress_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 currentIpamIPAddress variable as SaveIpamIPAddress.ipamIpAddress.
If currentIpamIPAddress is null, an appropriate SOAP fault MUST be returned.
The addressfamily is set to the Internet if the currentIpamIPAddress is IpamIPv4Address and InternetV6 if the currentIpamIPAddress 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.
Validate the currentIpamIPAddress using the processing rules listed under ValidateIpamIPAddress passing currentIpamIPAddress as Param_address. If any of the processing rules are not met, an appropriate SOAP fault MUST be returned.
If adding currentIpamIPAddress leads to any invalid duplicate addresses in IPAM data store, an appropriate SOAP fault MUST be returned. Validation of invalid duplicate address is done as follows:
Enumerate all rows in ADM_IPAddressTable where IPAddress value is same as currentIpamIPAddress.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 currentIpamIPAddress.ManagedByValue and currentIpamIPAddress.ManagedByEntityValue respectively, the newly added address is an invalid duplicate address.
Find out whether currentIpamIPAddress maps to any existing range, by checking the following conditions against the IPRange objects in the ADM_IPRangeTable. If all the conditions below are met for an IPRange, set the ParentIPRangeRecordId of currentIpamIPAddress to record identifier of the IPRange, else set it to NULL.
currentIpamIPAddress.IPAddress is greater than or equal to StartIPAddress of IPRange, and
currentIpamIPAddress.IPAddress is less than or equal to EndIPAddress of IPRange, and
currentIpamIPAddress.ManagedByValue is equal to ManagedByValue of IPRange, and
currentIpamIPAddress.ManagedByEntityValue is equal to ManagedByEntityValue of IPRange.
Find out whether currentIpamIPAddress has any duplicate addresses in the existing IpamIPAddress objects in the ADM_IPAddressTable. Enumerate all rows in the table whose IPAddress value is the same as currentIpamIPAddress.IPAddress. If one or more rows are enumerated, update the IsDuplicate field of all these rows as TRUE. Also set the IsDuplicate value of currentIpamIPAddress to 1.
Add currentIpamIPAddress to ADM_IPAddressTable and set the currentIpamIPAddress.RecordId to the value of 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 in 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 SaveIpamIPAddress.ipamIpAddress.CustomFieldValues by performing the processing rules listed under the section ValidateCustomFields. 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 currentIpamIPAddress.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 SaveIpamIPAddress.ipamIpAddress.CustomFieldValues.
If the ADM_CommonProperties.ExpiryAlertThreshold is not 0, and if currentIpamIPAddress.ExpiryDate is set, 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 plus 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.
Assign the currentIpamIPAddress.RecordId to SaveIpamIPAddressResponse.SaveIpamIPAddressResult.