Commit Graph

151 Commits

Author SHA1 Message Date
Oliver Gorwits
dc1f76c1aa Feature to gather SNMP Walk, use as Pseudo Device, and Browse Objects
* fix anomalous name

* add gather worker

* fix encoding of binary storage

* store results back to job

* now parsing mbis report to translate

* fix the broken report parser

* rename gather to snapshot

* implement walk code copied from SNMP::Info

* can now bulkwalk and parse mibs report and store resolved walk in cache

* add func/glob aliasing broken

* better aliasing

* implement aliasing from globals and funcs

* fix regexp for matching netdisco-mibs report

* fake cache entry for all ND2 methods called, add comments

* also save to logs/snapshots/IP

* add doc for netdisco-do

* add is_pseudo column to device table

* support for loading cache for pseudo devices

* check for hrSystemUptime as well as sysUpTime for snmp connect

* display pseudo devices with yellow pill for name

* color all cells for layers for pseudo

* no need to b64 encode binary data in scalars as we b64 whole thing after

* tweaked uptime check

* store snapshot to database instead of Job

* expose snapshots in device details tab

* small ux improvements on snap download

* fixes for errors in subnet mask searching

* hide snapshot management for pseudo devices

* update to use new netdisco-mibs object cache

* update for new format oids file

* start of work on loading walk into db for browsing

* store values and meta

* add auto increment col and oid index to browser

* start web plugin for browser

* add virtual search for oid children

* have all oid in separte table (60 seconds load on my laptop)

* rename table and add relation

* store oid as int array

* fix sql for children

* make jstree start working

* working very slow tree expand

* fix to work when first displaying tree

* store both oid and oid_parts

* simplify SQL to speed up (more complicated perl)

* fix sql bug, add better index, prettify tree

* render the snmp node detail

* add node template, make scrollable, pretty print data values (insecure)

* store munge hint

* some dubious code to munge the data

* make sure to filter by IP on device_browser

* make safer the rendering of value data (but need to come back to key ordering)

* fix sorting on object values

* limit the opening of child nodes to keep response good and unclutter

* factor out the munge and make safer

* reject unknown mungers

* show the munger and option (not working) to change

* additional js for munge select

* complete custom munge

* change so that saving to database is only at CLI and on request

* hide snmp tab if no browser rows in the db

* add helpful message when no browser rows for the device

* stub handler for search and add recurse control

* working search

* minor ui fixes

* implement typeahead for leaf search

* limit rows in typeahead

* make sure device_browser is visited in delete and renumber

* add requirements for this branch

* update manifest

* make sure node search and typeahead are restricted to current device only
2021-11-06 07:47:29 +00:00
Oliver Gorwits
feeebe04cb explicit no-op layout so that layout hook gets triggered which makes API work 2021-10-19 09:06:43 +01:00
Oliver Gorwits
e4ac38871e #761 explicit null template layout for xhr/fetch snippets 2021-10-12 15:23:59 +01:00
Oliver Gorwits
7ba097ec18 #761 explicit null template layout for xhr/fetch snippets 2021-10-12 08:57:31 +01:00
Oliver Gorwits
d74bf2c59e try explicit null layout for device search 2021-10-06 22:29:01 +01:00
Oliver Gorwits
3e0ff9e134 #808 avoid dns for node search on IPish thing 2021-10-06 15:45:53 +01:00
Oliver Gorwits
0dbf1b73cb add a code path for unauthorized XHR 2021-10-06 09:07:35 +01:00
Oliver Gorwits
691cedb3c6 Hide portctl features in Device Ports where ACLs would not permit the action 2021-09-03 08:07:01 +01:00
Oliver Gorwits
2498d9766b #800 gather and report SNMP Chassis ID http://oid-info.com/cgi-bin/display?oid=1.3.6.1.4.1.9.3.6.3&a=display 2021-08-14 13:28:13 +01:00
Oliver Gorwits
f3478571a3 bug fix for #775 radius dict finding 2021-08-12 11:32:11 +01:00
Oliver Gorwits
d206b9ccbf a bunch of logic changes to allow tests to run standalone 2021-08-12 10:58:55 +01:00
Oliver Gorwits
485cfd24fa #775 redux - use bundled dictionary 2021-07-14 12:16:23 +01:00
Oliver Gorwits
0d1dc39d33 #788 use device.name instead of device.dns for pseudo devices 2021-07-14 12:04:29 +01:00
nick n
83a946d36e replace unicode nonbreaking space with ascii space (#794) 2021-06-23 22:00:33 +01:00
Oliver Gorwits
87160b8e13 API port methods do not work with Cisco style Fa1/0/1 port names 2021-02-15 22:12:54 +00:00
Oliver Gorwits
669eec46db Implement Hooks per #726 2020-12-23 11:18:38 +00:00
Oliver Gorwits
2b72233738 release 2.046004 2020-10-17 14:28:53 +01:00
Oliver Gorwits
c7b8c3bcbd #748 always call NetAddr::MAC->new() with named mac param 2020-10-17 13:05:46 +01:00
Oliver Gorwits
ef1e2616f1 #738 crash on wildcard search 2020-09-23 09:38:46 +01:00
Oliver Gorwits
31fc6e1ee5 #734 Multiple TACACS+/RADIUS servers now supported 2020-07-10 22:18:29 +01:00
Oliver Gorwits
fc4bd4b342 #732 Node Search via API for known node returns invalid or empty JSON
A few things going on here ... swagger submitting "false" query
params which intefered with truth testing by existence, and also the
Node search not using {results => {}} format response for template,
and also that response then containing DBIC objects which cannot be
translated to JSON without running HRI first.
2020-07-06 19:00:38 +01:00
Oliver Gorwits
f882f98319 #721 redux - better MAC address support in searching 2020-06-30 09:46:19 +01:00
Oliver Gorwits
88ce0d7f9a #721 redux - Port Search handles VLAN and MAC addr properly 2020-06-29 19:00:05 +01:00
Oliver Gorwits
170ea64b7e #722 manual topology should not allow same left and right port/device 2020-06-29 14:42:06 +01:00
Oliver Gorwits
3662899ede #721 search will trim whitespace and handle more MAC formats 2020-05-24 19:41:21 +01:00
Oliver Gorwits
0d3aec8c17 #715 fix crash on missing Accept Header 2020-05-15 11:53:09 +01:00
Oliver Gorwits
42bb6e548b #718 fix Node Search API endpoint 2020-05-15 11:44:01 +01:00
Oliver Gorwits
8acdb67346 minor bug fixes and cleanup 2020-05-15 11:35:12 +01:00
Christian Ramseyer
dcb45e4cad Fix previous commit
* revert unwanted commit of bogus Web/Plugin/Device/Modules.pm
 * commit actual fix for #710
2020-04-25 17:32:01 +02:00
Christian Ramseyer
5663f84917 Fix #710: overwrite invalid EntityMIB parents
Check the obtained EntityMIB tree for invalid parents, and
reassign these modules to the root of the tree so they don't
end up invisible
2020-04-25 17:21:21 +02:00
Christian Ramseyer
ec90e67ce5 Update IpInventory.pm
Remove superfluous oui.abbrev from IpInventory NodeIP vendor
2020-04-21 14:28:02 +02:00
Christian Ramseyer
48996661ce Add vendor to IP Inventory report (#714)
* request on mailing list by Adrian Sevcenco, 08.04.20,
   "[Netdisco] how to modify report: add column to ip inventory"
2020-04-20 11:21:06 +01:00
Oliver Gorwits
b9c002477b allow swagger_path installed routes to be relocated 2020-04-19 18:00:15 +01:00
Oliver Gorwits
dff26abc5c API implementation (#712)
* initial v0 creator

* working json api for generic reports

* add require login

* move report swagger into plugin, and set new default layout of noop

* require proper role and also use new util func

* start to tidy authn

* some work on cleaning up web authn

* clean up the authN checks

* fix bug

* fix the auth for api

* fixes to json handling

* set swagger sort order

* enable most reports for api endpoints

* fix doc

* add paramters to reports

* add missed report

* allow api_parameters in reports config

* reorganise api

* add vlan search

* add port search

* make sure to enable layout processing

* add device search

* add v1 to api paths

* add Node Search

* support api_responses

* add device object search; fix spurious ports field in device result class

* handle some plugins just returning undef if search fails

* errors from api seamlessley

* fix error in date range default

* more sensible default for prefix

* change order of endpoints in swagger-ui

* all db row classes can now TO_JSON

* add device_port api endpoint

* add device ports endpoint

* do not expand docs

* add swagger ui json tree formatter

* add all relations from Device table

* add port relations

* add nodes retrieve on device or vlan

* rename to GetAPIKey

* update config for previous commit
2020-04-15 21:15:52 +01:00
Oliver Gorwits
bb46797201 smarter fix for vlan filter in netmap 2020-01-22 21:23:57 +00:00
Oliver Gorwits
ee86e62ac7 fix bug in vlan filtered netmap, duplicate nodes 2020-01-22 21:19:04 +00:00
Oliver Gorwits
241ecf3353 #524 ipinventory misses mac address for device ips 2019-12-22 23:31:40 +00:00
Oliver Gorwits
d133eb97c2 #667 Network Map: Filter by VLAN doesnt work as expected 2019-12-22 00:16:04 +00:00
Oliver Gorwits
4268fff785 #681 Add href link to a device in a report 2019-12-21 23:08:02 +00:00
Oliver Gorwits
4030000b34 #687 Add an option to set main page after logging in 2019-12-21 22:24:19 +00:00
Oliver Gorwits
b04ffffc06 fix #679 unint error 2019-12-21 21:53:50 +00:00
Oliver Gorwits
4e3bfee214 Add TACACS+ support per #660 (#662) 2019-10-15 18:23:51 +01:00
Oliver Gorwits
ecc9c6f209 sort the os_ver in the web interface (#663) 2019-10-15 18:23:34 +01:00
Oliver Gorwits
d8d2471c09 #644 Device DNS Mismatch report broken by domain_suffix change 2019-09-04 13:33:12 +01:00
Oliver Gorwits
542837d266 #591 domain_suffix can be list and supports (simple) regexp
Squashed commit of the following:

commit 975e4c6afc
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 13:35:26 2019 +0100

    also support regexp in domain_suffix

commit 0a2b5c8fa2
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 13:17:17 2019 +0100

    fix rancid, graph, and nodemonitor

commit 6d881de3ff
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 13:11:54 2019 +0100

    improve docs and set default domain_suffix to be list

commit 1dcafc08a8
Merge: 9a752e02 14ac69dc
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 13:00:39 2019 +0100

    Merge branch 'master' into og-multiple-domain-suffix

commit 9a752e0298
Merge: c836619f 82a99ea9
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 09:45:25 2019 +0100

    Merge branch 'master' into og-multiple-domain-suffix

commit c836619f8c
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu Jun 13 07:52:45 2019 +0100

    hokey fix for nodes with domains

commit fed14bd810
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu Jun 13 07:02:09 2019 +0100

    basic implementation, rancid graph and nodemonitor missing
2019-09-03 13:35:43 +01:00
Oliver Gorwits
82a99ea94e #642 requests to /admin/unknown-thing do not get 404 2019-09-03 09:36:50 +01:00
Oliver Gorwits
2897eda684 #587 #561 update pseudo devices to better support ssh arpnip
this patch resets all pseudo devices to have no layer3 support but adds a
feature to the pseudo devices admin panel to enable layer3 support. it also
changes arpnip and arpwalk behaviour to always permit the action if layer3
is available (ignoring the vendor).

documentation will need updating to tell users to create pseudo devices
with layer3 support when they want to arpnip an unsupported platform.

arpnip with ssh/cli against a supported platform (one that can be discovered)
will continue to work normally.

Squashed commit of the following:

commit 9dad5be81d
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 09:03:53 2019 +0100

    allow pseudo with layer 3 to run arpnip

commit 7d97943fcd
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 08:59:10 2019 +0100

    allow pseudo devices with layer 2/3 capability

commit d1fdf574e3
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 08:55:41 2019 +0100

    move pseudo and layer checks to is_able from is_able_now

commit e0f72ef67d
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 08:51:42 2019 +0100

    ports defaults to one

commit 86ba01270c
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 08:50:45 2019 +0100

    add tooltip for arpnip toggle

commit cdd2470228
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue Sep 3 08:34:46 2019 +0100

    simplify template

commit 46236d68ea
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Sep 1 23:53:56 2019 +0100

    a fix up for pseudo devices which need layer 3

commit 016d249efc
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Sep 1 20:37:11 2019 +0100

    do not wrap buttons

commit 1ec1402e0c
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Sep 1 20:33:03 2019 +0100

    implement user settable layer-three service for pseudo devices

commit a267efa3d8
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Sep 1 18:39:22 2019 +0100

    only set layer if successful action

commit b108be5e23
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Sep 1 18:32:19 2019 +0100

    should defer SNMP against pseudo devices

commit 897ba3a629
Merge: e0ddbaab a7348900
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Sep 1 14:54:36 2019 +0100

    Merge branch 'master' into og-pseudo-vs-cli-arpnip

commit e0ddbaab08
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Aug 26 11:35:13 2019 +0100

    as last commit, for discover

commit 61f9c89040
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Aug 25 23:55:38 2019 +0100

    move pseudo and layer checks into is_*able functions

commit 8b010d4023
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Aug 25 18:38:11 2019 +0100

    any device completing macsuck/arpnip must have that layer

commit a11bce7863
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Aug 25 18:33:27 2019 +0100

    clean up device layers

commit d2661bff61
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Aug 25 18:18:02 2019 +0100

    first make arpnip behave like other jobs towards pseudo devices
2019-09-03 09:09:55 +01:00
Oliver Gorwits
86daf7174d add comments 2019-08-23 09:25:17 +01:00
Oliver Gorwits
52da945221 Merge branch 'master' of github.com:netdisco/netdisco 2019-08-22 17:41:06 +01:00
Alan Buxey
54a86112e4 fix raidus typo (#637)
radius not raidus
2019-08-22 14:25:24 +01:00