diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-05-16 11:41:04 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-05-22 12:10:07 +0900 |
commit | fa1378f58bb6306e0c327f2a69a798a46c9865a4 (patch) | |
tree | 688d42e6befce07837714d86383c65ce605bd5d4 | |
parent | d2840e6760b0a2576b9f4cab7bca0a1d10d8b84d (diff) |
bmp: Obsolete "both" option for route-monitoring-policy
Because of the introduction of "local-rib" and "all" options for
route-monitoring-policy, this patch obsoletes "both" option.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
-rw-r--r-- | docs/sources/bmp.md | 11 | ||||
-rw-r--r-- | server/bmp.go | 9 | ||||
-rw-r--r-- | tools/pyang_plugins/gobgp.yang | 2 |
3 files changed, 16 insertions, 6 deletions
diff --git a/docs/sources/bmp.md b/docs/sources/bmp.md index 6d835e85..574a23d9 100644 --- a/docs/sources/bmp.md +++ b/docs/sources/bmp.md @@ -25,7 +25,12 @@ Add `[bmp-servers]` session to enable BMP. port=11019 ``` -Flows can be post-policy, pre-policy, or both. Pre-policy flows are the default. +The supported route monitoring policy types are: +- pre-policy (Default) +- post-policy +- both (Obsoleted) +- local-rib +- all Enable post-policy support as follows: @@ -37,14 +42,14 @@ Enable post-policy support as follows: route-monitoring-policy = "post-policy" ``` -Enable both pre-policy and post-policy support as follows: +Enable all policies support as follows: ```toml [[bmp-servers]] [bmp-servers.config] address = "127.0.0.1" port=11019 - route-monitoring-policy = "both" + route-monitoring-policy = "all" ``` diff --git a/server/bmp.go b/server/bmp.go index 8d996cd3..df98ab66 100644 --- a/server/bmp.go +++ b/server/bmp.go @@ -113,10 +113,15 @@ func (b *bmpClient) loop() { if func() bool { ops := []WatchOption{WatchPeerState(true)} - if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_PRE_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH { + if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH { + log.WithFields( + log.Fields{"Topic": "bmp"}, + ).Warn("both option for route-monitoring-policy is obsoleted") + } + if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_PRE_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL { ops = append(ops, WatchUpdate(true)) } - if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_POST_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_BOTH { + if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_POST_POLICY || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL { ops = append(ops, WatchPostUpdate(true)) } if b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_LOCAL_RIB || b.typ == config.BMP_ROUTE_MONITORING_POLICY_TYPE_ALL { diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang index fd1551ea..47f34540 100644 --- a/tools/pyang_plugins/gobgp.yang +++ b/tools/pyang_plugins/gobgp.yang @@ -46,7 +46,7 @@ module gobgp { } enum BOTH { value 2; - description "send both pre and post-policy routes"; + description "!OBSOLETED! send both pre and post-policy routes"; } enum LOCAL-RIB { value 3; |