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

Get the active interface associated with gw #4061

Conversation

yalzhang
Copy link
Contributor

@yalzhang yalzhang commented Feb 7, 2025

The original get_default_gateway_json() in utils_net.py is incomplete and can not work well when iface_name=True. Update it.

@yalzhang
Copy link
Contributor Author

yalzhang commented Feb 7, 2025

before the fix, when iface_name=true, it still get the gateway not the iface name. The case below will fail:
virtual_network.connectivity_check.ethernet_interface.managed_no.negative_test.managed_yes.non_root_user
Error while retrieving IP address from interface 10.73.105.254.
after the fix, it works well
(1/1) type_specific.io-github-autotest-libvirt.virtual_network.connectivity_check.ethernet_interface.managed_no.negative_test.managed_yes.non_root_user: PASS (44.23 s)

The original get_default_gateway_json() in utils_net.py is incomplete
 and can not work well when iface_name=True. Update it.

Signed-off-by: Yalan Zhang <[email protected]>
@yalzhang yalzhang force-pushed the fix_get_default_gateway_json branch from 9adc1ab to 11d5f2a Compare February 7, 2025 04:18
@yalzhang
Copy link
Contributor Author

yalzhang commented Feb 7, 2025

@chloerh Please help to review, Thank you!

@yalzhang yalzhang closed this Feb 7, 2025
@yalzhang
Copy link
Contributor Author

yalzhang commented Feb 7, 2025

duplicate

@yalzhang yalzhang deleted the fix_get_default_gateway_json branch February 7, 2025 04:25
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.

1 participant