From bd98dd1da0fb1fed0066bb9477c78a2569bd547b Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Tue, 4 May 2021 15:42:44 +0000 Subject: #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. --- src/virtual/ogOperations.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/virtual') 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'} -- cgit v1.2.3-18-g5258