diff options
author | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2018-05-29 09:31:23 +0900 |
---|---|---|
committer | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2018-06-13 13:50:30 +0900 |
commit | 0c334f5b3f8d330ced71649316c894119b2432d3 (patch) | |
tree | fe85e3e7e2bba38548d3519ff5373cedc9e8ff1f /client | |
parent | 4c63ed5d87f28ba2a829cec8cb65c01388a703ed (diff) |
gobgpd: Use gRPC APIs Instead of BgpServer functions
In order to integarate the setting via configuration files and via gRPC API,
This commit fixes gobgpd to use gRPC APIs
instead of using BgpServer functions directly, for consistency.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'client')
-rw-r--r-- | client/client.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/client/client.go b/client/client.go index 174d5659..37d68b49 100644 --- a/client/client.go +++ b/client/client.go @@ -507,23 +507,11 @@ func (cli *Client) AddVRF(name string, id int, rd bgp.RouteDistinguisherInterfac return err } - f := func(comms []bgp.ExtendedCommunityInterface) ([][]byte, error) { - var bufs [][]byte - for _, c := range comms { - buf, err := c.Serialize() - if err != nil { - return nil, err - } - bufs = append(bufs, buf) - } - return bufs, err - } - - importRT, err := f(im) + importRT, err := bgp.SerializeExtendedCommunities(im) if err != nil { return err } - exportRT, err := f(ex) + exportRT, err := bgp.SerializeExtendedCommunities(ex) if err != nil { return err } |