Add perm_hwaddr on Linux bonding slave nics (#19071)
This patch will additionally report the `perm_hwaddr` fact of a Linux bonding slave network interface. Related to issue #19067pull/4420/head
parent
455aff8436
commit
66818050b0
|
@ -2546,6 +2546,8 @@ class LinuxNetwork(Network):
|
||||||
path = os.path.join(path, 'bonding', 'all_slaves_active')
|
path = os.path.join(path, 'bonding', 'all_slaves_active')
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
interfaces[device]['all_slaves_active'] = get_file_content(path) == '1'
|
interfaces[device]['all_slaves_active'] = get_file_content(path) == '1'
|
||||||
|
if os.path.exists(os.path.join(path, 'bonding_slave')):
|
||||||
|
interfaces[device]['perm_macaddress'] = get_file_content(os.path.join(path, 'bonding_slave', 'perm_hwaddr'), default='')
|
||||||
if os.path.exists(os.path.join(path,'device')):
|
if os.path.exists(os.path.join(path,'device')):
|
||||||
interfaces[device]['pciid'] = os.path.basename(os.readlink(os.path.join(path,'device')))
|
interfaces[device]['pciid'] = os.path.basename(os.readlink(os.path.join(path,'device')))
|
||||||
if os.path.exists(os.path.join(path, 'speed')):
|
if os.path.exists(os.path.join(path, 'speed')):
|
||||||
|
|
Loading…
Reference in New Issue