From 6789989cb9700e5d703a06280d3c8fef2ab7b9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Dragi=C4=87?= Date: Sun, 14 Jan 2018 17:10:26 +0100 Subject: [PATCH 1/2] Rename ethernet switch arp command to mac --- gns3server/compute/dynamips/nodes/ethernet_switch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/dynamips/nodes/ethernet_switch.py b/gns3server/compute/dynamips/nodes/ethernet_switch.py index 6d044bcd..841a47c9 100644 --- a/gns3server/compute/dynamips/nodes/ethernet_switch.py +++ b/gns3server/compute/dynamips/nodes/ethernet_switch.py @@ -44,9 +44,9 @@ class EthernetSwitchConsole(EmbedShell): self._node = node @asyncio.coroutine - def arp(self): + def mac(self): """ - Show arp table + Show MAC address table """ res = 'Port Mac VLAN\n' result = (yield from self._node._hypervisor.send('ethsw show_mac_addr_table {}'.format(self._node.name))) From 5d86f063903709b7809ce97ebc41fb6f01241907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Dragi=C4=87?= Date: Sun, 14 Jan 2018 17:50:21 +0100 Subject: [PATCH 2/2] Rename ethernet switch arp command to mac, also rename in test --- tests/compute/dynamips/test_ethernet_switch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/compute/dynamips/test_ethernet_switch.py b/tests/compute/dynamips/test_ethernet_switch.py index 6089a634..a21e217c 100644 --- a/tests/compute/dynamips/test_ethernet_switch.py +++ b/tests/compute/dynamips/test_ethernet_switch.py @@ -20,7 +20,7 @@ from gns3server.compute.dynamips.nodes.ethernet_switch import EthernetSwitchCons from gns3server.compute.nios.nio_udp import NIOUDP -def test_arp_command(async_run): +def test_mac_command(async_run): node = AsyncioMagicMock() node.name = "Test" node.nios = {} @@ -30,7 +30,7 @@ def test_arp_command(async_run): node.nios[1].name = "Ethernet1" node._hypervisor.send = AsyncioMagicMock(return_value=["0050.7966.6801 1 Ethernet0", "0050.7966.6802 1 Ethernet1"]) console = EthernetSwitchConsole(node) - assert async_run(console.arp()) == \ + assert async_run(console.mac()) == \ "Port Mac VLAN\n" \ "Ethernet0 00:50:79:66:68:01 1\n" \ "Ethernet1 00:50:79:66:68:02 1\n"