Add Nodes discovered through LLDP/CDP report

This commit is contained in:
Oliver Gorwits
2014-08-25 16:45:38 +01:00
parent 3b6ae9e58e
commit 4c08de9512
9 changed files with 116 additions and 41 deletions

View File

@@ -0,0 +1,12 @@
[% USE CSV -%]
[% CSV.dump([ 'Device' 'Port' 'Remote ID' 'Remote IP' 'Remote Port' 'Remote Type']) %]
[% FOREACH row IN results %]
[% mylist = [] %]
[% device = row.dns || row.name || row.ip %]
[% FOREACH col IN [ device row.port row.remote_id row.remote_ip row.remote_port row.remote_type ] %]
[% mylist.push(col) %]
[% END %]
[% CSV.dump(mylist) %]
[% END %]