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

Get facts for cisco devices fails #150

Open
indy-independence opened this issue Jan 12, 2021 · 1 comment
Open

Get facts for cisco devices fails #150

indy-independence opened this issue Jan 12, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@indy-independence
Copy link
Member

os_version for some Cisco devices can exceed 64 chars and won't fit into the database (max 64 chars)
Example os_version: "C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(2)E7, RELEASE SOFTWARE (fc3)" (81 characters)

@indy-independence indy-independence added the bug Something isn't working label Jan 12, 2021
@indy-independence
Copy link
Member Author

indy-independence commented Jan 12, 2021

Should we really store that entire string? Seems like NAPALM gets it via "show version" and then:
_, os_version = line.split("Cisco IOS Software, ")

If you ask about version via NETCONF API you would get something like "16.9" so much shorter

Maybe we need some logic of our own to normalize os versions. You could do, if platform == "ios" then:

>>> m = re.match(r"[0-9]{2}\.[0-9]+.*", "C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(2)E7, RELEASE SOFTWARE (fc3)")
>>> m.groups()
('15.2(2)E7, RELEASE SOFTWARE (fc3)',)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant