3.19.4.4.1.44 DeleteDnsZonesDelegate
The DeleteDnsZonesDelegate processing is done when the IpamOperationWithProgressParameter.OperationId is AdminOperationId.DeleteDnsZones. The IpamOperationWithProgressParameter instance in this case MUST be of type DeleteDnsZonesParameters.
This operation is used to delete 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:
If IpamOperationWithProgressParameter is NULL or not of type DeleteDnsZonesParameters, generate an appropriate SOAP fault (as specified in section 2.2.2.1). Project IpamOperationWithProgressParameter in a local variable as DeleteDnsZonesParameters.
If DeleteDnsZonesParameters is NULL or DeleteDnsZonesParameters.ServerZoneIds is NULL or DeleteDnsZonesParameters.ServerZoneIds.Count is 0 or DeleteDnsZonesParameters.ZoneType is equal to ZoneLookupType.None, generate an appropriate SOAP fault.
If the DeleteDnsZonesParameters.zoneType is equal to DNSForwardLookupZone, iterate through the elements of DeleteDnsZonesParameters.ServerZoneIds and for each element id; perform the following steps:
Retrieve the row in ADM_DNSServerForwardLookupZoneTable table that has RecordId value equal to the element id and store the DnsZoneId of the retrieved row in a local variable ZoneId. If no such row is found, generate an appropriate SOAP fault, else delete the retrieved row from ADM_DNSServerForwardLookupZoneTable.
Iterate over the remaining rows of ADM_DNSServerForwardLookupZoneTable and search for rows that have DnsZoneId equal to the local variable ZoneId. If no such row is found, then delete the row in ADM_DNSForwardLookupTable that has DnsZoneId equal to the local variable ZoneId, else go to next step.
If the DeleteDnsZonesParameters.zoneType is equal to DNSReverseLookupZone, iterate through the elements of DeleteDnsZonesParameters.ServerZoneIds and for each element id perform the following steps:
Retrieve the row in ADM_DNSServerReverseLookupZoneTable table that has RecordId value the equal to the element id and store the DnsReverseZoneId of the retrieved row in a local variable ZoneId. If no such row is found, generate an appropriate SOAP fault, else delete the retrieved row from ADM_DNSServerReverseLookupZoneTable.
Iterate over the remaining rows of ADM_DNSServerReverseLookupZoneTable and search for rows that have DnsReverseZoneId equal to the local variable ZoneId. If no such row is found, then delete the row in ADM_DNSReverseLookupTable that has DnsReverseZoneId equal to local variable ZoneId, else go to next step.
Call SetOverallStatus with Success and 100 percent completion.