From f32673bbec2541226657653af1042d0500a52d00 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Thu, 9 Nov 2017 10:04:13 +0900 Subject: api: Activate address family using Peer.AfiSafis Currently, to configure per AFI-SAFI settings when adding neighbor via gRPC API, it is require to specify the both Peer.Families and Peer.AfiSafis fields. If Peer.Families is omitted, settings in Peer.AfiSafis are ignored and the given address families are not activated. This patch enables to configure per AFI-SAFI settings and activate the address family with only Peer.AfiSafis (without Peer.Families). Note: For the backward compatibility, if only Peer.Families is specified, this patch creates per AFI-SAFI settings with the default settings. Signed-off-by: IWASE Yusuke --- api/gobgp.pb.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'api/gobgp.pb.go') diff --git a/api/gobgp.pb.go b/api/gobgp.pb.go index 61cfd2fc..5e0c3461 100644 --- a/api/gobgp.pb.go +++ b/api/gobgp.pb.go @@ -2769,6 +2769,9 @@ func (*ValidateRibResponse) ProtoMessage() {} func (*ValidateRibResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{104} } type Peer struct { + // Note: Regarding to the consistency with OpenConfig model, a list of + // address family should be removed from here, and should be configured with + // the list of AfiSafi instead. Families []uint32 `protobuf:"varint,1,rep,packed,name=families" json:"families,omitempty"` ApplyPolicy *ApplyPolicy `protobuf:"bytes,2,opt,name=apply_policy,json=applyPolicy" json:"apply_policy,omitempty"` Conf *PeerConf `protobuf:"bytes,3,opt,name=conf" json:"conf,omitempty"` @@ -2950,7 +2953,7 @@ type PeerConf struct { RemoteCap [][]byte `protobuf:"bytes,11,rep,name=remote_cap,json=remoteCap,proto3" json:"remote_cap,omitempty"` LocalCap [][]byte `protobuf:"bytes,12,rep,name=local_cap,json=localCap,proto3" json:"local_cap,omitempty"` Id string `protobuf:"bytes,13,opt,name=id" json:"id,omitempty"` - // Note: Regarding to the consistency with OpenConfig mode, list of + // Note: Regarding to the consistency with OpenConfig model, list of // PrefixLimit should be removed from here, and list of PrefixLimit in // AfiSafi should be used instead. PrefixLimits []*PrefixLimit `protobuf:"bytes,14,rep,name=prefix_limits,json=prefixLimits" json:"prefix_limits,omitempty"` -- cgit v1.2.3