summaryrefslogtreecommitdiffstats
path: root/src/virtual/ogOperations.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-05-04 15:42:44 +0000
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-04 18:30:40 +0200
commitbd98dd1da0fb1fed0066bb9477c78a2569bd547b (patch)
tree9c5b254910421f6a6b6b18754f37854b10be3eec /src/virtual/ogOperations.py
parent8b959c8be9639ac481be528ba8bc5a98f1cf51b2 (diff)
#995 Add link speed in probe responses
Separates probe method into separate ogclient modes (virtual, vdi) so future supported OS can easily have a tailored probe responses. Link speed is retrieved using a minimal ethtool command sent using fcntl module from python.
Diffstat (limited to 'src/virtual/ogOperations.py')
-rw-r--r--src/virtual/ogOperations.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py
index 60370cb..94f3e1b 100644
--- a/src/virtual/ogOperations.py
+++ b/src/virtual/ogOperations.py
@@ -600,3 +600,6 @@ 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'}