03-10-2020 07:24 AM
genie parser fails to parse ntp server if followed by "prefer" keyword
show ntp config
ntp server x.y.15.4
ntp server x.y.25.4 prefer
only the first entry is parsed correctly.
"ntp_config": {
"stdout": [
"ntp server x.y.25.4 prefer\n ntp server x.y.15.4"
],
"stdout_lines": [
[
"ntp server x.y.25.4 prefer",
" ntp server x.y.15.4"
]
]
}
parsed:
"pyats_ntp_config": {
"vrf": {
"default": {
"address": {
" x.y.15.4": {
"isconfigured": {
"True": {
"address": "x.y.15.4",
"isconfigured": true
}
},
"type": {
"server": {
"address": "x.y.15.4",
"type": "server",
"vrf": "default"
}
}
}
}
}
}
}
any workarounds?
03-10-2020 05:38 PM
Interesting!
Two questions:
-What version of pyats/Genie are you using?
-What iOS version are you using?
03-11-2020 11:53 AM
Thanks for the reply
pyats==20.2.1
genie==20.2
IOS version 16.3.7
03-15-2020 03:54 AM
Hi Al_b,
I'm able to replicate your issue when I configure an IOSXE router with the "ntp server x.x.x.x prefer" statement. You'll see below that Genie didn't even parse the command as it said "bit it returned empty" indicating its not recognizing the prefer statement.
| Parsed command 'show ntp config' but it returned empty |
I've reached out to the pyATS Team to see if there is anything that can be done in the meantime.
03-15-2020 09:23 PM
Looks like at this current time 'show ntp config' doesn't have a key in the scheme configuration yet. This is why its not working. We might see this particular command in up and coming updates to pyATS/Genie.
I hope the above helps!
03-16-2020 07:09 AM
ok, thanks for looking into it!
Al
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide