Parsing out data from Nornir output #714
mikeymastro
started this conversation in
General
Replies: 1 comment 5 replies
-
Hello.
Are you having an issue accessing the object returned by nornir?
It’s usually a multiresult object. You have to use some references in it in order to get to the data.
Is this your problem?
…-----------------------------------------------------
Ioannis Theodoridis
Network & Systems Engineer
---------
Networks Section
Informatics Division
Bank of Greece
-----------------------------------------------------
From: magic9669 ***@***.***>
Sent: Friday, August 27, 2021 3:58 PM
To: nornir-automation/nornir ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [nornir-automation/nornir] Parsing out data from Nornir output (#714)
Hello all.
I want to apologize up front if this is a super simple task, as i'm extremely new to Nornir and trying to learn as much as possible.
I am running netmiko_send_command of show version against all of my Arista devices, and I am just looking to parse out the version number from each device. I cannot slice it like I normally would within Python, most likely due to the data structure that is returned from Nornir. I am having a really difficult time trying to figure this out. I tried to search online for quite some time but to no avail.
I also tried using the Napalm library using the get_facts but still no luck. I think if I can figure out one, I could use it with the other (i'd think!).
Any help would be appreciated. And as it pertains to network automation as a whole, i'm an extreme amateur so again, I apologize if I don't quite understand some of the responses. I hope to get to an intermediate state as quickly as possible haha.
Thanks all.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#714> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADVIRDOS7SQYZKTPMX6GU3LT66DULANCNFSM5C5P36XQ> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub> . <https://github.com/notifications/beacon/ADVIRDJAQ7APZPF5NKE2DJLT66DULA5CNFSM5C5P36X2YY3PNVWWK3TUL52HS4DFVJCGS43DOVZXG2LPN2VGG33NNVSW45C7NFSM4ABWBZKA.gif>
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
edit - this is for Nornir 3.0
Hello all.
I want to apologize up front if this is a super simple task, as i'm extremely new to Nornir and trying to learn as much as possible.
I am running netmiko_send_command of show version against all of my Arista devices, and I am just looking to parse out the version number from each device. I cannot slice it like I normally would within Python, most likely due to the data structure that is returned from Nornir. I am having a really difficult time trying to figure this out. I tried to search online for quite some time but to no avail.
I also tried using the Napalm library using the get_facts but still no luck. I think if I can figure out one, I could use it with the other (i'd think!).
Any help would be appreciated. And as it pertains to network automation as a whole, i'm an extreme amateur so again, I apologize if I don't quite understand some of the responses. I hope to get to an intermediate state as quickly as possible haha.
Thanks all.
Beta Was this translation helpful? Give feedback.
All reactions