clientapi_pve/models/nodes_ceph_createosd_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 NodesCephCreateosdRequest {
16
17 /// Set the device class of the OSD in crush.
18 #[serde(rename = "crush-device-class", skip_serializing_if = "Option::is_none")]
19 pub crush_device_class: Option<String>,
20
21 /// Block device name for block.db.
22 #[serde(rename = "db_dev", skip_serializing_if = "Option::is_none")]
23 pub db_dev: Option<String>,
24
25 /// If a block.db is requested but the size is not given, will be automatically selected by: bluestore_block_db_size from the ceph database (osd or global section) or config (osd or global section) in that order. If this is not available, it will be sized 10% of the size of the OSD device. Fails if the available size is not enough.
26 #[serde(rename = "db_dev_size", skip_serializing_if = "Option::is_none")]
27 pub db_dev_size: Option<f64>,
28
29 /// Block device name.
30 #[serde(rename = "dev")]
31 pub dev: String,
32
33 /// Enables encryption of the OSD.
34 #[serde(rename = "encrypted", skip_serializing_if = "Option::is_none")]
35 pub encrypted: Option<models::PveBoolean>,
36
37 /// OSD services per physical device. Only useful for fast NVMe devices to utilize their performance better. Mutually exclusive with 'db_dev' and 'wal_dev'.
38 #[serde(rename = "osds-per-device", skip_serializing_if = "Option::is_none")]
39 pub osds_per_device: Option<i64>,
40
41 /// Block device name for block.wal.
42 #[serde(rename = "wal_dev", skip_serializing_if = "Option::is_none")]
43 pub wal_dev: Option<String>,
44
45 /// If a block.wal is requested but the size is not given, will be automatically selected by: bluestore_block_wal_size from the ceph database (osd or global section) or config (osd or global section) in that order. If this is not available, it will be sized 1% of the size of the OSD device. Fails if the available size is not enough.
46 #[serde(rename = "wal_dev_size", skip_serializing_if = "Option::is_none")]
47 pub wal_dev_size: Option<f64>,
48
49
50}
51
52impl NodesCephCreateosdRequest {
53 pub fn new(dev: String) -> NodesCephCreateosdRequest {
54 NodesCephCreateosdRequest {
55
56 crush_device_class: None,
57
58 db_dev: None,
59
60 db_dev_size: None,
61
62 dev,
63
64 encrypted: None,
65
66 osds_per_device: None,
67
68 wal_dev: None,
69
70 wal_dev_size: None,
71
72 }
73 }
74}
75
76