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

lf_create_wanpath.py: LAN-3630 - added '--help_summary' support #72

Closed
wants to merge 3 commits into from

Conversation

claplante-candela
Copy link
Collaborator

Corrected issue where lf_create_wanpath.py did not support help summary and reconfigured argument parsing to be similar to create_station.py.

Verified with:
./lf_create_wanpath.py --help_summary

./lf_create_wanpath.py --mgr 192.168.102.158 --mgr_port 8080
--wp_name test_wp-A --wl_endp test_wl-A
--speed 102400 --latency 25 --max_jitter 50 --jitter_freq 6 --drop_freq 12
--log_level debug --debug

epilog='''\
Create Wanpaths
''',
description='''\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should this maybe be a raw docstring so that the '' don't get eaten in the output?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not against removing it entirely. I think the extra spacing is added to center it in the shell when --help is specified (epilogue is the first line above the next prompt)

@ct-dylaneskew
Copy link
Collaborator

I think this should really be split into two patches: One for the --help_summary changes, and one for the arg parsing structural changes. Otherwise, I think it looks fine, not that my opinion matters in this area

@a-gavin
Copy link
Collaborator

a-gavin commented Jan 24, 2025

Agreed with @ct-dylaneskew's feedback. Please separate into two patches and resubmit

Moved parsing out of main, and added validation for required arguments

Verified with:
./lf_create_wanpath.py --mgr 192.168.101.189 --mgr_port 8080\
                --wp_name test_wp-A --wl_endp test_wl-A\
                --speed 102400 --latency 25 --max_jitter 50 --jitter_freq 6 --drop_freq 12\
                --log_level debug --debug

Signed-off-by: Cameron LaPlante <[email protected]>
Added help_summary line and verified.

Verified with:
./lf_create_wanpath.py --help_summary

Out: This script will create and configure a wanpath given an existing wanlink endpoint.

Signed-off-by: Cameron LaPlante <[email protected]>
Removed redundant arg verification and added 'r' in parsing.

Verified with:
./lf_create_wanpath.py --mgr 192.168.101.189 --mgr_port 8080\
                --wp_name test_wp-TESTING --wl_endp test_wl-A\
                --speed 102400 --latency 25 --max_jitter 50 --jitter_freq 6 --drop_freq 12\
                --log_level debug --debug

Signed-off-by: Cameron LaPlante <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants