cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
939
Views
0
Helpful
5
Replies

Genie "show ntp config" parser issue

Al_b
Level 1
Level 1

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

LanDownUnda
Spotlight
Spotlight

Interesting!

 

Two questions:

-What version of pyats/Genie are you using?

-What iOS version are you using?

*** Rate All Helpful Responses ***

Thanks for the reply

pyats==20.2.1

genie==20.2

IOS version 16.3.7

 

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 ***

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 ***

ok, thanks for looking into it!

Al