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

interfaces: T4885: add 'clear interfaces counters' to op-mode #1916

Merged
merged 3 commits into from
Mar 29, 2023

Conversation

jestabro
Copy link
Contributor

@jestabro jestabro commented Mar 28, 2023

Change Summary

Note: this will need to be merged after
vyos/vyatta-op#59
to avoid conflicting templates.

The functions clear_counters and reset_counters were originally translated from Perl to Python in operational.py, however, they had errors and were never exposed in op-mode. Add fix; add to op-mode interfaces.py; add op-mode-defs.

Note that reset counters was never exposed in vyatta-op: the 'reset' function removes the cached values (from a previous clear), returning to the raw counters of '/sys/class/net/ifname/statistics'. It is a question as to whether this is useful; this PR fixes the reset function but does not expose it, focusing only on the useful 'clear' function. Reset is trivial to add if desired.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

Proposed changes

How to test

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@jestabro jestabro self-assigned this Mar 28, 2023
@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, sever-sever and c-po and removed request for a team March 28, 2023 19:16
@c-po c-po merged commit 454a49d into vyos:current Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants