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

Make NETWORK arg consistent in commands #318

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

pederhan
Copy link
Member

Since we can specify a network with its network id in network info (i.e. 192.168.0.0 can be used to find the network 192.168.0.0/24), it makes sense to make this behavior consistent across all network commands. That way, network info 192.168.0.0 and network list_unused_addresses 192.168.0.0 both work by finding the network associated with the address 192.168.0.0.

A side effect of this new approach, which uses Network.get_by_any_means_or_raise(), is that these commands can also find networks using their internal IDs.

Copy link
Collaborator

@terjekv terjekv left a comment

Choose a reason for hiding this comment

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

LGTM. What can possibly go wrong? 😄

@terjekv terjekv merged commit 93b6ac5 into unioslo:master Nov 12, 2024
6 checks passed
@pederhan pederhan deleted the consistent-network-arg-semantics branch November 12, 2024 09:21
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.

2 participants