You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1101,6 +1101,32 @@ if code cannot establish connection, it will retry using deploy port (+1 for def
1101
1101
1102
1102
If code cannot establish connection, it will start deployment of python using [Deployment setup tool](#deployment-setup-tool) and establish connection again.
1103
1103
1104
+
## RShell connection
1105
+
1106
+
`RShellConnection` is a connection type that leverages `httplib.client` library to establish and manage connections using RESTful API over HTTP protocol in EFI Shell environment. `rshell_client.py` must be present on the EFI Shell target system.
1107
+
1108
+
`rshell_server.py` is a server script that needs to be executed on the host machine to facilitate communication between the host and the EFI Shell target system. Server works on queue with address ip -> command to execute, it provides a RESTful API that allows the host to send commands and receive responses from the EFI Shell:
1109
+
1110
+
*`/execute_command` - Endpoint to execute commands on the EFI Shell target system:
1111
+
Form fields:
1112
+
*`timeout` - Timeout for command execution.
1113
+
*`command` - Command to be executed.
1114
+
*`ip` - IP address of the EFI Shell target system.
1115
+
*`/post_result` - Endpoint to post results back to the host.
1116
+
Headers fields:
1117
+
*`CommandID` - Unique identifier for the command.
1118
+
*`rc` - Return code of the executed command.
1119
+
Body:
1120
+
* Command output.
1121
+
*`/exception` - Endpoint to handle exceptions that may occur during communication.
1122
+
Headers fields:
1123
+
*`CommandID` - Unique identifier for the command.
1124
+
Body:
1125
+
* Exception details.
1126
+
*`/getCommandToExecute` - Endpoint to retrieve commands to be executed on the EFI Shell target system. Returns commandline with generated CommandID.
1127
+
*`/health/<ip>` - Endpoint to check the health status of the connection.
1128
+
1129
+
`rshell.py` is a Connection class that calls RESTful API endpoints provided by `rshell_server.py` to execute commands on the EFI Shell target system. If required, starts `rshell_server.py` on the host machine.
0 commit comments