diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-03-03 12:23:43 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-03-03 12:23:43 +0900 |
commit | f0ae221b894fdd02f697f4fb6994623082e2175e (patch) | |
tree | a75e87baad198d843e5201099563713886edfb28 /tools | |
parent | d387fd92e71a42e243cedef32f0812c72474c418 (diff) |
update the whole code for the latest openconfig yang files
The modified openconfig yang files are available at:
https://github.com/osrg/yang/tree/gobgp
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/config/example_toml.go | 14 | ||||
-rw-r--r-- | tools/route-server/quagga-rsconfig.go | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/tools/config/example_toml.go b/tools/config/example_toml.go index dbcbd454..2d556637 100644 --- a/tools/config/example_toml.go +++ b/tools/config/example_toml.go @@ -1,31 +1,31 @@ package main import ( - "github.com/osrg/gobgp/config" "bytes" "fmt" "github.com/BurntSushi/toml" + "github.com/osrg/gobgp/config" "net" ) func main() { - b := config.BgpType{ - Global: config.GlobalType{ + b := config.Bgp{ + Global: config.Global{ As: 12332, RouterId: net.ParseIP("10.0.0.1"), }, - NeighborList: []config.NeighborType{ - config.NeighborType{ + NeighborList: []config.Neighbor{ + config.Neighbor{ PeerAs: 12333, NeighborAddress: net.ParseIP("192.168.177.32"), AuthPassword: "apple", }, - config.NeighborType{ + config.Neighbor{ PeerAs: 12334, NeighborAddress: net.ParseIP("192.168.177.33"), AuthPassword: "orange", }, - config.NeighborType{ + config.Neighbor{ PeerAs: 12335, NeighborAddress: net.ParseIP("192.168.177.34"), AuthPassword: "grape", diff --git a/tools/route-server/quagga-rsconfig.go b/tools/route-server/quagga-rsconfig.go index 31269d47..421b1f77 100644 --- a/tools/route-server/quagga-rsconfig.go +++ b/tools/route-server/quagga-rsconfig.go @@ -15,12 +15,12 @@ import ( type QuaggaConfig struct { id int - config *config.NeighborType - gobgpConfig *config.GlobalType + config *config.Neighbor + gobgpConfig *config.Global serverIP net.IP } -func NewQuaggaConfig(id int, gConfig *config.GlobalType, myConfig *config.NeighborType, server net.IP) *QuaggaConfig { +func NewQuaggaConfig(id int, gConfig *config.Global, myConfig *config.Neighbor, server net.IP) *QuaggaConfig { return &QuaggaConfig{ id: id, config: myConfig, @@ -46,15 +46,15 @@ func (qt *QuaggaConfig) Config() *bytes.Buffer { func create_config_files(nr int, outputDir string) { quaggaConfigList := make([]*QuaggaConfig, 0) - gobgpConf := config.BgpType{ - Global: config.GlobalType{ + gobgpConf := config.Bgp{ + Global: config.Global{ As: 65000, RouterId: net.ParseIP("192.168.255.1"), }, } for i := 1; i < nr+1; i++ { - c := config.NeighborType{ + c := config.Neighbor{ PeerAs: 65000 + uint32(i), NeighborAddress: net.ParseIP(fmt.Sprintf("10.0.0.%d", i)), AuthPassword: fmt.Sprintf("hoge%d", i), |