mirror of https://git.48k.eu/ogclient
Rename operation 'execCMD' to 'shellrun'
This patch also ignores calls to shellrun when virtual mode is activated.more_events
parent
5f874030f5
commit
269c7b5055
|
|
@ -68,7 +68,7 @@ class OgLinuxOperations:
|
||||||
else:
|
else:
|
||||||
subprocess.call(['/sbin/reboot'])
|
subprocess.call(['/sbin/reboot'])
|
||||||
|
|
||||||
def execCMD(self, request, ogRest):
|
def shellrun(self, request, ogRest)
|
||||||
cmd = request.getrun()
|
cmd = request.getrun()
|
||||||
cmds = cmd.split(";|\n\r")
|
cmds = cmd.split(";|\n\r")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class ogThread():
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
shellout = ogRest.operations.execCMD(request, ogRest)
|
shellout = ogRest.operations.shellrun(request, ogRest)
|
||||||
except ValueError as err:
|
except ValueError as err:
|
||||||
response = restResponse(ogResponses.INTERNAL_ERR)
|
response = restResponse(ogResponses.INTERNAL_ERR)
|
||||||
client.send(response.get())
|
client.send(response.get())
|
||||||
|
|
|
||||||
|
|
@ -217,9 +217,8 @@ class OgVirtualOperations:
|
||||||
pass
|
pass
|
||||||
return installed_os
|
return installed_os
|
||||||
|
|
||||||
def execCMD(self, request, ogRest):
|
def shellrun(self, request, ogRest):
|
||||||
# TODO Implement.
|
return
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def session(self, request, ogRest):
|
def session(self, request, ogRest):
|
||||||
disk = request.getDisk()
|
disk = request.getDisk()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue