diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-01-29 11:30:47 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-05-31 16:19:01 +0900 |
commit | 0423ac05e9939ad8ecfefabd6b6de7d4dd4aaf8e (patch) | |
tree | 89863e0af3146d65bcd7e94aa1a2c1d78511061e /client/client.go | |
parent | d433ceb87af7ae593d5ebf97d64e1c104ae763e2 (diff) |
cli: Implement "neighbor update" command
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'client/client.go')
-rw-r--r-- | client/client.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/client.go b/client/client.go index d7a9521d..04c52336 100644 --- a/client/client.go +++ b/client/client.go @@ -198,8 +198,11 @@ func (cli *Client) DeleteNeighbor(c *config.Neighbor) error { return err } -//func (cli *Client) UpdateNeighbor(c *config.Neighbor) (bool, error) { -//} +func (cli *Client) UpdateNeighbor(c *config.Neighbor, doSoftResetIn bool) (bool, error) { + peer := api.NewPeerFromConfigStruct(c) + response, err := cli.cli.UpdateNeighbor(context.Background(), &api.UpdateNeighborRequest{Peer: peer, DoSoftResetIn: doSoftResetIn}) + return response.NeedsSoftResetIn, err +} func (cli *Client) ShutdownNeighbor(addr, communication string) error { _, err := cli.cli.ShutdownNeighbor(context.Background(), &api.ShutdownNeighborRequest{Address: addr, Communication: communication}) |