3.19.4.4.1.6 ApplyDhcpScopeConfigurationDelegate

The ApplyDhcpScopeConfigurationDelegate processing is done when the IpamOperationWithProgressParameter.OperationId is AdminOperationId.ApplyScopeConfigurationTemplate. The IpamOperationWithProgressParameter instance MUST be of type ApplyDhcpScopeConfigurationParameters.

This operation is used to update multiple DHCP scopes with specific properties. In the following steps, any time a fault is generated, SetOverallStatus is called with the fault details:

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

  2. If ApplyDhcpServerConfigurationParameters.ScopeIds is NULL or ApplyDhcpServerConfigurationParameters.ScopeIds.Count is 0 or ApplyDhcpServerConfigurationParameters.ScopeTemplate is NULL, generate an appropriate SOAP fault.

  3. For each scope specified by ApplyDhcpServerConfigurationParameters.ScopeIds, retrieve the corresponding scope object and create a collection of scopes called collectionScopes.

  4. To retrieve the scope object corresponding to the scope ID, in the step above, call the procedure GetScopeFromTable of ADM_DHCPScopesTable, passing the scopeId as a parameter in Param_id and ApplyDhcpServerConfigurationParameters.ScopeAddressFamily as a parameter in param_addressFamily.

  5. For each Scope in collectionScopes, populate the relationship name that the scope belongs to by searching for the scopeId in ADM_DhcpScopeFailoverTable and then for the corresponding relationshipId in the ADM_DhcpFailoverTable. Using the relationship names, remove one of the scopes of a given relationship from collectionScopes, if both the scopes of a relationship are in the collection.

  6. For each Scope in collectionScope, do the following steps:

  7. If ApplyDhcpScopeConfigurationParameters.ScopeTemplate.ModifiedProperties contains DnsNameProtectionStatus, assign to Scope.DnsNameProtectionStatus the ApplyDhcpScopeConfigurationParameters.ScopeTemplate.DnsNameProtectionStatus.

  8. If ApplyDhcpScopeConfigurationParameters.ScopeTemplate.ModifiedProperties contains DnsUpdateType, assign to Scope.DnsUpdateType the ApplyDhcpScopeConfigurationParameters.ScopeTemplate.DnsUpdateType.

  9. If ApplyDhcpScopeConfigurationParameters.ScopeTemplate.ModifiedProperties contains DiscardDnsRecordOnLeaseDeletionStatus, assign to Scope.DiscardDnsRecordOnLeaseDeletionStatus the ApplyDhcpScopeConfigurationParameters.ScopeTemplate.DiscardDnsRecordOnLeaseDeletionStatus.

  10. If ApplyDhcpScopeConfigurationParameters.ScopeTemplate.ModifiedProperties contains Status, assign to Scope.Status the ApplyDhcpScopeConfigurationParameters.ScopeTemplate.Status.

  11. If ApplyDhcpScopeConfigurationParameters.ScopeTemplate.ModifiedProperties contains Description, assign to Scope.Description the ApplyDhcpScopeConfigurationParameters.ScopeTemplate.Description.

  12. Call SetOverallStatus with Success and 100 percent completion.