From cdc140f0a3bed0db9e882ae6e90bf3e58025cbf4 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Wed, 7 Jun 2023 14:03:53 +0200 Subject: [PATCH] api2: cluster: ressources: add "localnetwork" zone Signed-off-by: Alexandre Derumier --- PVE/API2/Cluster.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 2e942368..a7224d7f 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -474,6 +474,20 @@ __PACKAGE__->register_method({ } } + #add default "localnetwork" zone + if ($rpcenv->check($authuser, "/sdn/zones/localnetwork", [ 'SDN.Audit' ], 1)) { + foreach my $node (@$nodelist) { + my $local_sdn = { + id => "sdn/$node/localnetwork", + sdn => 'localnetwork', + node => $node, + type => 'sdn', + status => 'ok', + }; + push @$res, $local_sdn; + } + } + if ($have_sdn) { if (!$param->{type} || $param->{type} eq 'sdn') {