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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
/*
* 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 StorageUpdateStorageRequest {
/// ZFS block size
#[serde(rename = "blocksize", skip_serializing_if = "Option::is_none")]
pub blocksize: Option<String>,
/// 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>>,
/// host group for comstar views
#[serde(rename = "comstar_hg", skip_serializing_if = "Option::is_none")]
pub comstar_hg: Option<String>,
/// target group for comstar views
#[serde(rename = "comstar_tg", skip_serializing_if = "Option::is_none")]
pub comstar_tg: 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>,
/// Overrides for default content type directories.
#[serde(rename = "content-dirs", skip_serializing_if = "Option::is_none")]
pub content_dirs: Option<String>,
/// 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>,
/// Data Pool (for erasure coding only)
#[serde(rename = "data-pool", skip_serializing_if = "Option::is_none")]
pub data_pool: Option<String>,
/// A list of settings you want to delete.
#[serde(rename = "delete", skip_serializing_if = "Option::is_none")]
pub delete: Option<String>,
/// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
#[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
pub digest: Option<String>,
/// Flag to disable the storage.
#[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
pub disable: Option<models::PveBoolean>,
/// CIFS domain.
#[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Encryption key. Use 'autogen' to generate one automatically without passphrase.
#[serde(rename = "encryption-key", skip_serializing_if = "Option::is_none")]
pub encryption_key: Option<String>,
/// Certificate SHA 256 fingerprint.
#[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")]
pub fingerprint: Option<String>,
/// Default image format.
#[serde(rename = "format", skip_serializing_if = "Option::is_none")]
pub format: Option<models::PveFormatFormatEnum>,
/// The Ceph filesystem name.
#[serde(rename = "fs-name", skip_serializing_if = "Option::is_none")]
pub fs_name: Option<String>,
/// Mount CephFS through FUSE.
#[serde(rename = "fuse", skip_serializing_if = "Option::is_none")]
pub fuse: Option<models::PveBoolean>,
/// Assume the given path is an externally managed mountpoint and consider the storage offline if it is not mounted. Using a boolean (yes/no) value serves as a shortcut to using the target path in this field.
#[serde(rename = "is_mountpoint", skip_serializing_if = "Option::is_none")]
pub is_mountpoint: Option<String>,
/// Client keyring contents (for external clusters).
#[serde(rename = "keyring", skip_serializing_if = "Option::is_none")]
pub keyring: Option<String>,
/// Always access rbd through krbd kernel module.
#[serde(rename = "krbd", skip_serializing_if = "Option::is_none")]
pub krbd: Option<models::PveBoolean>,
/// target portal group for Linux LIO targets
#[serde(rename = "lio_tpg", skip_serializing_if = "Option::is_none")]
pub lio_tpg: Option<String>,
/// Base64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.
#[serde(rename = "master-pubkey", skip_serializing_if = "Option::is_none")]
pub master_pubkey: 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>,
/// 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>,
/// IP addresses of monitors (for external clusters).
#[serde(rename = "monhost", skip_serializing_if = "Option::is_none")]
pub monhost: Option<String>,
/// mount point
#[serde(rename = "mountpoint", skip_serializing_if = "Option::is_none")]
pub mountpoint: Option<String>,
/// Namespace.
#[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
/// Set the NOCOW flag on files. Disables data checksumming and causes data errors to be unrecoverable from while allowing direct I/O. Only use this if data does not need to be any more safe than on a single ext4 formatted disk with no underlying raid system.
#[serde(rename = "nocow", skip_serializing_if = "Option::is_none")]
pub nocow: Option<models::PveBoolean>,
/// List of nodes for which the storage configuration applies.
#[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
pub nodes: Option<String>,
/// disable write caching on the target
#[serde(rename = "nowritecache", skip_serializing_if = "Option::is_none")]
pub nowritecache: 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>,
/// Password for accessing the share/datastore.
#[serde(rename = "password", skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
/// Pool.
#[serde(rename = "pool", skip_serializing_if = "Option::is_none")]
pub pool: Option<String>,
/// Use this port to connect to the storage instead of the default one (for example, with PBS or ESXi). For NFS and CIFS, use the 'options' option to configure the port via the mount options.
#[serde(rename = "port", skip_serializing_if = "Option::is_none")]
pub port: Option<i32>,
/// Preallocation mode for raw and qcow2 images. Using 'metadata' on raw images results in preallocation=off.
#[serde(rename = "preallocation", skip_serializing_if = "Option::is_none")]
pub preallocation: Option<models::PvePreallocationEnum>,
/// 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>,
/// Zero-out data when removing LVs.
#[serde(rename = "saferemove", skip_serializing_if = "Option::is_none")]
pub saferemove: Option<models::PveBoolean>,
/// Wipe step size in MiB. It will be capped to the maximum supported by the storage.
#[serde(rename = "saferemove-stepsize", skip_serializing_if = "Option::is_none")]
pub saferemove_stepsize: Option<models::PveSaferemoveStepsizeEnum>,
/// Wipe throughput (cstream -t parameter value).
#[serde(rename = "saferemove_throughput", skip_serializing_if = "Option::is_none")]
pub saferemove_throughput: Option<String>,
/// Server IP or DNS name.
#[serde(rename = "server", skip_serializing_if = "Option::is_none")]
pub server: Option<String>,
/// Indicate that this is a single storage with the same contents on all nodes (or all listed in the 'nodes' option). It will not make the contents of a local storage automatically accessible to other nodes, it just marks an already shared storage as such!
#[serde(rename = "shared", skip_serializing_if = "Option::is_none")]
pub shared: Option<models::PveBoolean>,
/// Disable TLS certificate verification, only enable on fully trusted networks!
#[serde(rename = "skip-cert-verification", skip_serializing_if = "Option::is_none")]
pub skip_cert_verification: Option<models::PveBoolean>,
/// SMB protocol version. 'default' if not set, negotiates the highest SMB2+ version supported by both the client and server.
#[serde(rename = "smbversion", skip_serializing_if = "Option::is_none")]
pub smbversion: Option<models::PveSmbversionEnum>,
/// Enable support for creating storage-vendor agnostic snapshot through volume backing-chains.
#[serde(rename = "snapshot-as-volume-chain", skip_serializing_if = "Option::is_none")]
pub snapshot_as_volume_chain: Option<models::PveBoolean>,
/// use sparse volumes
#[serde(rename = "sparse", skip_serializing_if = "Option::is_none")]
pub sparse: Option<models::PveBoolean>,
/// Subdir to mount.
#[serde(rename = "subdir", skip_serializing_if = "Option::is_none")]
pub subdir: Option<String>,
/// Only list logical volumes tagged with 'pve-vm-ID'.
#[serde(rename = "tagged_only", skip_serializing_if = "Option::is_none")]
pub tagged_only: Option<models::PveBoolean>,
/// RBD Id.
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
/// Base path where to look for the created ZFS block devices. Set automatically during creation if not specified. Usually '/dev/zvol'.
#[serde(rename = "zfs-base-path", skip_serializing_if = "Option::is_none")]
pub zfs_base_path: Option<String>,
}
impl StorageUpdateStorageRequest {
pub fn new() -> StorageUpdateStorageRequest {
StorageUpdateStorageRequest {
blocksize: None,
bwlimit: None,
comstar_hg: None,
comstar_tg: None,
content: None,
content_dirs: None,
create_base_path: None,
create_subdirs: None,
data_pool: None,
delete: None,
digest: None,
disable: None,
domain: None,
encryption_key: None,
fingerprint: None,
format: None,
fs_name: None,
fuse: None,
is_mountpoint: None,
keyring: None,
krbd: None,
lio_tpg: None,
master_pubkey: None,
max_protected_backups: None,
mkdir: None,
monhost: None,
mountpoint: None,
namespace: None,
nocow: None,
nodes: None,
nowritecache: None,
options: None,
password: None,
pool: None,
port: None,
preallocation: None,
prune_backups: None,
saferemove: None,
saferemove_stepsize: None,
saferemove_throughput: None,
server: None,
shared: None,
skip_cert_verification: None,
smbversion: None,
snapshot_as_volume_chain: None,
sparse: None,
subdir: None,
tagged_only: None,
username: None,
zfs_base_path: None,
}
}
}