Skip to content

Commit

Permalink
Add BGP neighbor description
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Nov 10, 2023
1 parent 526725c commit b7e16ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/agent/dozer/bcm/spec_vrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ var specVRFBGPNeighborEnforcer = &DefaultValueEnforcer[string, *dozer.SpecVRFBGP
Config: &oc.OpenconfigNetworkInstance_NetworkInstances_NetworkInstance_Protocols_Protocol_Bgp_Neighbors_Neighbor_Config{
NeighborAddress: ygot.String(name),
Enabled: value.Enabled,
Description: value.Description,
PeerAs: value.RemoteAS,
},
AfiSafis: &oc.OpenconfigNetworkInstance_NetworkInstances_NetworkInstance_Protocols_Protocol_Bgp_Neighbors_Neighbor_AfiSafis{
Expand Down Expand Up @@ -467,6 +468,7 @@ func unmarshalOCVRFs(ocVal *oc.OpenconfigNetworkInstance_NetworkInstances) (map[

bgp.Neighbors[neighborName] = &dozer.SpecVRFBGPNeighbor{
Enabled: neighbor.Config.Enabled,
Description: neighbor.Config.Description,
RemoteAS: neighbor.Config.PeerAs,
IPv4Unicast: ipv4Unicast,
L2VPNEVPN: l2vpnEVPN,
Expand Down
1 change: 1 addition & 0 deletions pkg/agent/dozer/dozer.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ type SpecVRFBGPNetwork struct{}

type SpecVRFBGPNeighbor struct {
Enabled *bool `json:"enabled,omitempty"`
Description *string `json:"description,omitempty"`
RemoteAS *uint32 `json:"remoteAS,omitempty"`
IPv4Unicast *bool `json:"ipv4Unicast,omitempty"`
L2VPNEVPN *bool `json:"l2vpnEvpn,omitempty"`
Expand Down

0 comments on commit b7e16ca

Please sign in to comment.