[pdm-devel] [PATCH pve-network v2 1/6] sdn: api: return null for rollback / lock endpoints

Stefan Hanreich s.hanreich at proxmox.com
Fri Aug 22 15:49:10 CEST 2025


lock_sdn_config can return a boolean value, which will then in turn
get returned as data from the API calls. Since we hint type null here,
this leads to problems with the pve-api-client in rust. Fix the return
value for this API call by adding an explicit return statement.

Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 src/PVE/API2/Network/SDN.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/API2/Network/SDN.pm b/src/PVE/API2/Network/SDN.pm
index af00b1a..88b229c 100644
--- a/src/PVE/API2/Network/SDN.pm
+++ b/src/PVE/API2/Network/SDN.pm
@@ -192,6 +192,8 @@ __PACKAGE__->register_method({
                 $param->{'lock-token'},
             );
         }
+
+        return;
     },
 });
 
@@ -247,6 +249,8 @@ __PACKAGE__->register_method({
         PVE::Network::SDN::lock_sdn_config(
             $rollback, "could not rollback SDN configuration", $lock_token,
         );
+
+        return;
     },
 });
 
-- 
2.47.2




More information about the pdm-devel mailing list