[tests] replace ifconfig command with ip command in node.py (#7471)

This commit replaces `ifconfig` command with `ip` command in node.py
for testing. `ifconfig` is not available on BR when bind9 is disabled.
This commit is contained in:
Yi
2022-03-10 06:54:50 -08:00
committed by GitHub
parent 15d25eed7f
commit b34f2a3fd3
+2 -2
View File
@@ -3142,13 +3142,13 @@ class LinuxHost():
"""Enable the ethernet interface.
"""
self.bash(f'ifconfig {self.ETH_DEV} up')
self.bash(f'ip link set {self.ETH_DEV} up')
def disable_ether(self):
"""Disable the ethernet interface.
"""
self.bash(f'ifconfig {self.ETH_DEV} down')
self.bash(f'ip link set {self.ETH_DEV} down')
def get_ether_addrs(self):
output = self.bash(f'ip -6 addr list dev {self.ETH_DEV}')