3.19.4.4.1.43 UpdateDnsZonesDelegate

The UpdateDnsZonesDelegate processing is done when the IpamOperationWithProgressParameter.OperationId is AdminOperationId.UpdateDnsZones. The IpamOperationWithProgressParameter instance in this case MUST be of type UpdateDnsZonesParameters.

This operation is used to update multiple DNS zones. The following are the steps involved. In these steps, at any time a fault is generated, the SetOverallStatus SHOULD be called with the fault details:

  1. If IpamOperationWithProgressParameter is NULL or not of type UpdateDnsZonesParameters, generate an appropriate SOAP fault (as specified in section 2.2.2.1). Project IpamOperationWithProgressParameter in a local variable as UpdateDnsZonesParameters.

  2. If UpdateDnsZonesParameters is NULL or UpdateDnsZonesParameters.ServerZonesTuple is NULL or UpdateDnsZonesParameters.ServerZonesTuple.Count is 0, generate an appropriate SOAP fault.

  3. Iteratively go through each element in UpdateDnsZonesParameters.ServerZonesTuple, assigning the currently accessed object to a local variable serverZoneTuple, and do the following operations for each element.

  4. Validate the serverZoneTuple.ServerZone using the processing rules listed under ValidateBaseDnsServerZone by passing serverZoneTuple.ServerZone as Param_baseDnsServerZone. If any of the processing rules are not met, an appropriate SOAP fault (as specified in section 2.2.2.1) MUST be returned. 

  5. If the serverZoneTuple.ServerZone.zoneType is equal to DNSForwardLookupZone, call the procedure GetDnsServerZoneFromTable in ADM_DNSServerForwardLookupZoneTable passing serverZoneTuple.ServerZone.RecordId as parameter and assign output to a local variable oldServerZone. If oldServerZone is NULL, generate an appropriate SOAP fault, else perform the following steps: 

    1. For all the list of modified properties indicated in serverZoneTuple.ServerZone.ModifiedProperties, update the properties in the retrieved row of ADM_DNSServerForwardLookupZoneTable from the corresponding properties from serverZoneTuple.ServerZone.

    2. Call the procedure GetDnsZoneFromTable in ADM_DNSForwardLookupTable passing serverZoneTuple.ServerZone.Zone.RecordId as parameter. If the retrieved row is NULL, generate an appropriate SOAP fault. Else, for all the properties indicated in serverZoneTuple.ServerZone.Zone.ModifiedProperties, update the properties in the retrieved row of ADM_DNSForwardLookupTable from the corresponding properties from serverZoneTuple.ServerZone.Zone.

  6. Else if the serverZoneTuple.ServerZone.zoneType is equal to DNSReverseLookupZone, call the procedure GetDnsServerReverseLookupZoneFromTable in ADM_DNSServerReverseLookupZoneTable passing serverZoneTuple.ServerZone.RecordId as parameter and assign output to a local variable oldServerZone. If oldServerZone is NULL, generate an appropriate SOAP fault, else perform the following steps: 

    1. For all the list of modified properties indicated in serverZoneTuple.ServerZone.ModifiedProperties, update the properties in the retrieved row of ADM_DNSServerReverseLookupZoneTable from the corresponding properties from serverZoneTuple.ServerZone.

    2. Call the procedure GetDnsReverseLookupZoneFromTable in ADM_DNSReverseLookupZoneTable passing serverZoneTuple.ServerZone.Zone.RecordId as parameter. If the retrieved row is NULL, generate an appropriate SOAP fault. Else, for all the properties indicated in serverZoneTuple.ServerZone.Zone.ModifiedProperties, update the properties in the retrieved row of ADM_DNSReverseLookupZoneTable from the corresponding properties from serverZoneTuple.ServerZone.Zone.

  7. Call SetOverallStatus with Success and 100 percent completion.