Commit Graph

761 Commits

Author SHA1 Message Date
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
4ae9b32973 Fix #704, allow delete without device_auth
* This typically comes up when using a deployment.yml generated from
   some inventory source, the device disappears and can then no
   longer be deleted since netdisco-delete unnecessarily insists on
   needing a valid device_auth
2020-04-21 00:43:59 +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
b155be832d release 2.045002 2020-04-19 18:02:46 +01:00
Oliver Gorwits
b9c002477b allow swagger_path installed routes to be relocated 2020-04-19 18:00:15 +01:00
Oliver Gorwits
da33478504 try to make swagger safer with send_file 2020-04-19 11:22:28 +01:00
Oliver Gorwits
ed1cf3e2cd another swagger fix for non roothosting 2020-04-19 09:43:02 +01:00
Oliver Gorwits
4f0117e22c many fixes to swagger hosting to allow path relocation (part complete) 2020-04-18 17:26:04 +01:00
Oliver Gorwits
4f57a4d30a rename ports column in device table to be num_ports 2020-04-18 16:50:49 +01:00
Oliver Gorwits
11e8d7c001 release 2.045001 2020-04-18 09:48:33 +01:00
Oliver Gorwits
524f4792c3 restore port column needed for discovery 2020-04-18 09:47:05 +01:00
Oliver Gorwits
22edb6676f release 2.045000 2020-04-15 21:23:28 +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
Christian Ramseyer
a8a77a2df1 Change SSHCollector::NXOS to use expect (#707)
* $ssh->capture() aka. directly executing a command via
   ssh <device> <command> does not seem to work on NXOS7, maybe
   also others

 * changed this module to use Expect, successfully tested on
   NXOS6 - NXOS9
2020-03-19 13:01:34 +01:00
Oliver Gorwits
8b42fb3774 fix pod 2020-02-13 14:23:27 +00:00
Oliver Gorwits
912a971a75 tidy the Clavister module 2020-02-13 10:24:10 +00:00
Henningen
2d849e60ce Create Clavister.pm (#674) 2020-02-13 10:20:24 +00:00
Oliver Gorwits
c3a995a476 release 2.044015 2020-02-12 16:56:19 +00:00
Oliver Gorwits
ab6305b4cf default access list for device_auth should be ipv4 and ipv6 2020-02-12 16:55:16 +00:00
Oliver Gorwits
2827d24f02 change from MCE::Shared to MCE::Queue after resolution of crash bug 2020-02-09 10:00:36 +00:00
Oliver Gorwits
d35a29931a change from MCE::Queue to MCE::Shared to better handle signals 2020-02-04 21:34:00 +00:00
Oliver Gorwits
7e489432d8 release 2.044012 2020-02-01 13:27:03 +00:00
Christian Ramseyer
031c3e6d95 Optimize PortMAC query
* We meant well but it turns out that the array unnest and join is
  actually very slow, as the join arguments do not get pushed down
  into the CTE (in Postgres 9/10 at least, later versions remove some
  of the optimization barriers in that specifc type of query)
* This caused a seq scan on both device and device_port, and the query
  is executed many times during macsuck
* The query is now rewritten to use ANY (macaddr[]) and without CTE,
  which seems to be around 20x faster
2020-01-31 10:32:02 +01:00
Oliver Gorwits
b032ebc18e prevent Template::AutoFilter taking action on CSV output 2020-01-30 19:21:02 +00:00
Christian Ramseyer
16e451c77c Change IOSXR Expect close method
* we noticed some hanging SSH connections with soft_close (probably due to fds not being closed properly), so switched to hard_close instead
2020-01-28 17:43:06 +01:00
Christian Ramseyer
8dc35a1b84 Merge branch 'master' of https://github.com/netdisco/netdisco
* 'master' of https://github.com/netdisco/netdisco:
  release 2.044011
2020-01-27 21:08:51 +01:00
Christian Ramseyer
0938cd1651 New version of the IOSXR module using Expect
* The previous module only worked for 32-bit IOSXR, and already
  there some fiddling with the STDIN of the process was required
  when being run from netdisco-backend
* In 64-bit IOSXR, the STDIN workaround stopped working and
  created a stuck ssh process on every arpnip
* This new version uses Expect instead of plain SSH, so a proper
  pty is provided under any circumstances
* Successfully tested on recent 32- and 64-bit variants
2020-01-27 21:03:23 +01:00
Oliver Gorwits
9e32c2a7f0 release 2.044011 2020-01-26 21:46:09 +00:00
Christian Ramseyer
f2f5d908bb Fix regression from PR #680
Hi @ollyg! Unfortunately I have found some issues with the code we
finally released in #680:

* get_port_macs expects an array ref but values() returns array,
  so the code was never called due to the return unless... check
* When fw_mac_list had exactly two entries, only the second value
  was bound as a scalar to the parameter. This is probably due
  to the shorthand bind formats described in
  https://metacpan.org/pod/DBIx::Class::ResultSet#DBIC-BIND-VALUES,
  but I'm not a 100% on this.
* return unless now checks for an entry in the list, with the old
  check the statement was also executed for empty lists

In cases where only the device(_port)?.mac lookup worked for uplink
detection, users of 02.044005 - 010 might get a lot of uplinks not
labeled as such.
2020-01-26 22:08:49 +01:00
Oliver Gorwits
ae0f711682 release 2.044010 2020-01-25 18:09:18 +00:00
Oliver Gorwits
db6e89607d #696 complete implementation of #688 2020-01-25 18:07:43 +00:00
Oliver Gorwits
e09ae10fb3 release 2.044009 2020-01-23 18:47:30 +00:00
Oliver Gorwits
a2d1a04716 Merge branch 'master' of github.com:netdisco/netdisco 2020-01-23 18:45:02 +00:00
Oliver Gorwits
41bb30239c release 2.044008 2020-01-23 18:44:43 +00:00
antonc42
3d231ec135 new SSHCollector platform for Extreme VSP (#695)
This module works for Extreme (formerly Avaya) VSP switches running the
VOSS operating system. When using multiple VRFs, the default Arpnip does
not work.

The way to query the ARP tables of different VRFs is to append "::X" to
the end of the SNMP community string, where "X" is the VRF ID number.
Since Netdisco doesn't support querying with multiple community strings
at this time, this module uses SSH to query the ARP tables of all the
VRFs by default or select VRFs using the "vrfs" key in "device_auth"
(see documentation in the module for an example).
2020-01-23 16:06:06 +01:00
Oliver Gorwits
8cc4602f7e release 2.044007 2020-01-22 21:25:01 +00:00
Oliver Gorwits
bb46797201 smarter fix for vlan filter in netmap 2020-01-22 21:23:57 +00:00
Oliver Gorwits
1de0c415e1 release 2.044006 2020-01-22 21:19:54 +00:00
Oliver Gorwits
ee86e62ac7 fix bug in vlan filtered netmap, duplicate nodes 2020-01-22 21:19:04 +00:00
Oliver Gorwits
abf415a1ca release 2.044005 2020-01-19 15:31:03 +00:00
Oliver Gorwits
3044d7ebe6 fixes to make the PortMacs query work 2020-01-19 15:08:38 +00:00
Oliver Gorwits
e982aded09 add some protections to ACLs and an error log, following #686 2019-12-30 11:23:17 +00:00
Oliver Gorwits
e42c2135c4 fix #686 makerancidconf excluded setting should be (ACL) list not dict 2019-12-30 11:09:17 +00:00
Oliver Gorwits
241ecf3353 #524 ipinventory misses mac address for device ips 2019-12-22 23:31:40 +00:00
Oliver Gorwits
f7f2d2088b #81 avoid DEPRECATED single warning from DBIC 2019-12-22 09:07:12 +00:00
Oliver Gorwits
c282a5a565 #688 Amend vlan search to show number of ports actually using the vlan 2019-12-22 08:33:11 +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