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 #19067
This commit is contained in:
Christian Albrecht 2017-03-21 21:29:38 +01:00 committed by Adrian Likins
parent 455aff8436
commit 66818050b0

View file

@ -2546,6 +2546,8 @@ class LinuxNetwork(Network):
path = os.path.join(path, 'bonding', 'all_slaves_active')
if os.path.exists(path):
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')):
interfaces[device]['pciid'] = os.path.basename(os.readlink(os.path.join(path,'device')))
if os.path.exists(os.path.join(path, 'speed')):