gnmi_subscriptionlist_test - openconfig/featureprofiles GitHub Wiki
This is to test for gNMI Subscription to multiple paths with different SubscriptionMode in a single SubscriptionRequest message using the Subscriptionlist field. Goal here is to,
- Ensure that the NOS supports "Subscriptionlist" field with multiple
Subscriptionmessages and also supports the desiredSubscriptionmodeper path in eachSubscriptionmessage. - The tests also check if the DUT is responding back everytime with a
SubscriptionResponsemessage that has thesync_responsefield set totrue
GNMI-2.1: Verify single subscription request with a Subscriptionlist and different SubscriptionModes:
- Send a single
SubscribeRequestmessage to the DUT with a SubcriptionList and SubscriptionMode matching the "Telemetry Parameter Coverage" section below. UseStreammode for theSubcribeRequest. - Ensure that the implementation successfully allows subscription to all the paths mentioned below and a
SubscribeResponsemessage is received by the client with thesync_reponsefield set totrue. The RPC via which theSubscribeRequestwas recieved should eventually be closed by the client.
- In the "Telemetry Parameter coverage" section below, change the
Subscribemessage for each of the paths withSubscriptionModeasON_CHANGEtoTARGET_DEFINEDand the ones that areTARGET_DEFINEDtoSAMPLEw/ a sampe_interval of 10secs and send all the subscribe messages in a singleSubscribeRequestmessage to the DUT. Confirm that aSubscribeResponsemessage is received by the client with thesync_reponsefield set totrue. The client should then close the RPC session - Again, switch the
SubscriptionModein eachSubscriptionmessage to its original state i.e. fromTARGET_DEFINEDtoON_CHANGEand fromSAMPLEtoTARGET_DEFINEDand resend theSubscriptionRequestwithModeasSTREAM. Confirm that the DUT is responding back to the client with aSubscriptionResponseand theSync_Responsefield set totrue
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(OCPATH): Add component names to component paths.
paths:
## Config Paths ##
/interfaces/interface/config/enabled:
/interfaces/interface/subinterfaces/subinterface/config/enabled:
/interfaces/interface/subinterfaces/subinterface/ipv4/config/enabled:
/interfaces/interface/subinterfaces/subinterface/ipv6/config/enabled:
## State Paths: SubscriptionMode: TARGET_DEFINED ##
/interfaces/interface/state/counters/in-unicast-pkts:
/interfaces/interface/state/counters/in-broadcast-pkts:
/interfaces/interface/state/counters/in-multicast-pkts:
/interfaces/interface/state/counters/out-unicast-pkts:
/interfaces/interface/state/counters/out-broadcast-pkts:
/interfaces/interface/state/counters/out-multicast-pkts:
/interfaces/interface/state/counters/in-octets:
/interfaces/interface/state/counters/out-octets:
/interfaces/interface/state/counters/in-discards:
/interfaces/interface/state/counters/out-discards:
/interfaces/interface/state/counters/in-errors:
/interfaces/interface/state/counters/out-errors:
/interfaces/interface/state/counters/in-fcs-errors:
/qos/interfaces/interface/output/queues/queue/state/transmit-pkts:
/qos/interfaces/interface/output/queues/queue/state/transmit-octets:
/qos/interfaces/interface/output/queues/queue/state/dropped-pkts:
/components/component/integrated-circuit/backplane-facing-capacity/state/available-pct:
platform_type: [ "INTEGRATED_CIRCUIT" ]
/components/component/integrated-circuit/backplane-facing-capacity/state/consumed-capacity:
platform_type: [ "INTEGRATED_CIRCUIT" ]
/components/component/integrated-circuit/backplane-facing-capacity/state/total:
platform_type: [ "INTEGRATED_CIRCUIT" ]
## State Paths: SubscriptionMode: ON_CHANGE ##
/interfaces/interface/state/admin-status:
/lacp/interfaces/interface/members/member/interface:
/interfaces/interface/ethernet/state/mac-address:
/interfaces/interface/state/hardware-port:
/interfaces/interface/state/id:
/interfaces/interface/state/oper-status:
/interfaces/interface/state/forwarding-viable:
/interfaces/interface/ethernet/state/port-speed:
/components/component/integrated-circuit/state/node-id:
platform_type: [ "INTEGRATED_CIRCUIT" ]
/components/component/integrated-circuit/backplane-facing-capacity/state/total-operational-capacity:
platform_type: [ "INTEGRATED_CIRCUIT" ]
# TODO(OCPATH): Add component names to component paths.
#/components/component/state/parent:
#/components/component/state/oper-status:
rpcs:
gnmi:
gNMI.Subscribe:
Mode: [ "TARGET_DEFINED", "ON_CHANGE" ]
gNMI.Set: