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-3133 - Updated arg parsing and added --help_summary support #78

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

claplante-candela
Copy link
Collaborator

Updated arg parsing/verification to be stand-alone functions outside of main.
Added support for --help_summary flag per LAN-3133.

Signed-off-by: Cameron LaPlante [email protected]

Created parse_args and validate_args functions to clean up main.
Removed argument validation from inside of add_wanpath.

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

./lf_create_wanpath.py --mgr 192.168.101.189 --mgr_port 8080\
                --wp_name test_wp-denna\
                --speed 102400 --latency 25 --max_jitter 50 --jitter_freq 6 --drop_freq 12\
                --log_level debug --debug

Signed-off-by: Cameron LaPlante <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Added response for help_summary flag.

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]>
Corrected flake8 complaince.
Added 'r' to comment blocks to preserve '\'.

Verified with:
./lf_create_wanpath.py --mgr 192.168.101.189 --mgr_port 8080\
                --wp_name test_wp-test --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]>
@a-gavin a-gavin self-requested a review January 27, 2025 19:16
Copy link
Collaborator

@a-gavin a-gavin left a comment

Choose a reason for hiding this comment

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

LGTM! Let's talk about editing PRs for future work. I see that the second commit introduces a whitespace error which the third commit fixes.

@a-gavin a-gavin merged commit afa3e36 into greearb:master Jan 27, 2025
1 check passed
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

2 participants