set_routes Command
This command instructs the switch driver to create one or more routes in the switch hardware. A single route description is formed by the following three comma-separated values enclosed in double quote characters: group name, input port name, and output port name.
The two ports must belong to the same group. If multiple routes are described, each route description must be separated by a space character as shown in the example below.
set_routes
command is sent to the switch driver
Command Sent from FlexOTO
set_routes "<group-name>, <input-port-name>, <output-port-name>" "<group-name>, <input-port-name>, <output-port-name>" ...
This example creates two switch routes in a switch model that has multiple internal switches. Notice that the string delimiter between routes is a space (" "
) character. The delimiter between a route's arguments is the comma character.
set_routes "SW1, 4, Out" "SW2, 2, 6"
Two switch routes in a switch module that has a single internal switch. Notice that because there is only one internal switch, the <group-name> is not included:
set_routes ", 4, Out" ", 2, 6"
Response Returned from Driver
This command should always return a value of DONE
. If the switch responds with an error, the error should be returned before the DONE
value.
print('error_message') # if any print("DONE")