Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Traffic config failing with error "No port found for OTG device name ateSrc.BGP4.peer\" #149

Open
s-nandu opened this issue Aug 23, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@s-nandu
Copy link

s-nandu commented Aug 23, 2023

Using below code for configuring traffic flow

func configureOTGTraffic(t *testing.T, top gosnappi.Config, ate *ondatra.ATEDevice, rxNames []string) {
t.Helper()
t.Logf("Start otg traffic config")

otg := ate.OTG()
top.Flows().Clear().Items()

flowipv4 := top.Flows().Add().SetName(flow1)
flowipv4.Metrics().SetEnable(true)
flowipv4.TxRx().Device().
	SetTxNames([]string{ateSrc.Name + ".BGP4.peer"}).
	SetRxNames(rxNames)
flowipv4.Duration().SetChoice("fixed_packets")
flowipv4.Duration().FixedPackets().SetPackets(22000)
flowipv4.Size().SetFixed(512)
flowipv4.Rate().SetPps(100)

flowipv4.EgressPacket().Add().Ethernet()
vlanEgress := flowipv4.EgressPacket().Add().Vlan()
vlanTag := vlanEgress.Id().MetricTags().Add()
vlanTag.SetName("vlanTracking").SetOffset(0).SetLength(12)

e1 := flowipv4.Packet().Add().Ethernet()
e1.Src().SetValue(ateSrc.MAC)
v4 := flowipv4.Packet().Add().Ipv4()
v4.Src().SetValue(ateSrc.IPv4)
v4.Dst().Increment().SetStart(advertisedRoutesv4Net).SetCount(100)

t.Logf("Push otg traffic config")
otg.PushConfig(t, top)

}

  • SetTxNames and SetRxNames uses below values from previous config used for BGP neighbor

    iDut1Bgp4Peer := iDut1Bgp.Ipv4Interfaces().Add().SetIpv4Name(iDut1Ipv4.Name()).Peers().Add().SetName(Name + ".BGP4.peer")

Name + ".BGP4.peer" is = ateSrc.BGP4.peer here

Developed this automation using cPTX and cIXIA and it passes there, tried to use same script to verify on physical hardware and seeing the above mentioned issue

@arkajyoti-cloud arkajyoti-cloud added the bug Something isn't working label Mar 20, 2024
@PrasenjitAdhikary
Copy link

On each PushConfig, the previous config is overwritten with the new config. So, unless the BGP peers, referenced in the Flow configuration (TxNames & RxNames) are part of the current config, the error will appear.
Please confirm if BGP neighbors are part of the present config being pushed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants