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

Jovatn/ospf deviations #627

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Jovatn/ospf deviations #627

merged 2 commits into from
Sep 13, 2024

Conversation

jovatn
Copy link
Contributor

@jovatn jovatn commented Sep 13, 2024

Description

Adding deviation statements in infix-routing.yang for non-supported OSPF RPCs and Notifications declared in ietf-ospf.yang.

Other information

Before the fix, pyang would list OSPF RPCs and Notifications.

pc: confd/yang (main) $ pyang -f tree [email protected] [email protected] [email protected] 
...
                +--ro v4ur:destination-prefix?   inet:ipv4-prefix
                +--ro v6ur:destination-prefix?   inet:ipv6-prefix

module: ietf-ospf

  rpcs:
   +---x clear-neighbor
   |  +---w input
   |     +---w routing-protocol-name    -> /rt:routing/control-plane-protocols/control-plane-protocol/name
   |     +---w interface?               if:interface-ref
   +---x clear-database
      +---w input
         +---w routing-protocol-name    -> /rt:routing/control-plane-protocols/control-plane-protocol/name

  notifications:
   +---n if-state-change
   |  +--ro routing-protocol-name?   -> /rt:routing/control-plane-protocols/control-plane-protocol/name
...

Before fix, sysrepocfg can probe for RFC, be it with a failure message

admin@infix:~$ cat file.json
{
   "ietf-ospf:clear-neighbor": {
  "routing-protocol-name": "default"
   }
}
admin@infix:~$ sysrepocfg -fjson -R file.json
[ERR] There are no matching subscribers for RPC/action "/ietf-ospf:clear-neighbor".
sysrepocfg error: Sending RPC/action failed (Operation not supported)
For more details you may try to increase the verbosity up to "-v3".
admin@infix-7e-ff-ff:~$

After fix, sysrepocfg does not recognize the RPC

admin@infix:~$ sysrepocfg -fjson -R file.json 
libyang[0]: Node "clear-neighbor" not found in the "ietf-ospf" module. (line: 2)
libyang error: Node "clear-neighbor" not found in the "ietf-ospf" module.
sysrepocfg error: Data parsing failed
For more details you may try to increase the verbosity up to "-v3".
admin@infix:~$

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

@mattiaswal mattiaswal merged commit cfa9c74 into main Sep 13, 2024
4 checks passed
@mattiaswal mattiaswal deleted the jovatn/ospf-deviations branch September 13, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants