diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-12-06 10:20:09 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-12-29 14:47:06 +0900 |
commit | d01c1586b9b1a25965448f9e15a05d94f2b22a5f (patch) | |
tree | 744609e474a9561dab792b60ab70d82696ab691e /tools/pyang_plugins/bgpyang2golang.py | |
parent | 58946b7924840f1effc993e95440266479c668d5 (diff) |
config: use viper and support multiple configuration formats
// toml by default
$ gobgpd -f gobgpd.toml
// use -t to change configuration type
$ gobgpd -t yaml -f gobgpd.yaml
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'tools/pyang_plugins/bgpyang2golang.py')
-rw-r--r-- | tools/pyang_plugins/bgpyang2golang.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/pyang_plugins/bgpyang2golang.py b/tools/pyang_plugins/bgpyang2golang.py index 42e4e65e..ed02b451 100644 --- a/tools/pyang_plugins/bgpyang2golang.py +++ b/tools/pyang_plugins/bgpyang2golang.py @@ -528,9 +528,9 @@ _type_translation_map = { 'decimal64': 'float64', 'boolean': 'bool', 'empty': 'bool', - 'inet:ip-address': 'net.IP', + 'inet:ip-address': 'string', 'inet:ip-prefix': 'string', - 'inet:ipv4-address': 'net.IP', + 'inet:ipv4-address': 'string', 'inet:as-number': 'uint32', 'bgp-set-community-option-type' : 'string', 'identityref' : 'string', @@ -570,8 +570,6 @@ def generate_header(ctx): print _COPYRIGHT_NOTICE print 'package config' print '' - print 'import "net"' - print '' def translate_type(key): |