From ecfd8b080be0f6be62988c24f9174cccd7cce514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Mon, 6 May 2024 14:20:52 -0400 Subject: [PATCH] incus/network_allocations: Update for client changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- cmd/incus/network_allocations.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/incus/network_allocations.go b/cmd/incus/network_allocations.go index 8a8c77473ac..b5f36f430df 100644 --- a/cmd/incus/network_allocations.go +++ b/cmd/incus/network_allocations.go @@ -73,7 +73,17 @@ func (c *cmdNetworkListAllocations) Run(cmd *cobra.Command, args []string) error resource := resources[0] server := resource.server.UseProject(c.flagProject) - addresses, err := server.GetNetworkAllocations(c.flagAllProjects) + + if c.flagAllProjects { + addresses, err := server.GetNetworkAllocationsAllProjects() + if err != nil { + return err + } + + return c.pretty(addresses) + } + + addresses, err := server.GetNetworkAllocations() if err != nil { return err }