Skip to content

Commit

Permalink
Network: add target parameter for GET 1.0/networks and network_get_ta…
Browse files Browse the repository at this point in the history
…rget api extension (#14419)

# Done

* add target parameter for GET 1.0/networks 
* add network_get_target api extension

fixes #14406 

~~The UI can fetch local networks for each member, and we don't need to
populate the `locations` field for non managed networks in the response
of `GET 1.0/netwroks`. Populating that field is expensive, because LXD
would have to fan out the request to all members to collect the network
interface lists for all of them.~~ Edit: We still need to add the
`locations` field in a follow-up, because it is the right thing to do
for the CLI.

This unblocks the UI work on Network management for cluster
environments. Especially to fetch networks per cluster member in order
to provide the right list of available uplinks/parents per member.
  • Loading branch information
tomponline authored Dec 12, 2024
2 parents b99d691 + b774b67 commit 510c011
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/api-extensions.md
5 changes: 5 additions & 0 deletions doc/rest-api.yaml
11 changes: 10 additions & 1 deletion lxc/network.go
11 changes: 11 additions & 0 deletions lxd/networks.go
1 change: 1 addition & 0 deletions shared/version/api.go
1 change: 1 addition & 0 deletions test/includes/clustering.sh
7 changes: 7 additions & 0 deletions test/suites/clustering.sh

0 comments on commit 510c011

Please sign in to comment.