|
@@ -457,12 +457,16 @@ angesprochen und sollte aus einer Mehrzahl von Gründen nicht
|
|
|
|
|
|
for nodeid in nodes:
|
|
|
node = nodes[nodeid]
|
|
|
- if ident == node.get('mac', '').lower() or \
|
|
|
- ident in [x.lower() for x in node.get('macs', [])]:
|
|
|
- answer.append('mac of node "%s" (id %s)' % (node.get('hostname', '?'), node.get('node_id')))
|
|
|
+ nodename = node.get('hostname', '?')
|
|
|
+ nodeinfo = 'node "%s" (id %s)' % (nodename, nodeid)
|
|
|
+
|
|
|
+ if ident == node.get('mac', '').lower():
|
|
|
+ answer.append('primary mac of ' + nodeinfo)
|
|
|
+ elif ident in [x.lower() for x in node.get('macs', [])]:
|
|
|
+ answer.append('mac of ' + nodeinfo)
|
|
|
|
|
|
if ident in [c.lower() for c in node.get('clients', [])]:
|
|
|
- answer.append('client at node "%s"' % node.get('hostname', '?'))
|
|
|
+ answer.append('client at ' + nodeinfo)
|
|
|
|
|
|
self.wfile.write(json.dumps(answers))
|
|
|
|