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.hanre...@proxmox.com>
---
 src/PVE/Network/SDN.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
index 0f6754a..cedbfd8 100644
--- a/src/PVE/Network/SDN.pm
+++ b/src/PVE/Network/SDN.pm
@@ -52,6 +52,13 @@ PVE::Cluster::cfs_register_file(
     sub { my ($filename, $data) = @_; return $data; }
 );
 
+PVE::JSONSchema::register_standard_option('pve-sdn-config-state', {
+    type => 'string',
+    enum => ['new', 'changed', 'deleted'],
+    description => 'State of the SDN configuration object.',
+    optional => 1,
+});
+
 PVE::JSONSchema::register_standard_option('pve-sdn-lock-secret', {
     type => 'string',
     description => "the secret for unlocking the global SDN configuration",
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to