handle ethtool not installed and add known limitations to README

This commit is contained in:
Solvik Blum 2019-08-04 23:24:51 +02:00
parent 15faf59182
commit 0c5ca003a6
No known key found for this signature in database
GPG key ID: CC12B3DC262B6C47
3 changed files with 10 additions and 0 deletions

View file

@ -65,6 +65,8 @@ class Network():
return self.nics
def get_netbox_type_for_nic(self, nic):
if nic.get('ethtool') is None:
return IFACE_TYPE_OTHER
if nic['ethtool']['speed'] == '10000Mb/s':
if nic['ethtool']['port'] == 'FIBRE':
return IFACE_TYPE_10GE_SFP_PLUS