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
/*
* 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 NodesCephCreatepoolRequest {
/// Configure VM and CT storage using the new pool. Defaults to false for replicated pools and to true for erasure-coded pools (since EC pools are typically only useful when wired up to storage).
#[serde(rename = "add_storages", skip_serializing_if = "Option::is_none")]
pub add_storages: Option<models::PveBoolean>,
/// The application of the pool.
#[serde(rename = "application", skip_serializing_if = "Option::is_none")]
pub application: Option<models::PveApplicationEnum>,
/// The rule to use for mapping object placement in the cluster.
#[serde(rename = "crush_rule", skip_serializing_if = "Option::is_none")]
pub crush_rule: Option<String>,
/// Create an erasure coded pool for RBD with an accompaning replicated pool for metadata storage. With EC, the common ceph options 'size', 'min_size' and 'crush_rule' parameters will be applied to the metadata pool.
#[serde(rename = "erasure-coding", skip_serializing_if = "Option::is_none")]
pub erasure_coding: Option<Box<models::PveErasureCodingField>>,
/// Minimum number of replicas per object
#[serde(rename = "min_size", skip_serializing_if = "Option::is_none")]
pub min_size: Option<i32>,
/// The name of the pool. It must be unique.
#[serde(rename = "name")]
pub name: String,
/// The automatic PG scaling mode of the pool.
#[serde(rename = "pg_autoscale_mode", skip_serializing_if = "Option::is_none")]
pub pg_autoscale_mode: Option<models::PvePgAutoscaleModeEnum>,
/// Number of placement groups.
#[serde(rename = "pg_num", skip_serializing_if = "Option::is_none")]
pub pg_num: Option<i32>,
/// Minimal number of placement groups.
#[serde(rename = "pg_num_min", skip_serializing_if = "Option::is_none")]
pub pg_num_min: Option<i32>,
/// Number of replicas per object
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<i32>,
/// The estimated target size of the pool for the PG autoscaler.
#[serde(rename = "target_size", skip_serializing_if = "Option::is_none")]
pub target_size: Option<String>,
/// The estimated target ratio of the pool for the PG autoscaler.
#[serde(rename = "target_size_ratio", skip_serializing_if = "Option::is_none")]
pub target_size_ratio: Option<f64>,
}
impl NodesCephCreatepoolRequest {
pub fn new(name: String) -> NodesCephCreatepoolRequest {
NodesCephCreatepoolRequest {
add_storages: None,
application: None,
crush_rule: None,
erasure_coding: None,
min_size: None,
name,
pg_autoscale_mode: None,
pg_num: None,
pg_num_min: None,
size: None,
target_size: None,
target_size_ratio: None,
}
}
}