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 /config/bgp_configs.go | |
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 'config/bgp_configs.go')
-rw-r--r-- | config/bgp_configs.go | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go index fbe829db..c8d61dca 100644 --- a/config/bgp_configs.go +++ b/config/bgp_configs.go @@ -15,8 +15,6 @@ package config -import "net" - // typedef for typedef bgp-types:rr-cluster-id-type type RrClusterIdType string @@ -148,7 +146,7 @@ type BmpServerState struct { type BmpServerConfig struct { // original -> gobgp:address //gobgp:address's original type is inet:ip-address - Address net.IP + Address string // original -> gobgp:port Port uint32 // original -> gobgp:route-monitoring-policy @@ -221,7 +219,7 @@ type RpkiServerState struct { type RpkiServerConfig struct { // original -> gobgp:address //gobgp:address's original type is inet:ip-address - Address net.IP + Address string // original -> gobgp:port Port uint32 // original -> gobgp:refresh-time @@ -541,13 +539,13 @@ type TransportState struct { LocalPort uint16 // original -> bgp-op:remote-address //bgp-op:remote-address's original type is inet:ip-address - RemoteAddress net.IP + RemoteAddress string // original -> bgp-op:remote-port //bgp-op:remote-port's original type is inet:port-number RemotePort uint16 // original -> gobgp:local-address //gobgp:local-address's original type is inet:ip-address - LocalAddress net.IP + LocalAddress string } //struct for container bgp:config @@ -562,7 +560,7 @@ type TransportConfig struct { PassiveMode bool // original -> gobgp:local-address //gobgp:local-address's original type is inet:ip-address - LocalAddress net.IP + LocalAddress string } //struct for container bgp:transport @@ -711,7 +709,7 @@ type NeighborState struct { PeerGroup string // original -> bgp:neighbor-address //bgp:neighbor-address's original type is inet:ip-address - NeighborAddress net.IP + NeighborAddress string // original -> bgp-op:session-state //bgp-op:session-state's original type is enumeration SessionState uint32 @@ -756,14 +754,14 @@ type NeighborConfig struct { PeerGroup string // original -> bgp:neighbor-address //bgp:neighbor-address's original type is inet:ip-address - NeighborAddress net.IP + NeighborAddress string } //struct for container bgp:neighbor type Neighbor struct { // original -> bgp:neighbor-address //bgp:neighbor-address's original type is inet:ip-address - NeighborAddress net.IP + NeighborAddress string // original -> bgp:neighbor-config Config NeighborConfig // original -> bgp:neighbor-state @@ -1339,7 +1337,7 @@ type GlobalState struct { As uint32 // original -> bgp:router-id //bgp:router-id's original type is inet:ipv4-address - RouterId net.IP + RouterId string // original -> bgp-op:total-paths TotalPaths uint32 // original -> bgp-op:total-prefixes @@ -1353,7 +1351,7 @@ type GlobalConfig struct { As uint32 // original -> bgp:router-id //bgp:router-id's original type is inet:ipv4-address - RouterId net.IP + RouterId string } //struct for container bgp:global @@ -1543,7 +1541,7 @@ type BgpConditions struct { OriginEq BgpOriginAttrType // original -> bgp-pol:next-hop-in //original type is list of inet:ip-address - NextHopIn []net.IP + NextHopIn []string // original -> bgp-pol:local-pref-eq LocalPrefEq uint32 // original -> bgp-pol:community-count @@ -1727,7 +1725,7 @@ type TagSets struct { type NeighborInfo struct { // original -> gobgp:address //gobgp:address's original type is inet:ip-address - Address net.IP + Address string } //struct for container rpol:neighbor-set |