codeout / junoser

PEG parser for JUNOS configuration.
MIT License
69 stars 11 forks source link

Additional invalid syntax #31

Closed XioNoX closed 2 years ago

XioNoX commented 2 years ago

Hi! Following up from https://github.com/codeout/junoser/issues/24 as I finally had time to look at it more closely.

I installed v0.4.5 with gem install junoser and am getting a couple errors:

On various QFXs, running Junos 20 or Junos 14: Invalid syntax: set system license keys key "JUNOS123456789 xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx yyyyy"

On various MXs running Junos 17 or 18:

Invalid syntax:  set protocols bgp group IX4 family inet unicast prefix-limit teardown 80 idle-timeout forever
Invalid syntax:  set protocols bgp group IX6 family inet6 unicast prefix-limit teardown 80 idle-timeout forever
Invalid syntax:  set protocols bgp group Private-Peer4 family inet unicast prefix-limit teardown 80 idle-timeout forever
Invalid syntax:  set protocols bgp group Private-Peer6 family inet6 unicast prefix-limit teardown 80 idle-timeout forever

If you're curious, your tool allowed us to find some issues with our config templates: https://gerrit.wikimedia.org/r/c/operations/homer/public/+/806857

Thanks

codeout commented 2 years ago

Hi! I'll take a look into both invalid statements.

If you're curious, your tool allowed us to find some issues with our config templates:

This is awesome! Glad to see junoser working in your project.

codeout commented 2 years ago

Hi, just published junoser 0.4.6 with the fix. It looks like a Juniper's .xsd bug. Please try the latest version and reopen this issue if you see any further problems. Thanks again for your bug report.