]> git.proxmox.com Git - pve-manager.git/commitdiff
api: ceph: update return schemas
authorAaron Lauterer <a.lauterer@proxmox.com>
Fri, 23 Dec 2022 09:59:14 +0000 (10:59 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 16 Jan 2023 13:32:00 +0000 (14:32 +0100)
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>
PVE/API2/Ceph.pm
PVE/API2/Ceph/MON.pm
PVE/API2/Ceph/OSD.pm
PVE/API2/Cluster/Ceph.pm

index 3a73872dc906c1fc894b866c50ac8ebef3eb75c7..786a1870475c4857aff2237b8c7cd252b4708688 100644 (file)
@@ -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}" } ],
     },
index 5771bb460096f9ee57fad80b4012809e3c75082b..7f25287572c9660e6d1c96307a3627c5ca76c636 100644 (file)
@@ -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}" } ],
index 93433b3a2bc06a87d98f986dfa1ed751432eaadb..18195743acdf96ca46efb389370988d44dc38463 100644 (file)
@@ -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) = @_;
index 7f8250033726f7257e1e82990c63a55e19070082..387b8c3ca89c0048d19d6904fa5e58951a02d32e 100644 (file)
@@ -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}" } ],