Closed yashikakn closed 2 years ago
@sezhang2 can you help with this question?
I tried "Loopback0" on a couple of different vendor platforms. It works fine.
I will make Loopback0 as the default and allow user to specify new name based on the vendor if needed.
I thought Juniper named the interface lo0. I can easily create a helper function in ondatra/netutil for returning the Loopback0 interface name specific to the vendor.
Yes. Juniper loopback interface is named as lo0. A helper function for returning the Loopback0 interface name specific to the vendor would be good. Thanks.
Here is the code I used:
lbIntf := "Loopback0"
if dut.Vendor() == ondatra.JUNIPER {
lbIntf = "lo0"
}
subintf := dut.Telemetry().Interface(lbIntf).Subinterface(0)
Done. You can now use netutil.LookbackInterface to get a Loopback interface name per vendor: https://github.com/openconfig/ondatra/blob/main/netutil/interface.go#L45
Fixed.
Hi, https://github.com/openconfig/featureprofiles/blob/main/feature/gnoi/tests/ping_test/ping_test.go#L99
lo0 := dut.Telemetry().Interface("Loopback0").Subinterface(0)
Was trying this script and seems the loopback interface name is hardcoded to "Loopback0" in Line 99. Could you please clarify on same as the name varies with Vendor?
Thanks.