3.3.4.12 CreateOrUpdateIPv4Reservation

The CreateOrUpdateIPv4Reservation operation is used to create a new IPv4 reservation or if the reservation corresponding to the given IPv4 address exists already, to update it.

 <wsdl:operation name="CreateOrUpdateIPv4Reservation" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/CreateOrUpdateIPv4Reservation" message="ipam:IIpamServer_CreateOrUpdateIPv4Reservation_InputMessage" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/CreateOrUpdateIPv4ReservationResponse" message="ipam:IIpamServer_CreateOrUpdateIPv4Reservation_OutputMessage" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" />
 </wsdl:operation>

Upon receiving the IIpamServer_CreateOrUpdateIPv4Reservation_InputMessage request message, the server performs the following processing steps. Upon successful completion of these steps, the server MUST respond with the IIpamServer_CreateOrUpdateIPv4Reservation_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. If any of the following conditions is not satisfied, an appropriate SOAP fault MUST be generated:

    • CreateOrUpdateIPv4Reservation.ipAddress is NULL.

    • CreateOrUpdateIPv4Reservation.ipAddress.DhcpScopeSubnetId is NULL.

    • CreateOrUpdateIPv4Reservation.ipAddress.Address is NULL.

    • CreateOrUpdateIPv4Reservation.ipAddress.MacAddress is NULL.

    • CreateOrUpdateIPv4Reservation.ipAddress.ReservationServer is NULL or empty string.

  2. If CreateOrUpdateIPv4Reservation.ipAddress.ReservationName is NULL or empty string2, check the ReservationSyncStatus if the reservation specified in ipam:IpamIpAddress element in the input message is marked to be an existing reservation.

  3. If the reservation exists, call the procedure AddOrUpdateReservation in ADM_DHCPReservationTable with the following parameters:

    1. IPv4 as Param_addressfamily.

    2. CreateOrUpdateIPv4Reservation.ipAddress.ReservationRecordId as Param_reservationId.

    3. CreateOrUpdateIPv4Reservation.ipAddress.DhcpScopeId as Param_scopeId.

    4. CreateOrUpdateIPv4Reservation.ipAddress.RecordId as Param_addressId.

    5. CreateOrUpdateIPv4Reservation.ipAddress.ReservationDetails as Param_reservationDetails

  4. If the procedure updated the reservation successfully, return the IpamIpAddress in the CreateOrUpdateIPv4ReservationResponse element. 

  5. If the reservation does not exist, call the procedure AddOrUpdateReservation in ADM_DHCPReservationTable passing the address family, Scope ID, Address ID and reservation details from the input message and the reservationId as NULL. If the procedure added the reservation successfully, update the returned reservationId in IpamIpAddress and populate that in CreateOrUpdateIPv4ReservationResponse element.

  6. Compute the ManagedByValue for the CreateOrUpdateIPv6Reservation.ipAddress as the value of the custom field in CreateOrUpdateIPv6Reservation.ipAddress.CustomFieldValues that has the record identifier ADM_ManagedByCustomFieldId.

  7. Compute the ManagedByEntity for the CreateOrUpdateIPv6Reservation.ipAddress as the value of the custom field in CreateOrUpdateIPv4Reservation.ipAddress.CustomFieldValues that has the record identifier ADM_ManagedByEntityCustomFieldId.

  8. If the ManagedByEntity field computed previously is the same as CreateOrUpdateIPv4Reservation.ipAddress.ReservationServer, set CreateOrUpdateIPv4Reservation.ipAddress.ReservationSyncStatus as ipam::DhcpReservationSyncStatus.Exists. Otherwise, set the CreateOrUpdateIPv4Reservation.ipAddress.ReservationSyncStatus as ipam::DhcpReservationSyncStatus.CreateSuccess.

  9. In case of any error while updating the reservation in step 4, set CreateOrUpdateIPv4Reservation.ipAddress.ReservationSyncStatus as ipam::DhcpReservationSyncStatus.CreateFailure.

  10. Update the ReservationSyncStatus in ADM_IPAddressTable in the row corresponding to CreateOrUpdateIPv4Reservation.ipAddress.RecordId.

  11. In case of any error while updating the reservation in step 4, an appropriate SOAP fault MUST be generated.