-
Notifications
You must be signed in to change notification settings - Fork 387
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
When doing bgp parsing a 'Device' object has no attribute 'execute'
error shows up
#597
Comments
9 times out of 10 this is caused due to having not first connected to your device. Run |
Hi Thomas. Thanks for your answer. |
Ah. Well if that's what you're doing then all you should need to do is run If there's more to it than that, I'm going to need more information. What parser are you using? What command? Are there any other error logs you can provide? |
Sorry for my late answer, we have worked around the problem with a custom parser but for sure I'd love to help. We are calling Then, it ends up calling the This is what I meant with the "non conditional instruction" sentence above. Hope it is clearer now and let me know if I can continue helping. Thanks. |
The problem is this line right here:
It's weird that this is the way it is. As far as I'm aware, this is not allowed in a parser. Despite that though, this has been in place for three years now... If I'm understanding it, lines 4819 to 4831 should be able to be safely wrapped in a try/except to mitigate this problem. Line 4820 ( |
… when unnecessary
I'm parsing some bgp commands and for every command that has a non conditional instruction:
self.device.execute(cmd)
it answers
'Device' object has no attribute 'execute'
That ends with not parsing of commands like
show ip bgp neighbor {neighbor} advertised-routes
or
show bgp all cluster-ids
The text was updated successfully, but these errors were encountered: