1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-09 23:02:37 +01:00

Add network check methods to Device and Workload classes

- Device subclasses should provide their own implementation.
    Default behaviour is to raise a `NotImplementedError`
  - Workload subclasses can set `requires_network` to `True` and
    network connectivity check will be performed during `setup()`
This commit is contained in:
muendelezaji
2016-08-31 16:00:50 +01:00
parent b5c0bdb0eb
commit 392a3f1600
4 changed files with 35 additions and 13 deletions

View File

@@ -426,6 +426,13 @@ class Device(Extension):
"""
pass
def is_network_connected(self):
"""
Checks if the device is connected to the internet
"""
raise NotImplementedError()
def __str__(self):
return 'Device<{}>'.format(self.name)