Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXOS - Show Version - Parser does not pull out all data #920

Open
RichardAtkin opened this issue Dec 13, 2024 · 4 comments
Open

NXOS - Show Version - Parser does not pull out all data #920

RichardAtkin opened this issue Dec 13, 2024 · 4 comments
Assignees

Comments

@RichardAtkin
Copy link

For reasons I can't fathom, the nxos parser does not always seem to identify / pull out the system version correctly.

I would have thought there'd be a ["platform"]["software"]["system_version"] key & value in the Python dict of the example below, but there is not.

Sample CLI output and corresponding Parser output follow.

show version

show version
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
Copyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
 
Software
  BIOS:      version 07.68
  kickstart: version 14.2(7v) 
  system:    version 14.2(7v) 
  PE:        version 4.2(7v)
  BIOS compile time:       05/18/2020
  kickstart image file is: /bootflash/aci-n9000-dk9.14.2.7v.bin
  kickstart compile time:  10/17/2022 06:26:11 [10/17/2022 06:26:11]
  system image file is:    /bootflash/auto-s
  system compile time:     10/17/2022 06:26:11 [10/17/2022 06:26:11]
 
 
Hardware
  cisco N9K-C93180YC-EX ("supervisor")
   Intel(R) Xeon(R) CPU  @ 1.80GHz with 24499200 kB of memory.
  Processor Board ID xxxxxxxxxxx
 
  Device name: xxxxxxxxxxx
  bootflash:    62522368 kB
 
Kernel uptime is 538 day(s), 22 hour(s), 54 minute(s), 30 second(s)
 
Last reset at 121000 usecs after Fri Jun 23 16:10:36 2023 GMT
  Reason: reset-by-installer
  System version: 14.2(7s)
  Service: Upgrade
 
plugin
  Core Plugin, Ethernet Plugin

genie parser output

{
    'platform': {
        'name': 'Nexus',
        'os': 'NX-OS',
        'software': {
            'bios_version': '07.68',
            'kickstart_version': '14.2(7v) [build 14.2(7v)]',
            'bios_compile_time': '05/26/2020',
            'kickstart_image_file': '/bootflash/aci-n9000-dk9.14.2.7v.bin',
            'kickstart_compile_time': '10/17/2022 06:26:11 [10/17/2022 06:26:11]',
            'system_image_file': '/bootflash/auto-s',
            'system_compile_time': '10/17/2022 06:26:11 [10/17/2022 06:26:11]'
        },
        'hardware': {
            'cpu': 'Intel(R) Pentium(R) CPU  @ 1.50GHz',
            'memory': '16267264 kB',
            'processor_board_id': 'xxxxxxxxxxx',
            'device_name': 'xxxxxxxxxxx',
            'bootflash': '62522368 kB'
        },
        'kernel_uptime': {'days': 56, 'hours': 6, 'minutes': 13, 'seconds': 21},
        'reason': 'system-power-cycled-due-to-cold-boot'
    },
    '_exclude': ['seconds', 'minutes', 'hours', 'days', 'essor_board_id', 'reason']
}
@RichardAtkin RichardAtkin changed the title Parser does not pull out all data NXOS - Show Version - Parser does not pull out all data Dec 13, 2024
@abvasudha
Copy link

abvasudha commented Dec 17, 2024

Hi Richard,

Tried it from my end we can fetch the system version under ["platform"]["software"]["system_version"]
Could you let me know which pyats version are you using?

{
"platform":{
"name":"Nexus",
"os":"NX-OS",
"software":{
"bios_version":"07.68",
"kickstart_version":"14.2(7v)",
"system_version":"14.2(7v)",
"bios_compile_time":"05/18/2020",
"kickstart_image_file":"/bootflash/aci-n9000-dk9.14.2.7v.bin",
"kickstart_compile_time":"10/17/2022 06:26:11 [10/17/2022 06:26:11]",
"system_image_file":"/bootflash/auto-s",
"system_compile_time":"10/17/2022 06:26:11 [10/17/2022 06:26:11]"
},
"hardware":{
"cpu":"Intel(R) Xeon(R) CPU @ 1.80GHz",
"memory":"24499200 kB",
"device_name":"xxxxxxxxxxx",
"bootflash":"62522368 kB"
},
"kernel_uptime":{
"days":538,
"hours":22,
"minutes":54,
"seconds":30
},
"reason":"reset-by-installer"
}
}

@abvasudha abvasudha self-assigned this Dec 17, 2024
@abvasudha
Copy link

Hi Richard, Did you try again to verify the above?
The 'show version' parser fetches the 'system version'. Please check and confirm.

Thank Youi

@RichardAtkin
Copy link
Author

RichardAtkin commented Jan 13, 2025 via email

@abvasudha
Copy link

Hi Richard,
Thank you. Hence, I will be closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants