[pdm-devel] [PATCH pve-network v2 3/6] api: add state standard option

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


GET calls on SDN entities with pending=1 show the state of the entity.
Define a common option for this, since it is the same across all SDN
entities. This will be used for improving the API documentation later
on.

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

diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
index 83f2cc7..f2ecd4a 100644
--- a/src/PVE/Network/SDN.pm
+++ b/src/PVE/Network/SDN.pm
@@ -60,6 +60,16 @@ PVE::JSONSchema::register_standard_option(
     },
 );
 
+PVE::JSONSchema::register_standard_option(
+    'pve-sdn-config-state',
+    {
+        type => 'string',
+        enum => ['new', 'changed', 'deleted'],
+        description => 'State of the SDN configuration object.',
+        optional => 1,
+    },
+);
+
 # improve me : move status code inside plugins ?
 
 sub ifquery_check {
-- 
2.47.2




More information about the pdm-devel mailing list