diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-09 15:14:25 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-06-13 10:54:00 +0900 |
commit | 417f8ba6f54c4010b746d6262eb77683851f1db5 (patch) | |
tree | c546ea896f4488511832867165febdec3d995fa4 /client | |
parent | 84987fb8732b6d2cce89e4cbc4009f6341592ec9 (diff) |
api: Use api/attribute.proto structure in gRPC API
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'client')
-rw-r--r-- | client/client.go | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/client/client.go b/client/client.go index 04c52336..174d5659 100644 --- a/client/client.go +++ b/client/client.go @@ -357,7 +357,7 @@ type AddPathByStreamClient struct { func (c *AddPathByStreamClient) Send(paths ...*table.Path) error { ps := make([]*api.Path, 0, len(paths)) for _, p := range paths { - ps = append(ps, api.ToPathApi(p, nil)) + ps = append(ps, api.ToPathApiInBin(p, nil)) } return c.stream.Send(&api.InjectMrtRequest{ Resource: api.Resource_GLOBAL, @@ -419,21 +419,10 @@ func (cli *Client) deletePath(uuid []byte, f bgp.RouteFamily, vrfID string, path switch { case len(pathList) != 0: for _, path := range pathList { - nlri := path.GetNlri() - n, err := nlri.Serialize() - if err != nil { - return err - } - p := &api.Path{ - Nlri: n, - Family: uint32(path.GetRouteFamily()), - Identifier: nlri.PathIdentifier(), - LocalIdentifier: nlri.PathLocalIdentifier(), - } reqs = append(reqs, &api.DeletePathRequest{ Resource: resource, VrfId: vrfID, - Path: p, + Path: api.ToPathApi(path, nil), }) } default: |