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

398 commits

Author SHA1 Message Date
Matthias Hannig
6fe4505bde
Merge branch 'DECIX-develop' 2019-03-20 11:23:13 +01:00
Matthias Hannig
813b0dcfa8
added test target to makefile 2019-03-20 11:23:02 +01:00
Matthias Hannig
90ec5e278a
fixed obsolete test case 2019-03-20 11:19:11 +01:00
Matthias Hannig
e3c6f12275
Merge branch 'develop' of git://github.com/DECIX/birdwatcher into DECIX-develop 2019-03-20 11:13:43 +01:00
Matthias Hannig
e2a35393db
Merge pull request #1 from CTassisF/master
Change go get command from ecix to alice-lg on README.
2019-03-15 16:44:20 +01:00
Benedikt Rudolph
57389bd263 Increment version, add changelog for 1.12.4 2019-03-13 17:14:29 +01:00
Benedikt Rudolph
6a9a0ab17e Integrate redis backend with the Cache interface 2019-02-28 16:40:13 +01:00
Benedikt Rudolph
420f94928e Merge redis cache from 'upstream/master' into develop
Leave redis cache the way it is for now. Rework in future commits.
2019-02-28 15:11:31 +01:00
Benedikt Rudolph
5b24ea324b Merge branch 'feature/cache-backends' into develop
Add support for various cache backends in anticipation of the merge
with upstream/master that has the redis backend.
2019-02-28 14:17:03 +01:00
Benedikt Rudolph
bab2be0957 Avoid overwriting existing cache entry
also fix RoutesNoExport.
2019-03-13 15:35:39 +01:00
Benedikt Rudolph
75380807de Add test for memory cache backend
Improve error handling in case value can not be retrieved.
Either return the value and nil, or a value and an error.
2019-03-13 15:35:38 +01:00
Benedikt Rudolph
3e0bfbb0f5 Add feature cache backends
Add support for various cache backends in anticipation of the
merge with master that has an additional redis backend.
The current memory based cache backend is refactored to implement
the new interface.
2019-03-13 15:35:38 +01:00
Benedikt Rudolph
b68401e0e5 Merge branch 'upstream/master' into develop
Merge changes including version 1.11.0 of upstream.
Conflicts:
        README.md
        * Keep `birdwatcher` in the configuration path
        VERSION
        * Keep version to 1.12.3 from development at DE-CIX
        bird/bird.go
        * Keep the default order of arguments to birdc in RoutesFiltered() and RoutesNoExport()
        birdwatcher.go
        * Keep `gorilla/handlers` for HTTP logging
2019-02-28 09:17:41 +01:00
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