-
Notifications
You must be signed in to change notification settings - Fork 383
ntp: T4909 rewrite NTP op mode in the new format #3307
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
Conversation
There is no check if the service is not configured
|
The commit message does not include the task number, but you marked it as done. For future use please |
Added this function to ntp.py |
@dmbaturin, @sever-sever I've posted a question here seeking feedback https://vyos.dev/T4909 would appreciate you input. |
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.
Feedback implemented (1) add raw mode, (2) check if ntp service is configured
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.
Feedback has been incorporated and changes applied as result.
Use please this in the future it will be difficult to revert the changes for example It is a good idea to have just one commit. |
@Giggum a way to fix it would be to |
ntp: T4909: Rewrite NTP op mode in new format Adapts ntp.xml.in to reference new ntp.py file Add ntp.py Adds a check to ntp.py to verify if the ntp service is configured Adds raw mode to ntp.py For raw output, replaces the original method of parsing the command line output FROM re.split+regex TO csv.reader. Separates chrony commands into equivalent functions show_tracking, show_sources, source_sourcestats and show_activity Revises the names of raw dictionary keys variables to be lowercase Corrects a comment typo and renames function name used for raw mode
@sever-sever, @GurliGebis thank you both was abled to squash those commits into one. |
You're welcome 🙂 |
@Mergifyio backport sagitta |
✅ Backports have been created
|
Change Summary
Op commands are rewritten in Python and encompasses the existing chronyc calls that were in show_ntp.sh.
Have also added two additional functions. Op-mode definition has been updated accordingly and follows the chronyc command language so that there's alignment between xml and python source.
Op commands consist of:
show ntp
show ntp activity
show ntp sources
show ntp tracking
note: show ntp activity and sources are new additions, while tracking has been renamed from previous system.
See task in Maniphest for additional info,
Types of changes
Related Task(s)
https://vyos.dev/T4909
Related PR(s)
Component(s) name
Proposed changes
How to test
Smoketest result
Checklist: