summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-11 18:49:57 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-01-09 05:17:57 -0800
commit26c03bb779fbb59bb3de1c98a2c9d65e192b50bb (patch)
treef68629f1089561e494b26291bf3ec548c7eb93ef /server
parent6733b6afb27f3dd3943d8325d2656f9e98740c17 (diff)
tools: avoid adding a new option to bgpyang2golang.py and fix gobgp.yang
pyang has an internal flag "multiple_modules" to handle multiple yang modules. use it instead of introducing a new option --augment also, fix warnings and errors in gobgp.yang which were there but not has been detected for a while due to the usage of --augment. by using "multiple_modules" flag, pyang detected them. most notable error is wrong usage of list, which needs a key in its substatement. this patch adds key to some of them, and for others uses leaf-list instead. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/server.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/server/server.go b/server/server.go
index 280f0d8e..6d9306a6 100644
--- a/server/server.go
+++ b/server/server.go
@@ -182,11 +182,7 @@ func (server *BgpServer) Serve() {
if g.Zebra.Url == "" {
g.Zebra.Url = "unix:/var/run/quagga/zserv.api"
}
- redists := make([]string, 0, len(g.Zebra.RedistributeRouteTypeList))
- for _, t := range g.Zebra.RedistributeRouteTypeList {
- redists = append(redists, t.RouteType)
- }
- err := server.NewZclient(g.Zebra.Url, redists)
+ err := server.NewZclient(g.Zebra.Url, g.Zebra.RedistributeRouteType)
if err != nil {
log.Error(err)
}