From 02b490170dbc2f05cd94f9732c364b922ab1f478 Mon Sep 17 00:00:00 2001 From: Wen Bo Li <50884368+wenovus@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:26:03 -0700 Subject: [PATCH] Convert and validate some READMEs to use the new YAML format. (#2903) * Convert and validate some READMEs to use the new YAML format. * Change YAML format of platform_type to list * Improve error messages * fix telemetry_basic_check_test (#2904) * fix telemetry_basic_check_test * enable workflow * fix basic check add int packet * enable workflow * revise yaml format * fix hw port path --------- Co-authored-by: Wen Bo Li <50884368+wenovus@users.noreply.github.com> * Make exempted readmes populatable via CLI flag * fix * Enable all validations after making fixes and adding TODOs for READMEs that require domain expertise or longer code perusing * fix typo * add component type for a few paths and fix static analysis errors * fix typo --------- Co-authored-by: Darren Loher --- .github/workflows/readme_oc_path_and_rpc.yml | 36 ++++- doc/test-requirements-template.md | 4 +- .../route_summary_counters_test/README.md | 20 ++- .../telemetry_basic_check_test/README.md | 97 +++++++----- .../README.md | 78 +++++----- .../telemetry_port_speed_test/README.md | 24 ++- .../tests/gnmi_sample_mode_test/README.md | 15 ++ .../gnmi_subscriptionlist_test/README.md | 98 +++++++----- feature/gnoi/os/tests/osinstall/README.md | 23 ++- .../README.md | 12 +- feature/gnoi/system/tests/ping_test/README.md | 11 ++ .../supervisor_switchover_test/README.md | 38 +++-- .../otg_tests/weighted_ecmp_test/README.md | 81 +++++----- .../README.md | 143 ++++++++---------- .../large_ip_packet_transmission/README.md | 23 +-- .../otg_tests/defaults_test/README.md | 14 ++ .../AccountingAuthenErrorMulti/README.md | 31 ++-- .../acctz/AccountingAuthenFailMulti/README.md | 30 ++-- .../acctz/AccountingAuthenFailUni/README.md | 30 ++-- .../acctz/AccountingPrivEscalation/README.md | 30 ++-- .../acctz/RecordHistoryTruncation/README.md | 24 +-- .../acctz/RecordPayloadTruncation/README.md | 14 +- .../gnsi/acctz/RecordSubscribeFull/README.md | 30 ++-- .../RecordSubscribeIdleTimeout/README.md | 16 +- .../RecordSubscribeIdleTimeoutDoA/README.md | 16 +- .../acctz/RecordSubscribeNongrpc/README.md | 26 ++-- .../acctz/RecordSubscribePartial/README.md | 24 +-- .../security/gnsi/authz/tests/authz/README.md | 13 ++ .../gnsi/certz/client_certificates/README.md | 14 +- .../server_certificate_rotation/README.md | 12 +- .../gnsi/certz/server_certificates/README.md | 12 +- .../security/gnsi/certz/test_data/README.md | 12 ++ .../gnsi/certz/trust_bundle/README.md | 13 +- .../certz/trust_bundle_rotation/README.md | 13 +- .../security/gnsi/credentialz/tests/README.md | 12 ++ .../basic_static_route_support_test/README.md | 56 +++---- feature/staticroute/tests/README.md | 51 ++++--- tools/internal/mdocspec/md_test.go | 14 +- tools/internal/mdocspec/ocspec.go | 53 +++++-- tools/internal/mdocspec/ocspec_test.go | 128 +++++++++++++++- .../validate_readme_spec/readme_allowlist.go | 23 --- .../validate_readme_spec.go | 45 ++++-- .../validate_readme_spec_test.sh | 10 +- 43 files changed, 934 insertions(+), 535 deletions(-) delete mode 100644 tools/validate_readme_spec/readme_allowlist.go diff --git a/.github/workflows/readme_oc_path_and_rpc.yml b/.github/workflows/readme_oc_path_and_rpc.yml index 1110244659f..b8d61a62a93 100644 --- a/.github/workflows/readme_oc_path_and_rpc.yml +++ b/.github/workflows/readme_oc_path_and_rpc.yml @@ -27,10 +27,40 @@ jobs: - name: Validate Template README run: | go install ./tools/validate_readme_spec - validate_readme_spec -alsologtostderr doc/test-requirements-template.md + validate_readme_spec --alsologtostderr doc/test-requirements-template.md - name: Validate Test READMEs run: | go install ./tools/validate_readme_spec - # TODO: Remove -feature-dir argument after all READMEs have converted to the new format. - validate_readme_spec -alsologtostderr -feature-dir feature/bgp/policybase/otg_tests/import_export_multi + + exemption_flags=( + --non-test-readme security/gnsi/certz/test_data/README.md + --non-test-readme experimental/p4rt/README.md + --non-test-readme feature/security/gnsi/acctz/README.md + ) + + # TODO: Just use this one line after all READMEs have converted to the new format. + # validate_readme_spec --alsologtostderr "${exemption_flags[@]}" + + function validate() { + validate_readme_spec --feature-dir "$1" --alsologtostderr "${exemption_flags[@]}" + } + + validate feature/gnoi/os + validate feature/networkinstance + validate feature/security + validate feature/bgp/policybase/otg_tests/import_export_multi + validate feature/aft/aft_summary/otg_tests/route_summary_counters_test + validate feature/gnmi/otg_tests/telemetry_basic_check_test + validate feature/gnmi/otg_tests/telemetry_interface_packet_counters_test + validate feature/gnmi/otg_tests/telemetry_port_speed_test + validate feature/gnmi/subscribe/tests/gnmi_sample_mode_test + validate feature/gnmi/subscribe/tests/gnmi_subscriptionlist_test + validate feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test + validate feature/gnoi/system/tests/ping_test + validate feature/gnoi/system/tests/supervisor_switchover_test + validate feature/isis/otg_tests/weighted_ecmp_test + validate feature/isis/static_route_isis_redistribution + validate feature/mtu/largeippacket/otg_tests/large_ip_packet_transmission + validate feature/staticroute/otg_tests/basic_static_route_support_test + validate feature/staticroute/tests diff --git a/doc/test-requirements-template.md b/doc/test-requirements-template.md index 5b0f61e89e5..4a4abfb4830 100644 --- a/doc/test-requirements-template.md +++ b/doc/test-requirements-template.md @@ -49,9 +49,9 @@ paths: # interface configuration /interfaces/interface/config/description: /interfaces/interface/config/enabled: - # name of chassis component + # name of chassis and linecard components /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS", "LINECARD"] rpcs: gnmi: diff --git a/feature/aft/aft_summary/otg_tests/route_summary_counters_test/README.md b/feature/aft/aft_summary/otg_tests/route_summary_counters_test/README.md index 96bf3776060..5b675caf6ce 100644 --- a/feature/aft/aft_summary/otg_tests/route_summary_counters_test/README.md +++ b/feature/aft/aft_summary/otg_tests/route_summary_counters_test/README.md @@ -14,15 +14,24 @@ Establish eBGP sessions between ATE:port1 and DUT:port1 and another between ATE: * Advertise prefixes from ATE port-1, observe received prefixes at ATE port-2 for IPv4 and IPv6 * Validate total number of entries of AFT for IPv4 and IPv6 -## Config Parameter Coverage +## OpenConfig Path and RPC Coverage +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Parameter Coverage +```yaml +paths: + ## Config Paths ## -/network-instances/network-instance/afts/aft-summaries/ipv4-unicast/protocols/protocol/state/counters/aft-entries -/network-instances/network-instance/afts/aft-summaries/ipv6-unicast/protocols/protocol/state/counters/aft-entries + ## State Paths ## + /network-instances/network-instance/afts/aft-summaries/ipv4-unicast/protocols/protocol/state/counters/aft-entries: + /network-instances/network-instance/afts/aft-summaries/ipv6-unicast/protocols/protocol/state/counters/aft-entries: -## Protocol/RPC Parameter Coverage +rpcs: + gnmi: + gNMI.Subscribe: +``` + +## Control Protocol Coverage BGP IS-IS @@ -30,4 +39,3 @@ IS-IS ## Minimum DUT Platform Requirement vRX - diff --git a/feature/gnmi/otg_tests/telemetry_basic_check_test/README.md b/feature/gnmi/otg_tests/telemetry_basic_check_test/README.md index 1a03ef14a45..cba1d2f1d08 100644 --- a/feature/gnmi/otg_tests/telemetry_basic_check_test/README.md +++ b/feature/gnmi/otg_tests/telemetry_basic_check_test/README.md @@ -12,10 +12,10 @@ following features: * Ethernet interface * Check the telemetry port-speed exists with correct speed. - * /interfaces/interfaces/interface/ethernet/state/port-speed + * /interfaces/interfaces/interface/ethernet/state/port-speed * Check the telemetry mac-address with correct format. * /interfaces/interfaces/interface/ethernet/state/mac-address - + * Interface status @@ -114,42 +114,65 @@ following features: * Check the following path exists with correct node ID. * /components/component/integrated-circuit/state/node-id -## Config Parameter coverage - -No configuration coverage. - -## Telemetry Parameter coverage - -* /interfaces/interface/state/admin-status -* /lacp/interfaces/interface/members/member -* /interfaces/interface/ethernet/state/mac-address -* /interfaces/interface/state/hardware-port /interfaces/interface/state/id -* /interfaces/interface/state/oper-status -* /interfaces/interface/ethernet/state/port-speed -* /interfaces/interface/state/physical-channel -* /components/component/integrated-circuit/state/node-id -* /components/component/state/parent -* /interfaces/interface/state/counters/in-octets -* /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/in-discards -* /interfaces/interface/state/counters/in-errors -* /interfaces/interface/state/counters/in-fcs-errors -* /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/out-octets -* /interfaces/interface/state/counters/out-discards -* /interfaces/interface/state/counters/out-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 -* /qos/interfaces/interface/output/queues/queue/state/dropped-octets - -## Protocol/RPC Parameter coverage +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. + +```yaml +paths: + ## Config Paths ## + # None + + ## State Paths ## + /interfaces/interface/state/admin-status: + /lacp/interfaces/interface/members/member/state/interface: + /lacp/interfaces/interface/members/member/state/counters/lacp-in-pkts: + /lacp/interfaces/interface/members/member/state/counters/lacp-out-pkts: + /lacp/interfaces/interface/members/member/state/aggregatable: + /lacp/interfaces/interface/members/member/state/collecting: + /lacp/interfaces/interface/members/member/state/distributing: + /lacp/interfaces/interface/members/member/state/partner-id: + /lacp/interfaces/interface/members/member/state/partner-key: + /lacp/interfaces/interface/members/member/state/partner-port-num: + /interfaces/interface/ethernet/state/mac-address: + /interfaces/interface/state/hardware-port: + /interfaces/interface/state/id: + /interfaces/interface/state/oper-status: + /interfaces/interface/ethernet/state/port-speed: + /interfaces/interface/state/physical-channel: + /components/component/integrated-circuit/state/node-id: + platform_type: [ "INTEGRATED_CIRCUIT" ] + /components/component/state/parent: + platform_type: [ + "CONTROLLER_CARD", + "LINECARD", + "FABRIC", + "POWER_SUPPLY", + "INTEGRATED_CIRCUIT" + ] + /interfaces/interface/state/counters/in-octets: + /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/in-discards: + /interfaces/interface/state/counters/in-errors: + /interfaces/interface/state/counters/in-fcs-errors: + /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/out-octets: + /interfaces/interface/state/counters/out-discards: + /interfaces/interface/state/counters/out-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: + /qos/interfaces/interface/output/queues/queue/state/dropped-octets: + +rpcs: + gnmi: + gNMI.Subscribe: +``` -N/A ## Minimum DUT platform requirement diff --git a/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/README.md b/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/README.md index 65a8fb605dd..b44dab58262 100644 --- a/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/README.md +++ b/feature/gnmi/otg_tests/telemetry_interface_packet_counters_test/README.md @@ -59,49 +59,41 @@ following features: * TODO: /interfaces/interface/state/cpu * TODO: /interfaces/interface/state/management -## Config Parameter coverage - -* /interfaces/interface/config/enabled -* /interfaces/interface/subinterfaces/subinterface/config/enabled -* /interfaces/interface/subinterfaces/subinterface/ipv4/config/enabled -* /interfaces/interface/subinterfaces/subinterface/ipv6/config/enabled - -## Telemetry Parameter coverage - -* /interfaces/interface/state/counters/in-pkts -* /interfaces/interface/state/counters/out-pkts - -* /interfaces/interface/subinterfaces/subinterface]/ipv4/state/counters/in-pkts - -* /interfaces/interface/subinterfaces/subinterface]/ipv4/state/counters/out-pkts - -* /interfaces/interface/subinterfaces/subinterface]/ipv6/state/counters/in-pkts - -* /interfaces/interface/subinterfaces/subinterface]/ipv6/state/counters/out-pkts - -* /interfaces/interface/subinterfaces/subinterface]/ipv6/state/counters/in-discarded-pkts - -* /interfaces/interface/subinterfaces/subinterface]/ipv6/state/counters/out-discarded-pkts - -* /interfaces/interface/ethernet/state/counters/in-maxsize-exceeded - -* /interfaces/interface/ethernet/state/counters/in-mac-pause-frames - -* /interfaces/interface/ethernet/state/counters/out-mac-pause-frames - -* /interfaces/interface/ethernet/state/counters/in-crc-errors - -* /interfaces/interface/ethernet/state/counters/in-fragment-frames - -* /interfaces/interface/ethernet/state/counters/in-jabber-frames - -* /interfaces/interface/state/cpu - -* /interfaces/interface/state/management - -## Protocol/RPC Parameter coverage - -No coverage +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. + +```yaml +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 ## + /interfaces/interface/state/counters/in-pkts: + /interfaces/interface/state/counters/out-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv4/state/counters/in-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv4/state/counters/out-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/in-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/out-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/in-discarded-pkts: + /interfaces/interface/subinterfaces/subinterface/ipv6/state/counters/out-discarded-pkts: + /interfaces/interface/ethernet/state/counters/in-maxsize-exceeded: + /interfaces/interface/ethernet/state/counters/in-mac-pause-frames: + /interfaces/interface/ethernet/state/counters/out-mac-pause-frames: + /interfaces/interface/ethernet/state/counters/in-crc-errors: + /interfaces/interface/ethernet/state/counters/in-fragment-frames: + /interfaces/interface/ethernet/state/counters/in-jabber-frames: + /interfaces/interface/state/cpu: + /interfaces/interface/state/management: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Minimum DUT platform requirement diff --git a/feature/gnmi/otg_tests/telemetry_port_speed_test/README.md b/feature/gnmi/otg_tests/telemetry_port_speed_test/README.md index c825def6c1d..8d3f35f8042 100644 --- a/feature/gnmi/otg_tests/telemetry_port_speed_test/README.md +++ b/feature/gnmi/otg_tests/telemetry_port_speed_test/README.md @@ -20,19 +20,27 @@ Validate port speed telemetry used by controller infrastructure. * Turn ports sequentially up at the ATE, and determine that the effective speed is increased as expected. -## Config Parameter Coverage +## OpenConfig Path and RPC Coverage -TBD +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Parameter Coverage +TODO(OCPATHS): Config paths TBD -/interfaces/interface/state/oper-status -/interfaces/interface/ethernet/state/port-speed -/interfaces/interface/aggregation/state/lag-speed +```yaml +paths: + ## Config Paths ## + # TBD -## Protocol/RPC Parameter Coverage + ## State Paths ## + /interfaces/interface/state/oper-status: + /interfaces/interface/ethernet/state/port-speed: + /interfaces/interface/aggregation/state/lag-speed: + +rpcs: + gnmi: + gNMI.Subscribe: +``` -No new protocol coverage. ## Minimum DUT platform requirement diff --git a/feature/gnmi/subscribe/tests/gnmi_sample_mode_test/README.md b/feature/gnmi/subscribe/tests/gnmi_sample_mode_test/README.md index 05cac82a0e4..efeacde8591 100644 --- a/feature/gnmi/subscribe/tests/gnmi_sample_mode_test/README.md +++ b/feature/gnmi/subscribe/tests/gnmi_sample_mode_test/README.md @@ -39,3 +39,18 @@ Test to validate basic gNMI streaming telemetry works with `SAMPLE` mode. * Configure ISIS on Port 1 in Default Network Instance. * Verify that ISIS telemetry is streamed within the next 5 samples. + +## OpenConfig Path and RPC Coverage + +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: + +rpcs: + gnmi: + gNMI.Subscribe: + SAMPLE: true +``` diff --git a/feature/gnmi/subscribe/tests/gnmi_subscriptionlist_test/README.md b/feature/gnmi/subscribe/tests/gnmi_subscriptionlist_test/README.md index 5550249d682..893eb36fcdd 100644 --- a/feature/gnmi/subscribe/tests/gnmi_subscriptionlist_test/README.md +++ b/feature/gnmi/subscribe/tests/gnmi_subscriptionlist_test/README.md @@ -13,39 +13,65 @@ This is to test for gNMI `Subscription` to multiple paths with different `Subscr * In the "Telemetry Parameter coverage" section below, change the `Subscribe` message for each of the paths with `SubscriptionMode` as `ON_CHANGE` to `TARGET_DEFINED` and the ones that are `TARGET_DEFINED` to `SAMPLE` w/ a sampe_interval of 10secs and send all the subscribe messages in a single `SubscribeRequest` message to the DUT. Confirm that a `SubscribeResponse` message is received by the client with the `sync_reponse` field set to `true`. The client should then close the RPC session * Again, switch the `SubscriptionMode` in each `Subscription` message to its original state i.e. from `TARGET_DEFINED` to `ON_CHANGE` and from `SAMPLE` to `TARGET_DEFINED` and resend the `SubscriptionRequest` with `Mode` as `STREAM`. Confirm that the DUT is responding back to the client with a `SubscriptionResponse` and the `Sync_Response` field set to `true` -## Telemetry Parameter Coverage - - * SubscriptionMode: ON_CHANGE - * /interfaces/interface/state/admin-status - * /lacp/interfaces/interface/members/member/interface - * /interfaces/interface/ethernet/state/macaddress - * /interfaces/interface/state/hardware-port - * /interfaces/interface/state/id - * /interfaces/interface/state/oper-status - * /interfaces/interface/ethernet/state/port-speed - * /components/component/integrated-circuit/state/node-id - * /components/component/state/parent - * /components/component/state/oper-status - * /interfaces/interface/state/forwarding-viable - * /components/component/integrated-circuit/backplane-facing-capacity/state/total-operational-ca -pacity - * 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 - * /components/component/integrated-circuit/backplane-facing-capacity/state/consumed-capacity - * /components/component/integrated-circuit/backplane-facing-capacity/state/total” +## OpenConfig Path and RPC Coverage + +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. + +```yaml +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: +``` + diff --git a/feature/gnoi/os/tests/osinstall/README.md b/feature/gnoi/os/tests/osinstall/README.md index 1d3e0f1c4e8..7c1e680041b 100644 --- a/feature/gnoi/os/tests/osinstall/README.md +++ b/feature/gnoi/os/tests/osinstall/README.md @@ -65,5 +65,24 @@ Note: For the test configuration, please include interface and BGP configuration. -## Telemetry Parameter Coverage -* /system/state/boot-time +## OpenConfig Path and RPC Coverage + +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): fill in coverage from code already written. + +```yaml +paths: + ## State Paths ## + /system/state/boot-time: + +rpcs: + gnmi: + gNMI.Subscribe: + gnoi: + os.OS.Activate: + os.OS.Install: + os.OS.Verify: + system.System.Reboot: +``` + diff --git a/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/README.md b/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/README.md index a1f562911b2..2d60643afd4 100644 --- a/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/README.md +++ b/feature/gnoi/system/tests/chassis_reboot_status_and_cancel_test/README.md @@ -21,7 +21,15 @@ Validate gNOI RPC can get reboot status and cancel the reboot * Issue Cancel reboot request RPC to chassis. * Validate that the reboot status is no longer active. +## OpenConfig Path and RPC Coverage -## Telemetry Parameter Coverage +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. + +```yaml +rpcs: + gnoi: + system.System.CancelReboot: + system.System.Reboot: + system.System.RebootStatus: +``` -* None diff --git a/feature/gnoi/system/tests/ping_test/README.md b/feature/gnoi/system/tests/ping_test/README.md index 07b4440facc..210145bacf4 100644 --- a/feature/gnoi/system/tests/ping_test/README.md +++ b/feature/gnoi/system/tests/ping_test/README.md @@ -38,3 +38,14 @@ ICMP, which is default. interface MTU of a transit router to test do_not_fragment. * TODO: verify these for vlan tagged vs untagged packets. May need +4 bytes + +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. + +```yaml +rpcs: + gnoi: + system.System.Ping: +``` + diff --git a/feature/gnoi/system/tests/supervisor_switchover_test/README.md b/feature/gnoi/system/tests/supervisor_switchover_test/README.md index 23739814a48..4d76adb5352 100644 --- a/feature/gnoi/system/tests/supervisor_switchover_test/README.md +++ b/feature/gnoi/system/tests/supervisor_switchover_test/README.md @@ -13,19 +13,25 @@ Validate that the active supervisor can be switched. * Validate the standby RE/SUP becomes the active after switchover * Validate that all connected ports are re-enabled. -## Config Parameter Coverage - -N/A - -## Telemetry Parameter Coverage - -* /system/state/current-datetime -* /components/component[name=]/state/last-switchover-time -* /components/component[name=]/state/last-switchover-reason/trigger -* /components/component[name=]/state/last-switchover-reason/details - -## Protocol/RPC Parameter Coverage - -* gNOI - * System - * SwitchControlProcessor +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC +paths used for test setup are not listed here. + +```yaml +paths: + ## State Paths ## + /system/state/current-datetime: + /components/component/state/last-switchover-time: + platform_type: [ "CONTROLLER_CARD" ] + /components/component/state/last-switchover-reason/trigger: + platform_type: [ "CONTROLLER_CARD" ] + /components/component/state/last-switchover-reason/details: + platform_type: [ "CONTROLLER_CARD" ] + +rpcs: + gnmi: + gNMI.Subscribe: + gnoi: + system.System.SwitchControlProcessor: +``` diff --git a/feature/isis/otg_tests/weighted_ecmp_test/README.md b/feature/isis/otg_tests/weighted_ecmp_test/README.md index e5755106280..dee5ca53f52 100644 --- a/feature/isis/otg_tests/weighted_ecmp_test/README.md +++ b/feature/isis/otg_tests/weighted_ecmp_test/README.md @@ -144,42 +144,49 @@ In the topology above, ### Config paths -* /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config -* /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/config - -* /network-instances/network-instance/protocols/protocol/isis/global/afi-safi - -* /network-instances/network-instance/protocols/protocol/isis/global/config/level-capability - -* /network-instances/network-instance/protocols/protocol/isis/levels/level/config/metric-style - -* /network-instances/network-instance/protocols/protocol/isis/global/config/weighted-ecmp - -* /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/weighted-ecmp/config/load-balancing-weight - -* /routing-policy/defined-sets/prefix-sets/prefix-set/ - -* /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/ip-prefix - -* /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/masklength-range/exact - -* /routing-policy/policy-definitions/policy-definition/config/name - -* /routing-policy/policy-definitions/policy-definition/statements/statement/config/name - -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/prefix-set - -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/match-set-options - -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/config/policy-result/ACCEPT_ROUTE - -* /network-instances/network-instance/protocols/protocol/bgp/neighbors/peer-group/afi-safis/afi-safi/apply-policy/config/import-policy - -* /network-instances/network-instance/protocols/protocol/bgp/neighbors/peer-group/afi-safis/afi-safi/apply-policy/config/export-policy - ### Telemetry Parameter Coverage -* /network-instances/network-instance/protocols/protocol/isis/global/state/weighted-ecmp -* /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/weighted-ecmp/state/load-balancing-weight -* /interfaces/interface/state/counters/out-pkts -* /interfaces/interface/state/counters/in-pkts +## OpenConfig Path and RPC Coverage + +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): Container path originally part of spec that needs to be separated +into leaves: /routing-policy/defined-sets/prefix-sets/prefix-set: + +```yaml +paths: + ## Config Paths ## + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config/peer-group-name: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/config/peer-as: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/config/afi-safi-name: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/config/afi-name: + /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/config/safi-name: + /network-instances/network-instance/protocols/protocol/isis/global/afi-safi/af/config/enabled: + /network-instances/network-instance/protocols/protocol/isis/global/config/level-capability: + /network-instances/network-instance/protocols/protocol/isis/levels/level/config/metric-style: + /network-instances/network-instance/protocols/protocol/isis/global/config/weighted-ecmp: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/weighted-ecmp/config/load-balancing-weight: + /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/ip-prefix: + /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/masklength-range: + value: exact + /routing-policy/policy-definitions/policy-definition/config/name: + /routing-policy/policy-definitions/policy-definition/statements/statement/config/name: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/prefix-set: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/match-set-options: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/config/policy-result: + value: ACCEPT_ROUTE + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/apply-policy/config/import-policy: + /network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/apply-policy/config/export-policy: + + ## State Paths ## + /network-instances/network-instance/protocols/protocol/isis/global/state/weighted-ecmp: + /network-instances/network-instance/protocols/protocol/isis/interfaces/interface/weighted-ecmp/state/load-balancing-weight: + /interfaces/interface/state/counters/out-pkts: + /interfaces/interface/state/counters/in-pkts: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` diff --git a/feature/isis/static_route_isis_redistribution/README.md b/feature/isis/static_route_isis_redistribution/README.md index 90d05ba7909..0d7f4913481 100644 --- a/feature/isis/static_route_isis_redistribution/README.md +++ b/feature/isis/static_route_isis_redistribution/README.md @@ -318,85 +318,70 @@ * Initiate traffic from ATE port-1 to the DUT and destined to ```ipv6-network``` i.e. ```2024:db8:128:128::/64``` * Validate that the traffic is received on ATE port-2 -## Config parameter coverage - -* /network-instances/network-instance/table-connections/table-connection/config -* /network-instances/network-instance/table-connections/table-connection/config/address-family -* /network-instances/network-instance/table-connections/table-connection/config/src-protocol -* /network-instances/network-instance/table-connections/table-connection/config/dst-protocol -* /network-instances/network-instance/table-connections/table-connection/config/default-import-policy -* /network-instances/network-instance/table-connections/table-connection/config/import-policy -* /network-instances/network-instance/table-connections/table-connection/config/disable-metric-propagation - -* /routing-policy/policy-definitions/policy-definition/config/name - -* /routing-policy/policy-definitions/policy-definition/statements/statement/config/name -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/config/policy-result - -* /routing-policy/defined-sets/prefix-sets/prefix-set/config/name -* /routing-policy/defined-sets/prefix-sets/prefix-set/config/mode - -* /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/ip-prefix -* /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/masklength-range - -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/match-set-options -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/prefix-set - -* /routing-policy/defined-sets/tag-sets/tag-set/config/name -* /routing-policy/defined-sets/tag-sets/tag-set/config/tag-value - -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/config/match-set-options -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/config/tag-set - -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/config/set-level -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/config/set-metric -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/config/set-metric-style-type - - -## Telemetry parameter coverage - -* /network-instances/network-instance/table-connections/table-connection/state/address-family -* /network-instances/network-instance/table-connections/table-connection/state/default-import-policy -* /network-instances/network-instance/table-connections/table-connection/state/disable-metric-propagation -* /network-instances/network-instance/table-connections/table-connection/state/dst-protocol -* /network-instances/network-instance/table-connections/table-connection/state/import-policy -* /network-instances/network-instance/table-connections/table-connection/state/src-protocol - -* /routing-policy/policy-definitions/policy-definition/state/name - -* /routing-policy/policy-definitions/policy-definition/statements/statement/state/name -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/state/policy-result - -* /routing-policy/defined-sets/prefix-sets/prefix-set/state/mode -* /routing-policy/defined-sets/prefix-sets/prefix-set/state/name - -* /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/state/ip-prefix -* /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/state/masklength-range - -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/state/match-set-options -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/state/prefix-set - -* /routing-policy/defined-sets/tag-sets/tag-set/state/name -* /routing-policy/defined-sets/tag-sets/tag-set/state/tag-value - -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/state/match-set-options -* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/state/tag-set - -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/state/set-level -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/state/set-metric -* /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/state/set-metric-style-type - -* /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/state/prefix -* /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/state/prefix - -* /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/state/metric -* /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/state/metric - -## Protocol/RPC Parameter Coverage - -* gNMI - * Get - * Set +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. + +```yaml +paths: + ## Config Paths ## + #/network-instances/network-instance/table-connections/table-connection/config: + /network-instances/network-instance/table-connections/table-connection/config/address-family: + /network-instances/network-instance/table-connections/table-connection/config/src-protocol: + /network-instances/network-instance/table-connections/table-connection/config/dst-protocol: + /network-instances/network-instance/table-connections/table-connection/config/default-import-policy: + /network-instances/network-instance/table-connections/table-connection/config/import-policy: + /network-instances/network-instance/table-connections/table-connection/config/disable-metric-propagation: + /routing-policy/policy-definitions/policy-definition/config/name: + /routing-policy/policy-definitions/policy-definition/statements/statement/config/name: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/config/policy-result: + /routing-policy/defined-sets/prefix-sets/prefix-set/config/name: + /routing-policy/defined-sets/prefix-sets/prefix-set/config/mode: + /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/ip-prefix: + /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/config/masklength-range: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/match-set-options: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/config/prefix-set: + /routing-policy/defined-sets/tag-sets/tag-set/config/name: + /routing-policy/defined-sets/tag-sets/tag-set/config/tag-value: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/config/match-set-options: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/config/tag-set: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/config/set-level: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/config/set-metric: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/config/set-metric-style-type: + + ## State Paths ## + /network-instances/network-instance/table-connections/table-connection/state/address-family: + /network-instances/network-instance/table-connections/table-connection/state/default-import-policy: + /network-instances/network-instance/table-connections/table-connection/state/disable-metric-propagation: + /network-instances/network-instance/table-connections/table-connection/state/dst-protocol: + /network-instances/network-instance/table-connections/table-connection/state/import-policy: + /network-instances/network-instance/table-connections/table-connection/state/src-protocol: + /routing-policy/policy-definitions/policy-definition/state/name: + /routing-policy/policy-definitions/policy-definition/statements/statement/state/name: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/state/policy-result: + /routing-policy/defined-sets/prefix-sets/prefix-set/state/mode: + /routing-policy/defined-sets/prefix-sets/prefix-set/state/name: + /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/state/ip-prefix: + /routing-policy/defined-sets/prefix-sets/prefix-set/prefixes/prefix/state/masklength-range: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/state/match-set-options: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-prefix-set/state/prefix-set: + /routing-policy/defined-sets/tag-sets/tag-set/state/name: + /routing-policy/defined-sets/tag-sets/tag-set/state/tag-value: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/state/match-set-options: + /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/match-tag-set/state/tag-set: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/state/set-level: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/state/set-metric: + /routing-policy/policy-definitions/policy-definition/statements/statement/actions/isis-actions/state/set-metric-style-type: + /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/state/prefix: + /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/state/prefix: + /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/extended-ipv4-reachability/prefixes/prefix/state/metric: + /network-instances/network-instance/protocols/protocol/isis/levels/level/link-state-database/lsp/tlvs/tlv/ipv6-reachability/prefixes/prefix/state/metric: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Required DUT platform diff --git a/feature/mtu/largeippacket/otg_tests/large_ip_packet_transmission/README.md b/feature/mtu/largeippacket/otg_tests/large_ip_packet_transmission/README.md index 277eeb24485..451b0999606 100644 --- a/feature/mtu/largeippacket/otg_tests/large_ip_packet_transmission/README.md +++ b/feature/mtu/largeippacket/otg_tests/large_ip_packet_transmission/README.md @@ -19,19 +19,24 @@ IPv4 and IPv6 packet sizes are sent over them. * Assert ATE reports packets sent and received count are the same, indicating no fragmentation, and successful transit. -## Config Parameter coverage +## OpenConfig Path and RPC Coverage -* /interfaces/interface[name=*]/config/mtu: -* /interfaces/interface[name=*]/subinterfaces/subinterface[index=*]/ipv4/config/mtu: -* /interfaces/interface[name=*]/subinterfaces/subinterface[index=*]/ipv6/config/mtu: +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Parameter coverage +```yaml +paths: + ## Config Paths ## + /interfaces/interface/config/mtu: + /interfaces/interface/subinterfaces/subinterface/ipv4/config/mtu: + /interfaces/interface/subinterfaces/subinterface/ipv6/config/mtu: -No configuration coverage, validates success by checking flow statistics between ATE ports. + ## State Paths ## + # No coverage, validates success by checking flow statistics between ATE ports. -## Protocol/RPC Parameter coverage - -N/A +rpcs: + gnmi: + gNMI.Set: +``` ## Minimum DUT platform requirement diff --git a/feature/networkinstance/otg_tests/defaults_test/README.md b/feature/networkinstance/otg_tests/defaults_test/README.md index c6882500284..9e7da08764d 100644 --- a/feature/networkinstance/otg_tests/defaults_test/README.md +++ b/feature/networkinstance/otg_tests/defaults_test/README.md @@ -1,3 +1,17 @@ # OC-1.2: Default Address Families TODO(robshakir): fill in test plan from code already written. + +## OpenConfig Path and RPC Coverage + +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(robshakir): fill in coverage from code already written. + +```yaml +paths: +rpcs: + gnmi: + gNMI.Subscribe: +``` + diff --git a/feature/security/gnsi/acctz/AccountingAuthenErrorMulti/README.md b/feature/security/gnsi/acctz/AccountingAuthenErrorMulti/README.md index 575d9fc8f96..bf0d49cfce4 100644 --- a/feature/security/gnsi/acctz/AccountingAuthenErrorMulti/README.md +++ b/feature/security/gnsi/acctz/AccountingAuthenErrorMulti/README.md @@ -35,21 +35,22 @@ for multi-transaction logins. For example, unreachable TACACS+ server(s). - all other fields should be omitted. - task_ids might be populate with platform-specific information - -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe - -### Parameter: -RecordRequest.timestamp!=0 -Record.service_request = CommandService - -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX - -## Protocol/RPC -gnsi.acctz.v1 +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record may not be complete + +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp!=0": true + "RecordResponse.service_request = CommandService": true +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/AccountingAuthenFailMulti/README.md b/feature/security/gnsi/acctz/AccountingAuthenFailMulti/README.md index 2b6ea8b2c56..3ca077975e6 100644 --- a/feature/security/gnsi/acctz/AccountingAuthenFailMulti/README.md +++ b/feature/security/gnsi/acctz/AccountingAuthenFailMulti/README.md @@ -34,20 +34,22 @@ Test Accounting for authentication failures of multi-transaction logins - all other fields should be omitted. - task_ids might be populate with platform-specific information -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe - -### Parameter: -RecordRequest.timestamp!=0 -Record.service_request = CommandService - -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX - -## Protocol/RPC -gnsi.acctz.v1 +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record may not be complete + +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp!=0": true + "RecordResponse.service_request = CommandService": true +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/AccountingAuthenFailUni/README.md b/feature/security/gnsi/acctz/AccountingAuthenFailUni/README.md index aa655d964c8..490e690223f 100644 --- a/feature/security/gnsi/acctz/AccountingAuthenFailUni/README.md +++ b/feature/security/gnsi/acctz/AccountingAuthenFailUni/README.md @@ -34,20 +34,22 @@ Test Accounting for authentication failures of uni-transaction logins - all other fields should be omitted. - task_ids might be populate with platform-specific information -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe - -### Parameter: -RecordRequest.timestamp!=0 -Record.service_request = CommandService - -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX - -## Protocol/RPC -gnsi.acctz.v1 +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record may not be complete + +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp!=0": true + "RecordResponse.service_request = CommandService": true +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/AccountingPrivEscalation/README.md b/feature/security/gnsi/acctz/AccountingPrivEscalation/README.md index 948b3fca7ab..80795e029df 100644 --- a/feature/security/gnsi/acctz/AccountingPrivEscalation/README.md +++ b/feature/security/gnsi/acctz/AccountingPrivEscalation/README.md @@ -34,20 +34,22 @@ Test Accounting for changing current privilege level, if supported. - all other fields should be omitted. - task_ids might be populate with platform-specific information -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe - -### Parameter: -RecordRequest.timestamp!=0 -Record.service_request = CommandService - -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX - -## Protocol/RPC -gnsi.acctz.v1 +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record may not be complete + +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp!=0": true + "RecordResponse.service_request = CommandService": true +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/RecordHistoryTruncation/README.md b/feature/security/gnsi/acctz/RecordHistoryTruncation/README.md index fecccd415f6..a8d705b31bd 100644 --- a/feature/security/gnsi/acctz/RecordHistoryTruncation/README.md +++ b/feature/security/gnsi/acctz/RecordHistoryTruncation/README.md @@ -11,20 +11,22 @@ Test Record Response Truncation boolean is set - Call gnsi.acctz.v1.Acctz.RecordSubscribe with RecordRequest.timestamp = (openconfig-system.system-global-state.boot-time - 24 hours) - Verify that RecordResponse.history_istruncated = true. It should be true because there should be no records in the history equal to nor pre-dating this RecordRequest.timestamp. -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe +## OpenConfig Path and RPC Coverage -### Parameter: -RecordRequest.timestamp!=0 -RecordResponse.service_request = CommandService +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +TODO(OCRPC): Record may not be complete -## Protocol/RPC -gnsi.acctz.v1 +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp!=0": true + "RecordResponse.service_request = CommandService": true +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/RecordPayloadTruncation/README.md b/feature/security/gnsi/acctz/RecordPayloadTruncation/README.md index 5127ff66578..8bf0782019c 100644 --- a/feature/security/gnsi/acctz/RecordPayloadTruncation/README.md +++ b/feature/security/gnsi/acctz/RecordPayloadTruncation/README.md @@ -12,13 +12,19 @@ Test how large payload is handled. 2. Verify that The appropriate boolean should be set; one of `CommandService.{cmd_istruncated,cmd_args_istruncated}` or `GrpcService.payload_istruncated`. 3. If an RPC, the contents of the payload field(s) is structured and must remain syntactically parsable. -## Telemetry Coverage +## OpenConfig Path and RPC Coverage -Accounting does not currently support any telemetry; see where it might become /system/aaa/acctz/XXX +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Protocol/RPC +TODO(OCRPC): Record may not be complete -gnsi.acctz.v1 +```yaml +paths: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: +``` ## Minimum DUT diff --git a/feature/security/gnsi/acctz/RecordSubscribeFull/README.md b/feature/security/gnsi/acctz/RecordSubscribeFull/README.md index c0dea6911f7..31e90a3d563 100644 --- a/feature/security/gnsi/acctz/RecordSubscribeFull/README.md +++ b/feature/security/gnsi/acctz/RecordSubscribeFull/README.md @@ -37,20 +37,22 @@ Test RecordSubscribe for all (since epoch) records - task_ids might be populate with platform-specific information -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe - -### Parameter: -RecordRequest.timestamp=0 -RecordResponse.service_request = GrpcService - -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX - -## Protocol/RPC -gnsi.acctz.v1 +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record may not be complete + +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp=0": true + "RecordResponse.service_request = GrpcService": true +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/RecordSubscribeIdleTimeout/README.md b/feature/security/gnsi/acctz/RecordSubscribeIdleTimeout/README.md index c5d28e0aafb..b7775f06814 100644 --- a/feature/security/gnsi/acctz/RecordSubscribeIdleTimeout/README.md +++ b/feature/security/gnsi/acctz/RecordSubscribeIdleTimeout/README.md @@ -14,14 +14,18 @@ Test RecordSubscribe connection termination after idle timeout following 1 Recor - Wait at least longer than the idletimeout period - Verify that the DUT closes the gNSI connection at or shortly after the idletimeout period. -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe +## OpenConfig Path and RPC Coverage -### Parameter: +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Coverage -gnsi.acctz.v1 +TODO(OCRPC): Record may not be complete + +```yaml +paths: +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/RecordSubscribeIdleTimeoutDoA/README.md b/feature/security/gnsi/acctz/RecordSubscribeIdleTimeoutDoA/README.md index 5e537748439..df8d552e8ad 100644 --- a/feature/security/gnsi/acctz/RecordSubscribeIdleTimeoutDoA/README.md +++ b/feature/security/gnsi/acctz/RecordSubscribeIdleTimeoutDoA/README.md @@ -10,14 +10,18 @@ Test RecordSubscribe connection termination after idle timeout without making Re - Wait at least longer than the idletimeout period (default: 120s) - Verify that the DUT closes the gNSI connection at or shortly after the idletimeout period. -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe +## OpenConfig Path and RPC Coverage -### Parameter: +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Coverage -gnsi.acctz.v1 +TODO(OCRPC): Record may not be complete + +```yaml +paths: +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/acctz/RecordSubscribeNongrpc/README.md b/feature/security/gnsi/acctz/RecordSubscribeNongrpc/README.md index f21cb5714ba..74a7e7aaad7 100644 --- a/feature/security/gnsi/acctz/RecordSubscribeNongrpc/README.md +++ b/feature/security/gnsi/acctz/RecordSubscribeNongrpc/README.md @@ -41,20 +41,24 @@ Test Accounting for non-gRPC records - If applicable to the service type, and session_info.stats != ONCE, ensure records for each connection are bracketed by LOGIN/LOGOUT records. -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe +## OpenConfig Path and RPC Coverage -### Parameter: -RecordRequest.timestamp!=0 -RecordResponse.service_request = CommandService +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +TODO(OCRPC): Record may not be complete + +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp!=0": true + "RecordResponse.service_request = CommandService": true +``` -## Protocol/RPC -gnsi.acctz.v1 ## Minimum DUT vRX + diff --git a/feature/security/gnsi/acctz/RecordSubscribePartial/README.md b/feature/security/gnsi/acctz/RecordSubscribePartial/README.md index ecfa9120c44..69e685d4b76 100644 --- a/feature/security/gnsi/acctz/RecordSubscribePartial/README.md +++ b/feature/security/gnsi/acctz/RecordSubscribePartial/README.md @@ -12,20 +12,22 @@ Test RecordSubscribe for records since a non-zero timestamp - Call gnsi.acctz.v1.Acctz.RecordSubscribe with RecordRequest.timestamp = to the timestamp retained in the previous step. - Verify, as in the [ACCTZ-1.1 - Record Subscribe Full](../RecordSubscribeFull) test, that accurate accounting records are returned for the second and subsequent commands run in that test, and that a record is NOT returned for the first command (ie: with the same timestamp as in the request). -## Config Parameter -### Prefix: -/gnsi/acctz/v1/Acctz/RecordSubscribe +## OpenConfig Path and RPC Coverage -### Parameter: -RecordRequest.timestamp!=0 -RecordResponse.service_request = GrpcService +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Telemetry Coverage -### Prefix: -Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +TODO(OCRPC): Record may not be complete -## Protocol/RPC -gnsi.acctz.v1 +```yaml +paths: + ### Prefix: + # Accounting does not currently support any telemetry; see https://github.com/openconfig/gnsi/issues/97 where it might become /system/aaa/acctz/XXX +rpcs: + gnsi: + acctz.v1.Acctz.RecordSubscribe: + "RecordRequest.timestamp!=0": true + "RecordResponse.service_request = GrpcService": true +``` ## Minimum DUT vRX diff --git a/feature/security/gnsi/authz/tests/authz/README.md b/feature/security/gnsi/authz/tests/authz/README.md index 4042f2abc92..92cb5022af9 100644 --- a/feature/security/gnsi/authz/tests/authz/README.md +++ b/feature/security/gnsi/authz/tests/authz/README.md @@ -400,3 +400,16 @@ For each of the scenarios in this section, we need to exercise the following 3 a 2. Reboot the device. 3. Reconnect to the device, issue `gNSI.Get` and `gNMI.Get` and validate the value of `version`, `created_on` and gRPC policy content does not change. 4. Ensure actual corresponding clients are authorized per the the above table for policy `policy-normal-1`. + +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record is not complete + +```yaml +rpcs: + gnsi: + authz.v1.Authz.Get: +``` + diff --git a/feature/security/gnsi/certz/client_certificates/README.md b/feature/security/gnsi/certz/client_certificates/README.md index cea7ebc84ee..f34513e3eac 100644 --- a/feature/security/gnsi/certz/client_certificates/README.md +++ b/feature/security/gnsi/certz/client_certificates/README.md @@ -102,13 +102,19 @@ certificates: 5) Validate that the connection is properly torn down by the DUT. -## Config Parameter Coverage -## Telemetry Parameter Coverage +## OpenConfig Path and RPC Coverage -## Protocol/RPC Parameter Coverage +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(OCRPC): Record may not be correct or complete + +```yaml +rpcs: + gnsi: + certz.v1.Certz.GetProfileList: +``` -None ## Minimum DUT Platform Requirement diff --git a/feature/security/gnsi/certz/server_certificate_rotation/README.md b/feature/security/gnsi/certz/server_certificate_rotation/README.md index b8ee75eef46..8a2afe1c30b 100644 --- a/feature/security/gnsi/certz/server_certificate_rotation/README.md +++ b/feature/security/gnsi/certz/server_certificate_rotation/README.md @@ -96,13 +96,17 @@ Perform this test with both the RSA and ECDSA types. -## Config Parameter Coverage +## OpenConfig Path and RPC Coverage -## Telemetry Parameter Coverage +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Protocol/RPC Parameter Coverage +TODO(OCRPC): Record may not be correct or complete -None +```yaml +rpcs: + gnsi: + certz.v1.Certz.Rotate: +``` ## Minimum DUT Platform Requirement diff --git a/feature/security/gnsi/certz/server_certificates/README.md b/feature/security/gnsi/certz/server_certificates/README.md index 6b75422f3a0..eed72366c9a 100644 --- a/feature/security/gnsi/certz/server_certificates/README.md +++ b/feature/security/gnsi/certz/server_certificates/README.md @@ -94,13 +94,17 @@ trust_bundles and certificates. 5) Validate that the connection is properly torn down by the DUT. -## Config Parameter Coverage +## OpenConfig Path and RPC Coverage -## Telemetry Parameter Coverage +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Protocol/RPC Parameter Coverage +TODO(OCRPC): Record may not be correct or complete -None +```yaml +rpcs: + gnsi: + certz.v1.Certz.GetProfileList: +``` ## Minimum DUT Platform Requirement diff --git a/feature/security/gnsi/certz/test_data/README.md b/feature/security/gnsi/certz/test_data/README.md index 736b7cd9486..2d1badf3128 100644 --- a/feature/security/gnsi/certz/test_data/README.md +++ b/feature/security/gnsi/certz/test_data/README.md @@ -21,3 +21,15 @@ Each CA set includes, for both RSA and ECDSA signature types: * CA trust bundle NOTE: Creation of bad data has not been completed yet. + +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record may not be correct or complete + +```yaml +rpcs: + gnsi: + certz.v1.Certz.GetProfileList: +``` diff --git a/feature/security/gnsi/certz/trust_bundle/README.md b/feature/security/gnsi/certz/trust_bundle/README.md index bc15e6aa10c..eda1bf030de 100644 --- a/feature/security/gnsi/certz/trust_bundle/README.md +++ b/feature/security/gnsi/certz/trust_bundle/README.md @@ -68,13 +68,18 @@ that certificate using the included trust_bundle. Perform this test with both RSA dn ECDSA key-types. -## Config Parameter Coverage +## OpenConfig Path and RPC Coverage -## Telemetry Parameter Coverage +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Protocol/RPC Parameter Coverage +TODO(OCRPC): Record may not be correct or complete + +```yaml +rpcs: + gnsi: + certz.v1.Certz.GetProfileList: +``` -None ## Minimum DUT Platform Requirement diff --git a/feature/security/gnsi/certz/trust_bundle_rotation/README.md b/feature/security/gnsi/certz/trust_bundle_rotation/README.md index 9be06f2b078..db80145a9a1 100644 --- a/feature/security/gnsi/certz/trust_bundle_rotation/README.md +++ b/feature/security/gnsi/certz/trust_bundle_rotation/README.md @@ -82,13 +82,18 @@ Perform this test with both the RSA and ECDSA types. 5) Verify that the server is still serving the certifcate properly. -## Config Parameter Coverage +## OpenConfig Path and RPC Coverage -## Telemetry Parameter Coverage +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. -## Protocol/RPC Parameter Coverage +TODO(OCRPC): Record may not be complete + +```yaml +rpcs: + gnsi: + certz.v1.Certz.Rotate: +``` -None ## Minimum DUT Platform Requirement diff --git a/feature/security/gnsi/credentialz/tests/README.md b/feature/security/gnsi/credentialz/tests/README.md index d26f1e77d58..5a6e51e3d13 100644 --- a/feature/security/gnsi/credentialz/tests/README.md +++ b/feature/security/gnsi/credentialz/tests/README.md @@ -281,3 +281,15 @@ and * Ensure that access rejects telemetry counter is incremented `/oc-sys:system/oc-sys:ssh-server/oc-sys:state:counters:access-rejects` +## OpenConfig Path and RPC Coverage + +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(OCRPC): Record may not be complete + +```yaml +rpcs: + gnsi: + credentialz.v1.Credentialz.RotateAccountCredentials: +``` + diff --git a/feature/staticroute/otg_tests/basic_static_route_support_test/README.md b/feature/staticroute/otg_tests/basic_static_route_support_test/README.md index e64a0047f6b..a50aa04c701 100644 --- a/feature/staticroute/otg_tests/basic_static_route_support_test/README.md +++ b/feature/staticroute/otg_tests/basic_static_route_support_test/README.md @@ -177,32 +177,36 @@ 203.0.113.0/24` and `ipv6-network 2001:db8:128:128::/64` * Validate that traffic is NOT received from DUT -## Config parameter coverage - -* /interfaces/interface/config/enabled -* /interfaces/interface/subinterfaces/subinterface/ipv4/config/enabled -* /interfaces/interface/subinterfaces/subinterface/ipv6/config/enabled -* /network-instances/network-instance/protocols/protocol/static-routes/static/config/prefix -* /network-instances/network-instance/protocols/protocol/static-routes/static/config/set-tag -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/metric -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/preference -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/recurse - -## Telemetry parameter coverage - -* /network-instances/network-instance/protocols/protocol/static-routes/static/state/prefix -* /network-instances/network-instance/protocols/protocol/static-routes/static/state/set-tag -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/next-hop -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/metric -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/preference -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/recurse - -## Protocol/RPC Parameter Coverage - -* gNMI - * Get - * Set +## OpenConfig Path and RPC Coverage + +The below yaml defines the OC paths intended to be covered by this test. OC paths used for test setup are not listed here. + +```yaml +paths: + ## Config Paths ## + /interfaces/interface/config/enabled: + /interfaces/interface/subinterfaces/subinterface/ipv4/config/enabled: + /interfaces/interface/subinterfaces/subinterface/ipv6/config/enabled: + /network-instances/network-instance/protocols/protocol/static-routes/static/config/prefix: + /network-instances/network-instance/protocols/protocol/static-routes/static/config/set-tag: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/metric: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/preference: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/recurse: + + ## State Paths ## + /network-instances/network-instance/protocols/protocol/static-routes/static/state/prefix: + /network-instances/network-instance/protocols/protocol/static-routes/static/state/set-tag: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/next-hop: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/metric: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/preference: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/recurse: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` ## Required DUT platform diff --git a/feature/staticroute/tests/README.md b/feature/staticroute/tests/README.md index a9bc98b85a0..c5857f40704 100644 --- a/feature/staticroute/tests/README.md +++ b/feature/staticroute/tests/README.md @@ -12,24 +12,35 @@ Validate static route functionality in Management network-instance (VRF). * Generate IPv4 and IPv6 traffic from ATE1 to any destination. * Verify that traffic is received at ATE2 interface -## Config Parameter coverage - -* /network-instances/network-instance/config/name -* /network-instances/network-instance/config/description -* /network-instances/network-instance/config/type - -* /network-instances/network-instance/interfaces/interface/config/id - - -* /network-instances/network-instance/protocols/protocol/static-routes/static -* /network-instances/network-instance/protocols/protocol/static-routes/static/prefix -* /network-instances/network-instance/protocols/protocol/static-routes/static/config -* /network-instances/network-instance/protocols/protocol/static-routes/static/config/prefix -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/index -* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config - - -## Telemetry Parameter coverage - * /network-instances/network-instance/protocols/protocol/static-routes/static/state +## OpenConfig Path and RPC Coverage + +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): Specify leaves for non-leaf paths that have been commented out. + +```yaml +paths: + ## Config Paths ## + /network-instances/network-instance/config/name: + /network-instances/network-instance/config/description: + /network-instances/network-instance/config/type: + /network-instances/network-instance/interfaces/interface/config/id: + #/network-instances/network-instance/protocols/protocol/static-routes/static: + /network-instances/network-instance/protocols/protocol/static-routes/static/prefix: + #/network-instances/network-instance/protocols/protocol/static-routes/static/config: + /network-instances/network-instance/protocols/protocol/static-routes/static/config/prefix: + #/network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/index: + #/network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/index: + /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop: + + ## State Paths ## + #/network-instances/network-instance/protocols/protocol/static-routes/static/state: + +rpcs: + gnmi: + gNMI.Subscribe: + gNMI.Set: +``` diff --git a/tools/internal/mdocspec/md_test.go b/tools/internal/mdocspec/md_test.go index e7b6a997c88..155846f2dc9 100644 --- a/tools/internal/mdocspec/md_test.go +++ b/tools/internal/mdocspec/md_test.go @@ -82,7 +82,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: @@ -105,7 +105,7 @@ rpcs: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: @@ -150,7 +150,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: @@ -187,7 +187,7 @@ rpcs: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: @@ -246,7 +246,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: @@ -493,7 +493,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: @@ -516,7 +516,7 @@ rpcs: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: diff --git a/tools/internal/mdocspec/ocspec.go b/tools/internal/mdocspec/ocspec.go index a40c3ff1fc0..416ebf136b0 100644 --- a/tools/internal/mdocspec/ocspec.go +++ b/tools/internal/mdocspec/ocspec.go @@ -47,7 +47,12 @@ var ErrNotFound = fmt.Errorf(`did not detect valid yaml block under a heading ti // /interfaces/interface/config/description: // /interfaces/interface/config/enabled: // /components/component/state/name: -// platform_type: "CHASSIS" +// platform_type: [ +// "CHASSIS" +// "CONTROLLER_CARD", +// "LINECARD", +// "FABRIC", +// ] // // rpcs: // gnmi: @@ -87,30 +92,50 @@ func parseYAML(source []byte) (*ppb.OCPaths, *rpb.OCRPCs, error) { pathNames := maps.Keys(paths) sort.Strings(pathNames) for _, name := range pathNames { - var platformType string + platformTypes := map[string]struct{}{} for propertyName, property := range paths[name] { switch propertyName { case "platform_type": - p, ok := property.(string) + ps, ok := property.([]any) if !ok { - return nil, nil, fmt.Errorf("mdocspec: only string values expected for `platform_type` attribute, got (%T, %v)", property, property) + return nil, nil, fmt.Errorf("mdocspec: path %q: got (%T, %v) for `platform_type` attribute, but expected []any", name, property, property) } - platformType = p + if len(ps) == 0 { + return nil, nil, fmt.Errorf("mdocspec: path %q: `platform_type` attribute must not be empty", name) + } + for i, p := range ps { + sp, ok := p.(string) + if !ok { + return nil, nil, fmt.Errorf("mdocspec: path %q: got (%T, %v), for `platform_type` element index %v, but must be string", name, p, p, i) + } + if _, ok := platformTypes[sp]; ok { + return nil, nil, fmt.Errorf("mdocspec: path %q: got duplicate element %q for `platform_type` element index %v", name, sp, i) + } + platformTypes[sp] = struct{}{} + } + case "value", "values": // Accept value/values as a property names used to specify what property of the path is used in the test. default: - return nil, nil, fmt.Errorf("mdocspec: only `platform_type` is expected as a valid attribute for paths, got %q", propertyName) + return nil, nil, fmt.Errorf("mdocspec: path %q: only `platform_type` is expected as a valid attribute for paths, got %q", name, propertyName) } } - ocPath := &ppb.OCPath{ - Name: name, + if len(platformTypes) == 0 { + protoPaths.Ocpaths = append(protoPaths.Ocpaths, &ppb.OCPath{ + Name: name, + }) + continue } - if platformType != "" { - ocPath.OcpathConstraint = &ppb.OCPathConstraint{ - Constraint: &ppb.OCPathConstraint_PlatformType{ - PlatformType: platformType, + platformTypesSlice := maps.Keys(platformTypes) + sort.Strings(platformTypesSlice) + for _, platformType := range platformTypesSlice { + protoPaths.Ocpaths = append(protoPaths.Ocpaths, &ppb.OCPath{ + Name: name, + OcpathConstraint: &ppb.OCPathConstraint{ + Constraint: &ppb.OCPathConstraint_PlatformType{ + PlatformType: platformType, + }, }, - } + }) } - protoPaths.Ocpaths = append(protoPaths.Ocpaths, ocPath) } protoRPCs := &rpb.OCRPCs{ diff --git a/tools/internal/mdocspec/ocspec_test.go b/tools/internal/mdocspec/ocspec_test.go index 92ef91d06ef..6c15447ea4b 100644 --- a/tools/internal/mdocspec/ocspec_test.go +++ b/tools/internal/mdocspec/ocspec_test.go @@ -104,7 +104,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: gnmi: @@ -177,7 +177,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] ` + "```" + ` `, @@ -200,7 +200,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] rpcs: ` + "```" + ` @@ -224,7 +224,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] ` + "```" + ` @@ -341,13 +341,19 @@ func TestParseYAML(t *testing.T) { wantErr bool }{{ desc: "good", - inYAML: `paths: + inYAML: ` +paths: # interface configuration /interfaces/interface/config/description: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: [ + "CHASSIS", + "CONTROLLER_CARD", + "LINECARD", + "FABRIC", + ] rpcs: gnmi: @@ -370,6 +376,24 @@ ocpaths: { platform_type: "CHASSIS" } } +ocpaths: { + name: "/components/component/state/name" + ocpath_constraint: { + platform_type: "CONTROLLER_CARD" + } +} +ocpaths: { + name: "/components/component/state/name" + ocpath_constraint: { + platform_type: "FABRIC" + } +} +ocpaths: { + name: "/components/component/state/name" + ocpath_constraint: { + platform_type: "LINECARD" + } +} ocpaths: { name: "/interfaces/interface/config/description" } @@ -405,7 +429,7 @@ oc_protocols: { /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] `, wantErr: true, }, { @@ -458,7 +482,7 @@ paths: /interfaces/interface/config/enabled: # name of chassis component /components/component/state/name: - platform_type: "CHASSIS" + platform_type: ["CHASSIS"] @@ -513,6 +537,94 @@ oc_protocols: { } } `), + }, { + desc: "platform_type-wrong-type", + inYAML: ` +paths: + # interface configuration + /interfaces/interface/config/description: + /interfaces/interface/config/enabled: + # name of chassis component + /components/component/state/name: + platform_type: "CHASSIS", + +rpcs: + gnmi: + gNMI.Set: + union_replace: true + gNMI.Subscribe: + on_change: true + gnoi: + healthz.Healthz.Get: + healthz.Healthz.List: + healthz.Healthz.Acknowledge: + healthz.Healthz.Artifact: + healthz.Healthz.Check: + bgp.BGP.ClearBGPNeighbor: +`, + wantErr: true, + }, { + desc: "platform_type-wrong-element-type", + inYAML: ` +paths: + # interface configuration + /interfaces/interface/config/description: + /interfaces/interface/config/enabled: + # name of chassis component + /components/component/state/name: + platform_type: [ + "CHASSIS", + 42, + "LINECARD", + "FABRIC", + ] + +rpcs: + gnmi: + gNMI.Set: + union_replace: true + gNMI.Subscribe: + on_change: true + gnoi: + healthz.Healthz.Get: + healthz.Healthz.List: + healthz.Healthz.Acknowledge: + healthz.Healthz.Artifact: + healthz.Healthz.Check: + bgp.BGP.ClearBGPNeighbor: +`, + wantErr: true, + }, { + desc: "platform_type-duplicate-element", + inYAML: ` +paths: + # interface configuration + /interfaces/interface/config/description: + /interfaces/interface/config/enabled: + # name of chassis component + /components/component/state/name: + platform_type: [ + "CHASSIS", + "LINECARD", + "FABRIC", + "LINECARD", + ] + +rpcs: + gnmi: + gNMI.Set: + union_replace: true + gNMI.Subscribe: + on_change: true + gnoi: + healthz.Healthz.Get: + healthz.Healthz.List: + healthz.Healthz.Acknowledge: + healthz.Healthz.Artifact: + healthz.Healthz.Check: + bgp.BGP.ClearBGPNeighbor: +`, + wantErr: true, }} for _, tt := range tests { diff --git a/tools/validate_readme_spec/readme_allowlist.go b/tools/validate_readme_spec/readme_allowlist.go deleted file mode 100644 index fb3aafbaa24..00000000000 --- a/tools/validate_readme_spec/readme_allowlist.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -var ( - // nonTestREADMEs are exempt from coverage spec validation. - nonTestREADMEs = map[string]struct{}{ - "security/gnsi/certz/test_data/README.md": {}, - "experimental/p4rt/README.md": {}, - } -) diff --git a/tools/validate_readme_spec/validate_readme_spec.go b/tools/validate_readme_spec/validate_readme_spec.go index dc9bb3561aa..c11221d8591 100644 --- a/tools/validate_readme_spec/validate_readme_spec.go +++ b/tools/validate_readme_spec/validate_readme_spec.go @@ -21,7 +21,7 @@ package main import ( - "flag" + goflag "flag" "fmt" "io/fs" "os" @@ -33,24 +33,48 @@ import ( "github.com/openconfig/featureprofiles/tools/internal/mdocspec" "github.com/openconfig/featureprofiles/tools/internal/ocpaths" "github.com/openconfig/featureprofiles/tools/internal/ocrpcs" + flag "github.com/spf13/pflag" "golang.org/x/exp/maps" ) // Config is the set of flags for this binary. type Config struct { - DownloadPath string - FeatureDir string + DownloadPath string + FeatureDir string + NonTestREADMEs stringMap +} + +func newConfig() *Config { + return &Config{ + NonTestREADMEs: map[string]struct{}{}, + } +} + +type stringMap map[string]struct{} + +func (m stringMap) String() string { + return strings.Join(maps.Keys(m), ",") +} + +func (m stringMap) Type() string { + return "stringMap" +} + +func (m stringMap) Set(readmePath string) error { + m[readmePath] = struct{}{} + return nil } // New registers a flagset with the configuration needed by this binary. func New(fs *flag.FlagSet) *Config { - c := &Config{} + c := newConfig() if fs == nil { fs = flag.CommandLine } fs.StringVar(&c.DownloadPath, "download-path", "./tmp", "path into which to download OpenConfig GitHub repos for validation") - fs.StringVar(&c.FeatureDir, "feature-dir", "", "path to the feature directory of featureprofiles, for which all README.md files are validated for their coverage spec aside from the allow-list in readme_allowlist.go") + fs.StringVar(&c.FeatureDir, "feature-dir", "", "path to the feature directory of featureprofiles, for which all README.md files are validated for their coverage spec") + fs.Var(&c.NonTestREADMEs, "non-test-readme", "README that's exempt from coverage spec validation (can be specified multiple times)") return c } @@ -63,7 +87,7 @@ func init() { config = New(nil) } -func readmeFiles(featureDir string) ([]string, error) { +func readmeFiles(featureDir string, nonTestREADMEs stringMap) ([]string, error) { var files []string err := filepath.WalkDir(featureDir, func(path string, d fs.DirEntry, err error) error { if err != nil { @@ -72,11 +96,7 @@ func readmeFiles(featureDir string) ([]string, error) { if d.Name() != fpciutil.READMEname { return nil } - relpath, err := filepath.Rel(filepath.Dir(featureDir), path) - if err != nil { - return fmt.Errorf("unexpected error: cannot take relative path of file %q against feature directory %q", path, featureDir) - } - if _, ok := nonTestREADMEs[relpath]; ok { + if _, ok := nonTestREADMEs[path]; ok { // Allowlist return nil } @@ -88,6 +108,7 @@ func readmeFiles(featureDir string) ([]string, error) { } func main() { + flag.CommandLine.AddGoFlagSet(goflag.CommandLine) // for compatibility with glog flag.Parse() fileCount := flag.NArg() @@ -104,7 +125,7 @@ func main() { fallthrough case config.FeatureDir != "": var err error - files, err = readmeFiles(config.FeatureDir) + files, err = readmeFiles(config.FeatureDir, config.NonTestREADMEs) if err != nil { log.Exitf("Error gathering README.md files for validation: %v", err) } diff --git a/tools/validate_readme_spec/validate_readme_spec_test.sh b/tools/validate_readme_spec/validate_readme_spec_test.sh index faea2862eb2..c13ac7bd1e6 100755 --- a/tools/validate_readme_spec/validate_readme_spec_test.sh +++ b/tools/validate_readme_spec/validate_readme_spec_test.sh @@ -17,27 +17,27 @@ go install ./ filename=invalid_all_empty.md -if validate_readme_spec -alsologtostderr testdata/"${filename}"; then +if validate_readme_spec --alsologtostderr testdata/"${filename}"; then echo "Validation passed, but failure expected" exit 1 fi filename=invalid_empty_rpcs.md -if validate_readme_spec -alsologtostderr testdata/"${filename}"; then +if validate_readme_spec --alsologtostderr testdata/"${filename}"; then echo "Validation passed, but failure expected" exit 1 fi filename=invalid_heading.md -if validate_readme_spec -alsologtostderr testdata/"${filename}"; then +if validate_readme_spec --alsologtostderr testdata/"${filename}"; then echo "Validation passed, but failure expected" exit 1 fi filename=invalid_path.md -if validate_readme_spec -alsologtostderr testdata/"${filename}"; then +if validate_readme_spec --alsologtostderr testdata/"${filename}"; then echo "Validation passed, but failure expected" exit 1 fi filename=valid_empty_paths.md -if ! validate_readme_spec -alsologtostderr testdata/"${filename}"; then +if ! validate_readme_spec --alsologtostderr testdata/"${filename}"; then echo "Validation failed, but pass expected" exit 1 fi