diff options
author | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2017-05-05 12:30:32 -0400 |
---|---|---|
committer | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2017-05-10 08:15:00 +0000 |
commit | 9b9a65d410bbf35730f4970932c7688203e096b1 (patch) | |
tree | 5a539d40d6190c20341ae7e5c4827e2c0bd532e2 /api/grpc_server.go | |
parent | 1f053c25c423c79471fbe1d5fb6c618bb67409df (diff) |
*: support replace-peer-as (aka as-override)
we use the term replace-peer-as instead of as-override
since openconfig is using it.
cli
```
$ gobgp n add <neighbor-addr> as <asn> replace-peer-as
```
config
```
neighbor:
config:
peer-as: <asn>
neighbor-address: <neighbor-addr>
as-path-options:
config:
replace-peer-as: true
```
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'api/grpc_server.go')
-rw-r--r-- | api/grpc_server.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go index e1a21f49..f9bdaf6a 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -172,6 +172,7 @@ func NewPeerFromConfigStruct(pconf *config.Neighbor) *Peer { Vrf: pconf.Config.Vrf, AllowOwnAs: uint32(pconf.AsPathOptions.Config.AllowOwnAs), RemovePrivateAs: removePrivateAs, + ReplacePeerAs: pconf.AsPathOptions.Config.ReplacePeerAs, }, Info: &PeerState{ BgpState: string(s.SessionState), @@ -864,6 +865,7 @@ func NewNeighborFromAPIStruct(a *Peer) (*config.Neighbor, error) { pconf.Config.NeighborInterface = a.Conf.NeighborInterface pconf.Config.Vrf = a.Conf.Vrf pconf.AsPathOptions.Config.AllowOwnAs = uint8(a.Conf.AllowOwnAs) + pconf.AsPathOptions.Config.ReplacePeerAs = a.Conf.ReplacePeerAs switch a.Conf.RemovePrivateAs { case PeerConf_ALL: |