Break/Restore Link Functions¶
interface control¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
- Controls the specified test port(s) by breaking or restoring the related link(s).
Synopsis:
interface control
mode= {break_link | restore_link}
port_handle= <handle>
Arguments:
mode
Specifies the action to perform for the port(s) specified by
the port_handle argument. Possible values are break_link or
This argument is `Mandatory`. The modes are described below::
break_link - Breaks all the current links on the specified port
restore_link - Restores the links broken by break_link
port_handle
Specifies the handle for the port to be controlled. This
argument is `Mandatory`.
Arguments Unsupported by Save as HLTAPI:
This function is not currently supported.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status $SUCCESS | $FAILURE. log An error message (if the operation failed).
- Description:
The
interface control
function controls the specified port on a Spirent HLTAPI chassis by breaking or restoring the related link(s). Use port_handle to specify the port to be controlled, and use the mode argument to specify the type of control.Depending on your test configuration, you may break more than one link by using break_link. To restore all of the affected links, use restore_link for the port on which the link was broken.
- Examples:
The following example breaks the link on a specified port:
set cmdReturn [interface control mode=break_link port_handle= port1]
The following example restores the broken link:
set cmdReturn [interface control mode=restore_link port_handle= port1]
Sample Output:
{status 1}
End of Procedure Header