diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2018-12-24 10:13:00 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2018-12-24 10:13:00 +0900 |
commit | 8e7741a0a80a1bd15a343563a29142f755c29f3f (patch) | |
tree | afc4fc4b8fd11c9fbb6de2c248867e2f1bc94a2c /pkg/server | |
parent | 8d0a8b0ffa696a3838740fec7accc54ccfb452ab (diff) |
api: rename ValidationDetail to Validation
Let's simply use 'validation' because there is no other validation
structure.
We could add validation results from other than rpki so drop rpki name.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'pkg/server')
-rw-r--r-- | pkg/server/grpc_server.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go index ccdaa51c..cb93c599 100644 --- a/pkg/server/grpc_server.go +++ b/pkg/server/grpc_server.go @@ -102,12 +102,12 @@ func (s *server) ListPeer(r *api.ListPeerRequest, stream api.GobgpApi_ListPeerSe return s.bgpServer.ListPeer(ctx, r, fn) } -func newValidationFromTableStruct(v *table.Validation) *api.RPKIValidation { +func newValidationFromTableStruct(v *table.Validation) *api.Validation { if v == nil { - return &api.RPKIValidation{} + return &api.Validation{} } - return &api.RPKIValidation{ - Reason: api.RPKIValidation_Reason(v.Reason.ToInt()), + return &api.Validation{ + Reason: api.Validation_Reason(v.Reason.ToInt()), Matched: newRoaListFromTableStructList(v.Matched), UnmatchedAs: newRoaListFromTableStructList(v.UnmatchedAs), UnmatchedLength: newRoaListFromTableStructList(v.UnmatchedLength), @@ -122,7 +122,7 @@ func toPathAPI(binNlri []byte, binPattrs [][]byte, anyNlri *any.Any, anyPattrs [ Pattrs: anyPattrs, Age: t, IsWithdraw: path.IsWithdraw, - ValidationDetail: newValidationFromTableStruct(v), + Validation: newValidationFromTableStruct(v), Family: &api.Family{Afi: api.Family_Afi(nlri.AFI()), Safi: api.Family_Safi(nlri.SAFI())}, Stale: path.IsStale(), IsFromExternal: path.IsFromExternal(), |