Skip to main content

clientapi_pve/models/
nodes_ceph_createpool_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NodesCephCreatepoolRequest {
16
17    /// 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).
18    #[serde(rename = "add_storages", skip_serializing_if = "Option::is_none")]
19    pub add_storages: Option<models::PveBoolean>,
20
21    /// The application of the pool.
22    #[serde(rename = "application", skip_serializing_if = "Option::is_none")]
23    pub application: Option<models::PveApplicationEnum>,
24
25    /// The rule to use for mapping object placement in the cluster.
26    #[serde(rename = "crush_rule", skip_serializing_if = "Option::is_none")]
27    pub crush_rule: Option<String>,
28
29    /// 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.
30    #[serde(rename = "erasure-coding", skip_serializing_if = "Option::is_none")]
31    pub erasure_coding: Option<Box<models::PveErasureCodingField>>,
32
33    /// Minimum number of replicas per object
34    #[serde(rename = "min_size", skip_serializing_if = "Option::is_none")]
35    pub min_size: Option<i32>,
36
37    /// The name of the pool. It must be unique.
38    #[serde(rename = "name")]
39    pub name: String,
40
41    /// The automatic PG scaling mode of the pool.
42    #[serde(rename = "pg_autoscale_mode", skip_serializing_if = "Option::is_none")]
43    pub pg_autoscale_mode: Option<models::PvePgAutoscaleModeEnum>,
44
45    /// Number of placement groups.
46    #[serde(rename = "pg_num", skip_serializing_if = "Option::is_none")]
47    pub pg_num: Option<i32>,
48
49    /// Minimal number of placement groups.
50    #[serde(rename = "pg_num_min", skip_serializing_if = "Option::is_none")]
51    pub pg_num_min: Option<i32>,
52
53    /// Number of replicas per object
54    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
55    pub size: Option<i32>,
56
57    /// The estimated target size of the pool for the PG autoscaler.
58    #[serde(rename = "target_size", skip_serializing_if = "Option::is_none")]
59    pub target_size: Option<String>,
60
61    /// The estimated target ratio of the pool for the PG autoscaler.
62    #[serde(rename = "target_size_ratio", skip_serializing_if = "Option::is_none")]
63    pub target_size_ratio: Option<f64>,
64
65
66}
67
68impl NodesCephCreatepoolRequest {
69    pub fn new(name: String) -> NodesCephCreatepoolRequest {
70        NodesCephCreatepoolRequest {
71            
72            add_storages: None,
73            
74            application: None,
75            
76            crush_rule: None,
77            
78            erasure_coding: None,
79            
80            min_size: None,
81            
82            name,
83            
84            pg_autoscale_mode: None,
85            
86            pg_num: None,
87            
88            pg_num_min: None,
89            
90            size: None,
91            
92            target_size: None,
93            
94            target_size_ratio: None,
95            
96        }
97    }
98}
99
100