summaryrefslogtreecommitdiffstats
path: root/src/ogRest.py
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2024-06-21 14:59:22 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-06-21 14:59:48 +0200
commit1c9a13cd968559f89ba6b114c978eeb8c9629bed (patch)
treea7a6bcbad989da1908b35c08351865871e0a41de /src/ogRest.py
parent19cd1b9a783646522bcbe46a4e4f9580c0a1d512 (diff)
rest: add cmd field to POST /shell/run
echo command that has been run for storage in ogserver, until GET /shell/output is invoked.
Diffstat (limited to 'src/ogRest.py')
-rw-r--r--src/ogRest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index e7b9d95..8e90842 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -92,13 +92,14 @@ class ogThread():
return
try:
- (retcode, shellout) = ogRest.operations.shellrun(request, ogRest)
+ (retcode, cmd, shellout) = ogRest.operations.shellrun(request, ogRest)
except Exception as e:
ogRest.send_internal_server_error(client, exc=e)
return
if request.getEcho():
json_body = jsonBody()
+ json_body.add_element('cmd', cmd)
json_body.add_element('out', shellout)
json_body.add_element('retcode', retcode)
response = restResponse(ogResponses.OK, json_body, seq=client.seq)