1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-27 04:29:18 +00:00
Commit graph

1123 commits

Author SHA1 Message Date
Wilhelm Schonfeldt
5ace4fdf97 fix(plugins): improve type checking for structured output
- Split type checking into two separate conditions for clarity
- Add early return when output contains non-string objects
- Ensure structured output like MikrotikBGPRouteTable passes through unchanged
- Prevent AttributeError on .strip() for tuple containing structured data

Resolves remaining crashes when processing already-structured BGP route data.
2025-09-26 12:45:10 +02:00
Wilhelm Schonfeldt
10ab164ee6 fix(plugins): handle non-string output in MikroTik garbage plugin
- Add type checking to handle already-processed structured output
- Skip processing when output is not raw strings (e.g., BGPRouteTable objects)
- Prevents AttributeError when trying to call .strip() on tuple/structured data

Fixes crash when MikroTik garbage plugin runs after structured parsing plugins.
2025-09-26 12:40:55 +02:00
Wilhelm Schonfeldt
120af851d1 fix(plugins): improve MikroTik output cleaning for all directives
- Change MikrotikGarbageOutput to apply to ALL MikroTik platform commands using common=True
- Add specialized traceroute output cleaning to handle progressive output and paging prompts
- Remove interactive paging prompts (-- [Q quit|C-z pause])
- Deduplicate traceroute hops to show only final results
- Clean up command echoes and empty progress lines
- Apply to custom directives automatically without manual configuration

Fixes messy traceroute output with repeated progress updates and interactive prompts.
2025-09-26 12:30:27 +02:00
Wilhelm Schonfeldt
7a6388bd39 fix: Improve handling of missing data fields in MikroTik BGP parser
- Update MikroTik parser to return -1 for unavailable age data instead of "0"
- Change age property return type from string to int for consistency
- Enhance frontend Age component to display "N/A" when age is -1
- Improve MonoField component to handle empty/undefined values gracefully
- Add appropriate tooltips and styling for missing data indicators

This addresses the issue where MikroTik devices don't provide route age
and source RID information, ensuring the UI displays user-friendly
indicators instead of potentially misleading placeholder values.
2025-09-26 11:55:51 +02:00
Wilhelm Schonfeldt
b2a05994aa fix: Improve error message for community name validation and clean up test formatting 2025-09-26 11:49:27 +02:00
Wilhelm Schonfeldt
eabd98b606 feat: Add BGP community friendly names and enhance RPKI configuration
- Add new 'name' mode for BGP communities to append friendly names
  - New configuration option `structured.communities.mode: name`
  - Community mappings via `structured.communities.names` dictionary
  - Communities display as "65000:1000 - Upstream Any" in UI
  - Backward compatible with existing permit/deny modes

- Enhance RPKI configuration documentation
  - Document both Cloudflare and Routinator backend options
  - Add `structured.rpki.backend` and `structured.rpki.rpki_server_url` parameters
  - Clarify Routinator web API endpoint usage vs RTR port
  - Add comprehensive configuration examples

- Update structured output platform support
  - Document all supported platforms: Arista EOS, FRRouting, Huawei VRP, Juniper Junos, Mikrotik RouterOS/SwitchOS

- Frontend enhancements
  - Parse comma-separated community format in UI components
  - Display friendly names alongside community codes
  - Maintain existing functionality for communities without names

- Add validation and examples
  - Validate that 'name' mode has community mappings configured
  - Include example configuration and test cases
  - Generic examples using ASN 65000 instead of specific networks
2025-09-26 11:32:29 +02:00
Wilhelm Schonfeldt
e78685d8c6 Enhance MikroTik BGP route handling by adding BGPRoute import and simplifying BGPRouteTable initialization 2025-09-26 10:04:56 +02:00
Wilhelm Schonfeldt
ae6a1a0bb8 Refactor code for improved readability and consistency across multiple files using black 2025-09-26 09:43:06 +02:00
Wilhelm Schonfeldt
8131853daa Added broader support for external RPKI validation.
Expanded params config for rpki server URL and backend type for query switching and lookup handling.
Initial support for routinator server API endpoint.
2025-09-25 20:35:47 +02:00
Carlos Santos
b3d4834d3b
Update mikrotik.py rpki ajustado pelo wilhelm_pa 2025-09-17 17:00:45 -03:00
Carlos Santos
63da21b504
Update mikrotik.py 2025-09-13 15:53:27 -03:00
Carlos Santos
1dfe987a6e
Update bgp_route_huawei.py 2025-09-13 03:21:22 -03:00
Carlos Santos
0b5bcc37c1
Update huawei.py 2025-09-13 03:10:38 -03:00
Carlos Santos
64f48feda6
Update constants.py 2025-09-13 03:01:10 -03:00
Carlos Santos
cc4a54a487
Update huawei.py 2025-09-13 02:38:20 -03:00
Carlos Santos
d2e83c41f3
Update mikrotik.py 2025-09-13 02:37:53 -03:00
Carlos Santos
16af5ce591
Update mikrotik.py 2025-09-13 02:37:11 -03:00
Carlos Santos
840e916216
Update huawei.py 2025-09-13 02:35:17 -03:00
Carlos Santos
bee642697e
Create mikrotik.py 2025-09-13 00:19:57 -03:00
Carlos Santos
2eb9c409d6
Create huawei.py 2025-09-13 00:19:36 -03:00
Carlos Santos
d72e5f98a6
Create bgp_routestr_huawei.py 2025-09-13 00:17:51 -03:00
Carlos Santos
16c1674d7e
Create mikrotik_normalize_input.py 2025-09-13 00:17:00 -03:00
Carlos Santos
504c0f1463
Update mikrotik_garbage_output.py 2025-09-13 00:16:17 -03:00
Carlos Santos
4432f48f9b
Create bgp_routestr_mikrotik.py 2025-09-13 00:15:56 -03:00
Carlos Santos
ff0bed6257
Update __init__.py 2025-09-13 00:15:15 -03:00
Carlos Santos
7e66bbdf20
Update mikrotik.py 2025-09-13 00:13:24 -03:00
Carlos Santos
c2cf9e28c6
Update huawei.py 2025-09-13 00:12:34 -03:00
Carlos Santos
62a93c0e5f
Update mikrotik.py 2025-09-13 00:09:46 -03:00
Carlos Santos
ab514629f7
Update mikrotik.py 2025-09-13 00:09:06 -03:00
Carlos Santos
413c60e29f
Update ssh_netmiko.py 2025-09-13 00:04:44 -03:00
Jason Hall
c68b00423a
Update pnpm-workspace.yaml 2025-06-14 22:17:03 -04:00
Jason Hall
cf137bd7e8
format and lint 2025-06-14 21:44:20 -04:00
Jelson Stoelben Rodrigues
23522da754 fix: ensure query_target is transformed after validation
Transformation must occur after validation, or else the transformation will possibly make the validation fail
2025-06-09 21:37:14 -04:00
Jelson Stoelben Rodrigues
f67c676a2d feat: add Huawei BGP Route Input Plugin
Create builtin plugin to transform input field before passing to Huawei device
2025-06-09 21:37:14 -04:00
Jelson Stoelben Rodrigues
44f8faa1e5 fix: timeout when fetching bgp routes
Huawei has pagination by default and when the output exceeds 24 lines it expects the user to keep scrooling to display the output. This makes the netmiko time out. By passing "| no-more" the pagination will be disabled for the command
2025-06-09 21:37:14 -04:00
Chris Wiggins
51c7f9eef6 feat: Add FRR structured output for BGP Routes 2025-06-09 21:12:18 -04:00
GrandArcher
e6e11ee058
Update mikrotik.py (#292)
Fixed Mikrotik_BGPRoute to print all routes that contain {target} instead of having to be an exact match to {target}.
2025-06-06 05:36:54 -04:00
KyleM
2ba8b2c67c
Fix VyOS Directives. (#284)
* Fixed vyos directives syntax

* Trying raw output

* Switched from MTR to traceroute as hyperglass cannot handle the encoding of MTR output.
2025-06-06 05:25:42 -04:00
cooperwinser
c369af439d Removed Union import 2025-05-17 23:34:15 +10:00
cooperwinser
7135ec3c9c Fix: allow integer values in extCommunityListRaw field for Arista BGP parsing 2024-12-09 12:08:25 +11:00
cooperwinser
2ed949a7a4 Fix: allow integer values in extCommunityListRaw field for Arista BGP parsing 2024-12-09 11:53:19 +11:00
Matt Love
c2142ee76f
Merge pull request #264 from openxbr/main
Fix for IPv6 traceroute for juniper devices
2024-07-01 00:06:15 -04:00
thatmattlove
ec3c55aa81 prepare v2.0.4 2024-07-01 00:01:03 -04:00
thatmattlove
a5bc1ca8a0 fix formatting 2024-06-30 23:55:59 -04:00
thatmattlove
0f52bc438f closes #268: fix issue with mikrotik commands 2024-06-30 23:55:05 -04:00
thatmattlove
e0751311ba remove unnecessary logging 2024-06-30 23:54:37 -04:00
thatmattlove
f340e65082 fix BGP route validation 2024-06-30 23:33:06 -04:00
thatmattlove
41248231ae fix logging issues 2024-06-30 23:22:46 -04:00
thatmattlove
b617df24d1 fixes #267: fix response caching 2024-06-30 22:22:44 -04:00
thatmattlove
3b0abd5ba8 don't cache errors 2024-06-30 21:34:42 -04:00