openwisp-monitoring
openwisp-monitoring copied to clipboard
[change] Make Iperf command configurable
Right now, Iperf command
is hard coded inside iperf.py
. We need to make it configurable.
if not device_connection:
logger.warning(f'{device}: connection not properly set, Iperf skipped!')
return
else:
device_connection.connect()
servers = self._get_iperf_servers(device.organization.id)
command = f'iperf3 -c {servers[0]} -J'
Update:
- We can do something like this :
DEFAULT_IPERF_CONFIG = {
'general' : {
'option':{
'interval': 0,
'port': 5201
...
}
},
'client' : {
'option':{
'time': 10,
'reverse': False
}
...
}
}