summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-11 10:12:26 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-07-20 04:25:25 +0900
commite090609b146fdde93714e966aa8ec300b5842ba3 (patch)
treed198865abf0c5600b28a7648ca1aa233fa0953d2 /server/server.go
parentc31164d90d1728e8c565cb8348adad0316cc60db (diff)
move gRPC-related code in vrf.go to grpc_server.go
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/server.go b/server/server.go
index 5d1e2892..76d214b8 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1380,11 +1380,11 @@ func (server *BgpServer) handleVrfRequest(req *GrpcRequest) []*table.Path {
}
goto END
case REQ_GET_VRF:
- l := make([]*api.Vrf, 0, len(server.globalRib.Vrfs))
+ l := make([]*table.Vrf, 0, len(server.globalRib.Vrfs))
for _, vrf := range server.globalRib.Vrfs {
- l = append(l, vrf.ToApiStruct())
+ l = append(l, vrf.Clone())
}
- result.Data = &api.GetVrfResponse{Vrfs: l}
+ result.Data = l
case REQ_ADD_VRF:
msgs, result.ResponseErr = server.handleAddVrfRequest(req)
result.Data = &api.AddVrfResponse{}