add device inventory by location report

This commit is contained in:
Eric A. Miller
2013-09-26 19:33:48 -04:00
parent 3a76021655
commit 8d903c9fe1
4 changed files with 87 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
[% USE CSV -%]
[% CSV.dump([ 'Location' 'Device' 'System Name' 'Vendor' 'Model' ]) %]
[% WHILE (row = results.next) %]
[% mylist = [] %]
[% device = row.dns || row.ip %]
[% FOREACH col IN [ row.location device row.name row.vendor row.model ] %]
[% mylist.push(col) %]
[% END %]
[% CSV.dump(mylist) %]
[% END %]