all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 2/5] api: add state standard option
Date: Fri, 28 Feb 2025 15:01:33 +0100	[thread overview]
Message-ID: <20250228140136.124286-3-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250228140136.124286-1-s.hanreich@proxmox.com>

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@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


  parent reply	other threads:[~2025-02-28 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 14:01 [pve-devel] [PATCH network 0/5] Improve documentation for SDN API endpoints used by PDM Stefan Hanreich
2025-02-28 14:01 ` [pve-devel] [PATCH pve-network 1/5] controllers: fix maximum value for ASN Stefan Hanreich
2025-03-10 15:29   ` Shannon Sterz
2025-03-11  5:53     ` Matthieu Pignolet via pve-devel
2025-03-11 10:50       ` DERUMIER, Alexandre via pve-devel
2025-02-28 14:01 ` Stefan Hanreich [this message]
2025-02-28 14:01 ` [pve-devel] [PATCH pve-network 3/5] api: controllers: update schema of endpoints Stefan Hanreich
2025-02-28 14:01 ` [pve-devel] [PATCH pve-network 4/5] api: vnets: " Stefan Hanreich
2025-02-28 14:01 ` [pve-devel] [PATCH pve-network 5/5] api: zones: " Stefan Hanreich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250228140136.124286-3-s.hanreich@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal