Rename operation 'execCMD' to 'shellrun'

This patch also ignores calls to shellrun when virtual mode is activated.
more_events
Roberto Hueso Gómez 2020-05-13 17:30:12 +02:00
parent 5f874030f5
commit 269c7b5055
3 changed files with 4 additions and 5 deletions

View File

@ -68,7 +68,7 @@ class OgLinuxOperations:
else:
subprocess.call(['/sbin/reboot'])
def execCMD(self, request, ogRest):
def shellrun(self, request, ogRest)
cmd = request.getrun()
cmds = cmd.split(";|\n\r")

View File

@ -79,7 +79,7 @@ class ogThread():
return
try:
shellout = ogRest.operations.execCMD(request, ogRest)
shellout = ogRest.operations.shellrun(request, ogRest)
except ValueError as err:
response = restResponse(ogResponses.INTERNAL_ERR)
client.send(response.get())

View File

@ -217,9 +217,8 @@ class OgVirtualOperations:
pass
return installed_os
def execCMD(self, request, ogRest):
# TODO Implement.
raise NotImplementedError
def shellrun(self, request, ogRest):
return
def session(self, request, ogRest):
disk = request.getDisk()