Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ecbcbb

Browse files
Replicate PR545/546 in OTG telemetry basic test
References: - openconfig#545 - openconfig#546
1 parent edb4a15 commit 6ecbcbb

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

feature/gnmi/otg_tests/telemetry_basic_check_test/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ following features:
2222
* /interfaces/interfaces/interface/state/admin-status
2323
* /interfaces/interfaces/interface/state/oper-status
2424

25+
* Interface physical channel
26+
27+
* Check interface physical-channel exists.
28+
* /interfaces/interface/state/physical-channel
29+
2530
* Interface status change
2631

2732
* Check admin-status and oper-status are correct after interface flapping.
@@ -122,6 +127,7 @@ No configuration coverage.
122127
* /interfaces/interface/state/hardware-port /interfaces/interface/state/id
123128
* /interfaces/interface/state/oper-status
124129
* /interfaces/interface/ethernet/state/port-speed
130+
* /interfaces/interface/state/physical-channel
125131
* /components/component/integrated-circuit/state/node-id
126132
* /components/component/state/parent
127133
* /interfaces/interface/state/counters/in-octets

feature/gnmi/otg_tests/telemetry_basic_check_test/telemetry_basic_check_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,17 @@ func TestInterfaceOperStatus(t *testing.T) {
144144
}
145145
}
146146

147+
func TestInterfacePhysicalChannel(t *testing.T) {
148+
dut := ondatra.DUT(t, "dut")
149+
dp := dut.Port(t, "port1")
150+
151+
phyChannel := gnmi.Get(t, dut, gnmi.OC().Interface(dp.Name()).PhysicalChannel().State())
152+
t.Logf("Got %q PhysicalChannel from telmetry: %v", dp.Name(), phyChannel)
153+
if len(phyChannel) == 0 {
154+
t.Errorf("Get(DUT port1 PhysicalChannel): got empty %v, want non-empty list", phyChannel)
155+
}
156+
}
157+
147158
func TestInterfaceStatusChange(t *testing.T) {
148159
dut := ondatra.DUT(t, "dut")
149160
dp := dut.Port(t, "port2")

0 commit comments

Comments
 (0)