3.19.4.4.1.29 ReplicateFailoverScopeDelegate

The ReplicateFailoverScopeDelegate processing is done when the IpamOperationWithProgressParameter.OperationId is AdminOperationId.ReplicateScope. The IpamOperationWithProgressParameter instance in this case MUST be of type ReplicateScopeParameters.

This operation is used to replicate a scope to the partner server in a DHCP failover relationship. The following are the steps involved. In these 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 ReplicateScopeParameters, generate an appropriate SOAP fault (as specified in section 2.2.2.1). Project IpamOperationWithProgressParameter in a local variable as ReplicateScopeParameters.

  2. If ReplicateScopeParameters.Scopes is NULL or ReplicateScopeParameters.Scopes.Count is 0, generate an appropriate SOAP fault (as specified in section 2.2.2.1).

  3. For each scope object in ReplicateScopeParameters.Scopes, put the scope object in a local variable Scope. Do the following steps for each such reservation in the collection:

  4. Find the partner server in a failover relationship for this scope. Search for a failover relationship corresponding to a given scope by looking for a row in ADM_DhcpScopeFailoverTable that has ScopeId equal to Scope.RecordId. If no record is found, skip this scope. If the ADM record is found, look for a row in ADM_FailoverRelationTable that has ADM_FailoverRelationTable.RecordId equal to ADM_DhcpScopeFailoverTable.FailoverRelationId. If no such ADM record is found, skip this scope. If the record is found, assign the failover relationship object to a local variable called Relationship.

  5. Create a local variable DestinationServer. If Relationship.Server1RecordId is equal to Scope.DHCPServerRecordId, assign Relationship.Server1RecordId to DestinationServer. If Relationship.Server2RecordId is equal to Scope.DHCPServerRecordId, assign Relationship.Server2RecordId to DestinationServer.

  6. Clone the Scope variable to another local variable ScopeToStore. Assign DestinationServer to ScopeToStore.DHCPServerRecordId.

  7. Check if ScopeToStore already exists in DestinationServer. If it does, call UpdateDhcpScopeDelegate (section 3.19.4.4.1.4), passing ScopeToStore as the parameter.  If the scope does not exist in the DestinationServer, call CreateDhcpScopeDelegate (section 3.19.4.4.1.3), passing ScopeToStore as the parameter.

  8. Call SetOverallStatus with Success and 100% completion.