get_arp_table unit tests on SG350X-48P
This commit is contained in:
1 parent
e232ad1ae9
commit
858636bf73
4 files changed
+47
-2
No files matched your search
+5
-2
@@ -135,10 +135,13 @@ class S350Driver(NetworkDriver):
|
|||||||
return uptime_sec
|
return uptime_sec
|
||||||
|
|
||||||
|
|
||||||
def get_arp_table(self):
|
def get_arp_table(self, vrf = None):
|
||||||
"""
|
"""
|
||||||
Get the ARP table, the age isn't readily available so we leave that out for now.
|
Get the ARP table, the age isn't readily available so we leave that out for now.
|
||||||
|
|
||||||
|
vrf is needed for test - no support on s350
|
||||||
"""
|
"""
|
||||||
|
|
||||||
arp_table = []
|
arp_table = []
|
||||||
|
|
||||||
output = self._send_command('show arp')
|
output = self._send_command('show arp')
|
||||||
@@ -161,7 +164,7 @@ class S350Driver(NetworkDriver):
|
|||||||
'interface': interface,
|
'interface': interface,
|
||||||
'mac': napalm.base.helpers.mac(mac),
|
'mac': napalm.base.helpers.mac(mac),
|
||||||
'ip': ip,
|
'ip': ip,
|
||||||
'age': 0,
|
'age': 0.0,
|
||||||
}
|
}
|
||||||
|
|
||||||
arp_table.append(entry)
|
arp_table.append(entry)
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{"interface": "te1/0/1", "mac": "00:00:0C:07:AC:01", "ip": "19.51.0.1", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "E4:C7:22:FE:E0:43", "ip": "19.51.0.2", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "BC:EA:FA:B4:15:AA", "ip": "19.51.0.5", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "BC:EA:FA:B4:14:6F", "ip": "19.51.0.3", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "5C:8A:38:2E:BD:C0", "ip": "19.51.0.1", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "5C:8A:38:2E:FD:E0", "ip": "19.51.0.8", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "00:50:56:93:19:B7", "ip": "19.51.1.4", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "00:50:56:92:2F:CB", "ip": "19.51.1.5", "age": 0.0},
|
||||||
|
{"interface": "vlan 852", "mac": "00:50:56:9E:51:F3", "ip": "19.51.1.2", "age": 0.0},
|
||||||
|
{"interface": "vlan 852", "mac": "A4:4C:C8:7D:37:03", "ip": "19.51.14.5", "age": 0.0}
|
||||||
|
]
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{"interface": "te1/0/1", "mac": "00:00:0C:07:AC:01", "ip": "19.51.0.1", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "E4:C7:22:FE:E0:43", "ip": "19.51.0.2", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "BC:EA:FA:B4:15:AA", "ip": "19.51.0.5", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "BC:EA:FA:B4:14:6F", "ip": "19.51.0.3", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "5C:8A:38:2E:BD:C0", "ip": "19.51.0.1", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "5C:8A:38:2E:FD:E0", "ip": "19.51.0.8", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "00:50:56:93:19:B7", "ip": "19.51.1.4", "age": 0.0},
|
||||||
|
{"interface": "te1/0/1", "mac": "00:50:56:92:2F:CB", "ip": "19.51.1.5", "age": 0.0},
|
||||||
|
{"interface": "vlan 852", "mac": "00:50:56:9E:51:F3", "ip": "19.51.1.2", "age": 0.0},
|
||||||
|
{"interface": "vlan 852", "mac": "A4:4C:C8:7D:37:03", "ip": "19.51.14.5", "age": 0.0}
|
||||||
|
]
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
Total number of entries: 10
|
||||||
|
|
||||||
|
|
||||||
|
VLAN Interface IP address HW address status
|
||||||
|
--------------------- --------------- ------------------- ---------------
|
||||||
|
vlan 852 te1/0/1 19.51.0.1 00:00:0c:07:ac:01 dynamic
|
||||||
|
vlan 852 te1/0/1 19.51.0.2 e4:c7:22:fe:e0:43 dynamic
|
||||||
|
vlan 852 te1/0/1 19.51.0.5 bc:ea:fa:b4:15:aa dynamic
|
||||||
|
vlan 852 te1/0/1 19.51.0.3 bc:ea:fa:b4:14:6f dynamic
|
||||||
|
vlan 852 te1/0/1 19.51.0.1 5c:8a:38:2e:bd:c0 dynamic
|
||||||
|
vlan 852 te1/0/1 19.51.0.8 5c:8a:38:2e:fd:e0 dynamic
|
||||||
|
vlan 852 te1/0/1 19.51.1.4 00:50:56:93:19:b7 dynamic
|
||||||
|
vlan 852 te1/0/1 19.51.1.5 00:50:56:92:2f:cb dynamic
|
||||||
|
vlan 852 19.51.1.2 00:50:56:9e:51:f3 dynamic
|
||||||
|
vlan 852 19.51.14.5 a4:4c:c8:7d:37:03 dynamic
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user