3.19.4.4.1.2 ApplyDhcpServerConfigurationDelegate

The ApplyDhcpServerConfigurationDelegate processing is done when the IpamOperationWithProgressParameter.OperationId is AdminOperationId.ApplyServerConfigurationTemplate. The IpamOperationWithProgressParameter instance MUST be of type ApplyDhcpServerConfigurationParameters.

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

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

  2. If ApplyDhcpServerConfigurationParameters.ServerIds is NULL or ApplyDhcpServerConfigurationParameters.ServerIds.Count is 0 or ApplyDhcpServerConfigurationParameters.ServerTemplate is NULL, generate an appropriate SOAP fault.

  3. For each server specified by ApplyDhcpServerConfigurationParameters.ServerIds, perform the following steps:

  4. Retrieve the server object corresponding to the server ID by calling the procedure GetServerInfoFromTable of ADM_ServersTable and passing the serverId as a parameter in Param_id. Assign the server object to a local variable Server.

  5. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionApplyType is not equal to None, update the server options in the server object through these steps:

  6. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionApplyType is AddorOverwrite, append or update the options for the Server with the list of DHCP options specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.Options.

  7. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionApplyType is Delete, delete the options specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.Options from the Server.

  8. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionApplyType is Append, append the options specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.Options to the options in the Server.

  9. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionApplyType is FindAndreplace, find the options specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.Options in the server configuration, and if they exist, replace with the options specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.FindAndReplaceOptions.

  10. If ApplyDhcpServerConfigurationParameters.ServerTemplate.UserClassApplyType is not equal to None or FindAndReplace, update the user class in the server object through these steps:

  11. If ApplyDhcpServerConfigurationParameters.ServerTemplate.UserClassApplyType is AddorOverwrite, append or update the user class for the Server with the user class specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.UserClasses.

  12. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionApplyType is Delete, delete the user classes specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.UserClasses from the Server.

  13. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionApplyType is Append, append the user classes specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.UserClasses to the Server.

  14. If ApplyDhcpServerConfigurationParameters.ServerTemplate.VendorClassApplyType is not equal to None or FindAndReplace, update the vendor class in the server object through these steps:

  15. If ApplyDhcpServerConfigurationParameters.ServerTemplate.VendorClassType is AddorOverwrite, append or update the vendor class for the Server with the vendor class specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.VendorClasses.

  16. If ApplyDhcpServerConfigurationParameters.ServerTemplate. VendorClassType is Delete, delete the vendor classes specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.VendorClasses from the Server.

  17. If ApplyDhcpServerConfigurationParameters.ServerTemplate. VendorClassType is Append, append the vendor classes specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.VendorClasses to the Server.

  18. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionDefinitionApplyType is not equal to None or FindAndReplace, update the option definitions in the server object through these steps:

  19. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionDefinitionApplyType is AddorOverwrite, Append or update the option definitions for the server with the option definitions specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionDefinitions.

  20. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionDefinitionApplyType is Delete, delete the option definitions specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionDefinitions from the Server.

  21. If ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionDefinitionApplyType is Append, append the option definitions specified in ApplyDhcpServerConfigurationParameters.ServerTemplate.OptionDefinitions to the Server.

  22. If ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsNameProtectionStatus is not equal to None, assign to Server.DnsNameProtectionStatus the ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsNameProtectionStatus.

  23. If ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsUpdateType is not equal to None, assign to Server.DnsUpdateType the ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsUpdateType.

  24. If ApplyDhcpServerConfigurationParameters.ServerTemplate.DiscardDnsRecordOnLeaseDeletionStatus is not equal to None, assign to Server.DiscardDnsRecordOnLeaseDeletionStatus the ApplyDhcpServerConfigurationParameters.ServerTemplate.DiscardDnsRecordOnLeaseDeletionStatus.

  25. If ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsRegistrationCredentialUserName is either NULL or an empty string, assign to Server.DnsRegistrationCredentialUserName the ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsRegistrationCredentialUserName.

  26. If ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsRegistrationCredentialDomainName is either NULL or an empty string, assign to Server.DnsRegistrationCredentialDomainName the ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsRegistrationCredentialDomainName.

  27. If ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsRegistrationCredentialPassword is either NULL or an empty string, assign to Server.DnsRegistrationCredentialPassword the ApplyDhcpServerConfigurationParameters.ServerTemplate.DnsRegistrationCredentialPassword.

  28. If ApplyDhcpServerConfigurationParameters.ServerTemplate.AuditLoggingStatus is not equal to None, assign to Server.AuditLoggingStatus the ApplyDhcpServerConfigurationParameters.ServerTemplate.AuditLoggingStatus.

  29. If ApplyDhcpServerConfigurationParameters.ServerTemplate.Type is equal to DhcpServerV6TemplateConfiguration, then perform the following steps:

  30. If ApplyDhcpServerConfigurationParameters.ServerTemplate.StatelessClientInventoryStatus is not equal to None, assign to Server.StatelessClientInventoryStatus the ApplyDhcpServerConfigurationParameters.ServerTemplate.StatelessClientInventoryStatus.

  31. If ApplyDhcpServerConfigurationParameters.ServerTemplate.PurgeInterval is not 0, assign to Server.PurgeInterval the ApplyDhcpServerConfigurationParameters.ServerTemplate.PurgeInterval.

  32. If the procedure returns any error, generate an appropriate SOAP fault (as specified in section 2.2.2.1).

  33. Call the SetOverallStatus with Success and 100 percent completion.