Library scope: | GLOBAL |
---|
Documentation for resource file SwitchUtils
.
will execute and command strings stored in switch.cleanup_cmds
when using multiple switch connections (e.g. more than one switch device) this keyword will switch the current connection index and prompt so that the following Read or Write actions happen on the correct device.
The commands neccessary to configure openflow on the given switch object should exist in the switch.base_openflow_config attribute. Also, the commands/logic to verify that openflow is working are checked in this keyword and come from switch.openflow_validation_cmd output where the validation strings are stored in switch.openflow_enable_validations
Will Open a connection to the switch, which will set the switch.connection_index. For each switch.connection_configs string, a write bare will be executed on the switch connection. The write bare is done becuase some switch consoles require extra input (CR/LF, etc.) that are needed. The connection_configs strings should be sufficient to put the switch console in to a usuable state so that further interactions with the switch can be used with the robot keyword "Execute Command"
executes the switch.openflow_disable_config on the given switch and validates that openflow is NOT operational with the switch.openflow_validation_command against all the strings in the switch.openflow_disable_validations list.
executes the switch.openflow_enable_config on the given switch and validates that openflow is operational with the switch.openflow_validation_command against all the strings in the switch.openflow_enable_validations list.
Wraps the Execute Command keyword so that depending on the switch.mgmt_protocol the right library (Telnet or SSHLibrary) is used.
Using the connection index for the given switch, will execute the command string "datapath_id_output_command" which will store the output in switch.datapath_id_output_string. The switch object method "update_datapath_id" is called which is assumed to place the ODL friendly (decimal) version of the datapath id in to switch.datapath_id and the value is also returned from this keyword.
Will connect and execute all switch.initialization_cmds on the given switch. In some cases, this may be a reboot. If so, the switch.initialization_type can be set to "reboot" and further logic is invoked to wait for the reboot to complete and a reconnect to the switch is made.
Each string in the @{cmd_list} argument is executed on the switch.connection_index.
Some switches require telnet access and others require ssh access. Based on the switch.mgmt_protocol, the connection open will be handled by the right robot library (Telnet or SSHLibrary). The connection_index is returned.
Wraps the Read command so that depending on the switch.mgmt_protocol the right library (Telnet or SSHLibrary) is used.
A generic keyword that will execute one command on the switch, and check for each string in the @{validations} argument. There is a boolean flag ${should_exist} that can be used to check that the validations are or are NOT in the output of the command executed.
Verifies the existence of the switch.datapath_id in the operational datastore.
Verifies that the given switch.datapath_id is not in the operational datastore.
If a switch has been set to reboot, it may take some time. This keyword will first make sure the switch has gone down (10 pings over 10 seconds should not see a 100% success, although it may respond for a short time after the reload is issued). Then a poll is done with a single ping request every 5s until a success is found, at which point it is assumed the switch is up and ready.
Wraps the Write Bare command so that depending on the switch.mgmt_protocol the right library (Telnet or SSHLibrary) is used.