3.3.4.13 DBUpdateDhcpServer
This operation can be used to modify the server-level properties of a DHCP server instance.
-
<wsdl:operation name="DBUpdateDhcpServer"> <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/DBUpdateDhcpServer" message="ipam:IIpamServer_DBUpdateDhcpServer_InputMessage" /> <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/DBUpdateDhcpServerResponse" message="ipam:IIpamServer_DBUpdateDhcpServer_OutputMessage" /> </wsdl:operation>
Upon receiving the IIpamServer_DBUpdateDhcpServer_InputMessage request message, the server performs the following processing steps. Upon successful completion of the steps specified below, the server MUST respond with the IIpamServer_DBUpdateDhcpServer_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.
Validate DBUpdateDhcpServer.dhcpServer is not null. If it is null, an appropriate SOAP fault MUST be generated.
The DBUpdateDhcpServer.dhcpServer MUST be validated as per the processing rules listed under ValidateDhcpServer. If the validation doesn’t succeed, an appropriate SOAP fault MUST be generated.
If DBUpdateDhcpServer.dhcpServer is DhcpServerV4 instance, addressfamily is initialized to Internet. Otherwise the addressfamily is initialized to InternetV6.
If DBUpdateDhcpServer.dhcpServer.ModifiedProperties is empty, there are no properties to update. No further processing is required.
Compute dhcpServerExists to be a flag that indicates whether the DhcpServer information is present in the ADM_DHCPServersTable by performing a lookup in the table based on DBUpdateDhcpServer.dhcpServer.RecordId. If the row is present, dhcpServerExists is set to TRUE. Otherwise dhcpServerExists is set to FALSE.
If DBUpdateDhcpServer.dhcpServer.OperationTracker contains DhcpServerOperations.ServerDnsUpdate, perform the following updates to the ADM_DhcpServersTable.
If dhcpServerExists, update the row in ADM_DhcpServersTable for the following fields. If dhcpServerExists is FALSE, insert a new row in ADM_DhcpServersTable with the following fields:
Set ServerRoleRecordId to DBUpdateDhcpServer.dhcpServer.ServerRoleInfo.RecordId
Set the following values from DBUpdateDhcpServer.dhcpServer to the row. Based on whether the addressfamily is Internet or InternetV6, the appropriate fields are selected for database update.
DnsUpdateType
DiscardDnsRecordOnLeaseDeletionStatus
DnsUpdateForNonRequestingClients
DnsNameProtectionStatus
Assign the record identifier of the newly inserted row to dhcpServer.RecordId for use with subsequent processing.
If OperationTracker contains DhcpServerOperations.ServerAuditLogSettingUpdate, the audit log settings has to be updated to the table.
Update the AuditLoggingStatus of the DBUpdateDhcpServer.dhcpServer into the table.
If OperationTracker contains DhcpServerOperations.ServerDnsRegistrationCredentialUpdate, the DNS credential user name has to be updated to the table. This consists of the values for fields DnsRegistrationCredentialDomainName and DnsRegistrationCredentialUserName.
For each entry in the UsersClasses.OperationTracker, the key specifies the operation to be performed and value specifies the DhcpUserClass on which the operation is to be performed.
If Key is CollectionOperations.Add, then add the DhcpUserClass to the DhcpServer.UserClasses row in ADM_DHCPServersTable.
If Key is CollectionOperations.Set, then update the DhcpUserClass to the value already present in DhcpServer.UserClasses row in ADM_DHCPServersTable.
If the Key is CollectionOperations.Delete, then delete the DhcpUserClass specified from the DhcpServer.UserClasses row.
For each entry in the VendorClasses.OperationTracker, the key specifies the operation to be performed and value specifies the DhcpVendorClass on which the operation is to be performed.
If Key is CollectionOperations.Add, then add the DhcpVendorClass to the DhcpServer.VendorClasses row in ADM_DHCPServersTable.
If Key is CollectionOperations.Set, then update the DhcpVendorClass to the value already present in DhcpServer.VendorClasses row in ADM_DHCPServersTable.
If the Key is CollectionOperations.Delete, then delete the DhcpVendorClass specified from the DhcpServer.VendorClasses row.
For each entry in the OptionDefinitions.OperationTracker, the key specifies the operation to be performed and value specifies the DhcpOptionDefinition on which the operation is to be performed.
If Key is CollectionOperations.Add, then add the DhcpOptionDefinition to the DhcpServer.OptionDefinitions row in ADM_DHCPServersTable.
If Key is CollectionOperations.Update, then update the DhcpOptionDefinition to the value already present in DhcpServer.OptionDefinitions row in ADM_DHCPServersTable.
If the Key is CollectionOperations.Delete, then delete the DhcpOptionDefinition specified from the DhcpServer.OptionDefinitions row.
For each Key Value pair in DBUpdateDhcpServer.dhcpServer.Options.OperationTracker, perform the following operations:
If the Key is CollectionOperations.Add or CollectionOperations.Set,
Add or update the DhcpOption in Value portion of Key Value pair into ADM_DhcpOptionsTable as follows:
Delete the row from ADM_DhcpOptionsTable which meets the following criteria (if it already exists):
ServerRecordId is dhcpServer.RecordId
ScopeRecordId is null
OptionDefinitionRecordId is DhcpOption.OptionDefinition.RecordID
UserClassRecordId is DhcpOption.UserClass.RecordId
Insert a new row into ADM_DhcpOptionstable with the following values:
ServerRecordId is dhcpServer.RecordId
ScopeRecordId is null
OptionDefinitionRecordId is set to DhcpOption.OptionDefinition.RecordId
UserClassRecordId is set to the value of DhcpOption.UserClass.RecordId
Values is assigned the value of DhcpOption.Values
OptionOwnerType is assigned the value of DhcpOption.OptionOwnerType
If the Key is CollectionOperations.Delete
Delete the DhcpOption form ADM_DhcpOptionsTable by looking up based on the following values.
ServerRecordId is dhcpServer.RecordId
ScopeRecordId is null
OptionDefinitionRecordId is DhcpOption.OptionDefinition.RecordID
UserClassRecordId is DhcpOption.UserClass.RecordId
Call the procedure GetDHCPServerFromTable in ADM_DHCPServersTable by passing dhcpServer.RecordId as Param_Id and addressfamily as Param_addressfamily. Assign the Result_server to DBUpdateDhcpServerResponse.dhcpServer to be returned as a part of the response message.