Skip to content

Commit

Permalink
Vendor deviation fix for gnoi-4.1 (openconfig#2544)
Browse files Browse the repository at this point in the history
moved deviation after subint configs
"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."

Co-authored-by: Sergey Fomin <[email protected]>
  • Loading branch information
MarcCharlebois and LimeHat authored Jan 17, 2024
1 parent 11d67cb commit 84b7059
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions feature/gnoi/os/tests/osinstall/osinstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,6 @@ func watchStatus(t *testing.T, ic ospb.OS_InstallClient, standby bool) error {
func TestPushAndVerifyInterfaceConfig(t *testing.T) {

dut := ondatra.DUT(t, "dut")
if deviations.ExplicitInterfaceInDefaultVRF(dut) {
ocPortName := dut.Port(t, "port1").Name()
fptest.AssignToNetworkInstance(t, dut, ocPortName, deviations.DefaultNetworkInstance(dut), 0)
}

t.Logf("Create and push interface config to the DUT")
dutPort := dut.Port(t, "port1")
dutPortName := dutPort.Name()
Expand All @@ -440,6 +435,10 @@ func TestPushAndVerifyInterfaceConfig(t *testing.T) {
in := configInterface(dutPortName, dutAttrs.Desc, dutAttrs.IPv4, dutAttrs.IPv4Len, dut)
fptest.LogQuery(t, fmt.Sprintf("%s to Replace()", dutPort), dc, in)
gnmi.Replace(t, dut, dc, in)
if deviations.ExplicitInterfaceInDefaultVRF(dut) {
ocPortName := dut.Port(t, "port1").Name()
fptest.AssignToNetworkInstance(t, dut, ocPortName, deviations.DefaultNetworkInstance(dut), 0)
}

t.Logf("Fetch interface config from the DUT using Get RPC and verify it matches with the config that was pushed earlier")
if val, present := gnmi.LookupConfig(t, dut, dc).Val(); present {
Expand Down

0 comments on commit 84b7059

Please sign in to comment.