Skip to content

Commit

Permalink
Fixed gNMI1.27 (openconfig#3351)
Browse files Browse the repository at this point in the history
* - Corrected TestGNMISampleMode as per README
- Added Deviation
- Fixed testbed association in metadata.textproto

"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\u2019s intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."

* - "gNMI-1.27"
- Changed to Logf before config
- Added Deviation
- Fixed testbed association in metadata.textproto
- Updated README with OC paths

    "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\u2019s intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."

* Removed lines 38-47 as per comment from Sergey Fomin as it is a no-op.
  • Loading branch information
basavarajnokia authored and ampattan committed Aug 23, 2024
1 parent 541bb73 commit 4ba7737
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
7 changes: 6 additions & 1 deletion feature/gnmi/subscribe/tests/gnmi_sample_mode_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@ Test to validate basic gNMI streaming telemetry works with `SAMPLE` mode.

The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here.

TODO(OCPATHS): Add paths

```yaml

paths:
## Config Paths ##
/interfaces/interface/config/description:

## State Paths ##
/interfaces/interface/state/description:

rpcs:
gnmi:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,14 @@ func TestGNMISampleMode(t *testing.T) {
p1Stream := samplestream.New(t, dut, gnmi.OC().Interface(p1.Name()).Description().State(), 10*time.Second)
defer p1Stream.Close()

desc := p1Stream.Next()
if desc == nil {
t.Errorf("Interface %q telemetry not received before config", p1.Name())
} else {
v, ok := desc.Val()
if !ok {
t.Errorf("Interface %q telemetry empty before config", p1.Name())
}
t.Logf("Description before config: %s", v)
}

gnmi.Replace(t, dut, gnmi.OC().Interface(p1.Name()).Config(), dutPort1.NewOCInterface(p1.Name(), dut))

desc = p1Stream.Next()
desc := p1Stream.Next()
if desc == nil {
t.Errorf("Interface %q telemetry not received after config", p1.Name())
} else {
v, ok := desc.Val()
t.Logf("Description from stream : %s", v)
if !ok {
t.Errorf("Interface %q telemetry empty after config", p1.Name())
}
Expand All @@ -69,6 +59,7 @@ func TestGNMISampleMode(t *testing.T) {
t.Errorf("Interface %q telemetry not received after description update", p1.Name())
} else {
v, ok := desc.Val()
t.Logf("Description from stream : %s", v)
if !ok {
t.Errorf("Interface %q telemetry empty after description update", p1.Name())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
uuid: "abcc6890-c3e1-4b0e-984e-749c85b54e5a"
plan_id: "gNMI-1.27"
description: "gNMI Sample Mode Test"
testbed: TESTBED_DUT
testbed: TESTBED_DUT_ATE_2LINKS
platform_exceptions: {
platform: {
vendor: ARISTA
Expand All @@ -18,3 +18,11 @@ platform_exceptions: {
isis_interface_afi_unsupported: true
}
}
platform_exceptions: {
platform: {
vendor: NOKIA
}
deviations: {
explicit_interface_in_default_vrf: true
}
}

0 comments on commit 4ba7737

Please sign in to comment.