Skip to content

Commit 8bfbc8c

Browse files
committed
improve annotations (#18470)
1 parent c66b575 commit 8bfbc8c

File tree

3 files changed

+41
-73
lines changed

3 files changed

+41
-73
lines changed

ydb/core/viewer/storage_groups.h

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,8 +2190,14 @@ class TStorageGroups : public TViewerPipeClient {
21902190
get:
21912191
tags:
21922192
- storage
2193-
summary: Storage groups
2194-
description: Information about storage groups
2193+
summary: Gets information about storage and groups.
2194+
description: >
2195+
It can get groups of storage groups or all storage groups.
2196+
It's always better to get groups of storage groups first, then get all storage groups in a group.
2197+
To get list of groups of storage groups we call it with `group` parameter first,
2198+
then we call it with `filter_group` and `filter_group_by` parameters to get content of a group.
2199+
For example, to get groups of storage groups we call it with `group=State` parameter,
2200+
then we call it with `filter_group_by=State` and `filter_group=ok` parameters.
21952201
parameters:
21962202
- name: database
21972203
in: query
@@ -2218,56 +2224,14 @@ class TStorageGroups : public TViewerPipeClient {
22182224
description: group id
22192225
required: false
22202226
type: integer
2221-
- name: need_groups
2222-
in: query
2223-
description: return groups information
2224-
required: false
2225-
type: boolean
2226-
default: true
2227-
- name: need_disks
2228-
in: query
2229-
description: return disks information
2230-
required: false
2231-
type: boolean
2232-
default: true
2233-
- name: with
2234-
in: query
2235-
description: >
2236-
filter groups by missing or space:
2237-
* `missing`
2238-
* `space`
2239-
required: false
2240-
type: string
22412227
- name: filter
22422228
description: filter to search for in group ids and pool names
22432229
required: false
22442230
type: string
2245-
- name: filter_group_by
2246-
in: query
2247-
description: >
2248-
filter group by:
2249-
* `GroupId`
2250-
* `Erasure`
2251-
* `Usage`
2252-
* `DiskSpaceUsage`
2253-
* `PoolName`
2254-
* `Kind`
2255-
* `Encryption`
2256-
* `MediaType`
2257-
* `MissingDisks`
2258-
* `State`
2259-
* `Latency`
2260-
required: false
2261-
type: string
2262-
- name: filter_group
2263-
in: query
2264-
description: content for filter group by
2265-
required: false
2266-
type: string
22672231
- name: sort
22682232
in: query
22692233
description: >
2270-
sort by:
2234+
sort storage groups by:
22712235
* `PoolName`
22722236
* `Kind`
22732237
* `MediaType`
@@ -2291,7 +2255,26 @@ class TStorageGroups : public TViewerPipeClient {
22912255
- name: group
22922256
in: query
22932257
description: >
2294-
group by:
2258+
returns groups of storage groups with number of storage groups in every group.
2259+
grouping by:
2260+
* `GroupId`
2261+
* `Erasure`
2262+
* `Usage`
2263+
* `DiskSpaceUsage`
2264+
* `PoolName`
2265+
* `Kind`
2266+
* `Encryption`
2267+
* `MediaType`
2268+
* `MissingDisks`
2269+
* `State`
2270+
* `Latency`
2271+
required: false
2272+
type: string
2273+
- name: filter_group_by
2274+
in: query
2275+
description: >
2276+
returns conent of a group of storage groups, expects to have filter_group parameter.
2277+
grouping by:
22952278
* `GroupId`
22962279
* `Erasure`
22972280
* `Usage`
@@ -2305,6 +2288,11 @@ class TStorageGroups : public TViewerPipeClient {
23052288
* `Latency`
23062289
required: false
23072290
type: string
2291+
- name: filter_group
2292+
in: query
2293+
description: name of a group of storage groups, used for filter_group_by
2294+
required: false
2295+
type: string
23082296
- name: fields_required
23092297
in: query
23102298
description: >
@@ -2333,12 +2321,12 @@ class TStorageGroups : public TViewerPipeClient {
23332321
type: string
23342322
- name: offset
23352323
in: query
2336-
description: skip N nodes
2324+
description: skip N nodes, used together with limit to implement paging
23372325
required: false
23382326
type: integer
23392327
- name: limit
23402328
in: query
2341-
description: limit to N nodes
2329+
description: limit result to N nodes, used together with offset to implement paging
23422330
required: false
23432331
type: integer
23442332
- name: timeout
@@ -2378,8 +2366,8 @@ class TStorageGroups : public TViewerPipeClient {
23782366
" * `ok` - group is okay\n"
23792367
" * `starting:n` - group is okay, but n disks are starting\n"
23802368
" * `replicating:n` - group is okay, all disks are available, but n disks are replicating\n"
2381-
" * `degraded:n(m, m...)` - group is okay, but n fail realms are not available (with m fail domains)\n"
2382-
" * `dead:n` - group is not okay, n fail realms are not available\n";
2369+
" * `degraded:n(m, m...)` - group is okay, but n data centers / racks are not available (with m devices)\n"
2370+
" * `dead:n` - group is not okay, n data centers / racks are not available\n";
23832371
storageGroupProperties["Kind"]["description"] = "kind of the disks in this group (specified by the user)";
23842372
storageGroupProperties["MediaType"]["description"] = "actual physical media type of the disks in this group";
23852373
storageGroupProperties["MissingDisks"]["description"] = "number of disks missing";

ydb/core/viewer/viewer_healthcheck.h

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -239,25 +239,11 @@ class TJsonHealthCheck : public TViewerPipeClient {
239239
.Summary = "Self-check result",
240240
.Description = "Performs self-check and returns result",
241241
});
242-
yaml.AddParameter({
243-
.Name = "enums",
244-
.Description = "convert enums to strings",
245-
.Type = "boolean",
246-
});
247-
yaml.AddParameter({
248-
.Name = "ui64",
249-
.Description = "return ui64 as number",
250-
.Type = "boolean",
251-
});
252-
yaml.AddParameter({
253-
.Name = "timeout",
254-
.Description = "timeout in ms",
255-
.Type = "integer",
256-
});
257242
yaml.AddParameter({
258243
.Name = "database",
259-
.Description = "database name",
244+
.Description = "database name, use cluster domain name to get cluster storage status",
260245
.Type = "string",
246+
.Required = true,
261247
});
262248
yaml.AddParameter({
263249
.Name = "cache",

ydb/core/viewer/viewer_nodes.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3282,7 +3282,7 @@ class TJsonNodes : public TViewerPipeClient {
32823282
get:
32833283
tags:
32843284
- viewer
3285-
summary: Nodes info
3285+
summary: To get information about nodes
32863286
description: Information about nodes
32873287
parameters:
32883288
- name: database
@@ -3318,12 +3318,6 @@ class TJsonNodes : public TViewerPipeClient {
33183318
* `dynamic`
33193319
* `storage`
33203320
* `any`
3321-
- name: with
3322-
in: query
3323-
description: >
3324-
filter groups by missing or space:
3325-
* `missing`
3326-
* `space`
33273321
- name: storage
33283322
in: query
33293323
description: return storage info

0 commit comments

Comments
 (0)