summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-08-05 17:21:51 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-05 22:12:24 +0900
commitad4bfac371e545e2713e9157cc6e5f6af5278635 (patch)
tree46e44865c4b74af43c262f366c5fa3d0cb870b11 /tools
parent0b5bb073128b3000f383927a997d4a40d274f569 (diff)
config: change type of Prefix in the PrefixSet
Diffstat (limited to 'tools')
-rw-r--r--tools/config/example_toml.go3
-rw-r--r--tools/pyang_plugins/bgpyang2golang.py2
2 files changed, 2 insertions, 3 deletions
diff --git a/tools/config/example_toml.go b/tools/config/example_toml.go
index 51ab4ae6..4988f648 100644
--- a/tools/config/example_toml.go
+++ b/tools/config/example_toml.go
@@ -75,12 +75,11 @@ func main() {
func policy() config.RoutingPolicy {
- _, prefix1, _ := net.ParseCIDR("10.3.192.0/21")
ps := config.PrefixSet{
PrefixSetName: "ps1",
PrefixList: []config.Prefix{
config.Prefix{
- IpPrefix: *prefix1,
+ IpPrefix: "10.3.192.0/21",
MasklengthRange: "21..24",
}},
}
diff --git a/tools/pyang_plugins/bgpyang2golang.py b/tools/pyang_plugins/bgpyang2golang.py
index 9fe8a8ee..569cc9bf 100644
--- a/tools/pyang_plugins/bgpyang2golang.py
+++ b/tools/pyang_plugins/bgpyang2golang.py
@@ -501,7 +501,7 @@ _type_translation_map = {
'boolean': 'bool',
'empty': 'bool',
'inet:ip-address': 'net.IP',
- 'inet:ip-prefix': 'net.IPNet',
+ 'inet:ip-prefix': 'string',
'inet:ipv4-address': 'net.IP',
'inet:as-number': 'uint32',
'bgp-set-community-option-type' : 'string',