handle ethtool not installed and add known limitations to README
This commit is contained in:
parent
15faf59182
commit
0c5ca003a6
3 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue