cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
368
Views
0
Helpful
5
Replies
Highlighted
Beginner

Genie "show ntp config" parser issue

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?

5 REPLIES 5
Highlighted
Beginner

Re: Genie "show ntp config" parser issue

Interesting!

 

Two questions:

-What version of pyats/Genie are you using?

-What iOS version are you using?

*** Rate All Helpful Responses ***
Highlighted
Beginner

Re: Genie "show ntp config" parser issue

Thanks for the reply

pyats==20.2.1

genie==20.2

IOS version 16.3.7

 

Highlighted
Beginner

Re: Genie "show ntp config" parser issue

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.

*** Rate All Helpful Responses ***
Highlighted
Beginner

Re: Genie "show ntp config" parser issue

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!

*** Rate All Helpful Responses ***
Highlighted
Beginner

Re: Genie "show ntp config" parser issue

ok, thanks for looking into it!

Al

This widget could not be displayed.