2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-04-15 09:39:37 +00:00

List switches if known even without macs

The macs was only showing switches with currently known mac address.
Provide all the data (and perhaps a hook to geet errors later).
This commit is contained in:
Jarrod Johnson 2017-09-26 12:07:09 -04:00
parent f44eb412c5
commit 0741e3953e

View File

@ -416,8 +416,7 @@ def handle_read_api_request(pathcomponents):
elif pathcomponents[2] == 'by-switch':
if len(pathcomponents) == 3:
return [msg.ChildCollection(x + '/')
for x in sorted(list(_macsbyswitch))]
for x in sorted(list(_switchportmap))]
if len(pathcomponents) == 4:
return [msg.ChildCollection('by-port/')]
if len(pathcomponents) == 5: