mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
ifquery --running should not display link attributes unless they are different then defaults.
Ticket: CM-9995 Reviewed By: julien Testing Done: Tested on amd64 hardnode Right now, ifquery -r shows link speed, duplex and autoneg current running values. This patch changes the behavior to not show link attributes unless they differ then the defaults for that interface.
This commit is contained in:
@@ -221,9 +221,10 @@ class ethtool(moduleBase,utilsBase):
|
||||
if not default_val:
|
||||
continue
|
||||
running_attr = self.get_running_attr(attr, ifaceobj)
|
||||
# if we can change it (have a default) then show it
|
||||
# otherwise, customers will show the running and save it to startup
|
||||
# which will result in errors (ethtool does not work on bonds, etc.)
|
||||
# Only show the link attributes if they differ from defaults
|
||||
# to see the defaults, we should implement another flag (--with-defaults)
|
||||
if default_val == running_attr:
|
||||
continue
|
||||
if running_attr:
|
||||
ifaceobj.update_config('link-%s'%attr, running_attr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user