Switches the interface to a specified standby variant.
NMS_V5_RESULT_T NMS_V5SwitchOverVariantData ( NMS_GR303_INTERFACE_ID_T interfaceId)
|
Argument |
Description |
|
interfaceId |
Interface ID of a provisioned interface. |
|
Return value |
Description |
|
NMSV5_SUCCESS |
|
|
NMSV5_INTERNAL_FAILURE |
Internal failure. Refer to the trace log for more information. |
|
NMSV5_INVALID_INTERFACE_ID |
Specified interface is not provisioned. |
|
NMSV5_NO_STANDBY |
No standby variant is provisioned for the interface. |
|
NMSV5_NOT_INITIALIZED |
Library was not initialized with NMS_V5Initialize. |
NMS_V5SwitchOverVariantData stops an interface (if the interface is started), destroys the active variant connections and configurations, and configures the standby variant as active. No standby variant is defined on the interface after the switchover process finishes. Applications should then call NMS_V5StartInterface to start the interface. The application must provision the standby variant (with NMS_V5ProvisionStandByVariant) before initiating a switchover.
If a failure occurs during any stage of the switchover process, both active and standby variants are destroyed and the application must destroy and re-provision the entire interface.
NMS_V5ProvisionInterface, NMS_V5DestroyStandByVariant
void SwitchOverVariantData( void )
{
NMS_V5_RESULT_T NmsResult;
DWORD InterfaceId;
printf("NMS_V5SwitchOverVariantData:\n");
/* Get parameters */
promptdw_nodft("Enter interfaceId", &InterfaceId);
NmsResult = NMS_V5SwitchOverVariantData( InterfaceId );
printf ("NMS_V5SwitchOverVariantData:
Result=%s\n",PRINT_RESULT(NmsResult));
}