Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation Script for OC Path and RPC Coverage in READMEs #2865

Merged
merged 19 commits into from
Apr 8, 2024
Merged

Commits on Mar 28, 2024

  1. Configuration menu
    Copy the full SHA
    6632935 View commit details
    Browse the repository at this point in the history
  2. revise yaml

    dplore committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    7329e95 View commit details
    Browse the repository at this point in the history
  3. revise yaml

    dplore committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    e5a0e45 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2024

  1. Validation Script for OC Path and RPC Coverage in READMEs

    * `mdocspec` package parses ocpath.proto and ocrpcs.proto from yaml
      according to the format shown below by mdocspec.Parse's documentation.
    * `tools/validate_readme_spec/validate_readme_spec.go` script is added
      that can parse and then validate OC Paths and RPCs according to
      existing repo states in github.com/openconfig.
    
    ```go
    // Parse extracts sorted OpenConfig Path and RPC Coverage from an FNT
    README.
    //
    // The first yaml code block after a heading line named exactly as
    // "OpenConfig Path and RPC Coverage" will be used. Any other code
    blocks are
    // ignored.
    //
    // Expected markdown format:
    //
    //      ## OpenConfig Path and RPC Coverage
    //
    //      ```yaml
    //      paths:
    //        /interfaces/interface/config/description:
    //        /interfaces/interface/config/enabled:
    //        /components/component/state/name:
    //          platform_type: "CHASSIS"
    //
    //      rpcs:
    //        gnmi:
    //          gNMI.Set:
    //            union_replace: true
    //          gNMI.Subscribe:
    //            on_change: true
    //      ```
    //
    // Note: For `rpcs`, only the RPC name and methods are validated. Any
    // attributes defined below RPC methods (e.g. union_replace) are not validated.
    ```
    wenovus committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    9f57dbc View commit details
    Browse the repository at this point in the history
  2. Add invalid README example

    wenovus committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    2515f36 View commit details
    Browse the repository at this point in the history
  3. Fix style

    wenovus committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    890d3f2 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Make YAMLRenderer unexported

    wenovus committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    93bc9bd View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. Improve comments

    wenovus committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    5ee1b4c View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. Configuration menu
    Copy the full SHA
    d6e80be View commit details
    Browse the repository at this point in the history
  2. Update tools/internal/mdocspec/ocspec.go

    Co-authored-by: Darren Loher <dloher@google.com>
    wenovus and dplore authored Apr 5, 2024
    Configuration menu
    Copy the full SHA
    04b2b0c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    18658b9 View commit details
    Browse the repository at this point in the history
  4. Minor improvements for OC coverage validation

    * Skip repo-cloning during validation if repo already cloned.
    * Validate that at least one RPC method is specified for any coverage spec.
    * Add additional validation for script in bash file.
    * Style Improvements.
    wenovus committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    08f5448 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5826fd9 View commit details
    Browse the repository at this point in the history
  6. add another corner case test

    wenovus committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    9a1ffc5 View commit details
    Browse the repository at this point in the history
  7. add another corner case test

    wenovus committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    b0515e0 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2024

  1. Improve doc comment

    wenovus committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    218ea66 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Improve doc comments

    wenovus committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    73d317c View commit details
    Browse the repository at this point in the history
  2. Fix doc comment

    wenovus committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    1f5be99 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2b79d7b View commit details
    Browse the repository at this point in the history