genieparser icon indicating copy to clipboard operation
genieparser copied to clipboard

iosxe - show ap cdp neighbor not working

Open oianson opened this issue 2 years ago • 1 comments

On 9800 platform (iosxe) the show ap cdp neighbor parser is not working with the output:

C2-WLC#show ap cdp neighbors 
Number of neighbors: 5

AP Name                          AP IP                                     Neighbor Name                              Neighbor IP        Neighbor Port
-------------------------------------------------------------------------------------------------------------------------------------------------------------
C2B1-AP-3                        10.86.201.195                             C2-EXT-1.foo.bar.corp                      10.86.201.226      GigabitEthernet0/2        
C2B2-AP-1                        10.86.201.196                             C2-Edge-2.foo.bar.corp                       10.86.201.193      FiveGigabitEthernet1/0/3  
C2B1-AP-2                        10.86.201.194                             C2-Edge-1.foo.bar.corp                     10.86.201.193      FiveGigabitEthernet1/0/1  
C2B1-AP-4                        10.86.201.197                             C2-EXT-1.foo.bar.corp                      10.86.201.226      GigabitEthernet0/1        
C2B1-AP-1                        10.86.201.198                             C2-Edge-1.foo.bar.corp                     10.86.201.193      FiveGigabitEthernet1/0/2
Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/genie/libs/robot/GenieRobot.py", line 95, in metaparser_on_device
    return self.metaparser_on_device_alias_context(device=device,
  File "/venv/lib/python3.9/site-packages/genie/libs/robot/GenieRobot.py", line 136, in metaparser_on_device_alias_context
    return con.parse(parser)
  File "src/genie/conf/base/device.py", line 531, in genie.conf.base.device.Device.parse
  File "src/genie/conf/base/device.py", line 570, in genie.conf.base.device.Device._get_parser_output
  File "src/genie/conf/base/device.py", line 568, in genie.conf.base.device.Device._get_parser_output
  File "src/genie/metaparser/_metaparser.py", line 342, in genie.metaparser._metaparser.MetaParser.parse
  File "src/genie/metaparser/_metaparser.py", line 322, in genie.metaparser._metaparser.MetaParser.parse
  File "src/genie/metaparser/util/schemaengine.py", line 419, in genie.metaparser.util.schemaengine.Schema.validate
genie.metaparser.util.exceptions.SchemaMissingKeyError: Missing keys: [['ap_name']]

oianson avatar Jan 17 '23 11:01 oianson

Hi

Thanks for reporting.

I debugged the issue, looks like we don't support the regex for the below

AP Name AP IP Neighbor Name Neighbor IP Neighbor Port

Right now we support the below output,

AP Name AP IP Neighbor Name Neighbor Port

https://github.com/CiscoTestAutomation/genieparser/blob/master/src/genie/libs/parser/iosxe/show_ap.py#L1151

As you know, genieparser is community driven. I request you to create a PR to support the output which you had shared. Let me know if you need any help through the process.

Taarini avatar Jan 20 '23 19:01 Taarini