Skip to content

Commit

Permalink
added same change to otg for tests to be in-sync
Browse files Browse the repository at this point in the history
---
<sub>This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia’s intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind.</sub>
  • Loading branch information
MarcCharlebois committed Aug 7, 2024
1 parent 128bafa commit 333a3a4
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,21 @@ func TestLLDPDisabled(t *testing.T) {
func configureDUT(t *testing.T, name string, lldpEnabled bool) (*ondatra.DUTDevice, *oc.Lldp) {
node := ondatra.DUT(t, name)
p := node.Port(t, portName)
lldp := gnmi.OC().Lldp()
d := &oc.Root{}
lldp := d.GetOrCreateLldp()
llint := lldp.GetOrCreateInterface(p.Name())

gnmi.Replace(t, node, lldp.Enabled().Config(), lldpEnabled)
gnmi.Replace(t, node, gnmi.OC().Lldp().Enabled().Config(), lldpEnabled)

if lldpEnabled {
gnmi.Replace(t, node, lldp.Interface(p.Name()).Enabled().Config(), lldpEnabled)
gnmi.Replace(t, node, gnmi.OC().Lldp().Interface(p.Name()).Config(), llint)
}

if deviations.InterfaceEnabled(node) {
gnmi.Replace(t, node, gnmi.OC().Interface(p.Name()).Enabled().Config(), true)
}

return node, gnmi.Get(t, node, lldp.Config())
return node, gnmi.Get(t, node, gnmi.OC().Lldp().Config())
}

func configureATE(t *testing.T, otg *otg.OTG) gosnappi.Config {
Expand Down

0 comments on commit 333a3a4

Please sign in to comment.