summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/grpc_server.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-11-16 16:07:10 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-11-16 16:49:49 +0900
commit6b05d9db0f3e5aa2230d26083e800edc07b6d298 (patch)
tree5f48740cdce76c4c2d9daf9ca43011d1c417218a /pkg/server/grpc_server.go
parent8856dd599a7327bc099ed9cb4798539794d4dba7 (diff)
api: rename NlriAny in api.Path to Nlri
Also rename PathAttrsAny to PathAttrs. Both are the first choice rather than the binary format members. Support SortType member to ListPathRequest to add an option to return unordered paths. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg/server/grpc_server.go')
-rw-r--r--pkg/server/grpc_server.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go
index 54d4b28d..386fa45c 100644
--- a/pkg/server/grpc_server.go
+++ b/pkg/server/grpc_server.go
@@ -118,8 +118,8 @@ func toPathAPI(binNlri []byte, binPattrs [][]byte, anyNlri *any.Any, anyPattrs [
nlri := path.GetNlri()
t, _ := ptypes.TimestampProto(path.GetTimestamp())
p := &api.Path{
- Nlri: binNlri,
- Pattrs: binPattrs,
+ Nlri: anyNlri,
+ Pattrs: anyPattrs,
Age: t,
IsWithdraw: path.IsWithdraw,
ValidationDetail: newValidationFromTableStruct(v),
@@ -130,8 +130,8 @@ func toPathAPI(binNlri []byte, binPattrs [][]byte, anyNlri *any.Any, anyPattrs [
IsNexthopInvalid: path.IsNexthopInvalid,
Identifier: nlri.PathIdentifier(),
LocalIdentifier: nlri.PathLocalIdentifier(),
- AnyNlri: anyNlri,
- AnyPattrs: anyPattrs,
+ NlriBinary: binNlri,
+ PattrsBinary: binPattrs,
}
if s := path.GetSource(); s != nil {
p.SourceAsn = s.AS