diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-24 19:07:00 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-24 21:53:26 +0200 |
commit | 42df77762c8bc436a53350b44355c23e70f7d215 (patch) | |
tree | b633a0340d2f77fdb00fb545b25fe48a0fa99974 /python/vyos/ifconfig.py | |
parent | 065adc3ab2ee6262b4a1a85762697ac81fc5b084 (diff) | |
download | vyos-1x-42df77762c8bc436a53350b44355c23e70f7d215.tar.gz vyos-1x-42df77762c8bc436a53350b44355c23e70f7d215.zip |
Python/ifconfig: T1557: remove unused has_autoneg() from EthernetIf
Diffstat (limited to 'python/vyos/ifconfig.py')
-rw-r--r-- | python/vyos/ifconfig.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index d10015e2d..a155ce572 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -922,32 +922,6 @@ class EthernetIf(VLANIf): link = os.readlink('/sys/class/net/{}/device/driver/module'.format(self._ifname)) return os.path.basename(link) - - def has_autoneg(self): - """ - Not all drivers support autonegotiation. - - returns True -> Autonegotiation is supported by driver - False -> Autonegotiation is not supported by driver - - Example: - >>> from vyos.ifconfig import EthernetIf - >>> i = EthernetIf('eth0') - >>> i.has_autoneg() - 'True' - """ - regex = 'Supports auto-negotiation:[ ]\w+' - tmp = self._cmd('/sbin/ethtool {}'.format(self._ifname)) - tmp = re.search(regex, tmp.decode()) - - # Output is either 'Supports auto-negotiation: Yes' or - # 'Supports auto-negotiation: No' - if tmp.group().split(':')[1].lstrip() == "Yes": - return True - else: - return False - - def set_flow_control(self, enable): """ Changes the pause parameters of the specified Ethernet device. |