-
Notifications
You must be signed in to change notification settings - Fork 168
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
iface_network/dhcp_range: expect second guest not to get IP #6064
base: master
Are you sure you want to change the base?
Conversation
In 1e88841 `utils_net.get_guest_ip_addr` was replaced by `network_base.get_vm_ip`. However, the first function returned `None` when IP wasn't available whereas the second function raises a test error. Update the code to handle the test error in the same way it would have handle a return value `None`. In this specific case, when dhcp_range is tested, the range is very small so the second VM is expected not to get an ip. Signed-off-by: Sebastian Mitterle <[email protected]>
test cases with
|
@smitterl maybe the function get_vm_ip() could be updated to return None instead of raising error, to avoid different behavior. I think I could just add an arg and make it work. What do you think? |
Do you mean I should add an arg like "raise_on_error" that per default would be |
Yes. I could update it too. 🤝 |
Updated function get_vm_ip: |
In 1e88841
utils_net.get_guest_ip_addr
was replaced bynetwork_base.get_vm_ip
. However, the first function returnedNone
when IP wasn't available whereas the second function raises a test error. Update the code to handle the test error in the same way it would have handle a return valueNone
.In this specific case, when dhcp_range is tested, the range is very small so the second VM is expected not to get an ip.