1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-23 00:00:07 +01:00
Commit graph

256 commits

Author SHA1 Message Date
Benedikt Rudolph
4fd0b8a5cf Increment version, add changelog for 1.12.3 2019-03-13 09:29:59 +01:00
Benedikt Rudolph
850815fd0f Merge branch 'develop' into master for 1.12.3
Changes since last version:
* Fix community value misssing when parsing multiline communities
* Add a test case for the multiline community parsing
2019-03-13 09:29:59 +01:00
Benedikt Rudolph
244fb3d14d Increment version, add changelog for 1.12.2 2019-03-13 09:29:58 +01:00
Patrick Seeburger
12be0f9de3 Fixed a bug where a community was missing when parsing multiline communities.
Also added a test case for the multiline community parsing.
2019-03-13 09:29:58 +01:00
Benedikt Rudolph
01263e2fb9 Merge branch 'develop' into master for 1.12.2
Changes since last version:
* Removed unused OrigTTL attribute from cache info
2019-03-13 09:29:57 +01:00
Patrick Seeburger
49fb6882fa Removed unused OrigTTL attribute from cache info. 2019-03-13 09:29:57 +01:00
Benedikt Rudolph
56994baa6c Increment version, add changelog for 1.12.1 2019-03-13 09:29:56 +01:00
Benedikt Rudolph
67fdd4b95c Merge branch 'develop' into master for 1.12.1
Changes since last version:
* Parser: ignore whitespace at the end of the protocol line
* Fix parser tests failing
2019-03-13 09:29:56 +01:00
Patrick Seeburger
681fcc60ea Removed timestamp from logging output. 2019-03-13 09:29:55 +01:00
Patrick Seeburger
791b2a04ba Fixed the regular expression to not match white spaces at the end of
the protocol line.

Fixed the route sample which was failing the parser tests.
2019-03-13 09:29:55 +01:00
Benedikt Rudolph
2ce394c213 Increment version, add changelog for 1.12.0 2019-03-13 09:29:54 +01:00
Benedikt Rudolph
ffbd8f74a5 Merge branch 'develop' into master for 1.12.0
Changes since last version:
* Parser: Fix a bug when parsing 'BGP.*community' output spanning
 multiple lines.
* Fix the default config path to /etc/birdwatcher/birdwatcher.conf
2019-03-13 09:29:54 +01:00
Benedikt Rudolph
5e49d6d4a3 Fix default config path
Instead of /etc/birdwatcher the config file location was assumed to
be in etc/birdwatcher relative to the working directory at execution.
2019-03-13 09:29:53 +01:00
Patrick Seeburger
c1db0320e3 Implemented handling of multiline replies in case of BGP.*community 2019-03-13 09:29:53 +01:00
Benedikt Rudolph
ae298b73d0 Increment version, add changelog for 1.11.5 2019-03-13 09:29:52 +01:00
Benedikt Rudolph
85eac133e0 Merge branch 'develop' into master for 1.11.5
Changes since last version:
* Fix testcase for /protocols/bgp
* New birdc query 'RoutesFilteredCount()'
* Queue for birdc commands, prevents running the same birdc command
  multiple times in parallel on concurrent API requests.
* Cache: redesign cache structure, separation of Parsed and Meta cache
  * allows independent cache access
  * implement convenience methods for interaction with the cache
2019-03-13 09:29:52 +01:00
Patrick Seeburger
3eca6db998 Add "Last Error" to protocols bgp test case. 2019-03-13 09:29:51 +01:00
Patrick Seeburger
83628d4995 Cache refactoring, allow update before store
* Change the callback type to update the cache for RunAndParse()
  to be a pointer to the Parsed record, which allows updating the
  Parsed record before it will be stored inside the cache
2019-03-13 09:29:15 +01:00
Patrick Seeburger
01eb78117b Refactor use of the Meta Cache
* Update all functions that use the meta cache to only create
  their own records and also use GetCacheKey() to request the
  meta cache from other functions.
  * eliminates the need for Clear() -> removed
* Add two new birdc commands:
  * PipeRoutesFiltered()
  * PipeRoutesFilteredCount()
2019-03-13 09:29:15 +01:00
Patrick Seeburger
50a79e7f4f Add the GetCacheKey() function
This allows to determine the key in the cache, where the result of
specific functions are stored, without requiring to know what command
was executed by that function.
Also updated all functions to use GetCacheKey() to store Parsed
records.
2019-03-13 09:29:14 +01:00
Patrick Seeburger
d931094ce7 Introduce a new birdc query RoutesFilteredCount()
The query can be used to determine the exact number of filtered
(not exported) prefixes from a table towards a pipe protocol for
a certain neighbor (if multiple neighbors are connected to
the given table).
2019-03-13 09:29:14 +01:00
Patrick Seeburger
c3d0d16b48 Fixed a bug in RoutesDumpPerPeerTable()
The bug causes an early exit if the filtered routes for a protocol
can not be retrieved.
2019-03-13 09:29:14 +01:00
Patrick Seeburger
3e63268af3 Implement a RunQeue for birdc commands
This prevents running the same birdc command multiple times in
parallel.
2019-03-13 09:29:13 +01:00
Patrick Seeburger
ced455ef7b Cache redesign - Parsed and Meta cache separation
* seperate Parsed and Meta cache, so that they may be locked independently
* extend the RunAndParse() function to allow the caller to specify a
  callback which will update the Meta cache
* change all methods interacting with the Meta cache to use the
  callback for RunAndParse() to update the Meta cache
2019-03-13 09:28:59 +01:00
Benedikt Rudolph
68beddef10 Increment version, add changelog for 1.11.4 2019-02-22 14:12:28 +01:00
Benedikt Rudolph
5279fe862f Merge branch 'develop' into master for 1.11.4
Changes since last version:
* Fix race condition between main() and InstallRateLimitReset()
* Fix endpoint /routes/count/table now returns integer instead of routes
* Fix endpoint /routes/count/protocol now returns integer instead of routes
* Fix endpoint /routes/prefixed ignores URL paremeter
* Fix endpoint /symbols
* Fix TestParseProtocolBgp()
* Fix some filtered routes missing in /routes/dump
* Fix parser return correct type on error
* New endpoint for total number of best-paths '/routes/count/primary'
* Parser: support extended communities and test-cases
* Introduce new data structure for extended communities replacing the Parsed type
* Cache: avoid duplicate cache writes in Status()
2019-02-22 14:11:35 +01:00
Benedikt Rudolph
bf99b1d35c Increment version, add changelog for 1.11.3 2019-02-22 14:11:23 +01:00
Benedikt Rudolph
945e0446a0 Merge branch 'develop' into master for '1.11.3'
Changes since last version:
* Move code to Alice-LG GitHub organization
* Include caching information alongside ttl
* Repair endpoint 'protocols'
* Documentation on interpretation of route count numbers
* Improve example configuration
* Caching of parsed responses from birdc.
  Eliminates an additional parser run for cache hits.
* Fix quotes in arguments of birdc commands in Routes{Table,Lookup}* methods.
  This eliminates the "IP address expected" error in BIRD.
2019-02-22 14:09:27 +01:00
Patrick Seeburger
980fcff9c2 Changed the data structure for the extended communities to be a single
slice of {string, int64, int64} instead of a parsed record.
2019-02-22 14:07:11 +01:00
Patrick Seeburger
95cf1a71af Fixed a bug in the parser that would return an integer of the wrong type
(int vs. int64) in an error case.
2019-02-22 14:07:11 +01:00
Patrick Seeburger
7fd2dfd0cf Implement new endpoint /routes/count/primary 2019-02-22 14:07:10 +01:00
Patrick Seeburger
541ea6d84d Fix RoutesDumpPerPeerTable()
Fix RoutesDumpPerPeerTable to return results again and the filtered
routes.
2019-02-22 14:07:10 +01:00
Patrick Seeburger
c1a07cc985 Implemented support for parsing extended communities. 2019-02-22 14:07:10 +01:00
Patrick Seeburger
b7952f9061 Fix TestParseProtocolBgp()
Fix test method TestParseProtocolBgp() to match the output of the
current ProtocolsBgp() method wich returns Parsed records instead of a
string array.
2019-02-22 14:07:09 +01:00
Patrick Seeburger
08c63fc3a3 Fixed /routes/count/protocol Endpoint which was returning no data,
because the wrong parser was called.
2019-02-22 14:07:09 +01:00
Patrick Seeburger
6e8734fa90 Fixed /symbols endpoint. 2019-02-22 14:07:09 +01:00
Johannes Moos
439ee0d5d0 Fix RoutesPrefixed
This version ignored the prefix which is passed as an URL parameter.
2019-02-22 14:07:08 +01:00
Patrick Seeburger
b8b9b5d021 Fixed /routes/count/table Endpoint which was returning routes instead of
a route count because the wrong method was called.
2019-02-22 14:07:08 +01:00
Patrick Seeburger
4ffebab2c4 Fixed race condition between main() and InstallRateLimitReset(). 2019-02-22 14:07:08 +01:00
Benedikt Rudolph
337e2288e8 Add info on show route command 2019-02-22 14:07:07 +01:00
Patrick Seeburger
27fe2969d7 Avoid unnecessary cache writes in /status
Introduce check to avoid unneccesarry cache writes.
2019-02-22 14:07:07 +01:00
Benedikt Rudolph
e8cb296397 Add doc on interpretation of route count numbers
We hope to clarify with the given examples the semantics of route counts.
2019-02-22 14:07:07 +01:00
Patrick Seeburger
8a69b5ba98 Repair 'protocols' endpoint
* repair 'protocols' endpoint to return a meaningful JSON object
* improve example configuration file
2019-02-22 14:07:06 +01:00
Matthias Hannig
712510b3bc include caching information alongside ttl 2019-02-22 14:07:06 +01:00
Daniel Czerwonk
f82f265612 fixed vendoring 2019-02-22 14:06:37 +01:00
Benedikt Rudolph
fe6359aee5 Merge branch 'develop' into master for 1.11.2
Changes since last version:
* Parser: protocol parser can now parse all types of protocols
* Parser: improved parsing of route change statistics
* Add TLS support for the HTTP listener
* Configuration: add new option for TLS 'enable_tls', 'crt' and 'key'
* Improved logging of API requests, similar to a webserver
* Execute birdc in restricted mode 'birdc -r'
2019-02-22 08:26:07 +01:00
Benedikt Rudolph
7e38e5e3bd Merge branch 'develop' into master for 1.11.1
Changes since last version:
* Fix detection of BIRD v2.x.y
* Fix birdc command in RoutesFiltered
* Use worker-threads to parse in parallel.
  This speeds up parsing of large responses e.g. BGP full-table.
* Add flag "worker-pool-size" to control number of threads while parsing
* Configuration: add setting for ttl value to control caching of bird responses
* Configuration: change default location to /etc/birdwatcher
2019-02-22 08:21:00 +01:00
Benedikt Rudolph
0467c9795c Merge branch 'develop' into master for 1.11.0
Changes since last version:
* Parser: support BIRD v2.x with multiprotocol BGP and channels
* Parser: major refactoring
* Parser: decrease memory footprint
  * use io.Reader interface
  * use line-iterator for birdc output
* Detection of BIRD v1.6.x or BIRD v2.x
* Extend test coverage for IPv6
* Tests for BIRD v2.x and IPv4
* Dependencies managed by now managed by dep

Includes an updated CHANGELOG reaching back to 1.10.0.
2019-02-22 08:08:35 +01:00
Benedikt Rudolph
ac1c385048 Conclude de-ecixification 2019-02-20 17:27:02 +01:00
Benedikt Rudolph
821a4f869a Change Go import paths for alice-lg github org 2019-02-20 17:25:57 +01:00