Skip to content

Commit

Permalink
fix leaf constraint error and address family initialisation error (#3558
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ram-mac authored Nov 5, 2024
1 parent eaccc6c commit 55b08c4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ func bgpCreateNbr(t *testing.T, localAs, peerAs uint32, dut *ondatra.DUTDevice,
global := bgp.GetOrCreateGlobal()
global.RouterId = ygot.String(dutPort2.IPv4)
global.As = ygot.Uint32(localAs)
global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV4_UNICAST).Enabled = ygot.Bool(true)
global.GetOrCreateAfiSafi(oc.BgpTypes_AFI_SAFI_TYPE_IPV6_UNICAST).Enabled = ygot.Bool(true)

// Note: we have to define the peer group even if we aren't setting any policy because it's
// invalid OC for the neighbor to be part of a peer group that doesn't exist.
Expand Down Expand Up @@ -402,6 +404,11 @@ func TestAfiSafiOcDefaults(t *testing.T) {

t.Run("Configure DEFAULT network instance", func(t *testing.T) {
dutConfNIPath := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut))
name := deviations.DefaultNetworkInstance(dut)
c := gnmi.OC().NetworkInstance(deviations.DefaultNetworkInstance(dut))
gnmi.Update(t, dut, c.Config(), &oc.NetworkInstance{
Name: ygot.String(name),
})
gnmi.Replace(t, dut, dutConfNIPath.Type().Config(), oc.NetworkInstanceTypes_NETWORK_INSTANCE_TYPE_DEFAULT_INSTANCE)
})

Expand Down

0 comments on commit 55b08c4

Please sign in to comment.