summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2024-09-28 23:13:53 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-09-30 14:42:29 +0200
commit8f437bb954266d1da31c7044edcdc2d9f4cef540 (patch)
treee39e0a433368ebe58ee4b63b86e54fc1c836c6e9
parent9c18ef7392c801e68b72e5e0e2770b9aed0a38bc (diff)
live: remove unused probe
unused since ogserver's commit 87be2ce08 #980 Change initial probe to refresh
-rw-r--r--src/live/ogOperations.py8
-rw-r--r--src/ogRest.py24
-rw-r--r--src/virtual/ogOperations.py3
-rw-r--r--src/windows/ogOperations.py3
4 files changed, 1 insertions, 37 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index d0a848b..2f59711 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -809,11 +809,3 @@ class OgLiveOperations:
logging.info('Sending response to refresh request')
return json_body
-
- def probe(self, ogRest):
-
- interface = os.getenv('DEVICE')
- speed = ethtool(interface)
-
- return {'status': 'OPG' if ogRest.state != ThreadState.BUSY else 'BSY',
- 'speed': speed}
diff --git a/src/ogRest.py b/src/ogRest.py
index cab1c06..7511c76 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -309,8 +309,7 @@ class ogRest():
if (not "stop" in URI and
not "reboot" in URI and
- not "poweroff" in URI and
- not "probe" in URI):
+ not "poweroff" in URI):
if self.state == ThreadState.BUSY:
logging.error('Request has been received while ogClient is busy')
response = restResponse(ogResponses.SERVICE_UNAVAILABLE, seq=client.seq)
@@ -336,8 +335,6 @@ class ogRest():
elif ("POST" in method):
if ("poweroff" in URI):
self.process_poweroff(client)
- elif "probe" in URI:
- self.process_probe(client)
elif ("reboot" in URI):
self.process_reboot(client)
elif ("shell/run" in URI):
@@ -404,25 +401,6 @@ class ogRest():
threading.Thread(target=ogThread.poweroff, args=(self,)).start()
- def process_probe(self, client):
- try:
- status = self.operations.probe(self)
- except:
- response = restResponse(ogResponses.INTERNAL_ERR, seq=client.seq)
- client.send(response.get())
- return
-
- json_body = jsonBody()
- for k, v in status.items():
- json_body.add_element(k, v)
-
- if self.state != ThreadState.BUSY:
- response = restResponse(ogResponses.OK, json_body, seq=client.seq)
- else:
- response = restResponse(ogResponses.IN_PROGRESS, json_body, seq=client.seq)
-
- client.send(response.get())
-
def process_shellrun(self, client, request):
threading.Thread(target=ogThread.shellrun, args=(client, request, self,)).start()
diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py
index 836967a..73d41db 100644
--- a/src/virtual/ogOperations.py
+++ b/src/virtual/ogOperations.py
@@ -623,6 +623,3 @@ class OgVirtualOperations:
for k, v in device_names.items():
f.write(f'{k}={v}\n')
f.truncate()
-
- def probe(self, ogRest):
- return {'status': 'VDI' if ogRest.state != ThreadState.BUSY else 'BSY'}
diff --git a/src/windows/ogOperations.py b/src/windows/ogOperations.py
index 5ac9c9f..4eae217 100644
--- a/src/windows/ogOperations.py
+++ b/src/windows/ogOperations.py
@@ -119,6 +119,3 @@ class OgWindowsOperations:
def refresh(self, ogRest):
return {"status": "WIN"}
-
- def probe(self, ogRest):
- return {'status': 'WIN' if ogRest.state != ThreadState.BUSY else 'BSY'}