all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v2 1/2] api: ceph: update return schemas
Date: Fri, 23 Dec 2022 10:59:14 +0100	[thread overview]
Message-ID: <20221223095915.3035857-2-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20221223095915.3035857-1-a.lauterer@proxmox.com>

to include a more complete description of the returned data.
Sort properties in alphabetical order if the list is longer.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---

changes:
- split patch 3/3 from the previous series. This patch contains
the smaller changes
- formatting has been reversed
- phrasing for osd tree reworded

 PVE/API2/Ceph.pm         |  7 ++++++-
 PVE/API2/Ceph/MON.pm     | 11 +++++++++--
 PVE/API2/Ceph/OSD.pm     | 10 ++++++++++
 PVE/API2/Cluster/Ceph.pm |  8 ++++++++
 4 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 55220324..cc8720b2 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -622,7 +622,12 @@ __PACKAGE__->register_method ({
 	type => 'array',
 	items => {
 	    type => "object",
-	    properties => {},
+	    properties => {
+		name => {
+		    description => "Name of the CRUSH rule.",
+		    type => "string",
+		}
+	    },
 	},
 	links => [ { rel => 'child', href => "{name}" } ],
     },
diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
index 5771bb46..7f252875 100644
--- a/PVE/API2/Ceph/MON.pm
+++ b/PVE/API2/Ceph/MON.pm
@@ -212,9 +212,16 @@ __PACKAGE__->register_method ({
 	items => {
 	    type => "object",
 	    properties => {
-		name => { type => 'string' },
 		addr => { type => 'string', optional => 1 },
-		host => { type => 'string', optional => 1 },
+		ceph_version => { type => 'string', optional => 1 },
+		ceph_version_short => { type => 'string', optional => 1 },
+		direxists => { type => 'string', optional => 1 },
+		host => { type => 'boolean', optional => 1 },
+		name => { type => 'string' },
+		quorum => { type => 'boolean', optional => 1 },
+		rank => { type => 'integer', optional => 1 },
+		service => { type => 'integer', optional => 1 },
+		state => { type => 'string', optional => 1 },
 	    },
 	},
 	links => [ { rel => 'child', href => "{name}" } ],
diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
index 93433b3a..18195743 100644
--- a/PVE/API2/Ceph/OSD.pm
+++ b/PVE/API2/Ceph/OSD.pm
@@ -88,6 +88,16 @@ __PACKAGE__->register_method ({
     # fixme: return a list instead of extjs tree format ?
     returns => {
 	type => "object",
+	items => {
+	    type => "object",
+	    properties => {
+		flags => { type => "string" },
+		root => {
+		    type => "object",
+		    description => "Tree with OSDs in the CRUSH map structure.",
+		},
+	    },
+	},
     },
     code => sub {
 	my ($param) = @_;
diff --git a/PVE/API2/Cluster/Ceph.pm b/PVE/API2/Cluster/Ceph.pm
index 7f825003..387b8c3c 100644
--- a/PVE/API2/Cluster/Ceph.pm
+++ b/PVE/API2/Cluster/Ceph.pm
@@ -181,6 +181,14 @@ __PACKAGE__->register_method ({
 		    description => "Flag name.",
 		    type => 'string', enum => $possible_flags_list,
 		},
+		description => {
+		    description => "Flag description.",
+		    type => 'string',
+		},
+		value => {
+		    description => "Flag value.",
+		    type => 'boolean',
+		},
 	    },
 	},
 	links => [ { rel => 'child', href => "{name}" } ],
-- 
2.30.2





  reply	other threads:[~2022-12-23  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  9:59 [pve-devel] [PATCH manager v2 0/2] Ceph API " Aaron Lauterer
2022-12-23  9:59 ` Aaron Lauterer [this message]
2022-12-23  9:59 ` [pve-devel] [PATCH manager v2 2/2] api: ceph: metadata: update return schema Aaron Lauterer
2023-01-16 15:35 ` [pve-devel] applied-series: [PATCH manager v2 0/2] Ceph API update return schemas Thomas Lamprecht

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=20221223095915.3035857-2-a.lauterer@proxmox.com \
    --to=a.lauterer@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