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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/*
* 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 PveStorageCephfsConfig {
/// File system path.
#[serde(rename = "path")]
pub path: String,
/// Overrides for default content type directories.
#[serde(rename = "content-dirs", skip_serializing_if = "Option::is_none")]
pub content_dirs: Option<String>,
/// IP addresses of monitors (for external clusters).
#[serde(rename = "monhost", skip_serializing_if = "Option::is_none")]
pub monhost: Option<String>,
/// List of nodes for which the storage configuration applies.
#[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
pub nodes: Option<String>,
/// Subdir to mount.
#[serde(rename = "subdir", skip_serializing_if = "Option::is_none")]
pub subdir: Option<String>,
/// Flag to disable the storage.
#[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
pub disable: Option<models::PveBoolean>,
/// NFS/CIFS mount options (see 'man nfs' or 'man mount.cifs')
#[serde(rename = "options", skip_serializing_if = "Option::is_none")]
pub options: Option<String>,
/// RBD Id.
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
/// Allowed content types. NOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
/// Default image format.
#[serde(rename = "format", skip_serializing_if = "Option::is_none")]
pub format: Option<models::PveFormatFormatEnum>,
/// Create the directory if it doesn't exist and populate it with default sub-dirs. NOTE: Deprecated, use the 'create-base-path' and 'create-subdirs' options instead.
#[serde(rename = "mkdir", skip_serializing_if = "Option::is_none")]
pub mkdir: Option<models::PveBoolean>,
/// Create the base directory if it doesn't exist.
#[serde(rename = "create-base-path", skip_serializing_if = "Option::is_none")]
pub create_base_path: Option<models::PveBoolean>,
/// Populate the directory with the default structure.
#[serde(rename = "create-subdirs", skip_serializing_if = "Option::is_none")]
pub create_subdirs: Option<models::PveBoolean>,
/// Mount CephFS through FUSE.
#[serde(rename = "fuse", skip_serializing_if = "Option::is_none")]
pub fuse: Option<models::PveBoolean>,
/// Set I/O bandwidth limit for various operations (in KiB/s).
#[serde(rename = "bwlimit", skip_serializing_if = "Option::is_none")]
pub bwlimit: Option<Box<models::PveBwlimitField>>,
/// Client keyring contents (for external clusters).
#[serde(rename = "keyring", skip_serializing_if = "Option::is_none")]
pub keyring: Option<String>,
/// The retention options with shorter intervals are processed first with --keep-last being the very first one. Each option covers a specific period of time. We say that backups within this period are covered by this option. The next option does not take care of already covered backups and only considers older backups.
#[serde(rename = "prune-backups", skip_serializing_if = "Option::is_none")]
pub prune_backups: Option<String>,
/// Maximal number of protected backups per guest. Use '-1' for unlimited.
#[serde(rename = "max-protected-backups", skip_serializing_if = "Option::is_none")]
pub max_protected_backups: Option<i64>,
/// The Ceph filesystem name.
#[serde(rename = "fs-name", skip_serializing_if = "Option::is_none")]
pub fs_name: Option<String>,
#[serde(rename = "type")]
pub r#type: Type,
}
impl PveStorageCephfsConfig {
pub fn new(path: String, r#type: Type) -> PveStorageCephfsConfig {
PveStorageCephfsConfig {
path,
content_dirs: None,
monhost: None,
nodes: None,
subdir: None,
disable: None,
options: None,
username: None,
content: None,
format: None,
mkdir: None,
create_base_path: None,
create_subdirs: None,
fuse: None,
bwlimit: None,
keyring: None,
prune_backups: None,
max_protected_backups: None,
fs_name: None,
r#type,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "cephfs")]
Cephfs,
}
impl Default for Type {
fn default() -> Type {
Self::Cephfs
}
}