-
Notifications
You must be signed in to change notification settings - Fork 555
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
resolve #1293 #1382
resolve #1293 #1382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start @minefuto, thanks for having a go at this. I've requested some changes, as I wouldn't want to increase the complexity while the data is already available.
napalm/junos/junos.py
Outdated
@@ -403,11 +403,18 @@ def get_interfaces_counters(self): | |||
"""Return interfaces counters.""" | |||
query = junos_views.junos_iface_counter_table(self.device) | |||
query.get() | |||
query_logical = junos_views.junos_logical_iface_counter_table(self.device) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should make a separate request just for this: the logical interfaces are already present in the junos_iface_counter_table
, we just need to extract them. For this we can use the nested tables junos-eznc offers, see an example here where a view is able to reference a sub-table. In the same way, we can have the logical interfaces nested under a sub-table, and avoid an additional RPC request.
Thanks, @mirceaulinic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @minefuto - thanks for making the changes. It is slightly different from what I had in mind, but I like this implementation too. 😄
This is related to #1293.
I added support for logical interface counters of Junos.