1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NodesCephLspoolsResponseDataInner {
/// Application tags attached to the pool (mapping of application name to its metadata object).
#[serde(rename = "application_metadata", skip_serializing_if = "Option::is_none")]
pub application_metadata: Option<serde_json::Value>,
/// Raw pg_autoscaler status object for this pool; shape varies between Ceph releases.
#[serde(rename = "autoscale_status", skip_serializing_if = "Option::is_none")]
pub autoscale_status: Option<serde_json::Value>,
/// Bytes currently used in the pool; absent if no usage statistics are reported.
#[serde(rename = "bytes_used", skip_serializing_if = "Option::is_none")]
pub bytes_used: Option<i64>,
/// Numeric id of the CRUSH rule used by this pool.
#[serde(rename = "crush_rule")]
pub crush_rule: i64,
/// Human-readable name of the CRUSH rule used by this pool; absent if the rule id is not in the current CRUSH map.
#[serde(rename = "crush_rule_name", skip_serializing_if = "Option::is_none")]
pub crush_rule_name: Option<String>,
/// Minimum number of replicas required to accept writes.
#[serde(rename = "min_size")]
pub min_size: i64,
/// Percentage of pool capacity currently used; absent if no usage statistics are reported.
#[serde(rename = "percent_used", skip_serializing_if = "Option::is_none")]
pub percent_used: Option<f64>,
/// Placement-group autoscaler mode ('on', 'warn' or 'off').
#[serde(rename = "pg_autoscale_mode", skip_serializing_if = "Option::is_none")]
pub pg_autoscale_mode: Option<String>,
/// Current placement-group count.
#[serde(rename = "pg_num")]
pub pg_num: i64,
/// Optimal placement-group count computed by pg_autoscaler.
#[serde(rename = "pg_num_final", skip_serializing_if = "Option::is_none")]
pub pg_num_final: Option<i64>,
/// Minimum placement-group count the pg_autoscaler may choose.
#[serde(rename = "pg_num_min", skip_serializing_if = "Option::is_none")]
pub pg_num_min: Option<i64>,
/// Numeric pool id assigned by Ceph.
#[serde(rename = "pool")]
pub pool: i64,
/// Operator-visible name of the pool.
#[serde(rename = "pool_name")]
pub pool_name: String,
/// Replication factor (target number of object replicas).
#[serde(rename = "size")]
pub size: i64,
/// Operator-supplied target size in bytes; hints the pg_autoscaler.
#[serde(rename = "target_size", skip_serializing_if = "Option::is_none")]
pub target_size: Option<i64>,
/// Operator-supplied target ratio of total pool capacity; hints the pg_autoscaler.
#[serde(rename = "target_size_ratio", skip_serializing_if = "Option::is_none")]
pub target_size_ratio: Option<f64>,
/// Pool type: 'replicated' for n-way replication, 'erasure' for an erasure-coded pool, 'unknown' for types PVE does not yet map.
#[serde(rename = "type")]
pub r#type: models::PveNodesCephTypeEnum,
}
impl NodesCephLspoolsResponseDataInner {
pub fn new(crush_rule: i64, min_size: i64, pg_num: i64, pool: i64, pool_name: String, size: i64, r#type: models::PveNodesCephTypeEnum) -> NodesCephLspoolsResponseDataInner {
NodesCephLspoolsResponseDataInner {
application_metadata: None,
autoscale_status: None,
bytes_used: None,
crush_rule,
crush_rule_name: None,
min_size,
percent_used: None,
pg_autoscale_mode: None,
pg_num,
pg_num_final: None,
pg_num_min: None,
pool,
pool_name,
size,
target_size: None,
target_size_ratio: None,
r#type,
}
}
}