mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 22:51:23 -07:00
Add speed link in gathered facts for Linux. (#15347)
This commit is contained in:
parent
8bbbe16d31
commit
92c6283e93
1 changed files with 4 additions and 0 deletions
|
@ -2271,6 +2271,10 @@ class LinuxNetwork(Network):
|
|||
interfaces[device]['all_slaves_active'] = get_file_content(path) == '1'
|
||||
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')):
|
||||
speed = get_file_content(os.path.join(path, 'speed'))
|
||||
if speed is not None:
|
||||
interfaces[device]['speed'] = int(speed)
|
||||
|
||||
# Check whether an interface is in promiscuous mode
|
||||
if os.path.exists(os.path.join(path,'flags')):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue