]>
Commit | Line | Data |
---|---|---|
56122987 DM |
1 | var pveapi = [ |
2 | { | |
3 | "leaf" : 0, | |
7aacca6f DM |
4 | "path" : "/cluster", |
5 | "info" : { | |
6 | "GET" : { | |
7 | "method" : "GET", | |
8 | "returns" : { | |
9 | "links" : [ | |
10 | { | |
11 | "rel" : "child", | |
12 | "href" : "{name}" | |
13 | } | |
14 | ], | |
15 | "items" : { | |
16 | "type" : "object", | |
17 | "properties" : {} | |
18 | }, | |
19 | "type" : "array" | |
20 | }, | |
21 | "permissions" : { | |
22 | "user" : "all" | |
23 | }, | |
24 | "parameters" : { | |
25 | "additionalProperties" : 0 | |
26 | }, | |
27 | "name" : "index", | |
28 | "description" : "Cluster index." | |
29 | } | |
30 | }, | |
56122987 DM |
31 | "children" : [ |
32 | { | |
56122987 DM |
33 | "info" : { |
34 | "GET" : { | |
56122987 | 35 | "method" : "GET", |
56122987 | 36 | "returns" : { |
7aacca6f | 37 | "type" : "array", |
56122987 DM |
38 | "items" : { |
39 | "type" : "object", | |
40 | "properties" : {} | |
41 | }, | |
56122987 DM |
42 | "links" : [ |
43 | { | |
7aacca6f DM |
44 | "rel" : "child", |
45 | "href" : "{name}" | |
56122987 DM |
46 | } |
47 | ] | |
48 | }, | |
49 | "description" : "Directory index.", | |
50 | "permissions" : { | |
51 | "user" : "all" | |
7aacca6f DM |
52 | }, |
53 | "parameters" : { | |
54 | "additionalProperties" : 0 | |
55 | }, | |
56 | "name" : "index" | |
56122987 DM |
57 | } |
58 | }, | |
7aacca6f | 59 | "text" : "firewall", |
56122987 DM |
60 | "children" : [ |
61 | { | |
7aacca6f DM |
62 | "info" : { |
63 | "GET" : { | |
64 | "method" : "GET", | |
65 | "returns" : { | |
66 | "type" : "array", | |
67 | "links" : [ | |
68 | { | |
69 | "href" : "{group}", | |
70 | "rel" : "child" | |
71 | } | |
72 | ], | |
73 | "items" : { | |
74 | "properties" : { | |
75 | "group" : { | |
76 | "maxLength" : 20, | |
77 | "minLength" : 2, | |
78 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
79 | "description" : "Security Group name.", | |
80 | "type" : "string" | |
81 | }, | |
82 | "digest" : { | |
83 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
84 | "optional" : 0, | |
85 | "type" : "string", | |
86 | "maxLength" : 40 | |
87 | }, | |
88 | "comment" : { | |
89 | "type" : "string", | |
90 | "optional" : 1 | |
91 | } | |
92 | }, | |
93 | "type" : "object" | |
94 | } | |
95 | }, | |
96 | "description" : "List security groups.", | |
97 | "permissions" : { | |
98 | "user" : "all" | |
99 | }, | |
100 | "parameters" : { | |
101 | "additionalProperties" : 0 | |
102 | }, | |
103 | "name" : "list_security_groups" | |
104 | }, | |
105 | "POST" : { | |
106 | "returns" : { | |
107 | "type" : "null" | |
108 | }, | |
109 | "method" : "POST", | |
110 | "parameters" : { | |
111 | "additionalProperties" : 0, | |
112 | "properties" : { | |
113 | "group" : { | |
114 | "maxLength" : 20, | |
115 | "description" : "Security Group name.", | |
116 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
117 | "minLength" : 2, | |
118 | "type" : "string" | |
119 | }, | |
120 | "digest" : { | |
121 | "maxLength" : 40, | |
122 | "optional" : 1, | |
123 | "type" : "string", | |
124 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
125 | }, | |
126 | "rename" : { | |
127 | "maxLength" : 20, | |
128 | "optional" : 1, | |
129 | "type" : "string", | |
130 | "minLength" : 2, | |
131 | "description" : "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.", | |
132 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" | |
133 | }, | |
134 | "comment" : { | |
135 | "type" : "string", | |
136 | "optional" : 1 | |
137 | } | |
138 | } | |
139 | }, | |
140 | "permissions" : { | |
141 | "check" : [ | |
142 | "perm", | |
143 | "/", | |
144 | [ | |
145 | "Sys.Modify" | |
146 | ] | |
147 | ] | |
148 | }, | |
149 | "name" : "create_security_group", | |
150 | "description" : "Create new security group.", | |
151 | "protected" : 1 | |
152 | } | |
153 | }, | |
56122987 | 154 | "text" : "groups", |
56122987 DM |
155 | "children" : [ |
156 | { | |
7aacca6f DM |
157 | "leaf" : 0, |
158 | "path" : "/cluster/firewall/groups/{group}", | |
159 | "info" : { | |
160 | "GET" : { | |
161 | "proxyto" : null, | |
162 | "description" : "List rules.", | |
163 | "permissions" : { | |
164 | "check" : [ | |
165 | "perm", | |
166 | "/", | |
167 | [ | |
168 | "Sys.Audit" | |
169 | ] | |
170 | ] | |
171 | }, | |
172 | "parameters" : { | |
173 | "properties" : { | |
174 | "group" : { | |
175 | "minLength" : 2, | |
176 | "description" : "Security Group name.", | |
177 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
178 | "type" : "string", | |
179 | "maxLength" : 20 | |
180 | } | |
181 | }, | |
182 | "additionalProperties" : 0 | |
183 | }, | |
184 | "name" : "get_rules", | |
185 | "method" : "GET", | |
186 | "returns" : { | |
187 | "items" : { | |
188 | "properties" : { | |
189 | "pos" : { | |
190 | "type" : "integer" | |
191 | } | |
56122987 | 192 | }, |
7aacca6f | 193 | "type" : "object" |
56122987 DM |
194 | }, |
195 | "links" : [ | |
196 | { | |
197 | "href" : "{pos}", | |
198 | "rel" : "child" | |
199 | } | |
7aacca6f DM |
200 | ], |
201 | "type" : "array" | |
56122987 DM |
202 | } |
203 | }, | |
204 | "DELETE" : { | |
56122987 | 205 | "name" : "delete_security_group", |
56122987 DM |
206 | "parameters" : { |
207 | "additionalProperties" : 0, | |
208 | "properties" : { | |
209 | "group" : { | |
56122987 | 210 | "maxLength" : 20, |
56122987 | 211 | "minLength" : 2, |
7aacca6f DM |
212 | "description" : "Security Group name.", |
213 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
56122987 DM |
214 | "type" : "string" |
215 | } | |
216 | } | |
217 | }, | |
56122987 DM |
218 | "permissions" : { |
219 | "check" : [ | |
220 | "perm", | |
221 | "/", | |
222 | [ | |
223 | "Sys.Modify" | |
224 | ] | |
225 | ] | |
7aacca6f DM |
226 | }, |
227 | "protected" : 1, | |
228 | "description" : "Delete security group.", | |
229 | "returns" : { | |
230 | "type" : "null" | |
231 | }, | |
232 | "method" : "DELETE" | |
56122987 DM |
233 | }, |
234 | "POST" : { | |
7aacca6f | 235 | "method" : "POST", |
56122987 DM |
236 | "parameters" : { |
237 | "additionalProperties" : 0, | |
238 | "properties" : { | |
7aacca6f | 239 | "iface" : { |
56122987 | 240 | "maxLength" : 20, |
7aacca6f DM |
241 | "format" : "pve-iface", |
242 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", | |
56122987 | 243 | "minLength" : 2, |
7aacca6f DM |
244 | "optional" : 1, |
245 | "type" : "string" | |
56122987 DM |
246 | }, |
247 | "comment" : { | |
248 | "type" : "string", | |
249 | "optional" : 1 | |
250 | }, | |
7aacca6f DM |
251 | "digest" : { |
252 | "maxLength" : 40, | |
253 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
254 | "optional" : 1, | |
255 | "type" : "string" | |
256 | }, | |
257 | "source" : { | |
258 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
259 | "optional" : 1, | |
56122987 | 260 | "type" : "string", |
7aacca6f | 261 | "format" : "pve-fw-addr-spec" |
56122987 | 262 | }, |
7aacca6f DM |
263 | "sport" : { |
264 | "format" : "pve-fw-sport-spec", | |
265 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
56122987 | 266 | "optional" : 1, |
7aacca6f | 267 | "type" : "string" |
56122987 DM |
268 | }, |
269 | "dest" : { | |
56122987 | 270 | "optional" : 1, |
7aacca6f DM |
271 | "type" : "string", |
272 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
273 | "format" : "pve-fw-addr-spec" | |
56122987 | 274 | }, |
7aacca6f DM |
275 | "action" : { |
276 | "maxLength" : 20, | |
56122987 | 277 | "type" : "string", |
7aacca6f DM |
278 | "optional" : 0, |
279 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
280 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
281 | "minLength" : 2 | |
282 | }, | |
283 | "enable" : { | |
284 | "minimum" : 0, | |
285 | "type" : "integer", | |
286 | "optional" : 1 | |
287 | }, | |
288 | "dport" : { | |
289 | "format" : "pve-fw-dport-spec", | |
290 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
291 | "type" : "string", | |
292 | "optional" : 1 | |
56122987 DM |
293 | }, |
294 | "type" : { | |
295 | "enum" : [ | |
296 | "in", | |
297 | "out", | |
298 | "group" | |
299 | ], | |
300 | "optional" : 0, | |
301 | "type" : "string" | |
302 | }, | |
7aacca6f | 303 | "macro" : { |
56122987 | 304 | "type" : "string", |
56122987 | 305 | "optional" : 1, |
7aacca6f | 306 | "maxLength" : 128 |
56122987 | 307 | }, |
7aacca6f | 308 | "group" : { |
56122987 | 309 | "type" : "string", |
7aacca6f DM |
310 | "description" : "Security Group name.", |
311 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
312 | "minLength" : 2, | |
313 | "maxLength" : 20 | |
56122987 | 314 | }, |
7aacca6f | 315 | "proto" : { |
56122987 | 316 | "optional" : 1, |
7aacca6f DM |
317 | "type" : "string", |
318 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", | |
319 | "format" : "pve-fw-protocol-spec" | |
56122987 | 320 | }, |
7aacca6f | 321 | "pos" : { |
56122987 | 322 | "minimum" : 0, |
7aacca6f DM |
323 | "description" : "Update rule at position <pos>.", |
324 | "type" : "integer", | |
325 | "optional" : 1 | |
56122987 DM |
326 | } |
327 | } | |
328 | }, | |
7aacca6f | 329 | "name" : "create_rule", |
56122987 | 330 | "protected" : 1, |
7aacca6f DM |
331 | "returns" : { |
332 | "type" : "null" | |
333 | }, | |
56122987 DM |
334 | "permissions" : { |
335 | "check" : [ | |
336 | "perm", | |
337 | "/", | |
338 | [ | |
339 | "Sys.Modify" | |
340 | ] | |
341 | ] | |
342 | }, | |
7aacca6f DM |
343 | "description" : "Create new rule.", |
344 | "proxyto" : null | |
56122987 DM |
345 | } |
346 | }, | |
7aacca6f DM |
347 | "children" : [ |
348 | { | |
349 | "text" : "{pos}", | |
350 | "info" : { | |
351 | "PUT" : { | |
352 | "parameters" : { | |
353 | "additionalProperties" : 0, | |
354 | "properties" : { | |
355 | "sport" : { | |
356 | "format" : "pve-fw-sport-spec", | |
357 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
358 | "type" : "string", | |
359 | "optional" : 1 | |
360 | }, | |
361 | "iface" : { | |
362 | "minLength" : 2, | |
363 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", | |
364 | "type" : "string", | |
365 | "optional" : 1, | |
366 | "maxLength" : 20, | |
367 | "format" : "pve-iface" | |
368 | }, | |
369 | "macro" : { | |
370 | "maxLength" : 128, | |
371 | "optional" : 1, | |
372 | "type" : "string" | |
373 | }, | |
374 | "proto" : { | |
375 | "format" : "pve-fw-protocol-spec", | |
376 | "type" : "string", | |
377 | "optional" : 1, | |
378 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." | |
379 | }, | |
380 | "pos" : { | |
381 | "description" : "Update rule at position <pos>.", | |
382 | "type" : "integer", | |
383 | "optional" : 1, | |
384 | "minimum" : 0 | |
385 | }, | |
386 | "action" : { | |
387 | "optional" : 1, | |
388 | "type" : "string", | |
389 | "minLength" : 2, | |
390 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
391 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
392 | "maxLength" : 20 | |
393 | }, | |
394 | "enable" : { | |
395 | "optional" : 1, | |
396 | "type" : "integer", | |
397 | "minimum" : 0 | |
398 | }, | |
399 | "digest" : { | |
400 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
401 | "optional" : 1, | |
402 | "type" : "string", | |
403 | "maxLength" : 40 | |
404 | }, | |
405 | "source" : { | |
406 | "optional" : 1, | |
407 | "type" : "string", | |
408 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
409 | "format" : "pve-fw-addr-spec" | |
410 | }, | |
411 | "dest" : { | |
412 | "format" : "pve-fw-addr-spec", | |
413 | "optional" : 1, | |
414 | "type" : "string", | |
415 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." | |
416 | }, | |
417 | "delete" : { | |
418 | "description" : "A list of settings you want to delete.", | |
419 | "type" : "string", | |
420 | "optional" : 1, | |
421 | "format" : "pve-configid-list" | |
422 | }, | |
423 | "comment" : { | |
424 | "type" : "string", | |
425 | "optional" : 1 | |
426 | }, | |
427 | "moveto" : { | |
428 | "description" : "Move rule to new position <moveto>. Other arguments are ignored.", | |
429 | "type" : "integer", | |
430 | "optional" : 1, | |
431 | "minimum" : 0 | |
432 | }, | |
433 | "group" : { | |
434 | "maxLength" : 20, | |
435 | "type" : "string", | |
436 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
437 | "description" : "Security Group name.", | |
438 | "minLength" : 2 | |
439 | }, | |
440 | "dport" : { | |
441 | "type" : "string", | |
442 | "optional" : 1, | |
443 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
444 | "format" : "pve-fw-dport-spec" | |
445 | }, | |
446 | "type" : { | |
447 | "enum" : [ | |
448 | "in", | |
449 | "out", | |
450 | "group" | |
451 | ], | |
452 | "optional" : 1, | |
453 | "type" : "string" | |
454 | } | |
455 | } | |
456 | }, | |
457 | "name" : "update_rule", | |
458 | "protected" : 1, | |
459 | "method" : "PUT", | |
460 | "permissions" : { | |
461 | "check" : [ | |
462 | "perm", | |
463 | "/", | |
464 | [ | |
465 | "Sys.Modify" | |
466 | ] | |
467 | ] | |
468 | }, | |
469 | "description" : "Modify rule data.", | |
470 | "proxyto" : null, | |
471 | "returns" : { | |
472 | "type" : "null" | |
473 | } | |
474 | }, | |
475 | "DELETE" : { | |
476 | "returns" : { | |
477 | "type" : "null" | |
478 | }, | |
479 | "description" : "Delete rule.", | |
480 | "proxyto" : null, | |
481 | "permissions" : { | |
482 | "check" : [ | |
483 | "perm", | |
484 | "/", | |
485 | [ | |
486 | "Sys.Modify" | |
487 | ] | |
488 | ] | |
489 | }, | |
490 | "method" : "DELETE", | |
491 | "protected" : 1, | |
492 | "name" : "delete_rule", | |
493 | "parameters" : { | |
494 | "properties" : { | |
495 | "pos" : { | |
496 | "type" : "integer", | |
497 | "optional" : 1, | |
498 | "description" : "Update rule at position <pos>.", | |
499 | "minimum" : 0 | |
500 | }, | |
501 | "group" : { | |
502 | "maxLength" : 20, | |
503 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
504 | "description" : "Security Group name.", | |
505 | "minLength" : 2, | |
506 | "type" : "string" | |
507 | }, | |
508 | "digest" : { | |
509 | "type" : "string", | |
510 | "optional" : 1, | |
511 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
512 | "maxLength" : 40 | |
513 | } | |
514 | }, | |
515 | "additionalProperties" : 0 | |
516 | } | |
517 | }, | |
518 | "GET" : { | |
519 | "name" : "get_rule", | |
520 | "permissions" : { | |
521 | "check" : [ | |
522 | "perm", | |
523 | "/", | |
524 | [ | |
525 | "Sys.Audit" | |
526 | ] | |
527 | ] | |
528 | }, | |
529 | "parameters" : { | |
530 | "properties" : { | |
531 | "pos" : { | |
532 | "description" : "Update rule at position <pos>.", | |
533 | "type" : "integer", | |
534 | "optional" : 1, | |
535 | "minimum" : 0 | |
536 | }, | |
537 | "group" : { | |
538 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
539 | "description" : "Security Group name.", | |
540 | "minLength" : 2, | |
541 | "type" : "string", | |
542 | "maxLength" : 20 | |
543 | } | |
544 | }, | |
545 | "additionalProperties" : 0 | |
546 | }, | |
547 | "proxyto" : null, | |
548 | "description" : "Get single rule data.", | |
549 | "returns" : { | |
550 | "properties" : { | |
551 | "pos" : { | |
552 | "type" : "integer" | |
553 | } | |
554 | }, | |
555 | "type" : "object" | |
556 | }, | |
557 | "method" : "GET" | |
558 | } | |
559 | }, | |
560 | "path" : "/cluster/firewall/groups/{group}/{pos}", | |
561 | "leaf" : 1 | |
562 | } | |
563 | ], | |
56122987 DM |
564 | "text" : "{group}" |
565 | } | |
566 | ], | |
7aacca6f DM |
567 | "leaf" : 0, |
568 | "path" : "/cluster/firewall/groups" | |
569 | }, | |
570 | { | |
56122987 DM |
571 | "info" : { |
572 | "GET" : { | |
56122987 | 573 | "method" : "GET", |
56122987 | 574 | "returns" : { |
7aacca6f | 575 | "type" : "array", |
56122987 DM |
576 | "links" : [ |
577 | { | |
578 | "rel" : "child", | |
579 | "href" : "{pos}" | |
580 | } | |
581 | ], | |
56122987 | 582 | "items" : { |
56122987 DM |
583 | "properties" : { |
584 | "pos" : { | |
585 | "type" : "integer" | |
586 | } | |
7aacca6f DM |
587 | }, |
588 | "type" : "object" | |
56122987 DM |
589 | } |
590 | }, | |
7aacca6f | 591 | "name" : "get_rules", |
56122987 DM |
592 | "parameters" : { |
593 | "additionalProperties" : 0 | |
7aacca6f | 594 | }, |
56122987 DM |
595 | "permissions" : { |
596 | "check" : [ | |
597 | "perm", | |
598 | "/", | |
599 | [ | |
7aacca6f | 600 | "Sys.Audit" |
56122987 DM |
601 | ] |
602 | ] | |
603 | }, | |
7aacca6f DM |
604 | "description" : "List rules.", |
605 | "proxyto" : null | |
606 | }, | |
607 | "POST" : { | |
608 | "method" : "POST", | |
609 | "protected" : 1, | |
610 | "name" : "create_rule", | |
56122987 | 611 | "parameters" : { |
56122987 | 612 | "properties" : { |
7aacca6f DM |
613 | "dport" : { |
614 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
56122987 | 615 | "optional" : 1, |
7aacca6f DM |
616 | "type" : "string", |
617 | "format" : "pve-fw-dport-spec" | |
56122987 DM |
618 | }, |
619 | "type" : { | |
7aacca6f | 620 | "type" : "string", |
56122987 DM |
621 | "optional" : 0, |
622 | "enum" : [ | |
623 | "in", | |
624 | "out", | |
625 | "group" | |
7aacca6f | 626 | ] |
56122987 | 627 | }, |
7aacca6f | 628 | "enable" : { |
56122987 | 629 | "type" : "integer", |
56122987 | 630 | "optional" : 1, |
7aacca6f | 631 | "minimum" : 0 |
56122987 DM |
632 | }, |
633 | "action" : { | |
634 | "type" : "string", | |
56122987 | 635 | "optional" : 0, |
7aacca6f | 636 | "minLength" : 2, |
56122987 | 637 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", |
7aacca6f | 638 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
56122987 DM |
639 | "maxLength" : 20 |
640 | }, | |
7aacca6f | 641 | "macro" : { |
56122987 | 642 | "optional" : 1, |
56122987 | 643 | "type" : "string", |
7aacca6f | 644 | "maxLength" : 128 |
56122987 | 645 | }, |
7aacca6f DM |
646 | "pos" : { |
647 | "description" : "Update rule at position <pos>.", | |
648 | "type" : "integer", | |
56122987 | 649 | "optional" : 1, |
7aacca6f | 650 | "minimum" : 0 |
56122987 | 651 | }, |
7aacca6f DM |
652 | "proto" : { |
653 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", | |
56122987 DM |
654 | "type" : "string", |
655 | "optional" : 1, | |
7aacca6f | 656 | "format" : "pve-fw-protocol-spec" |
56122987 DM |
657 | }, |
658 | "iface" : { | |
7aacca6f | 659 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", |
56122987 | 660 | "minLength" : 2, |
7aacca6f DM |
661 | "type" : "string", |
662 | "optional" : 1, | |
56122987 | 663 | "maxLength" : 20, |
7aacca6f DM |
664 | "format" : "pve-iface" |
665 | }, | |
666 | "comment" : { | |
667 | "type" : "string", | |
56122987 DM |
668 | "optional" : 1 |
669 | }, | |
7aacca6f DM |
670 | "source" : { |
671 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
56122987 | 672 | "optional" : 1, |
56122987 | 673 | "type" : "string", |
7aacca6f | 674 | "format" : "pve-fw-addr-spec" |
56122987 | 675 | }, |
7aacca6f DM |
676 | "digest" : { |
677 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
56122987 | 678 | "type" : "string", |
7aacca6f DM |
679 | "optional" : 1, |
680 | "maxLength" : 40 | |
56122987 | 681 | }, |
7aacca6f DM |
682 | "dest" : { |
683 | "format" : "pve-fw-addr-spec", | |
684 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
685 | "optional" : 1, | |
686 | "type" : "string" | |
687 | }, | |
688 | "sport" : { | |
689 | "format" : "pve-fw-sport-spec", | |
690 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
691 | "optional" : 1, | |
692 | "type" : "string" | |
56122987 | 693 | } |
7aacca6f DM |
694 | }, |
695 | "additionalProperties" : 0 | |
56122987 | 696 | }, |
56122987 DM |
697 | "returns" : { |
698 | "type" : "null" | |
699 | }, | |
7aacca6f DM |
700 | "proxyto" : null, |
701 | "description" : "Create new rule.", | |
702 | "permissions" : { | |
703 | "check" : [ | |
704 | "perm", | |
705 | "/", | |
706 | [ | |
707 | "Sys.Modify" | |
708 | ] | |
709 | ] | |
710 | } | |
56122987 DM |
711 | } |
712 | }, | |
56122987 DM |
713 | "children" : [ |
714 | { | |
56122987 DM |
715 | "text" : "{pos}", |
716 | "info" : { | |
7aacca6f DM |
717 | "GET" : { |
718 | "method" : "GET", | |
719 | "returns" : { | |
720 | "properties" : { | |
721 | "pos" : { | |
722 | "type" : "integer" | |
723 | } | |
724 | }, | |
725 | "type" : "object" | |
726 | }, | |
727 | "permissions" : { | |
728 | "check" : [ | |
729 | "perm", | |
730 | "/", | |
731 | [ | |
732 | "Sys.Audit" | |
733 | ] | |
734 | ] | |
735 | }, | |
736 | "parameters" : { | |
737 | "additionalProperties" : 0, | |
738 | "properties" : { | |
739 | "pos" : { | |
740 | "description" : "Update rule at position <pos>.", | |
741 | "optional" : 1, | |
742 | "type" : "integer", | |
743 | "minimum" : 0 | |
744 | } | |
745 | } | |
746 | }, | |
747 | "name" : "get_rule", | |
748 | "description" : "Get single rule data.", | |
749 | "proxyto" : null | |
750 | }, | |
56122987 | 751 | "PUT" : { |
7aacca6f DM |
752 | "protected" : 1, |
753 | "name" : "update_rule", | |
56122987 DM |
754 | "parameters" : { |
755 | "properties" : { | |
7aacca6f DM |
756 | "delete" : { |
757 | "description" : "A list of settings you want to delete.", | |
56122987 | 758 | "optional" : 1, |
7aacca6f DM |
759 | "type" : "string", |
760 | "format" : "pve-configid-list" | |
56122987 DM |
761 | }, |
762 | "iface" : { | |
56122987 | 763 | "minLength" : 2, |
7aacca6f | 764 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", |
56122987 | 765 | "type" : "string", |
56122987 | 766 | "optional" : 1, |
7aacca6f DM |
767 | "format" : "pve-iface", |
768 | "maxLength" : 20 | |
56122987 DM |
769 | }, |
770 | "moveto" : { | |
56122987 DM |
771 | "minimum" : 0, |
772 | "description" : "Move rule to new position <moveto>. Other arguments are ignored.", | |
7aacca6f | 773 | "type" : "integer", |
56122987 DM |
774 | "optional" : 1 |
775 | }, | |
7aacca6f | 776 | "comment" : { |
56122987 | 777 | "optional" : 1, |
7aacca6f | 778 | "type" : "string" |
56122987 | 779 | }, |
7aacca6f DM |
780 | "digest" : { |
781 | "maxLength" : 40, | |
782 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
56122987 | 783 | "optional" : 1, |
7aacca6f | 784 | "type" : "string" |
56122987 DM |
785 | }, |
786 | "source" : { | |
56122987 | 787 | "format" : "pve-fw-addr-spec", |
7aacca6f | 788 | "type" : "string", |
56122987 DM |
789 | "optional" : 1, |
790 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." | |
791 | }, | |
792 | "sport" : { | |
7aacca6f | 793 | "optional" : 1, |
56122987 DM |
794 | "type" : "string", |
795 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
7aacca6f | 796 | "format" : "pve-fw-sport-spec" |
56122987 | 797 | }, |
7aacca6f DM |
798 | "dest" : { |
799 | "type" : "string", | |
56122987 | 800 | "optional" : 1, |
7aacca6f DM |
801 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", |
802 | "format" : "pve-fw-addr-spec" | |
56122987 | 803 | }, |
7aacca6f DM |
804 | "enable" : { |
805 | "optional" : 1, | |
806 | "type" : "integer", | |
807 | "minimum" : 0 | |
56122987 | 808 | }, |
7aacca6f | 809 | "dport" : { |
56122987 | 810 | "optional" : 1, |
7aacca6f DM |
811 | "type" : "string", |
812 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
813 | "format" : "pve-fw-dport-spec" | |
56122987 | 814 | }, |
7aacca6f DM |
815 | "type" : { |
816 | "enum" : [ | |
817 | "in", | |
818 | "out", | |
819 | "group" | |
820 | ], | |
56122987 | 821 | "type" : "string", |
56122987 DM |
822 | "optional" : 1 |
823 | }, | |
7aacca6f | 824 | "action" : { |
56122987 DM |
825 | "type" : "string", |
826 | "optional" : 1, | |
7aacca6f DM |
827 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
828 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
829 | "minLength" : 2, | |
830 | "maxLength" : 20 | |
56122987 | 831 | }, |
7aacca6f DM |
832 | "macro" : { |
833 | "optional" : 1, | |
56122987 | 834 | "type" : "string", |
7aacca6f DM |
835 | "maxLength" : 128 |
836 | }, | |
837 | "pos" : { | |
838 | "description" : "Update rule at position <pos>.", | |
56122987 | 839 | "optional" : 1, |
7aacca6f DM |
840 | "type" : "integer", |
841 | "minimum" : 0 | |
842 | }, | |
843 | "proto" : { | |
844 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", | |
845 | "optional" : 1, | |
846 | "type" : "string", | |
847 | "format" : "pve-fw-protocol-spec" | |
56122987 DM |
848 | } |
849 | }, | |
850 | "additionalProperties" : 0 | |
851 | }, | |
7aacca6f | 852 | "method" : "PUT", |
56122987 | 853 | "proxyto" : null, |
7aacca6f | 854 | "description" : "Modify rule data.", |
56122987 DM |
855 | "permissions" : { |
856 | "check" : [ | |
857 | "perm", | |
858 | "/", | |
859 | [ | |
860 | "Sys.Modify" | |
861 | ] | |
862 | ] | |
863 | }, | |
864 | "returns" : { | |
865 | "type" : "null" | |
7aacca6f | 866 | } |
56122987 | 867 | }, |
7aacca6f | 868 | "DELETE" : { |
56122987 DM |
869 | "permissions" : { |
870 | "check" : [ | |
871 | "perm", | |
872 | "/", | |
873 | [ | |
7aacca6f | 874 | "Sys.Modify" |
56122987 DM |
875 | ] |
876 | ] | |
877 | }, | |
56122987 | 878 | "proxyto" : null, |
7aacca6f | 879 | "description" : "Delete rule.", |
56122987 | 880 | "returns" : { |
7aacca6f | 881 | "type" : "null" |
56122987 | 882 | }, |
56122987 DM |
883 | "parameters" : { |
884 | "additionalProperties" : 0, | |
885 | "properties" : { | |
886 | "pos" : { | |
56122987 DM |
887 | "optional" : 1, |
888 | "type" : "integer", | |
7aacca6f | 889 | "description" : "Update rule at position <pos>.", |
56122987 DM |
890 | "minimum" : 0 |
891 | }, | |
892 | "digest" : { | |
56122987 DM |
893 | "maxLength" : 40, |
894 | "optional" : 1, | |
7aacca6f DM |
895 | "type" : "string", |
896 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
56122987 DM |
897 | } |
898 | } | |
899 | }, | |
7aacca6f DM |
900 | "name" : "delete_rule", |
901 | "protected" : 1, | |
902 | "method" : "DELETE" | |
903 | } | |
904 | }, | |
905 | "path" : "/cluster/firewall/rules/{pos}", | |
906 | "leaf" : 1 | |
907 | } | |
908 | ], | |
909 | "text" : "rules", | |
910 | "leaf" : 0, | |
911 | "path" : "/cluster/firewall/rules" | |
912 | }, | |
913 | { | |
914 | "path" : "/cluster/firewall/ipset", | |
915 | "leaf" : 0, | |
916 | "children" : [ | |
917 | { | |
918 | "leaf" : 0, | |
919 | "path" : "/cluster/firewall/ipset/{name}", | |
920 | "info" : { | |
921 | "DELETE" : { | |
922 | "protected" : 1, | |
923 | "description" : "Delete IPSet", | |
56122987 DM |
924 | "permissions" : { |
925 | "check" : [ | |
926 | "perm", | |
927 | "/", | |
928 | [ | |
929 | "Sys.Modify" | |
930 | ] | |
931 | ] | |
932 | }, | |
7aacca6f DM |
933 | "parameters" : { |
934 | "additionalProperties" : 0, | |
935 | "properties" : { | |
936 | "name" : { | |
937 | "description" : "IP set name.", | |
938 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
939 | "minLength" : 2, | |
940 | "type" : "string", | |
941 | "maxLength" : 64 | |
942 | } | |
943 | } | |
944 | }, | |
945 | "name" : "delete_ipset", | |
56122987 DM |
946 | "returns" : { |
947 | "type" : "null" | |
948 | }, | |
7aacca6f DM |
949 | "method" : "DELETE" |
950 | }, | |
951 | "GET" : { | |
952 | "returns" : { | |
953 | "items" : { | |
954 | "type" : "object", | |
955 | "properties" : { | |
956 | "comment" : { | |
957 | "type" : "string", | |
958 | "optional" : 1 | |
959 | }, | |
960 | "nomatch" : { | |
961 | "type" : "boolean", | |
962 | "optional" : 1 | |
963 | }, | |
964 | "cidr" : { | |
965 | "type" : "string" | |
966 | }, | |
967 | "digest" : { | |
968 | "maxLength" : 40, | |
969 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
970 | "type" : "string", | |
971 | "optional" : 0 | |
972 | } | |
973 | } | |
974 | }, | |
975 | "links" : [ | |
976 | { | |
977 | "href" : "{cidr}", | |
978 | "rel" : "child" | |
979 | } | |
980 | ], | |
981 | "type" : "array" | |
56122987 | 982 | }, |
7aacca6f DM |
983 | "method" : "GET", |
984 | "permissions" : { | |
985 | "check" : [ | |
986 | "perm", | |
987 | "/", | |
988 | [ | |
989 | "Sys.Audit" | |
990 | ] | |
991 | ] | |
56122987 | 992 | }, |
7aacca6f DM |
993 | "name" : "get_ipset", |
994 | "parameters" : { | |
995 | "additionalProperties" : 0, | |
996 | "properties" : { | |
997 | "name" : { | |
998 | "description" : "IP set name.", | |
999 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
1000 | "minLength" : 2, | |
1001 | "type" : "string", | |
1002 | "maxLength" : 64 | |
1003 | } | |
1004 | } | |
56122987 | 1005 | }, |
7aacca6f | 1006 | "description" : "List IPSet content" |
56122987 | 1007 | }, |
7aacca6f DM |
1008 | "POST" : { |
1009 | "returns" : { | |
1010 | "type" : "null" | |
1011 | }, | |
1012 | "method" : "POST", | |
1013 | "name" : "create_ip", | |
1014 | "parameters" : { | |
1015 | "additionalProperties" : 0, | |
1016 | "properties" : { | |
1017 | "cidr" : { | |
1018 | "format" : "IPorCIDRorAlias", | |
1019 | "type" : "string", | |
1020 | "description" : "Network/IP specification in CIDR format." | |
1021 | }, | |
1022 | "nomatch" : { | |
1023 | "type" : "boolean", | |
1024 | "optional" : 1 | |
1025 | }, | |
1026 | "name" : { | |
1027 | "type" : "string", | |
1028 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
1029 | "description" : "IP set name.", | |
1030 | "minLength" : 2, | |
1031 | "maxLength" : 64 | |
1032 | }, | |
1033 | "comment" : { | |
1034 | "type" : "string", | |
1035 | "optional" : 1 | |
1036 | } | |
56122987 DM |
1037 | } |
1038 | }, | |
7aacca6f DM |
1039 | "permissions" : { |
1040 | "check" : [ | |
1041 | "perm", | |
1042 | "/", | |
1043 | [ | |
1044 | "Sys.Modify" | |
1045 | ] | |
1046 | ] | |
1047 | }, | |
1048 | "description" : "Add IP or Network to IPSet.", | |
1049 | "protected" : 1 | |
1050 | } | |
56122987 | 1051 | }, |
56122987 DM |
1052 | "text" : "{name}", |
1053 | "children" : [ | |
1054 | { | |
7aacca6f | 1055 | "text" : "{cidr}", |
56122987 DM |
1056 | "info" : { |
1057 | "GET" : { | |
7aacca6f DM |
1058 | "returns" : { |
1059 | "type" : "object" | |
1060 | }, | |
1061 | "method" : "GET", | |
1062 | "description" : "Read IP or Network settings from IPSet.", | |
56122987 DM |
1063 | "protected" : 1, |
1064 | "permissions" : { | |
1065 | "check" : [ | |
1066 | "perm", | |
1067 | "/", | |
1068 | [ | |
1069 | "Sys.Audit" | |
1070 | ] | |
1071 | ] | |
1072 | }, | |
56122987 DM |
1073 | "parameters" : { |
1074 | "additionalProperties" : 0, | |
1075 | "properties" : { | |
1076 | "cidr" : { | |
7aacca6f | 1077 | "description" : "Network/IP specification in CIDR format.", |
56122987 | 1078 | "type" : "string", |
7aacca6f | 1079 | "format" : "IPorCIDRorAlias" |
56122987 DM |
1080 | }, |
1081 | "name" : { | |
56122987 | 1082 | "maxLength" : 64, |
7aacca6f DM |
1083 | "type" : "string", |
1084 | "minLength" : 2, | |
56122987 | 1085 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
7aacca6f | 1086 | "description" : "IP set name." |
56122987 DM |
1087 | } |
1088 | } | |
7aacca6f DM |
1089 | }, |
1090 | "name" : "read_ip" | |
56122987 | 1091 | }, |
7aacca6f DM |
1092 | "PUT" : { |
1093 | "method" : "PUT", | |
56122987 DM |
1094 | "returns" : { |
1095 | "type" : "null" | |
1096 | }, | |
1097 | "parameters" : { | |
7aacca6f | 1098 | "additionalProperties" : 0, |
56122987 | 1099 | "properties" : { |
7aacca6f | 1100 | "nomatch" : { |
56122987 | 1101 | "optional" : 1, |
7aacca6f | 1102 | "type" : "boolean" |
56122987 DM |
1103 | }, |
1104 | "name" : { | |
56122987 DM |
1105 | "maxLength" : 64, |
1106 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
7aacca6f | 1107 | "description" : "IP set name.", |
56122987 DM |
1108 | "minLength" : 2, |
1109 | "type" : "string" | |
7aacca6f DM |
1110 | }, |
1111 | "comment" : { | |
1112 | "type" : "string", | |
1113 | "optional" : 1 | |
1114 | }, | |
1115 | "cidr" : { | |
1116 | "format" : "IPorCIDRorAlias", | |
1117 | "description" : "Network/IP specification in CIDR format.", | |
1118 | "type" : "string" | |
1119 | }, | |
1120 | "digest" : { | |
1121 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
1122 | "optional" : 1, | |
1123 | "type" : "string", | |
1124 | "maxLength" : 40 | |
56122987 | 1125 | } |
7aacca6f | 1126 | } |
56122987 | 1127 | }, |
7aacca6f | 1128 | "name" : "update_ip", |
56122987 DM |
1129 | "permissions" : { |
1130 | "check" : [ | |
1131 | "perm", | |
1132 | "/", | |
1133 | [ | |
1134 | "Sys.Modify" | |
1135 | ] | |
1136 | ] | |
7aacca6f | 1137 | }, |
56122987 | 1138 | "description" : "Update IP or Network settings", |
7aacca6f DM |
1139 | "protected" : 1 |
1140 | }, | |
1141 | "DELETE" : { | |
1142 | "method" : "DELETE", | |
1143 | "returns" : { | |
1144 | "type" : "null" | |
1145 | }, | |
1146 | "description" : "Remove IP or Network from IPSet.", | |
1147 | "protected" : 1, | |
56122987 DM |
1148 | "permissions" : { |
1149 | "check" : [ | |
1150 | "perm", | |
1151 | "/", | |
1152 | [ | |
1153 | "Sys.Modify" | |
1154 | ] | |
1155 | ] | |
1156 | }, | |
56122987 DM |
1157 | "parameters" : { |
1158 | "properties" : { | |
56122987 | 1159 | "digest" : { |
7aacca6f | 1160 | "maxLength" : 40, |
56122987 DM |
1161 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", |
1162 | "optional" : 1, | |
56122987 | 1163 | "type" : "string" |
7aacca6f DM |
1164 | }, |
1165 | "cidr" : { | |
1166 | "description" : "Network/IP specification in CIDR format.", | |
1167 | "type" : "string", | |
1168 | "format" : "IPorCIDRorAlias" | |
1169 | }, | |
1170 | "name" : { | |
1171 | "minLength" : 2, | |
1172 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
1173 | "description" : "IP set name.", | |
1174 | "type" : "string", | |
1175 | "maxLength" : 64 | |
56122987 DM |
1176 | } |
1177 | }, | |
1178 | "additionalProperties" : 0 | |
1179 | }, | |
7aacca6f | 1180 | "name" : "remove_ip" |
56122987 DM |
1181 | } |
1182 | }, | |
1183 | "path" : "/cluster/firewall/ipset/{name}/{cidr}", | |
7aacca6f | 1184 | "leaf" : 1 |
56122987 | 1185 | } |
7aacca6f DM |
1186 | ] |
1187 | } | |
1188 | ], | |
1189 | "text" : "ipset", | |
1190 | "info" : { | |
1191 | "POST" : { | |
1192 | "returns" : { | |
1193 | "type" : "null" | |
1194 | }, | |
1195 | "method" : "POST", | |
1196 | "protected" : 1, | |
1197 | "description" : "Create new IPSet", | |
1198 | "parameters" : { | |
1199 | "additionalProperties" : 0, | |
1200 | "properties" : { | |
1201 | "comment" : { | |
1202 | "type" : "string", | |
1203 | "optional" : 1 | |
56122987 | 1204 | }, |
7aacca6f DM |
1205 | "name" : { |
1206 | "description" : "IP set name.", | |
1207 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
1208 | "minLength" : 2, | |
1209 | "type" : "string", | |
1210 | "maxLength" : 64 | |
56122987 | 1211 | }, |
7aacca6f DM |
1212 | "rename" : { |
1213 | "type" : "string", | |
1214 | "optional" : 1, | |
1215 | "minLength" : 2, | |
1216 | "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", | |
1217 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
1218 | "maxLength" : 64 | |
56122987 | 1219 | }, |
7aacca6f DM |
1220 | "digest" : { |
1221 | "maxLength" : 40, | |
1222 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
1223 | "type" : "string", | |
1224 | "optional" : 1 | |
1225 | } | |
1226 | } | |
1227 | }, | |
1228 | "permissions" : { | |
1229 | "check" : [ | |
1230 | "perm", | |
1231 | "/", | |
1232 | [ | |
1233 | "Sys.Modify" | |
1234 | ] | |
1235 | ] | |
1236 | }, | |
1237 | "name" : "create_ipset" | |
1238 | }, | |
1239 | "GET" : { | |
1240 | "returns" : { | |
1241 | "type" : "array", | |
1242 | "items" : { | |
1243 | "properties" : { | |
1244 | "comment" : { | |
1245 | "type" : "string", | |
1246 | "optional" : 1 | |
1247 | }, | |
1248 | "name" : { | |
1249 | "maxLength" : 64, | |
1250 | "type" : "string", | |
1251 | "minLength" : 2, | |
1252 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
1253 | "description" : "IP set name." | |
1254 | }, | |
1255 | "digest" : { | |
1256 | "maxLength" : 40, | |
1257 | "type" : "string", | |
1258 | "optional" : 0, | |
1259 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
1260 | } | |
1261 | }, | |
1262 | "type" : "object" | |
56122987 | 1263 | }, |
7aacca6f DM |
1264 | "links" : [ |
1265 | { | |
1266 | "href" : "{name}", | |
1267 | "rel" : "child" | |
1268 | } | |
1269 | ] | |
1270 | }, | |
1271 | "method" : "GET", | |
1272 | "description" : "List IPSets", | |
1273 | "name" : "ipset_index", | |
1274 | "parameters" : { | |
1275 | "additionalProperties" : 0 | |
1276 | }, | |
1277 | "permissions" : { | |
1278 | "check" : [ | |
1279 | "perm", | |
1280 | "/", | |
1281 | [ | |
1282 | "Sys.Audit" | |
1283 | ] | |
1284 | ] | |
1285 | } | |
1286 | } | |
1287 | } | |
1288 | }, | |
1289 | { | |
1290 | "info" : { | |
1291 | "POST" : { | |
1292 | "method" : "POST", | |
1293 | "returns" : { | |
1294 | "type" : "null" | |
1295 | }, | |
1296 | "protected" : 1, | |
1297 | "description" : "Create IP or Network Alias.", | |
1298 | "parameters" : { | |
1299 | "additionalProperties" : 0, | |
1300 | "properties" : { | |
1301 | "cidr" : { | |
1302 | "description" : "Network/IP specification in CIDR format.", | |
1303 | "type" : "string", | |
1304 | "format" : "IPorCIDR" | |
56122987 | 1305 | }, |
7aacca6f DM |
1306 | "name" : { |
1307 | "maxLength" : 64, | |
1308 | "type" : "string", | |
1309 | "minLength" : 2, | |
1310 | "description" : "Alias name.", | |
1311 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" | |
1312 | }, | |
1313 | "comment" : { | |
1314 | "optional" : 1, | |
1315 | "type" : "string" | |
1316 | } | |
1317 | } | |
1318 | }, | |
1319 | "permissions" : { | |
1320 | "check" : [ | |
1321 | "perm", | |
1322 | "/", | |
1323 | [ | |
1324 | "Sys.Modify" | |
1325 | ] | |
1326 | ] | |
1327 | }, | |
1328 | "name" : "create_alias" | |
1329 | }, | |
1330 | "GET" : { | |
1331 | "method" : "GET", | |
1332 | "returns" : { | |
1333 | "type" : "array", | |
1334 | "links" : [ | |
1335 | { | |
1336 | "rel" : "child", | |
1337 | "href" : "{name}" | |
1338 | } | |
1339 | ], | |
1340 | "items" : { | |
1341 | "properties" : { | |
1342 | "digest" : { | |
1343 | "optional" : 0, | |
1344 | "type" : "string", | |
1345 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
1346 | "maxLength" : 40 | |
1347 | }, | |
1348 | "cidr" : { | |
1349 | "type" : "string" | |
1350 | }, | |
1351 | "comment" : { | |
1352 | "optional" : 1, | |
1353 | "type" : "string" | |
1354 | }, | |
1355 | "name" : { | |
1356 | "type" : "string" | |
1357 | } | |
1358 | }, | |
1359 | "type" : "object" | |
1360 | } | |
1361 | }, | |
1362 | "description" : "List aliases", | |
1363 | "parameters" : { | |
1364 | "additionalProperties" : 0 | |
1365 | }, | |
1366 | "permissions" : { | |
1367 | "check" : [ | |
1368 | "perm", | |
1369 | "/", | |
1370 | [ | |
1371 | "Sys.Audit" | |
1372 | ] | |
1373 | ] | |
1374 | }, | |
1375 | "name" : "get_aliases" | |
1376 | } | |
1377 | }, | |
1378 | "text" : "aliases", | |
1379 | "children" : [ | |
1380 | { | |
1381 | "info" : { | |
1382 | "DELETE" : { | |
56122987 | 1383 | "parameters" : { |
56122987 | 1384 | "properties" : { |
7aacca6f DM |
1385 | "digest" : { |
1386 | "type" : "string", | |
1387 | "optional" : 1, | |
1388 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
1389 | "maxLength" : 40 | |
1390 | }, | |
56122987 DM |
1391 | "name" : { |
1392 | "maxLength" : 64, | |
7aacca6f DM |
1393 | "type" : "string", |
1394 | "description" : "Alias name.", | |
56122987 | 1395 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
7aacca6f | 1396 | "minLength" : 2 |
56122987 | 1397 | } |
56122987 | 1398 | }, |
7aacca6f DM |
1399 | "additionalProperties" : 0 |
1400 | }, | |
1401 | "name" : "remove_alias", | |
56122987 DM |
1402 | "permissions" : { |
1403 | "check" : [ | |
1404 | "perm", | |
1405 | "/", | |
1406 | [ | |
1407 | "Sys.Modify" | |
1408 | ] | |
1409 | ] | |
1410 | }, | |
7aacca6f DM |
1411 | "description" : "Remove IP or Network alias.", |
1412 | "protected" : 1, | |
1413 | "returns" : { | |
1414 | "type" : "null" | |
1415 | }, | |
1416 | "method" : "DELETE" | |
1417 | }, | |
1418 | "PUT" : { | |
1419 | "method" : "PUT", | |
1420 | "returns" : { | |
1421 | "type" : "null" | |
1422 | }, | |
1423 | "description" : "Update IP or Network alias.", | |
56122987 | 1424 | "protected" : 1, |
56122987 DM |
1425 | "parameters" : { |
1426 | "additionalProperties" : 0, | |
1427 | "properties" : { | |
7aacca6f DM |
1428 | "rename" : { |
1429 | "maxLength" : 64, | |
56122987 | 1430 | "minLength" : 2, |
7aacca6f | 1431 | "description" : "Rename an existing alias.", |
56122987 | 1432 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
56122987 DM |
1433 | "optional" : 1, |
1434 | "type" : "string" | |
1435 | }, | |
7aacca6f DM |
1436 | "name" : { |
1437 | "maxLength" : 64, | |
1438 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
1439 | "description" : "Alias name.", | |
1440 | "minLength" : 2, | |
56122987 | 1441 | "type" : "string" |
7aacca6f DM |
1442 | }, |
1443 | "comment" : { | |
56122987 | 1444 | "type" : "string", |
7aacca6f DM |
1445 | "optional" : 1 |
1446 | }, | |
1447 | "cidr" : { | |
1448 | "description" : "Network/IP specification in CIDR format.", | |
1449 | "type" : "string", | |
1450 | "format" : "IPorCIDR" | |
56122987 DM |
1451 | }, |
1452 | "digest" : { | |
56122987 | 1453 | "maxLength" : 40, |
7aacca6f | 1454 | "type" : "string", |
56122987 | 1455 | "optional" : 1, |
7aacca6f | 1456 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
56122987 | 1457 | } |
7aacca6f | 1458 | } |
56122987 | 1459 | }, |
7aacca6f | 1460 | "name" : "update_alias", |
56122987 DM |
1461 | "permissions" : { |
1462 | "check" : [ | |
1463 | "perm", | |
1464 | "/", | |
1465 | [ | |
7aacca6f | 1466 | "Sys.Modify" |
56122987 DM |
1467 | ] |
1468 | ] | |
7aacca6f DM |
1469 | } |
1470 | }, | |
1471 | "GET" : { | |
56122987 DM |
1472 | "parameters" : { |
1473 | "additionalProperties" : 0, | |
1474 | "properties" : { | |
1475 | "name" : { | |
56122987 | 1476 | "maxLength" : 64, |
7aacca6f DM |
1477 | "type" : "string", |
1478 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
56122987 | 1479 | "description" : "Alias name.", |
7aacca6f | 1480 | "minLength" : 2 |
56122987 DM |
1481 | } |
1482 | } | |
1483 | }, | |
56122987 DM |
1484 | "permissions" : { |
1485 | "check" : [ | |
1486 | "perm", | |
1487 | "/", | |
1488 | [ | |
7aacca6f | 1489 | "Sys.Audit" |
56122987 DM |
1490 | ] |
1491 | ] | |
1492 | }, | |
7aacca6f DM |
1493 | "name" : "read_alias", |
1494 | "description" : "Read alias.", | |
56122987 | 1495 | "returns" : { |
7aacca6f | 1496 | "type" : "object" |
56122987 | 1497 | }, |
7aacca6f | 1498 | "method" : "GET" |
56122987 DM |
1499 | } |
1500 | }, | |
7aacca6f DM |
1501 | "text" : "{name}", |
1502 | "leaf" : 1, | |
56122987 DM |
1503 | "path" : "/cluster/firewall/aliases/{name}" |
1504 | } | |
1505 | ], | |
7aacca6f DM |
1506 | "leaf" : 0, |
1507 | "path" : "/cluster/firewall/aliases" | |
56122987 DM |
1508 | }, |
1509 | { | |
1510 | "info" : { | |
7aacca6f DM |
1511 | "PUT" : { |
1512 | "description" : "Set Firewall options.", | |
1513 | "protected" : 1, | |
56122987 | 1514 | "parameters" : { |
56122987 | 1515 | "properties" : { |
7aacca6f DM |
1516 | "policy_out" : { |
1517 | "type" : "string", | |
1518 | "optional" : 1, | |
1519 | "description" : "Output policy.", | |
56122987 DM |
1520 | "enum" : [ |
1521 | "ACCEPT", | |
1522 | "REJECT", | |
1523 | "DROP" | |
7aacca6f DM |
1524 | ] |
1525 | }, | |
1526 | "delete" : { | |
56122987 | 1527 | "optional" : 1, |
7aacca6f DM |
1528 | "type" : "string", |
1529 | "description" : "A list of settings you want to delete.", | |
1530 | "format" : "pve-configid-list" | |
56122987 DM |
1531 | }, |
1532 | "enable" : { | |
7aacca6f | 1533 | "type" : "integer", |
56122987 | 1534 | "optional" : 1, |
7aacca6f DM |
1535 | "description" : "Enable or disable the firewall cluster wide.", |
1536 | "minimum" : 0 | |
56122987 | 1537 | }, |
7aacca6f DM |
1538 | "digest" : { |
1539 | "maxLength" : 40, | |
1540 | "optional" : 1, | |
56122987 | 1541 | "type" : "string", |
7aacca6f DM |
1542 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
1543 | }, | |
1544 | "policy_in" : { | |
56122987 | 1545 | "optional" : 1, |
7aacca6f DM |
1546 | "type" : "string", |
1547 | "description" : "Input policy.", | |
56122987 DM |
1548 | "enum" : [ |
1549 | "ACCEPT", | |
1550 | "REJECT", | |
1551 | "DROP" | |
1552 | ] | |
1553 | } | |
1554 | }, | |
7aacca6f | 1555 | "additionalProperties" : 0 |
56122987 | 1556 | }, |
7aacca6f | 1557 | "name" : "set_options", |
56122987 DM |
1558 | "permissions" : { |
1559 | "check" : [ | |
1560 | "perm", | |
1561 | "/", | |
1562 | [ | |
7aacca6f | 1563 | "Sys.Modify" |
56122987 DM |
1564 | ] |
1565 | ] | |
7aacca6f DM |
1566 | }, |
1567 | "method" : "PUT", | |
1568 | "returns" : { | |
1569 | "type" : "null" | |
1570 | } | |
1571 | }, | |
1572 | "GET" : { | |
56122987 DM |
1573 | "permissions" : { |
1574 | "check" : [ | |
1575 | "perm", | |
1576 | "/", | |
1577 | [ | |
7aacca6f | 1578 | "Sys.Audit" |
56122987 DM |
1579 | ] |
1580 | ] | |
1581 | }, | |
56122987 | 1582 | "parameters" : { |
7aacca6f DM |
1583 | "additionalProperties" : 0 |
1584 | }, | |
1585 | "name" : "get_options", | |
1586 | "description" : "Get Firewall options.", | |
1587 | "method" : "GET", | |
1588 | "returns" : { | |
1589 | "type" : "object", | |
56122987 | 1590 | "properties" : { |
56122987 | 1591 | "policy_in" : { |
56122987 | 1592 | "optional" : 1, |
7aacca6f DM |
1593 | "type" : "string", |
1594 | "description" : "Input policy.", | |
56122987 DM |
1595 | "enum" : [ |
1596 | "ACCEPT", | |
1597 | "REJECT", | |
1598 | "DROP" | |
7aacca6f | 1599 | ] |
56122987 | 1600 | }, |
7aacca6f DM |
1601 | "enable" : { |
1602 | "description" : "Enable or disable the firewall cluster wide.", | |
1603 | "optional" : 1, | |
1604 | "type" : "integer", | |
1605 | "minimum" : 0 | |
56122987 DM |
1606 | }, |
1607 | "policy_out" : { | |
7aacca6f | 1608 | "optional" : 1, |
56122987 | 1609 | "type" : "string", |
7aacca6f | 1610 | "description" : "Output policy.", |
56122987 DM |
1611 | "enum" : [ |
1612 | "ACCEPT", | |
1613 | "REJECT", | |
1614 | "DROP" | |
7aacca6f | 1615 | ] |
56122987 DM |
1616 | } |
1617 | } | |
56122987 DM |
1618 | } |
1619 | } | |
1620 | }, | |
7aacca6f | 1621 | "text" : "options", |
56122987 | 1622 | "leaf" : 1, |
7aacca6f | 1623 | "path" : "/cluster/firewall/options" |
56122987 DM |
1624 | }, |
1625 | { | |
56122987 DM |
1626 | "info" : { |
1627 | "GET" : { | |
7aacca6f DM |
1628 | "description" : "List available macros", |
1629 | "name" : "get_macros", | |
56122987 DM |
1630 | "permissions" : { |
1631 | "user" : "all" | |
1632 | }, | |
7aacca6f DM |
1633 | "parameters" : { |
1634 | "additionalProperties" : 0 | |
1635 | }, | |
56122987 | 1636 | "method" : "GET", |
56122987 | 1637 | "returns" : { |
7aacca6f | 1638 | "type" : "array", |
56122987 DM |
1639 | "items" : { |
1640 | "properties" : { | |
1641 | "descr" : { | |
7aacca6f DM |
1642 | "type" : "string", |
1643 | "description" : "More verbose description (if available)." | |
56122987 DM |
1644 | }, |
1645 | "macro" : { | |
7aacca6f DM |
1646 | "description" : "Macro name.", |
1647 | "type" : "string" | |
56122987 DM |
1648 | } |
1649 | }, | |
1650 | "type" : "object" | |
7aacca6f | 1651 | } |
56122987 DM |
1652 | } |
1653 | } | |
7aacca6f DM |
1654 | }, |
1655 | "text" : "macros", | |
1656 | "leaf" : 1, | |
1657 | "path" : "/cluster/firewall/macros" | |
56122987 DM |
1658 | }, |
1659 | { | |
1660 | "leaf" : 1, | |
56122987 DM |
1661 | "path" : "/cluster/firewall/refs", |
1662 | "info" : { | |
1663 | "GET" : { | |
7aacca6f DM |
1664 | "parameters" : { |
1665 | "additionalProperties" : 0, | |
1666 | "properties" : { | |
1667 | "type" : { | |
1668 | "description" : "Only list references of specified type.", | |
1669 | "enum" : [ | |
1670 | "alias", | |
1671 | "ipset" | |
1672 | ], | |
1673 | "type" : "string", | |
1674 | "optional" : 1 | |
1675 | } | |
1676 | } | |
1677 | }, | |
56122987 DM |
1678 | "permissions" : { |
1679 | "check" : [ | |
1680 | "perm", | |
1681 | "/", | |
1682 | [ | |
1683 | "Sys.Audit" | |
1684 | ] | |
1685 | ] | |
1686 | }, | |
56122987 | 1687 | "name" : "refs", |
7aacca6f | 1688 | "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", |
56122987 DM |
1689 | "returns" : { |
1690 | "items" : { | |
56122987 DM |
1691 | "properties" : { |
1692 | "name" : { | |
1693 | "type" : "string" | |
1694 | }, | |
56122987 DM |
1695 | "type" : { |
1696 | "type" : "string", | |
1697 | "enum" : [ | |
1698 | "alias", | |
1699 | "ipset" | |
1700 | ] | |
1701 | }, | |
7aacca6f | 1702 | "ref" : { |
56122987 | 1703 | "type" : "string" |
7aacca6f DM |
1704 | }, |
1705 | "comment" : { | |
1706 | "type" : "string", | |
1707 | "optional" : 1 | |
56122987 | 1708 | } |
7aacca6f DM |
1709 | }, |
1710 | "type" : "object" | |
56122987 DM |
1711 | }, |
1712 | "type" : "array" | |
1713 | }, | |
7aacca6f | 1714 | "method" : "GET" |
56122987 | 1715 | } |
7aacca6f DM |
1716 | }, |
1717 | "text" : "refs" | |
56122987 DM |
1718 | } |
1719 | ], | |
7aacca6f | 1720 | "leaf" : 0, |
56122987 DM |
1721 | "path" : "/cluster/firewall" |
1722 | }, | |
1723 | { | |
56122987 DM |
1724 | "children" : [ |
1725 | { | |
56122987 | 1726 | "info" : { |
7aacca6f DM |
1727 | "DELETE" : { |
1728 | "protected" : 1, | |
1729 | "description" : "Delete vzdump backup job definition.", | |
1730 | "name" : "delete_job", | |
56122987 DM |
1731 | "parameters" : { |
1732 | "additionalProperties" : 0, | |
1733 | "properties" : { | |
1734 | "id" : { | |
7aacca6f | 1735 | "type" : "string", |
56122987 | 1736 | "description" : "The job ID.", |
7aacca6f | 1737 | "maxLength" : 50 |
56122987 DM |
1738 | } |
1739 | } | |
1740 | }, | |
56122987 DM |
1741 | "permissions" : { |
1742 | "check" : [ | |
1743 | "perm", | |
1744 | "/", | |
1745 | [ | |
1746 | "Sys.Modify" | |
1747 | ] | |
1748 | ] | |
1749 | }, | |
56122987 | 1750 | "method" : "DELETE", |
56122987 DM |
1751 | "returns" : { |
1752 | "type" : "null" | |
1753 | } | |
1754 | }, | |
1755 | "PUT" : { | |
7aacca6f DM |
1756 | "method" : "PUT", |
1757 | "returns" : { | |
1758 | "type" : "null" | |
1759 | }, | |
1760 | "name" : "update_job", | |
56122987 DM |
1761 | "permissions" : { |
1762 | "check" : [ | |
1763 | "perm", | |
1764 | "/", | |
1765 | [ | |
1766 | "Sys.Modify" | |
1767 | ] | |
1768 | ] | |
1769 | }, | |
56122987 DM |
1770 | "parameters" : { |
1771 | "properties" : { | |
7aacca6f DM |
1772 | "size" : { |
1773 | "minimum" : 500, | |
1774 | "description" : "Unused, will be removed in a future release.", | |
1775 | "default" : 1024, | |
56122987 | 1776 | "optional" : 1, |
7aacca6f | 1777 | "type" : "integer" |
56122987 | 1778 | }, |
7aacca6f | 1779 | "node" : { |
56122987 | 1780 | "type" : "string", |
7aacca6f DM |
1781 | "optional" : 1, |
1782 | "description" : "Only run if executed on this node.", | |
1783 | "format" : "pve-node" | |
56122987 | 1784 | }, |
7aacca6f | 1785 | "exclude" : { |
56122987 | 1786 | "optional" : 1, |
7aacca6f DM |
1787 | "type" : "string", |
1788 | "description" : "Exclude specified guest systems (assumes --all)", | |
1789 | "format" : "pve-vmid-list" | |
56122987 | 1790 | }, |
7aacca6f DM |
1791 | "delete" : { |
1792 | "format" : "pve-configid-list", | |
56122987 | 1793 | "optional" : 1, |
7aacca6f DM |
1794 | "type" : "string", |
1795 | "description" : "A list of settings you want to delete." | |
1796 | }, | |
1797 | "stdexcludes" : { | |
1798 | "description" : "Exclude temporary files and logs.", | |
56122987 | 1799 | "default" : 1, |
7aacca6f | 1800 | "optional" : 1, |
56122987 DM |
1801 | "type" : "boolean" |
1802 | }, | |
7aacca6f DM |
1803 | "exclude-path" : { |
1804 | "format" : "string-alist", | |
56122987 | 1805 | "type" : "string", |
7aacca6f DM |
1806 | "optional" : 1, |
1807 | "description" : "Exclude certain files/directories (shell globs)." | |
56122987 DM |
1808 | }, |
1809 | "enabled" : { | |
56122987 DM |
1810 | "description" : "Enable or disable the job.", |
1811 | "type" : "boolean", | |
7aacca6f | 1812 | "optional" : 1, |
56122987 DM |
1813 | "default" : "1" |
1814 | }, | |
7aacca6f DM |
1815 | "storage" : { |
1816 | "format" : "pve-storage-id", | |
56122987 | 1817 | "optional" : 1, |
7aacca6f DM |
1818 | "type" : "string", |
1819 | "description" : "Store resulting file to this storage." | |
56122987 | 1820 | }, |
7aacca6f DM |
1821 | "pigz" : { |
1822 | "default" : 0, | |
56122987 | 1823 | "optional" : 1, |
56122987 | 1824 | "type" : "integer", |
7aacca6f | 1825 | "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." |
56122987 | 1826 | }, |
7aacca6f DM |
1827 | "stopwait" : { |
1828 | "minimum" : 0, | |
1829 | "description" : "Maximal time to wait until a guest system is stopped (minutes).", | |
56122987 | 1830 | "type" : "integer", |
7aacca6f DM |
1831 | "optional" : 1, |
1832 | "default" : 10 | |
56122987 | 1833 | }, |
7aacca6f DM |
1834 | "quiet" : { |
1835 | "description" : "Be quiet.", | |
1836 | "default" : 0, | |
56122987 | 1837 | "optional" : 1, |
7aacca6f | 1838 | "type" : "boolean" |
56122987 DM |
1839 | }, |
1840 | "mailnotification" : { | |
56122987 DM |
1841 | "enum" : [ |
1842 | "always", | |
1843 | "failure" | |
1844 | ], | |
1845 | "description" : "Specify when to send an email", | |
7aacca6f | 1846 | "type" : "string", |
56122987 | 1847 | "optional" : 1, |
7aacca6f | 1848 | "default" : "always" |
56122987 | 1849 | }, |
7aacca6f DM |
1850 | "all" : { |
1851 | "type" : "boolean", | |
56122987 | 1852 | "optional" : 1, |
7aacca6f DM |
1853 | "default" : 0, |
1854 | "description" : "Backup all known guest systems on this host." | |
56122987 | 1855 | }, |
7aacca6f DM |
1856 | "id" : { |
1857 | "description" : "The job ID.", | |
1858 | "type" : "string", | |
1859 | "maxLength" : 50 | |
1860 | }, | |
1861 | "remove" : { | |
1862 | "default" : 1, | |
56122987 | 1863 | "optional" : 1, |
7aacca6f DM |
1864 | "type" : "boolean", |
1865 | "description" : "Remove old backup files if there are more than 'maxfiles' backup files." | |
56122987 | 1866 | }, |
7aacca6f | 1867 | "script" : { |
56122987 | 1868 | "optional" : 1, |
7aacca6f DM |
1869 | "type" : "string", |
1870 | "description" : "Use specified hook script." | |
56122987 DM |
1871 | }, |
1872 | "lockwait" : { | |
56122987 DM |
1873 | "minimum" : 0, |
1874 | "default" : 180, | |
56122987 | 1875 | "optional" : 1, |
7aacca6f DM |
1876 | "type" : "integer", |
1877 | "description" : "Maximal time to wait for the global lock (minutes)." | |
1878 | }, | |
1879 | "mailto" : { | |
56122987 | 1880 | "type" : "string", |
7aacca6f DM |
1881 | "optional" : 1, |
1882 | "description" : "Comma-separated list of email addresses that should receive email notifications.", | |
1883 | "format" : "string-list" | |
56122987 DM |
1884 | }, |
1885 | "dumpdir" : { | |
56122987 | 1886 | "description" : "Store resulting files to specified directory.", |
7aacca6f | 1887 | "type" : "string", |
56122987 DM |
1888 | "optional" : 1 |
1889 | }, | |
7aacca6f DM |
1890 | "starttime" : { |
1891 | "pattern" : "\\d{1,2}:\\d{1,2}", | |
1892 | "description" : "Job Start time.", | |
56122987 | 1893 | "type" : "string", |
7aacca6f | 1894 | "typetext" : "HH:MM" |
56122987 | 1895 | }, |
7aacca6f DM |
1896 | "bwlimit" : { |
1897 | "minimum" : 0, | |
1898 | "description" : "Limit I/O bandwidth (KBytes per second).", | |
1899 | "default" : 0, | |
56122987 | 1900 | "optional" : 1, |
7aacca6f | 1901 | "type" : "integer" |
56122987 DM |
1902 | }, |
1903 | "ionice" : { | |
1904 | "minimum" : 0, | |
7aacca6f | 1905 | "description" : "Set CFQ ionice priority.", |
56122987 | 1906 | "optional" : 1, |
7aacca6f DM |
1907 | "type" : "integer", |
1908 | "default" : 7, | |
1909 | "maximum" : 8 | |
56122987 | 1910 | }, |
7aacca6f DM |
1911 | "stop" : { |
1912 | "default" : 0, | |
56122987 | 1913 | "optional" : 1, |
56122987 | 1914 | "type" : "boolean", |
7aacca6f | 1915 | "description" : "Stop runnig backup jobs on this host." |
56122987 | 1916 | }, |
7aacca6f DM |
1917 | "maxfiles" : { |
1918 | "description" : "Maximal number of backup files per guest system.", | |
1919 | "default" : 1, | |
56122987 | 1920 | "optional" : 1, |
7aacca6f DM |
1921 | "type" : "integer", |
1922 | "minimum" : 1 | |
56122987 DM |
1923 | }, |
1924 | "mode" : { | |
56122987 DM |
1925 | "description" : "Backup mode.", |
1926 | "enum" : [ | |
1927 | "snapshot", | |
1928 | "suspend", | |
1929 | "stop" | |
1930 | ], | |
1931 | "default" : "snapshot", | |
7aacca6f DM |
1932 | "type" : "string", |
1933 | "optional" : 1 | |
56122987 | 1934 | }, |
7aacca6f DM |
1935 | "compress" : { |
1936 | "default" : "0", | |
1937 | "optional" : 1, | |
1938 | "type" : "string", | |
1939 | "description" : "Compress dump file.", | |
1940 | "enum" : [ | |
1941 | "0", | |
1942 | "1", | |
1943 | "gzip", | |
1944 | "lzo" | |
1945 | ] | |
1946 | }, | |
1947 | "tmpdir" : { | |
56122987 | 1948 | "optional" : 1, |
7aacca6f DM |
1949 | "type" : "string", |
1950 | "description" : "Store temporary files to specified directory." | |
1951 | }, | |
1952 | "vmid" : { | |
56122987 | 1953 | "format" : "pve-vmid-list", |
7aacca6f DM |
1954 | "type" : "string", |
1955 | "optional" : 1, | |
1956 | "description" : "The ID of the guest system you want to backup." | |
1957 | }, | |
1958 | "dow" : { | |
1959 | "description" : "Day of week selection.", | |
1960 | "optional" : 1, | |
1961 | "type" : "string", | |
1962 | "format" : "pve-day-of-week-list" | |
56122987 DM |
1963 | } |
1964 | }, | |
1965 | "additionalProperties" : 0 | |
7aacca6f DM |
1966 | }, |
1967 | "protected" : 1, | |
1968 | "description" : "Update vzdump backup job definition." | |
1969 | }, | |
1970 | "GET" : { | |
1971 | "method" : "GET", | |
1972 | "returns" : { | |
1973 | "type" : "object" | |
1974 | }, | |
1975 | "parameters" : { | |
1976 | "properties" : { | |
1977 | "id" : { | |
1978 | "description" : "The job ID.", | |
1979 | "type" : "string", | |
1980 | "maxLength" : 50 | |
1981 | } | |
1982 | }, | |
1983 | "additionalProperties" : 0 | |
1984 | }, | |
1985 | "permissions" : { | |
1986 | "check" : [ | |
1987 | "perm", | |
1988 | "/", | |
1989 | [ | |
1990 | "Sys.Audit" | |
1991 | ] | |
1992 | ] | |
1993 | }, | |
1994 | "name" : "read_job", | |
1995 | "description" : "Read vzdump backup job definition." | |
56122987 DM |
1996 | } |
1997 | }, | |
7aacca6f DM |
1998 | "text" : "{id}", |
1999 | "leaf" : 1, | |
56122987 DM |
2000 | "path" : "/cluster/backup/{id}" |
2001 | } | |
2002 | ], | |
7aacca6f | 2003 | "text" : "backup", |
56122987 DM |
2004 | "info" : { |
2005 | "POST" : { | |
7aacca6f DM |
2006 | "description" : "Create new vzdump backup job.", |
2007 | "protected" : 1, | |
2008 | "name" : "create_job", | |
2009 | "permissions" : { | |
2010 | "check" : [ | |
2011 | "perm", | |
2012 | "/", | |
2013 | [ | |
2014 | "Sys.Modify" | |
2015 | ] | |
2016 | ] | |
2017 | }, | |
56122987 DM |
2018 | "parameters" : { |
2019 | "properties" : { | |
7aacca6f DM |
2020 | "stopwait" : { |
2021 | "default" : 10, | |
2022 | "optional" : 1, | |
2023 | "type" : "integer", | |
2024 | "description" : "Maximal time to wait until a guest system is stopped (minutes).", | |
2025 | "minimum" : 0 | |
56122987 | 2026 | }, |
7aacca6f DM |
2027 | "quiet" : { |
2028 | "description" : "Be quiet.", | |
2029 | "default" : 0, | |
2030 | "type" : "boolean", | |
56122987 DM |
2031 | "optional" : 1 |
2032 | }, | |
2033 | "remove" : { | |
56122987 | 2034 | "default" : 1, |
7aacca6f | 2035 | "type" : "boolean", |
56122987 DM |
2036 | "optional" : 1, |
2037 | "description" : "Remove old backup files if there are more than 'maxfiles' backup files." | |
2038 | }, | |
7aacca6f DM |
2039 | "mailnotification" : { |
2040 | "description" : "Specify when to send an email", | |
2041 | "enum" : [ | |
2042 | "always", | |
2043 | "failure" | |
2044 | ], | |
2045 | "default" : "always", | |
2046 | "type" : "string", | |
2047 | "optional" : 1 | |
2048 | }, | |
56122987 | 2049 | "all" : { |
7aacca6f | 2050 | "description" : "Backup all known guest systems on this host.", |
56122987 | 2051 | "optional" : 1, |
7aacca6f DM |
2052 | "type" : "boolean", |
2053 | "default" : 0 | |
56122987 | 2054 | }, |
7aacca6f DM |
2055 | "exclude" : { |
2056 | "description" : "Exclude specified guest systems (assumes --all)", | |
2057 | "type" : "string", | |
2058 | "optional" : 1, | |
2059 | "format" : "pve-vmid-list" | |
56122987 | 2060 | }, |
7aacca6f DM |
2061 | "size" : { |
2062 | "description" : "Unused, will be removed in a future release.", | |
2063 | "default" : 1024, | |
56122987 | 2064 | "type" : "integer", |
56122987 | 2065 | "optional" : 1, |
7aacca6f | 2066 | "minimum" : 500 |
56122987 | 2067 | }, |
7aacca6f DM |
2068 | "node" : { |
2069 | "optional" : 1, | |
56122987 | 2070 | "type" : "string", |
7aacca6f DM |
2071 | "description" : "Only run if executed on this node.", |
2072 | "format" : "pve-node" | |
56122987 | 2073 | }, |
7aacca6f | 2074 | "pigz" : { |
56122987 | 2075 | "default" : 0, |
7aacca6f | 2076 | "type" : "integer", |
56122987 | 2077 | "optional" : 1, |
7aacca6f | 2078 | "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." |
56122987 | 2079 | }, |
7aacca6f DM |
2080 | "stdexcludes" : { |
2081 | "description" : "Exclude temporary files and logs.", | |
2082 | "default" : 1, | |
2083 | "type" : "boolean", | |
56122987 DM |
2084 | "optional" : 1 |
2085 | }, | |
7aacca6f | 2086 | "exclude-path" : { |
56122987 | 2087 | "type" : "string", |
7aacca6f DM |
2088 | "optional" : 1, |
2089 | "description" : "Exclude certain files/directories (shell globs).", | |
2090 | "format" : "string-alist" | |
56122987 DM |
2091 | }, |
2092 | "storage" : { | |
2093 | "optional" : 1, | |
7aacca6f | 2094 | "type" : "string", |
56122987 | 2095 | "description" : "Store resulting file to this storage.", |
7aacca6f | 2096 | "format" : "pve-storage-id" |
56122987 DM |
2097 | }, |
2098 | "enabled" : { | |
2099 | "description" : "Enable or disable the job.", | |
7aacca6f | 2100 | "default" : "1", |
56122987 | 2101 | "optional" : 1, |
7aacca6f | 2102 | "type" : "boolean" |
56122987 | 2103 | }, |
7aacca6f DM |
2104 | "maxfiles" : { |
2105 | "minimum" : 1, | |
2106 | "default" : 1, | |
56122987 | 2107 | "optional" : 1, |
56122987 | 2108 | "type" : "integer", |
7aacca6f | 2109 | "description" : "Maximal number of backup files per guest system." |
56122987 | 2110 | }, |
7aacca6f DM |
2111 | "stop" : { |
2112 | "type" : "boolean", | |
56122987 | 2113 | "optional" : 1, |
7aacca6f DM |
2114 | "default" : 0, |
2115 | "description" : "Stop runnig backup jobs on this host." | |
56122987 | 2116 | }, |
7aacca6f | 2117 | "tmpdir" : { |
56122987 | 2118 | "optional" : 1, |
7aacca6f DM |
2119 | "type" : "string", |
2120 | "description" : "Store temporary files to specified directory." | |
56122987 | 2121 | }, |
7aacca6f DM |
2122 | "compress" : { |
2123 | "optional" : 1, | |
2124 | "type" : "string", | |
2125 | "default" : "0", | |
2126 | "enum" : [ | |
2127 | "0", | |
2128 | "1", | |
2129 | "gzip", | |
2130 | "lzo" | |
2131 | ], | |
2132 | "description" : "Compress dump file." | |
56122987 | 2133 | }, |
7aacca6f | 2134 | "mode" : { |
56122987 | 2135 | "type" : "string", |
56122987 | 2136 | "optional" : 1, |
7aacca6f | 2137 | "default" : "snapshot", |
56122987 | 2138 | "enum" : [ |
7aacca6f DM |
2139 | "snapshot", |
2140 | "suspend", | |
2141 | "stop" | |
2142 | ], | |
2143 | "description" : "Backup mode." | |
56122987 | 2144 | }, |
7aacca6f DM |
2145 | "bwlimit" : { |
2146 | "description" : "Limit I/O bandwidth (KBytes per second).", | |
2147 | "default" : 0, | |
56122987 | 2148 | "optional" : 1, |
7aacca6f DM |
2149 | "type" : "integer", |
2150 | "minimum" : 0 | |
56122987 DM |
2151 | }, |
2152 | "ionice" : { | |
56122987 | 2153 | "minimum" : 0, |
56122987 | 2154 | "default" : 7, |
7aacca6f DM |
2155 | "maximum" : 8, |
2156 | "type" : "integer", | |
56122987 | 2157 | "optional" : 1, |
7aacca6f | 2158 | "description" : "Set CFQ ionice priority." |
56122987 DM |
2159 | }, |
2160 | "dow" : { | |
56122987 DM |
2161 | "format" : "pve-day-of-week-list", |
2162 | "default" : "mon,tue,wed,thu,fri,sat,sun", | |
7aacca6f DM |
2163 | "optional" : 1, |
2164 | "type" : "string", | |
2165 | "description" : "Day of week selection." | |
56122987 | 2166 | }, |
7aacca6f DM |
2167 | "vmid" : { |
2168 | "description" : "The ID of the guest system you want to backup.", | |
56122987 | 2169 | "type" : "string", |
7aacca6f DM |
2170 | "optional" : 1, |
2171 | "format" : "pve-vmid-list" | |
56122987 | 2172 | }, |
7aacca6f DM |
2173 | "lockwait" : { |
2174 | "minimum" : 0, | |
2175 | "description" : "Maximal time to wait for the global lock (minutes).", | |
2176 | "type" : "integer", | |
56122987 | 2177 | "optional" : 1, |
7aacca6f DM |
2178 | "default" : 180 |
2179 | }, | |
2180 | "script" : { | |
56122987 | 2181 | "type" : "string", |
7aacca6f DM |
2182 | "optional" : 1, |
2183 | "description" : "Use specified hook script." | |
56122987 DM |
2184 | }, |
2185 | "mailto" : { | |
56122987 | 2186 | "description" : "Comma-separated list of email addresses that should receive email notifications.", |
56122987 | 2187 | "optional" : 1, |
7aacca6f DM |
2188 | "type" : "string", |
2189 | "format" : "string-list" | |
56122987 | 2190 | }, |
7aacca6f DM |
2191 | "dumpdir" : { |
2192 | "description" : "Store resulting files to specified directory.", | |
2193 | "type" : "string", | |
2194 | "optional" : 1 | |
2195 | }, | |
2196 | "starttime" : { | |
2197 | "typetext" : "HH:MM", | |
2198 | "description" : "Job Start time.", | |
2199 | "pattern" : "\\d{1,2}:\\d{1,2}", | |
56122987 DM |
2200 | "type" : "string" |
2201 | } | |
2202 | }, | |
2203 | "additionalProperties" : 0 | |
2204 | }, | |
7aacca6f | 2205 | "method" : "POST", |
56122987 DM |
2206 | "returns" : { |
2207 | "type" : "null" | |
7aacca6f | 2208 | } |
56122987 DM |
2209 | }, |
2210 | "GET" : { | |
7aacca6f | 2211 | "method" : "GET", |
56122987 | 2212 | "returns" : { |
7aacca6f DM |
2213 | "links" : [ |
2214 | { | |
2215 | "rel" : "child", | |
2216 | "href" : "{id}" | |
2217 | } | |
2218 | ], | |
56122987 | 2219 | "items" : { |
7aacca6f | 2220 | "type" : "object", |
56122987 DM |
2221 | "properties" : { |
2222 | "id" : { | |
2223 | "type" : "string" | |
2224 | } | |
56122987 | 2225 | } |
7aacca6f DM |
2226 | }, |
2227 | "type" : "array" | |
56122987 | 2228 | }, |
56122987 DM |
2229 | "description" : "List vzdump backup schedule.", |
2230 | "permissions" : { | |
2231 | "check" : [ | |
2232 | "perm", | |
2233 | "/", | |
2234 | [ | |
2235 | "Sys.Audit" | |
2236 | ] | |
2237 | ] | |
56122987 | 2238 | }, |
7aacca6f | 2239 | "name" : "index", |
56122987 DM |
2240 | "parameters" : { |
2241 | "additionalProperties" : 0 | |
7aacca6f | 2242 | } |
56122987 DM |
2243 | } |
2244 | }, | |
7aacca6f DM |
2245 | "path" : "/cluster/backup", |
2246 | "leaf" : 0 | |
2247 | }, | |
2248 | { | |
56122987 | 2249 | "path" : "/cluster/ha", |
7aacca6f DM |
2250 | "leaf" : 0, |
2251 | "text" : "ha", | |
56122987 DM |
2252 | "children" : [ |
2253 | { | |
56122987 DM |
2254 | "info" : { |
2255 | "POST" : { | |
56122987 DM |
2256 | "method" : "POST", |
2257 | "returns" : { | |
2258 | "type" : "null" | |
2259 | }, | |
7aacca6f DM |
2260 | "name" : "create", |
2261 | "permissions" : { | |
2262 | "check" : [ | |
2263 | "perm", | |
2264 | "/", | |
2265 | [ | |
2266 | "Sys.Console" | |
2267 | ] | |
2268 | ] | |
2269 | }, | |
56122987 | 2270 | "parameters" : { |
56122987 | 2271 | "properties" : { |
7aacca6f DM |
2272 | "max_restart" : { |
2273 | "description" : "Maximal number of tries to restart the service on a node after its start failed.", | |
2274 | "default" : 1, | |
2275 | "type" : "integer", | |
2276 | "optional" : 1, | |
2277 | "minimum" : 0 | |
2278 | }, | |
2279 | "state" : { | |
56122987 | 2280 | "type" : "string", |
7aacca6f DM |
2281 | "optional" : 1, |
2282 | "default" : "enabled", | |
2283 | "enum" : [ | |
2284 | "enabled", | |
2285 | "disabled" | |
2286 | ], | |
2287 | "description" : "Resource state." | |
2288 | }, | |
2289 | "max_relocate" : { | |
2290 | "default" : 1, | |
2291 | "optional" : 1, | |
2292 | "type" : "integer", | |
2293 | "description" : "Maximal number of service relocate tries when a service failes to start.", | |
2294 | "minimum" : 0 | |
56122987 DM |
2295 | }, |
2296 | "group" : { | |
2297 | "type" : "string", | |
7aacca6f | 2298 | "optional" : 1, |
56122987 | 2299 | "description" : "The HA group identifier.", |
7aacca6f | 2300 | "format" : "pve-configid" |
56122987 DM |
2301 | }, |
2302 | "comment" : { | |
2303 | "optional" : 1, | |
7aacca6f | 2304 | "type" : "string", |
56122987 | 2305 | "description" : "Description.", |
7aacca6f | 2306 | "maxLength" : 4096 |
56122987 DM |
2307 | }, |
2308 | "type" : { | |
56122987 DM |
2309 | "enum" : [ |
2310 | "vm", | |
2311 | "ct" | |
2312 | ], | |
7aacca6f | 2313 | "description" : "Resource type.", |
56122987 | 2314 | "type" : "string", |
56122987 | 2315 | "optional" : 1 |
7aacca6f DM |
2316 | }, |
2317 | "sid" : { | |
2318 | "format" : "pve-ha-resource-or-vm-id", | |
2319 | "typetext" : "<type>:<name>", | |
2320 | "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", | |
2321 | "type" : "string" | |
56122987 DM |
2322 | } |
2323 | }, | |
7aacca6f | 2324 | "additionalProperties" : 0, |
56122987 DM |
2325 | "type" : "object" |
2326 | }, | |
2327 | "protected" : 1, | |
7aacca6f | 2328 | "description" : "Create a new HA resource." |
56122987 DM |
2329 | }, |
2330 | "GET" : { | |
56122987 | 2331 | "returns" : { |
56122987 DM |
2332 | "items" : { |
2333 | "properties" : { | |
2334 | "sid" : { | |
2335 | "type" : "string" | |
2336 | } | |
2337 | }, | |
2338 | "type" : "object" | |
2339 | }, | |
2340 | "links" : [ | |
2341 | { | |
7aacca6f DM |
2342 | "href" : "{sid}", |
2343 | "rel" : "child" | |
56122987 | 2344 | } |
7aacca6f DM |
2345 | ], |
2346 | "type" : "array" | |
56122987 | 2347 | }, |
7aacca6f DM |
2348 | "method" : "GET", |
2349 | "description" : "List HA resources.", | |
2350 | "name" : "index", | |
56122987 DM |
2351 | "permissions" : { |
2352 | "check" : [ | |
2353 | "perm", | |
2354 | "/", | |
2355 | [ | |
2356 | "Sys.Audit" | |
2357 | ] | |
2358 | ] | |
2359 | }, | |
7aacca6f DM |
2360 | "parameters" : { |
2361 | "additionalProperties" : 0, | |
2362 | "properties" : { | |
2363 | "type" : { | |
2364 | "type" : "string", | |
2365 | "optional" : 1, | |
2366 | "enum" : [ | |
2367 | "vm", | |
2368 | "ct" | |
2369 | ], | |
2370 | "description" : "Only list resources of specific type" | |
2371 | } | |
2372 | } | |
2373 | } | |
56122987 DM |
2374 | } |
2375 | }, | |
7aacca6f | 2376 | "text" : "resources", |
56122987 DM |
2377 | "children" : [ |
2378 | { | |
2379 | "text" : "{sid}", | |
56122987 DM |
2380 | "children" : [ |
2381 | { | |
2382 | "path" : "/cluster/ha/resources/{sid}/migrate", | |
7aacca6f DM |
2383 | "leaf" : 1, |
2384 | "text" : "migrate", | |
56122987 DM |
2385 | "info" : { |
2386 | "POST" : { | |
7aacca6f DM |
2387 | "name" : "migrate", |
2388 | "parameters" : { | |
2389 | "properties" : { | |
2390 | "sid" : { | |
2391 | "typetext" : "<type>:<name>", | |
2392 | "format" : "pve-ha-resource-or-vm-id", | |
2393 | "type" : "string", | |
2394 | "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100)." | |
2395 | }, | |
2396 | "node" : { | |
2397 | "format" : "pve-node", | |
2398 | "description" : "The cluster node name.", | |
2399 | "type" : "string" | |
2400 | } | |
2401 | }, | |
2402 | "additionalProperties" : 0 | |
2403 | }, | |
56122987 DM |
2404 | "permissions" : { |
2405 | "check" : [ | |
2406 | "perm", | |
2407 | "/", | |
2408 | [ | |
2409 | "Sys.Console" | |
2410 | ] | |
2411 | ] | |
2412 | }, | |
7aacca6f | 2413 | "protected" : 1, |
56122987 DM |
2414 | "description" : "Request resource migration (online) to another node.", |
2415 | "returns" : { | |
2416 | "type" : "null" | |
2417 | }, | |
7aacca6f | 2418 | "method" : "POST" |
56122987 | 2419 | } |
7aacca6f | 2420 | } |
56122987 DM |
2421 | }, |
2422 | { | |
7aacca6f | 2423 | "path" : "/cluster/ha/resources/{sid}/relocate", |
56122987 DM |
2424 | "leaf" : 1, |
2425 | "text" : "relocate", | |
2426 | "info" : { | |
2427 | "POST" : { | |
2428 | "name" : "relocate", | |
56122987 | 2429 | "parameters" : { |
7aacca6f | 2430 | "additionalProperties" : 0, |
56122987 DM |
2431 | "properties" : { |
2432 | "node" : { | |
56122987 | 2433 | "format" : "pve-node", |
7aacca6f DM |
2434 | "description" : "The cluster node name.", |
2435 | "type" : "string" | |
56122987 DM |
2436 | }, |
2437 | "sid" : { | |
7aacca6f | 2438 | "typetext" : "<type>:<name>", |
56122987 | 2439 | "format" : "pve-ha-resource-or-vm-id", |
7aacca6f DM |
2440 | "type" : "string", |
2441 | "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100)." | |
56122987 | 2442 | } |
7aacca6f | 2443 | } |
56122987 | 2444 | }, |
56122987 DM |
2445 | "permissions" : { |
2446 | "check" : [ | |
2447 | "perm", | |
2448 | "/", | |
2449 | [ | |
2450 | "Sys.Console" | |
2451 | ] | |
2452 | ] | |
2453 | }, | |
7aacca6f DM |
2454 | "protected" : 1, |
2455 | "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.", | |
2456 | "returns" : { | |
2457 | "type" : "null" | |
2458 | }, | |
2459 | "method" : "POST" | |
56122987 | 2460 | } |
7aacca6f | 2461 | } |
56122987 DM |
2462 | } |
2463 | ], | |
2464 | "info" : { | |
7aacca6f DM |
2465 | "GET" : { |
2466 | "returns" : {}, | |
2467 | "method" : "GET", | |
2468 | "parameters" : { | |
2469 | "properties" : { | |
2470 | "sid" : { | |
2471 | "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", | |
2472 | "type" : "string", | |
2473 | "format" : "pve-ha-resource-or-vm-id", | |
2474 | "typetext" : "<type>:<name>" | |
2475 | } | |
2476 | }, | |
2477 | "additionalProperties" : 0 | |
2478 | }, | |
2479 | "permissions" : { | |
2480 | "check" : [ | |
2481 | "perm", | |
2482 | "/", | |
2483 | [ | |
2484 | "Sys.Audit" | |
2485 | ] | |
2486 | ] | |
2487 | }, | |
2488 | "name" : "read", | |
2489 | "description" : "Read resource configuration." | |
2490 | }, | |
56122987 DM |
2491 | "PUT" : { |
2492 | "returns" : { | |
2493 | "type" : "null" | |
2494 | }, | |
7aacca6f | 2495 | "method" : "PUT", |
56122987 DM |
2496 | "parameters" : { |
2497 | "additionalProperties" : 0, | |
7aacca6f | 2498 | "type" : "object", |
56122987 | 2499 | "properties" : { |
7aacca6f DM |
2500 | "group" : { |
2501 | "format" : "pve-configid", | |
56122987 DM |
2502 | "optional" : 1, |
2503 | "type" : "string", | |
7aacca6f | 2504 | "description" : "The HA group identifier." |
56122987 DM |
2505 | }, |
2506 | "max_restart" : { | |
7aacca6f | 2507 | "minimum" : 0, |
56122987 | 2508 | "optional" : 1, |
56122987 DM |
2509 | "type" : "integer", |
2510 | "default" : 1, | |
7aacca6f | 2511 | "description" : "Maximal number of tries to restart the service on a node after its start failed." |
56122987 | 2512 | }, |
7aacca6f DM |
2513 | "delete" : { |
2514 | "description" : "A list of settings you want to delete.", | |
2515 | "optional" : 1, | |
56122987 | 2516 | "type" : "string", |
7aacca6f DM |
2517 | "format" : "pve-configid-list", |
2518 | "maxLength" : 4096 | |
56122987 DM |
2519 | }, |
2520 | "sid" : { | |
2521 | "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", | |
7aacca6f | 2522 | "type" : "string", |
56122987 | 2523 | "format" : "pve-ha-resource-or-vm-id", |
7aacca6f | 2524 | "typetext" : "<type>:<name>" |
56122987 | 2525 | }, |
7aacca6f DM |
2526 | "comment" : { |
2527 | "description" : "Description.", | |
2528 | "optional" : 1, | |
56122987 | 2529 | "type" : "string", |
7aacca6f | 2530 | "maxLength" : 4096 |
56122987 DM |
2531 | }, |
2532 | "max_relocate" : { | |
7aacca6f | 2533 | "optional" : 1, |
56122987 | 2534 | "type" : "integer", |
7aacca6f | 2535 | "default" : 1, |
56122987 | 2536 | "description" : "Maximal number of service relocate tries when a service failes to start.", |
7aacca6f DM |
2537 | "minimum" : 0 |
2538 | }, | |
2539 | "digest" : { | |
2540 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
2541 | "type" : "string", | |
2542 | "optional" : 1, | |
2543 | "maxLength" : 40 | |
2544 | }, | |
2545 | "state" : { | |
2546 | "enum" : [ | |
2547 | "enabled", | |
2548 | "disabled" | |
2549 | ], | |
2550 | "description" : "Resource state.", | |
2551 | "type" : "string", | |
2552 | "optional" : 1, | |
2553 | "default" : "enabled" | |
56122987 | 2554 | } |
7aacca6f | 2555 | } |
56122987 DM |
2556 | }, |
2557 | "name" : "update", | |
56122987 DM |
2558 | "permissions" : { |
2559 | "check" : [ | |
2560 | "perm", | |
2561 | "/", | |
2562 | [ | |
2563 | "Sys.Console" | |
2564 | ] | |
2565 | ] | |
2566 | }, | |
7aacca6f DM |
2567 | "description" : "Update resource configuration.", |
2568 | "protected" : 1 | |
56122987 DM |
2569 | }, |
2570 | "DELETE" : { | |
7aacca6f DM |
2571 | "protected" : 1, |
2572 | "description" : "Delete resource configuration.", | |
2573 | "name" : "delete", | |
56122987 DM |
2574 | "permissions" : { |
2575 | "check" : [ | |
2576 | "perm", | |
2577 | "/", | |
2578 | [ | |
2579 | "Sys.Console" | |
2580 | ] | |
2581 | ] | |
2582 | }, | |
56122987 DM |
2583 | "parameters" : { |
2584 | "properties" : { | |
2585 | "sid" : { | |
56122987 | 2586 | "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", |
7aacca6f | 2587 | "type" : "string", |
56122987 | 2588 | "format" : "pve-ha-resource-or-vm-id", |
7aacca6f | 2589 | "typetext" : "<type>:<name>" |
56122987 DM |
2590 | } |
2591 | }, | |
2592 | "additionalProperties" : 0 | |
2593 | }, | |
7aacca6f | 2594 | "method" : "DELETE", |
56122987 DM |
2595 | "returns" : { |
2596 | "type" : "null" | |
2597 | } | |
2598 | } | |
2599 | }, | |
7aacca6f DM |
2600 | "path" : "/cluster/ha/resources/{sid}", |
2601 | "leaf" : 0 | |
56122987 DM |
2602 | } |
2603 | ], | |
2604 | "leaf" : 0, | |
7aacca6f | 2605 | "path" : "/cluster/ha/resources" |
56122987 DM |
2606 | }, |
2607 | { | |
7aacca6f DM |
2608 | "leaf" : 0, |
2609 | "path" : "/cluster/ha/groups", | |
2610 | "info" : { | |
2611 | "GET" : { | |
2612 | "parameters" : { | |
2613 | "additionalProperties" : 0 | |
2614 | }, | |
2615 | "name" : "index", | |
2616 | "permissions" : { | |
2617 | "check" : [ | |
2618 | "perm", | |
2619 | "/", | |
2620 | [ | |
2621 | "Sys.Audit" | |
2622 | ] | |
2623 | ] | |
2624 | }, | |
2625 | "description" : "Get HA groups.", | |
2626 | "method" : "GET", | |
2627 | "returns" : { | |
2628 | "type" : "array", | |
2629 | "items" : { | |
2630 | "type" : "object", | |
2631 | "properties" : { | |
2632 | "group" : { | |
2633 | "type" : "string" | |
2634 | } | |
2635 | } | |
2636 | }, | |
2637 | "links" : [ | |
2638 | { | |
2639 | "href" : "{group}", | |
2640 | "rel" : "child" | |
2641 | } | |
2642 | ] | |
2643 | } | |
2644 | }, | |
2645 | "POST" : { | |
2646 | "method" : "POST", | |
2647 | "returns" : { | |
2648 | "type" : "null" | |
2649 | }, | |
2650 | "description" : "Create a new HA group.", | |
2651 | "protected" : 1, | |
2652 | "parameters" : { | |
2653 | "properties" : { | |
2654 | "comment" : { | |
2655 | "maxLength" : 4096, | |
2656 | "description" : "Description.", | |
2657 | "optional" : 1, | |
2658 | "type" : "string" | |
2659 | }, | |
2660 | "restricted" : { | |
2661 | "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", | |
2662 | "optional" : 1, | |
2663 | "type" : "boolean", | |
2664 | "default" : 0 | |
2665 | }, | |
2666 | "nofailback" : { | |
2667 | "type" : "boolean", | |
2668 | "optional" : 1, | |
2669 | "default" : 0, | |
2670 | "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior." | |
2671 | }, | |
2672 | "type" : { | |
2673 | "enum" : [ | |
2674 | "group" | |
2675 | ], | |
2676 | "description" : "Group type.", | |
2677 | "optional" : 1, | |
2678 | "type" : "string" | |
2679 | }, | |
2680 | "nodes" : { | |
2681 | "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').", | |
2682 | "type" : "string", | |
2683 | "optional" : 0, | |
2684 | "format" : "pve-ha-group-node-list", | |
2685 | "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*" | |
2686 | }, | |
2687 | "group" : { | |
2688 | "format" : "pve-configid", | |
2689 | "type" : "string", | |
2690 | "description" : "The HA group identifier." | |
2691 | } | |
2692 | }, | |
2693 | "type" : "object", | |
2694 | "additionalProperties" : 0 | |
2695 | }, | |
2696 | "permissions" : { | |
2697 | "check" : [ | |
2698 | "perm", | |
2699 | "/", | |
2700 | [ | |
2701 | "Sys.Console" | |
2702 | ] | |
2703 | ] | |
2704 | }, | |
2705 | "name" : "create" | |
2706 | } | |
2707 | }, | |
2708 | "text" : "groups", | |
56122987 DM |
2709 | "children" : [ |
2710 | { | |
56122987 DM |
2711 | "info" : { |
2712 | "PUT" : { | |
2713 | "protected" : 1, | |
2714 | "description" : "Update ha group configuration.", | |
56122987 | 2715 | "parameters" : { |
7aacca6f DM |
2716 | "type" : "object", |
2717 | "additionalProperties" : 0, | |
56122987 | 2718 | "properties" : { |
56122987 | 2719 | "nodes" : { |
7aacca6f DM |
2720 | "format" : "pve-ha-group-node-list", |
2721 | "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*", | |
56122987 DM |
2722 | "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').", |
2723 | "optional" : 1, | |
56122987 DM |
2724 | "type" : "string" |
2725 | }, | |
7aacca6f DM |
2726 | "digest" : { |
2727 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
2728 | "type" : "string", | |
56122987 | 2729 | "optional" : 1, |
7aacca6f DM |
2730 | "maxLength" : 40 |
2731 | }, | |
2732 | "group" : { | |
2733 | "description" : "The HA group identifier.", | |
56122987 | 2734 | "type" : "string", |
7aacca6f | 2735 | "format" : "pve-configid" |
56122987 DM |
2736 | }, |
2737 | "comment" : { | |
2738 | "maxLength" : 4096, | |
7aacca6f | 2739 | "type" : "string", |
56122987 | 2740 | "optional" : 1, |
7aacca6f | 2741 | "description" : "Description." |
56122987 | 2742 | }, |
7aacca6f DM |
2743 | "nofailback" : { |
2744 | "default" : 0, | |
2745 | "optional" : 1, | |
2746 | "type" : "boolean", | |
2747 | "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior." | |
56122987 | 2748 | }, |
7aacca6f DM |
2749 | "restricted" : { |
2750 | "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", | |
2751 | "default" : 0, | |
2752 | "type" : "boolean", | |
2753 | "optional" : 1 | |
2754 | }, | |
2755 | "delete" : { | |
2756 | "format" : "pve-configid-list", | |
2757 | "maxLength" : 4096, | |
56122987 | 2758 | "optional" : 1, |
7aacca6f DM |
2759 | "type" : "string", |
2760 | "description" : "A list of settings you want to delete." | |
56122987 | 2761 | } |
7aacca6f | 2762 | } |
56122987 | 2763 | }, |
7aacca6f | 2764 | "name" : "update", |
56122987 DM |
2765 | "permissions" : { |
2766 | "check" : [ | |
2767 | "perm", | |
2768 | "/", | |
2769 | [ | |
7aacca6f | 2770 | "Sys.Console" |
56122987 DM |
2771 | ] |
2772 | ] | |
2773 | }, | |
7aacca6f DM |
2774 | "method" : "PUT", |
2775 | "returns" : { | |
2776 | "type" : "null" | |
56122987 DM |
2777 | } |
2778 | }, | |
2779 | "DELETE" : { | |
2780 | "method" : "DELETE", | |
7aacca6f DM |
2781 | "returns" : { |
2782 | "type" : "null" | |
2783 | }, | |
56122987 DM |
2784 | "name" : "delete", |
2785 | "parameters" : { | |
2786 | "properties" : { | |
2787 | "group" : { | |
2788 | "description" : "The HA group identifier.", | |
7aacca6f DM |
2789 | "type" : "string", |
2790 | "format" : "pve-configid" | |
56122987 DM |
2791 | } |
2792 | }, | |
2793 | "additionalProperties" : 0 | |
2794 | }, | |
56122987 DM |
2795 | "permissions" : { |
2796 | "check" : [ | |
2797 | "perm", | |
2798 | "/", | |
2799 | [ | |
2800 | "Sys.Console" | |
2801 | ] | |
2802 | ] | |
2803 | }, | |
2804 | "description" : "Delete ha group configuration.", | |
2805 | "protected" : 1 | |
7aacca6f DM |
2806 | }, |
2807 | "GET" : { | |
2808 | "parameters" : { | |
2809 | "properties" : { | |
2810 | "group" : { | |
2811 | "description" : "The HA group identifier.", | |
2812 | "type" : "string", | |
2813 | "format" : "pve-configid" | |
2814 | } | |
2815 | }, | |
2816 | "additionalProperties" : 0 | |
2817 | }, | |
2818 | "name" : "read", | |
2819 | "permissions" : { | |
2820 | "check" : [ | |
2821 | "perm", | |
2822 | "/", | |
2823 | [ | |
2824 | "Sys.Audit" | |
2825 | ] | |
2826 | ] | |
2827 | }, | |
2828 | "description" : "Read ha group configuration.", | |
2829 | "returns" : {}, | |
2830 | "method" : "GET" | |
56122987 DM |
2831 | } |
2832 | }, | |
7aacca6f | 2833 | "text" : "{group}", |
56122987 | 2834 | "leaf" : 1, |
7aacca6f | 2835 | "path" : "/cluster/ha/groups/{group}" |
56122987 | 2836 | } |
7aacca6f DM |
2837 | ] |
2838 | }, | |
2839 | { | |
2840 | "text" : "status", | |
2841 | "children" : [ | |
2842 | { | |
2843 | "info" : { | |
2844 | "GET" : { | |
2845 | "returns" : { | |
2846 | "type" : "array" | |
56122987 DM |
2847 | }, |
2848 | "method" : "GET", | |
56122987 | 2849 | "description" : "Get HA manger status.", |
7aacca6f | 2850 | "name" : "status", |
56122987 DM |
2851 | "permissions" : { |
2852 | "check" : [ | |
2853 | "perm", | |
2854 | "/", | |
2855 | [ | |
2856 | "Sys.Audit" | |
2857 | ] | |
2858 | ] | |
7aacca6f DM |
2859 | }, |
2860 | "parameters" : { | |
2861 | "additionalProperties" : 0 | |
56122987 DM |
2862 | } |
2863 | } | |
7aacca6f DM |
2864 | }, |
2865 | "text" : "current", | |
2866 | "leaf" : 1, | |
2867 | "path" : "/cluster/ha/status/current" | |
56122987 DM |
2868 | }, |
2869 | { | |
2870 | "info" : { | |
2871 | "GET" : { | |
2872 | "method" : "GET", | |
56122987 DM |
2873 | "returns" : { |
2874 | "type" : "object" | |
2875 | }, | |
7aacca6f DM |
2876 | "description" : "Get full HA manger status, including LRM status.", |
2877 | "parameters" : { | |
2878 | "additionalProperties" : 0 | |
2879 | }, | |
2880 | "name" : "manager_status", | |
56122987 DM |
2881 | "permissions" : { |
2882 | "check" : [ | |
2883 | "perm", | |
2884 | "/", | |
2885 | [ | |
2886 | "Sys.Audit" | |
2887 | ] | |
2888 | ] | |
7aacca6f | 2889 | } |
56122987 DM |
2890 | } |
2891 | }, | |
7aacca6f | 2892 | "text" : "manager_status", |
56122987 | 2893 | "leaf" : 1, |
7aacca6f | 2894 | "path" : "/cluster/ha/status/manager_status" |
56122987 DM |
2895 | } |
2896 | ], | |
56122987 DM |
2897 | "info" : { |
2898 | "GET" : { | |
7aacca6f | 2899 | "method" : "GET", |
56122987 | 2900 | "returns" : { |
56122987 DM |
2901 | "items" : { |
2902 | "properties" : {}, | |
2903 | "type" : "object" | |
2904 | }, | |
2905 | "links" : [ | |
2906 | { | |
2907 | "rel" : "child", | |
2908 | "href" : "{name}" | |
2909 | } | |
7aacca6f DM |
2910 | ], |
2911 | "type" : "array" | |
56122987 | 2912 | }, |
7aacca6f DM |
2913 | "description" : "Directory index.", |
2914 | "permissions" : { | |
2915 | "user" : "all" | |
2916 | }, | |
2917 | "parameters" : { | |
2918 | "additionalProperties" : 0 | |
2919 | }, | |
2920 | "name" : "index" | |
56122987 | 2921 | } |
7aacca6f DM |
2922 | }, |
2923 | "path" : "/cluster/ha/status", | |
2924 | "leaf" : 0 | |
56122987 DM |
2925 | } |
2926 | ], | |
56122987 DM |
2927 | "info" : { |
2928 | "GET" : { | |
7aacca6f DM |
2929 | "description" : "Directory index.", |
2930 | "permissions" : { | |
2931 | "check" : [ | |
2932 | "perm", | |
2933 | "/", | |
2934 | [ | |
2935 | "Sys.Audit" | |
2936 | ] | |
2937 | ] | |
2938 | }, | |
2939 | "name" : "index", | |
2940 | "parameters" : { | |
2941 | "additionalProperties" : 0 | |
2942 | }, | |
56122987 DM |
2943 | "method" : "GET", |
2944 | "returns" : { | |
2945 | "type" : "array", | |
2946 | "items" : { | |
7aacca6f DM |
2947 | "type" : "object", |
2948 | "properties" : { | |
2949 | "id" : { | |
2950 | "type" : "string" | |
2951 | } | |
2952 | } | |
2953 | }, | |
2954 | "links" : [ | |
2955 | { | |
2956 | "href" : "{id}", | |
2957 | "rel" : "child" | |
2958 | } | |
2959 | ] | |
2960 | } | |
2961 | } | |
2962 | } | |
2963 | }, | |
2964 | { | |
2965 | "path" : "/cluster/log", | |
2966 | "leaf" : 1, | |
2967 | "text" : "log", | |
2968 | "info" : { | |
2969 | "GET" : { | |
2970 | "description" : "Read cluster log", | |
2971 | "permissions" : { | |
2972 | "user" : "all" | |
56122987 DM |
2973 | }, |
2974 | "parameters" : { | |
7aacca6f | 2975 | "additionalProperties" : 0, |
56122987 DM |
2976 | "properties" : { |
2977 | "max" : { | |
7aacca6f | 2978 | "type" : "integer", |
56122987 | 2979 | "optional" : 1, |
7aacca6f DM |
2980 | "description" : "Maximum number of entries.", |
2981 | "minimum" : 1 | |
56122987 | 2982 | } |
7aacca6f | 2983 | } |
56122987 | 2984 | }, |
7aacca6f DM |
2985 | "name" : "log", |
2986 | "method" : "GET", | |
2987 | "returns" : { | |
2988 | "type" : "array", | |
2989 | "items" : { | |
2990 | "type" : "object", | |
2991 | "properties" : {} | |
2992 | } | |
2993 | } | |
56122987 DM |
2994 | } |
2995 | } | |
2996 | }, | |
2997 | { | |
56122987 DM |
2998 | "info" : { |
2999 | "GET" : { | |
7aacca6f | 3000 | "method" : "GET", |
56122987 DM |
3001 | "returns" : { |
3002 | "items" : { | |
3003 | "properties" : {}, | |
3004 | "type" : "object" | |
3005 | }, | |
3006 | "type" : "array" | |
3007 | }, | |
7aacca6f DM |
3008 | "name" : "resources", |
3009 | "permissions" : { | |
3010 | "user" : "all" | |
3011 | }, | |
56122987 DM |
3012 | "parameters" : { |
3013 | "additionalProperties" : 0, | |
3014 | "properties" : { | |
3015 | "type" : { | |
7aacca6f DM |
3016 | "optional" : 1, |
3017 | "type" : "string", | |
56122987 DM |
3018 | "enum" : [ |
3019 | "vm", | |
3020 | "storage", | |
3021 | "node" | |
7aacca6f | 3022 | ] |
56122987 DM |
3023 | } |
3024 | } | |
3025 | }, | |
7aacca6f | 3026 | "description" : "Resources index (cluster wide)." |
56122987 DM |
3027 | } |
3028 | }, | |
3029 | "text" : "resources", | |
7aacca6f DM |
3030 | "leaf" : 1, |
3031 | "path" : "/cluster/resources" | |
56122987 DM |
3032 | }, |
3033 | { | |
56122987 DM |
3034 | "info" : { |
3035 | "GET" : { | |
7aacca6f DM |
3036 | "description" : "List recent tasks (cluster wide).", |
3037 | "permissions" : { | |
3038 | "user" : "all" | |
3039 | }, | |
3040 | "name" : "tasks", | |
56122987 DM |
3041 | "parameters" : { |
3042 | "additionalProperties" : 0 | |
3043 | }, | |
7aacca6f | 3044 | "method" : "GET", |
56122987 | 3045 | "returns" : { |
7aacca6f | 3046 | "type" : "array", |
56122987 | 3047 | "items" : { |
7aacca6f | 3048 | "type" : "object", |
56122987 DM |
3049 | "properties" : { |
3050 | "upid" : { | |
3051 | "type" : "string" | |
3052 | } | |
7aacca6f DM |
3053 | } |
3054 | } | |
3055 | } | |
56122987 DM |
3056 | } |
3057 | }, | |
7aacca6f DM |
3058 | "text" : "tasks", |
3059 | "leaf" : 1, | |
56122987 DM |
3060 | "path" : "/cluster/tasks" |
3061 | }, | |
3062 | { | |
3063 | "leaf" : 1, | |
56122987 DM |
3064 | "path" : "/cluster/options", |
3065 | "info" : { | |
7aacca6f | 3066 | "GET" : { |
56122987 | 3067 | "parameters" : { |
7aacca6f DM |
3068 | "additionalProperties" : 0 |
3069 | }, | |
3070 | "permissions" : { | |
3071 | "check" : [ | |
3072 | "perm", | |
3073 | "/", | |
3074 | [ | |
3075 | "Sys.Audit" | |
3076 | ] | |
3077 | ] | |
3078 | }, | |
3079 | "name" : "get_options", | |
3080 | "description" : "Get datacenter options.", | |
3081 | "method" : "GET", | |
3082 | "returns" : { | |
3083 | "type" : "object", | |
3084 | "properties" : {} | |
3085 | } | |
3086 | }, | |
3087 | "PUT" : { | |
3088 | "permissions" : { | |
3089 | "check" : [ | |
3090 | "perm", | |
3091 | "/", | |
3092 | [ | |
3093 | "Sys.Modify" | |
3094 | ] | |
3095 | ] | |
3096 | }, | |
3097 | "name" : "set_options", | |
3098 | "parameters" : { | |
3099 | "additionalProperties" : 0, | |
3100 | "properties" : { | |
3101 | "fencing" : { | |
3102 | "default" : "watchdog", | |
3103 | "type" : "string", | |
3104 | "optional" : 1, | |
3105 | "description" : "Set the fencing mode of the HA cluster. Hardware mode needs a valid configuration of fence devices in /etc/pve/ha/fence.cfg. With both all two modes are used.\n\nWARNING: 'hardware' and 'both' are EXPERIMENTAL & WIP", | |
3106 | "enum" : [ | |
3107 | "watchdog", | |
3108 | "hardware", | |
3109 | "both" | |
3110 | ] | |
56122987 DM |
3111 | }, |
3112 | "console" : { | |
7aacca6f | 3113 | "optional" : 1, |
56122987 DM |
3114 | "type" : "string", |
3115 | "description" : "Select the default Console viewer. You can either use the builtin java applet (VNC), an external virt-viewer comtatible application (SPICE), or an HTML5 based viewer (noVNC).", | |
56122987 DM |
3116 | "enum" : [ |
3117 | "applet", | |
3118 | "vv", | |
3119 | "html5" | |
3120 | ] | |
3121 | }, | |
7aacca6f DM |
3122 | "delete" : { |
3123 | "format" : "pve-configid-list", | |
3124 | "description" : "A list of settings you want to delete.", | |
3125 | "optional" : 1, | |
3126 | "type" : "string" | |
3127 | }, | |
3128 | "max_workers" : { | |
3129 | "minimum" : 1, | |
3130 | "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.", | |
3131 | "type" : "integer", | |
3132 | "optional" : 1 | |
3133 | }, | |
3134 | "language" : { | |
3135 | "type" : "string", | |
3136 | "optional" : 1, | |
3137 | "enum" : [ | |
3138 | "en", | |
3139 | "de" | |
3140 | ], | |
3141 | "description" : "Default GUI language." | |
3142 | }, | |
56122987 DM |
3143 | "keyboard" : { |
3144 | "enum" : [ | |
7aacca6f DM |
3145 | "da", |
3146 | "sv", | |
56122987 | 3147 | "en-gb", |
7aacca6f DM |
3148 | "lt", |
3149 | "is", | |
56122987 | 3150 | "mk", |
7aacca6f DM |
3151 | "pl", |
3152 | "hu", | |
56122987 | 3153 | "fr-be", |
56122987 | 3154 | "pt-br", |
7aacca6f DM |
3155 | "de-ch", |
3156 | "nl", | |
56122987 | 3157 | "no", |
7aacca6f | 3158 | "tr", |
56122987 | 3159 | "sl", |
7aacca6f | 3160 | "de", |
56122987 | 3161 | "fr-ca", |
56122987 | 3162 | "ja", |
7aacca6f DM |
3163 | "es", |
3164 | "it", | |
3165 | "pt", | |
3166 | "fr", | |
3167 | "en-us", | |
3168 | "fi", | |
3169 | "fr-ch" | |
56122987 DM |
3170 | ], |
3171 | "description" : "Default keybord layout for vnc server.", | |
3172 | "optional" : 1, | |
3173 | "type" : "string" | |
3174 | }, | |
56122987 | 3175 | "http_proxy" : { |
56122987 | 3176 | "optional" : 1, |
56122987 | 3177 | "type" : "string", |
7aacca6f DM |
3178 | "pattern" : "http://.*", |
3179 | "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')" | |
56122987 | 3180 | }, |
7aacca6f DM |
3181 | "email_from" : { |
3182 | "format" : "email-opt", | |
56122987 | 3183 | "optional" : 1, |
7aacca6f DM |
3184 | "type" : "string", |
3185 | "description" : "Specify email address to send notification from (default is root@$hostname)" | |
56122987 | 3186 | }, |
7aacca6f DM |
3187 | "migration_unsecure" : { |
3188 | "type" : "boolean", | |
56122987 | 3189 | "optional" : 1, |
7aacca6f | 3190 | "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration." |
56122987 DM |
3191 | } |
3192 | } | |
3193 | }, | |
56122987 | 3194 | "protected" : 1, |
7aacca6f DM |
3195 | "description" : "Set datacenter options.", |
3196 | "returns" : { | |
3197 | "type" : "null" | |
56122987 | 3198 | }, |
7aacca6f DM |
3199 | "method" : "PUT" |
3200 | } | |
3201 | }, | |
3202 | "text" : "options" | |
3203 | }, | |
3204 | { | |
3205 | "text" : "status", | |
3206 | "info" : { | |
56122987 | 3207 | "GET" : { |
56122987 DM |
3208 | "parameters" : { |
3209 | "additionalProperties" : 0 | |
3210 | }, | |
7aacca6f | 3211 | "name" : "get_status", |
56122987 DM |
3212 | "permissions" : { |
3213 | "check" : [ | |
3214 | "perm", | |
3215 | "/", | |
3216 | [ | |
3217 | "Sys.Audit" | |
3218 | ] | |
3219 | ] | |
3220 | }, | |
7aacca6f DM |
3221 | "description" : "Get cluster status informations.", |
3222 | "protected" : 1, | |
3223 | "method" : "GET", | |
56122987 | 3224 | "returns" : { |
56122987 DM |
3225 | "items" : { |
3226 | "type" : "object", | |
3227 | "properties" : { | |
3228 | "type" : { | |
3229 | "type" : "string" | |
3230 | } | |
3231 | } | |
7aacca6f DM |
3232 | }, |
3233 | "type" : "array" | |
56122987 DM |
3234 | } |
3235 | } | |
3236 | }, | |
7aacca6f DM |
3237 | "path" : "/cluster/status", |
3238 | "leaf" : 1 | |
56122987 DM |
3239 | }, |
3240 | { | |
56122987 DM |
3241 | "info" : { |
3242 | "GET" : { | |
7aacca6f DM |
3243 | "method" : "GET", |
3244 | "returns" : { | |
3245 | "type" : "integer", | |
3246 | "description" : "The next free VMID." | |
56122987 DM |
3247 | }, |
3248 | "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.", | |
3249 | "parameters" : { | |
56122987 DM |
3250 | "properties" : { |
3251 | "vmid" : { | |
56122987 | 3252 | "format" : "pve-vmid", |
7aacca6f | 3253 | "minimum" : 1, |
56122987 | 3254 | "description" : "The (unique) ID of the VM.", |
7aacca6f DM |
3255 | "optional" : 1, |
3256 | "type" : "integer" | |
56122987 | 3257 | } |
7aacca6f DM |
3258 | }, |
3259 | "additionalProperties" : 0 | |
56122987 DM |
3260 | }, |
3261 | "name" : "nextid", | |
7aacca6f DM |
3262 | "permissions" : { |
3263 | "user" : "all" | |
3264 | } | |
56122987 DM |
3265 | } |
3266 | }, | |
3267 | "text" : "nextid", | |
7aacca6f DM |
3268 | "leaf" : 1, |
3269 | "path" : "/cluster/nextid" | |
56122987 DM |
3270 | } |
3271 | ], | |
7aacca6f | 3272 | "text" : "cluster" |
56122987 DM |
3273 | }, |
3274 | { | |
7aacca6f | 3275 | "path" : "/nodes", |
56122987 DM |
3276 | "leaf" : 0, |
3277 | "text" : "nodes", | |
56122987 DM |
3278 | "children" : [ |
3279 | { | |
7aacca6f DM |
3280 | "info" : { |
3281 | "GET" : { | |
3282 | "returns" : { | |
3283 | "links" : [ | |
3284 | { | |
3285 | "rel" : "child", | |
3286 | "href" : "{name}" | |
3287 | } | |
3288 | ], | |
3289 | "items" : { | |
3290 | "type" : "object", | |
3291 | "properties" : {} | |
3292 | }, | |
3293 | "type" : "array" | |
3294 | }, | |
3295 | "method" : "GET", | |
3296 | "description" : "Node index.", | |
3297 | "parameters" : { | |
3298 | "additionalProperties" : 0, | |
3299 | "properties" : { | |
3300 | "node" : { | |
3301 | "format" : "pve-node", | |
3302 | "description" : "The cluster node name.", | |
3303 | "type" : "string" | |
3304 | } | |
3305 | } | |
3306 | }, | |
3307 | "permissions" : { | |
3308 | "user" : "all" | |
3309 | }, | |
3310 | "name" : "index" | |
3311 | } | |
3312 | }, | |
3313 | "children" : [ | |
3314 | { | |
3315 | "children" : [ | |
3316 | { | |
3317 | "path" : "/nodes/{node}/qemu/{vmid}", | |
3318 | "leaf" : 0, | |
3319 | "text" : "{vmid}", | |
56122987 DM |
3320 | "children" : [ |
3321 | { | |
7aacca6f | 3322 | "path" : "/nodes/{node}/qemu/{vmid}/firewall", |
56122987 | 3323 | "leaf" : 0, |
7aacca6f | 3324 | "text" : "firewall", |
56122987 DM |
3325 | "children" : [ |
3326 | { | |
7aacca6f | 3327 | "text" : "rules", |
56122987 DM |
3328 | "children" : [ |
3329 | { | |
3330 | "text" : "{pos}", | |
56122987 DM |
3331 | "info" : { |
3332 | "DELETE" : { | |
7aacca6f | 3333 | "method" : "DELETE", |
56122987 DM |
3334 | "parameters" : { |
3335 | "properties" : { | |
56122987 | 3336 | "node" : { |
56122987 | 3337 | "type" : "string", |
7aacca6f | 3338 | "description" : "The cluster node name.", |
56122987 DM |
3339 | "format" : "pve-node" |
3340 | }, | |
7aacca6f DM |
3341 | "vmid" : { |
3342 | "minimum" : 1, | |
3343 | "format" : "pve-vmid", | |
3344 | "description" : "The (unique) ID of the VM.", | |
3345 | "type" : "integer" | |
3346 | }, | |
56122987 | 3347 | "pos" : { |
7aacca6f | 3348 | "type" : "integer", |
56122987 | 3349 | "optional" : 1, |
7aacca6f DM |
3350 | "description" : "Update rule at position <pos>.", |
3351 | "minimum" : 0 | |
56122987 DM |
3352 | }, |
3353 | "digest" : { | |
56122987 | 3354 | "optional" : 1, |
7aacca6f DM |
3355 | "type" : "string", |
3356 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
3357 | "maxLength" : 40 | |
56122987 DM |
3358 | } |
3359 | }, | |
3360 | "additionalProperties" : 0 | |
3361 | }, | |
7aacca6f DM |
3362 | "name" : "delete_rule", |
3363 | "protected" : 1, | |
3364 | "returns" : { | |
3365 | "type" : "null" | |
3366 | }, | |
56122987 DM |
3367 | "permissions" : { |
3368 | "check" : [ | |
3369 | "perm", | |
3370 | "/vms/{vmid}", | |
3371 | [ | |
3372 | "VM.Config.Network" | |
3373 | ] | |
3374 | ] | |
3375 | }, | |
7aacca6f DM |
3376 | "description" : "Delete rule.", |
3377 | "proxyto" : null | |
3378 | }, | |
3379 | "PUT" : { | |
56122987 DM |
3380 | "returns" : { |
3381 | "type" : "null" | |
3382 | }, | |
56122987 DM |
3383 | "permissions" : { |
3384 | "check" : [ | |
3385 | "perm", | |
3386 | "/vms/{vmid}", | |
3387 | [ | |
7aacca6f | 3388 | "VM.Config.Network" |
56122987 DM |
3389 | ] |
3390 | ] | |
3391 | }, | |
56122987 | 3392 | "proxyto" : null, |
7aacca6f DM |
3393 | "description" : "Modify rule data.", |
3394 | "method" : "PUT", | |
56122987 DM |
3395 | "parameters" : { |
3396 | "properties" : { | |
7aacca6f DM |
3397 | "dport" : { |
3398 | "format" : "pve-fw-dport-spec", | |
3399 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
56122987 | 3400 | "optional" : 1, |
7aacca6f DM |
3401 | "type" : "string" |
3402 | }, | |
3403 | "type" : { | |
3404 | "enum" : [ | |
3405 | "in", | |
3406 | "out", | |
3407 | "group" | |
3408 | ], | |
3409 | "type" : "string", | |
3410 | "optional" : 1 | |
56122987 DM |
3411 | }, |
3412 | "node" : { | |
3413 | "format" : "pve-node", | |
3414 | "type" : "string", | |
3415 | "description" : "The cluster node name." | |
7aacca6f DM |
3416 | }, |
3417 | "moveto" : { | |
3418 | "minimum" : 0, | |
3419 | "type" : "integer", | |
56122987 | 3420 | "optional" : 1, |
7aacca6f | 3421 | "description" : "Move rule to new position <moveto>. Other arguments are ignored." |
56122987 | 3422 | }, |
7aacca6f DM |
3423 | "comment" : { |
3424 | "optional" : 1, | |
3425 | "type" : "string" | |
3426 | }, | |
3427 | "delete" : { | |
3428 | "format" : "pve-configid-list", | |
3429 | "description" : "A list of settings you want to delete.", | |
3430 | "type" : "string", | |
3431 | "optional" : 1 | |
3432 | }, | |
3433 | "dest" : { | |
3434 | "format" : "pve-fw-addr-spec", | |
56122987 | 3435 | "optional" : 1, |
56122987 | 3436 | "type" : "string", |
7aacca6f | 3437 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." |
56122987 DM |
3438 | }, |
3439 | "source" : { | |
3440 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
56122987 | 3441 | "type" : "string", |
7aacca6f | 3442 | "optional" : 1, |
56122987 DM |
3443 | "format" : "pve-fw-addr-spec" |
3444 | }, | |
7aacca6f DM |
3445 | "digest" : { |
3446 | "maxLength" : 40, | |
3447 | "type" : "string", | |
56122987 | 3448 | "optional" : 1, |
7aacca6f | 3449 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
56122987 | 3450 | }, |
7aacca6f | 3451 | "enable" : { |
56122987 | 3452 | "optional" : 1, |
7aacca6f DM |
3453 | "type" : "integer", |
3454 | "minimum" : 0 | |
3455 | }, | |
3456 | "action" : { | |
56122987 | 3457 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", |
56122987 | 3458 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
7aacca6f | 3459 | "minLength" : 2, |
56122987 | 3460 | "optional" : 1, |
7aacca6f DM |
3461 | "type" : "string", |
3462 | "maxLength" : 20 | |
56122987 | 3463 | }, |
7aacca6f DM |
3464 | "pos" : { |
3465 | "type" : "integer", | |
56122987 | 3466 | "optional" : 1, |
7aacca6f DM |
3467 | "description" : "Update rule at position <pos>.", |
3468 | "minimum" : 0 | |
56122987 DM |
3469 | }, |
3470 | "proto" : { | |
56122987 | 3471 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", |
7aacca6f | 3472 | "type" : "string", |
56122987 | 3473 | "optional" : 1, |
7aacca6f | 3474 | "format" : "pve-fw-protocol-spec" |
56122987 | 3475 | }, |
7aacca6f DM |
3476 | "vmid" : { |
3477 | "format" : "pve-vmid", | |
3478 | "minimum" : 1, | |
3479 | "description" : "The (unique) ID of the VM.", | |
3480 | "type" : "integer" | |
56122987 | 3481 | }, |
7aacca6f DM |
3482 | "macro" : { |
3483 | "maxLength" : 128, | |
56122987 | 3484 | "type" : "string", |
7aacca6f DM |
3485 | "optional" : 1 |
3486 | }, | |
3487 | "iface" : { | |
3488 | "format" : "pve-iface", | |
3489 | "maxLength" : 20, | |
3490 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", | |
3491 | "minLength" : 2, | |
56122987 | 3492 | "optional" : 1, |
7aacca6f | 3493 | "type" : "string" |
56122987 DM |
3494 | }, |
3495 | "sport" : { | |
7aacca6f | 3496 | "format" : "pve-fw-sport-spec", |
56122987 DM |
3497 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", |
3498 | "optional" : 1, | |
56122987 | 3499 | "type" : "string" |
56122987 | 3500 | } |
7aacca6f DM |
3501 | }, |
3502 | "additionalProperties" : 0 | |
56122987 | 3503 | }, |
7aacca6f DM |
3504 | "name" : "update_rule", |
3505 | "protected" : 1 | |
3506 | }, | |
3507 | "GET" : { | |
56122987 DM |
3508 | "permissions" : { |
3509 | "check" : [ | |
3510 | "perm", | |
3511 | "/vms/{vmid}", | |
3512 | [ | |
7aacca6f | 3513 | "VM.Audit" |
56122987 DM |
3514 | ] |
3515 | ] | |
7aacca6f DM |
3516 | }, |
3517 | "name" : "get_rule", | |
3518 | "parameters" : { | |
3519 | "properties" : { | |
3520 | "node" : { | |
3521 | "type" : "string", | |
3522 | "description" : "The cluster node name.", | |
3523 | "format" : "pve-node" | |
3524 | }, | |
3525 | "pos" : { | |
3526 | "minimum" : 0, | |
3527 | "type" : "integer", | |
3528 | "optional" : 1, | |
3529 | "description" : "Update rule at position <pos>." | |
3530 | }, | |
3531 | "vmid" : { | |
3532 | "format" : "pve-vmid", | |
3533 | "minimum" : 1, | |
3534 | "type" : "integer", | |
3535 | "description" : "The (unique) ID of the VM." | |
3536 | } | |
3537 | }, | |
3538 | "additionalProperties" : 0 | |
3539 | }, | |
3540 | "proxyto" : null, | |
3541 | "description" : "Get single rule data.", | |
3542 | "returns" : { | |
3543 | "type" : "object", | |
3544 | "properties" : { | |
3545 | "pos" : { | |
3546 | "type" : "integer" | |
3547 | } | |
3548 | } | |
3549 | }, | |
3550 | "method" : "GET" | |
56122987 | 3551 | } |
7aacca6f DM |
3552 | }, |
3553 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}", | |
3554 | "leaf" : 1 | |
56122987 DM |
3555 | } |
3556 | ], | |
56122987 | 3557 | "info" : { |
7aacca6f | 3558 | "POST" : { |
56122987 | 3559 | "returns" : { |
7aacca6f | 3560 | "type" : "null" |
56122987 | 3561 | }, |
7aacca6f DM |
3562 | "description" : "Create new rule.", |
3563 | "proxyto" : null, | |
56122987 DM |
3564 | "permissions" : { |
3565 | "check" : [ | |
3566 | "perm", | |
3567 | "/vms/{vmid}", | |
3568 | [ | |
7aacca6f | 3569 | "VM.Config.Network" |
56122987 DM |
3570 | ] |
3571 | ] | |
7aacca6f DM |
3572 | }, |
3573 | "method" : "POST", | |
3574 | "protected" : 1, | |
56122987 | 3575 | "parameters" : { |
56122987 | 3576 | "properties" : { |
56122987 | 3577 | "pos" : { |
56122987 | 3578 | "optional" : 1, |
7aacca6f DM |
3579 | "type" : "integer", |
3580 | "description" : "Update rule at position <pos>.", | |
3581 | "minimum" : 0 | |
56122987 | 3582 | }, |
7aacca6f DM |
3583 | "proto" : { |
3584 | "format" : "pve-fw-protocol-spec", | |
3585 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", | |
56122987 | 3586 | "optional" : 1, |
56122987 DM |
3587 | "type" : "string" |
3588 | }, | |
3589 | "vmid" : { | |
7aacca6f | 3590 | "description" : "The (unique) ID of the VM.", |
56122987 DM |
3591 | "type" : "integer", |
3592 | "format" : "pve-vmid", | |
7aacca6f | 3593 | "minimum" : 1 |
56122987 | 3594 | }, |
7aacca6f | 3595 | "macro" : { |
56122987 DM |
3596 | "optional" : 1, |
3597 | "type" : "string", | |
7aacca6f | 3598 | "maxLength" : 128 |
56122987 | 3599 | }, |
7aacca6f DM |
3600 | "dport" : { |
3601 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
56122987 | 3602 | "type" : "string", |
7aacca6f DM |
3603 | "optional" : 1, |
3604 | "format" : "pve-fw-dport-spec" | |
56122987 | 3605 | }, |
7aacca6f DM |
3606 | "type" : { |
3607 | "optional" : 0, | |
56122987 | 3608 | "type" : "string", |
7aacca6f DM |
3609 | "enum" : [ |
3610 | "in", | |
3611 | "out", | |
3612 | "group" | |
3613 | ] | |
56122987 DM |
3614 | }, |
3615 | "enable" : { | |
3616 | "minimum" : 0, | |
3617 | "type" : "integer", | |
3618 | "optional" : 1 | |
3619 | }, | |
7aacca6f DM |
3620 | "action" : { |
3621 | "optional" : 0, | |
56122987 | 3622 | "type" : "string", |
7aacca6f DM |
3623 | "minLength" : 2, |
3624 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
3625 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
3626 | "maxLength" : 20 | |
56122987 DM |
3627 | }, |
3628 | "sport" : { | |
7aacca6f | 3629 | "type" : "string", |
56122987 DM |
3630 | "optional" : 1, |
3631 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
7aacca6f DM |
3632 | "format" : "pve-fw-sport-spec" |
3633 | }, | |
3634 | "dest" : { | |
3635 | "format" : "pve-fw-addr-spec", | |
3636 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
3637 | "optional" : 1, | |
56122987 | 3638 | "type" : "string" |
7aacca6f DM |
3639 | }, |
3640 | "source" : { | |
3641 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
3642 | "optional" : 1, | |
3643 | "type" : "string", | |
3644 | "format" : "pve-fw-addr-spec" | |
3645 | }, | |
3646 | "digest" : { | |
3647 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
3648 | "optional" : 1, | |
3649 | "type" : "string", | |
3650 | "maxLength" : 40 | |
3651 | }, | |
3652 | "node" : { | |
3653 | "type" : "string", | |
3654 | "description" : "The cluster node name.", | |
3655 | "format" : "pve-node" | |
3656 | }, | |
3657 | "comment" : { | |
3658 | "type" : "string", | |
3659 | "optional" : 1 | |
3660 | }, | |
3661 | "iface" : { | |
3662 | "optional" : 1, | |
3663 | "type" : "string", | |
3664 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", | |
3665 | "minLength" : 2, | |
3666 | "format" : "pve-iface", | |
3667 | "maxLength" : 20 | |
56122987 | 3668 | } |
7aacca6f DM |
3669 | }, |
3670 | "additionalProperties" : 0 | |
56122987 | 3671 | }, |
7aacca6f DM |
3672 | "name" : "create_rule" |
3673 | }, | |
3674 | "GET" : { | |
3675 | "description" : "List rules.", | |
56122987 | 3676 | "proxyto" : null, |
7aacca6f DM |
3677 | "name" : "get_rules", |
3678 | "parameters" : { | |
3679 | "additionalProperties" : 0, | |
3680 | "properties" : { | |
3681 | "vmid" : { | |
3682 | "format" : "pve-vmid", | |
3683 | "minimum" : 1, | |
3684 | "description" : "The (unique) ID of the VM.", | |
3685 | "type" : "integer" | |
3686 | }, | |
3687 | "node" : { | |
3688 | "description" : "The cluster node name.", | |
3689 | "type" : "string", | |
3690 | "format" : "pve-node" | |
3691 | } | |
3692 | } | |
3693 | }, | |
56122987 DM |
3694 | "permissions" : { |
3695 | "check" : [ | |
3696 | "perm", | |
3697 | "/vms/{vmid}", | |
3698 | [ | |
7aacca6f | 3699 | "VM.Audit" |
56122987 DM |
3700 | ] |
3701 | ] | |
3702 | }, | |
56122987 | 3703 | "returns" : { |
7aacca6f DM |
3704 | "type" : "array", |
3705 | "links" : [ | |
3706 | { | |
3707 | "href" : "{pos}", | |
3708 | "rel" : "child" | |
3709 | } | |
3710 | ], | |
3711 | "items" : { | |
3712 | "properties" : { | |
3713 | "pos" : { | |
3714 | "type" : "integer" | |
3715 | } | |
3716 | }, | |
3717 | "type" : "object" | |
3718 | } | |
56122987 | 3719 | }, |
7aacca6f | 3720 | "method" : "GET" |
56122987 DM |
3721 | } |
3722 | }, | |
7aacca6f DM |
3723 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules", |
3724 | "leaf" : 0 | |
56122987 DM |
3725 | }, |
3726 | { | |
7aacca6f DM |
3727 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases", |
3728 | "leaf" : 0, | |
56122987 DM |
3729 | "children" : [ |
3730 | { | |
7aacca6f | 3731 | "text" : "{name}", |
56122987 | 3732 | "info" : { |
7aacca6f DM |
3733 | "GET" : { |
3734 | "method" : "GET", | |
3735 | "returns" : { | |
3736 | "type" : "object" | |
56122987 | 3737 | }, |
7aacca6f | 3738 | "description" : "Read alias.", |
56122987 | 3739 | "parameters" : { |
56122987 | 3740 | "properties" : { |
7aacca6f DM |
3741 | "vmid" : { |
3742 | "type" : "integer", | |
3743 | "description" : "The (unique) ID of the VM.", | |
3744 | "minimum" : 1, | |
3745 | "format" : "pve-vmid" | |
56122987 DM |
3746 | }, |
3747 | "name" : { | |
7aacca6f | 3748 | "maxLength" : 64, |
56122987 DM |
3749 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
3750 | "description" : "Alias name.", | |
7aacca6f | 3751 | "minLength" : 2, |
56122987 DM |
3752 | "type" : "string" |
3753 | }, | |
7aacca6f DM |
3754 | "node" : { |
3755 | "format" : "pve-node", | |
3756 | "type" : "string", | |
3757 | "description" : "The cluster node name." | |
56122987 | 3758 | } |
7aacca6f DM |
3759 | }, |
3760 | "additionalProperties" : 0 | |
56122987 | 3761 | }, |
7aacca6f | 3762 | "name" : "read_alias", |
56122987 DM |
3763 | "permissions" : { |
3764 | "check" : [ | |
3765 | "perm", | |
3766 | "/vms/{vmid}", | |
3767 | [ | |
3768 | "VM.Audit" | |
3769 | ] | |
3770 | ] | |
7aacca6f DM |
3771 | } |
3772 | }, | |
3773 | "PUT" : { | |
3774 | "permissions" : { | |
3775 | "check" : [ | |
3776 | "perm", | |
3777 | "/vms/{vmid}", | |
3778 | [ | |
3779 | "VM.Config.Network" | |
3780 | ] | |
3781 | ] | |
56122987 DM |
3782 | }, |
3783 | "parameters" : { | |
3784 | "properties" : { | |
56122987 DM |
3785 | "vmid" : { |
3786 | "description" : "The (unique) ID of the VM.", | |
56122987 | 3787 | "type" : "integer", |
7aacca6f DM |
3788 | "format" : "pve-vmid", |
3789 | "minimum" : 1 | |
3790 | }, | |
3791 | "digest" : { | |
3792 | "maxLength" : 40, | |
3793 | "type" : "string", | |
3794 | "optional" : 1, | |
3795 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
3796 | }, | |
3797 | "cidr" : { | |
3798 | "description" : "Network/IP specification in CIDR format.", | |
3799 | "type" : "string", | |
3800 | "format" : "IPorCIDR" | |
3801 | }, | |
3802 | "comment" : { | |
3803 | "type" : "string", | |
3804 | "optional" : 1 | |
3805 | }, | |
3806 | "rename" : { | |
3807 | "maxLength" : 64, | |
3808 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
3809 | "description" : "Rename an existing alias.", | |
3810 | "minLength" : 2, | |
3811 | "type" : "string", | |
3812 | "optional" : 1 | |
56122987 DM |
3813 | }, |
3814 | "name" : { | |
3815 | "maxLength" : 64, | |
56122987 | 3816 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
7aacca6f | 3817 | "description" : "Alias name.", |
56122987 DM |
3818 | "minLength" : 2, |
3819 | "type" : "string" | |
7aacca6f DM |
3820 | }, |
3821 | "node" : { | |
3822 | "description" : "The cluster node name.", | |
3823 | "type" : "string", | |
3824 | "format" : "pve-node" | |
56122987 DM |
3825 | } |
3826 | }, | |
3827 | "additionalProperties" : 0 | |
3828 | }, | |
7aacca6f | 3829 | "name" : "update_alias", |
56122987 | 3830 | "protected" : 1, |
56122987 DM |
3831 | "description" : "Update IP or Network alias.", |
3832 | "returns" : { | |
3833 | "type" : "null" | |
3834 | }, | |
7aacca6f DM |
3835 | "method" : "PUT" |
3836 | }, | |
3837 | "DELETE" : { | |
3838 | "name" : "remove_alias", | |
56122987 DM |
3839 | "parameters" : { |
3840 | "additionalProperties" : 0, | |
3841 | "properties" : { | |
3842 | "vmid" : { | |
56122987 | 3843 | "format" : "pve-vmid", |
7aacca6f DM |
3844 | "minimum" : 1, |
3845 | "description" : "The (unique) ID of the VM.", | |
3846 | "type" : "integer" | |
56122987 DM |
3847 | }, |
3848 | "digest" : { | |
56122987 DM |
3849 | "maxLength" : 40, |
3850 | "optional" : 1, | |
56122987 | 3851 | "type" : "string", |
7aacca6f | 3852 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
56122987 | 3853 | }, |
7aacca6f | 3854 | "name" : { |
56122987 | 3855 | "maxLength" : 64, |
7aacca6f | 3856 | "type" : "string", |
56122987 DM |
3857 | "minLength" : 2, |
3858 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
7aacca6f DM |
3859 | "description" : "Alias name." |
3860 | }, | |
3861 | "node" : { | |
3862 | "type" : "string", | |
3863 | "description" : "The cluster node name.", | |
3864 | "format" : "pve-node" | |
56122987 DM |
3865 | } |
3866 | } | |
3867 | }, | |
7aacca6f DM |
3868 | "permissions" : { |
3869 | "check" : [ | |
3870 | "perm", | |
3871 | "/vms/{vmid}", | |
3872 | [ | |
3873 | "VM.Config.Network" | |
3874 | ] | |
3875 | ] | |
3876 | }, | |
3877 | "protected" : 1, | |
3878 | "description" : "Remove IP or Network alias.", | |
3879 | "returns" : { | |
3880 | "type" : "null" | |
3881 | }, | |
3882 | "method" : "DELETE" | |
56122987 DM |
3883 | } |
3884 | }, | |
7aacca6f DM |
3885 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}", |
3886 | "leaf" : 1 | |
56122987 DM |
3887 | } |
3888 | ], | |
7aacca6f | 3889 | "text" : "aliases", |
56122987 DM |
3890 | "info" : { |
3891 | "POST" : { | |
7aacca6f DM |
3892 | "description" : "Create IP or Network Alias.", |
3893 | "protected" : 1, | |
56122987 DM |
3894 | "parameters" : { |
3895 | "properties" : { | |
7aacca6f DM |
3896 | "vmid" : { |
3897 | "description" : "The (unique) ID of the VM.", | |
3898 | "type" : "integer", | |
3899 | "format" : "pve-vmid", | |
3900 | "minimum" : 1 | |
56122987 DM |
3901 | }, |
3902 | "cidr" : { | |
56122987 | 3903 | "format" : "IPorCIDR", |
7aacca6f DM |
3904 | "description" : "Network/IP specification in CIDR format.", |
3905 | "type" : "string" | |
56122987 | 3906 | }, |
7aacca6f DM |
3907 | "node" : { |
3908 | "format" : "pve-node", | |
3909 | "description" : "The cluster node name.", | |
3910 | "type" : "string" | |
56122987 DM |
3911 | }, |
3912 | "name" : { | |
3913 | "maxLength" : 64, | |
7aacca6f | 3914 | "type" : "string", |
56122987 | 3915 | "minLength" : 2, |
7aacca6f DM |
3916 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
3917 | "description" : "Alias name." | |
3918 | }, | |
3919 | "comment" : { | |
3920 | "optional" : 1, | |
56122987 DM |
3921 | "type" : "string" |
3922 | } | |
3923 | }, | |
3924 | "additionalProperties" : 0 | |
3925 | }, | |
3926 | "name" : "create_alias", | |
56122987 DM |
3927 | "permissions" : { |
3928 | "check" : [ | |
3929 | "perm", | |
3930 | "/vms/{vmid}", | |
3931 | [ | |
3932 | "VM.Config.Network" | |
3933 | ] | |
3934 | ] | |
3935 | }, | |
7aacca6f DM |
3936 | "method" : "POST", |
3937 | "returns" : { | |
3938 | "type" : "null" | |
3939 | } | |
56122987 DM |
3940 | }, |
3941 | "GET" : { | |
56122987 DM |
3942 | "method" : "GET", |
3943 | "returns" : { | |
7aacca6f | 3944 | "type" : "array", |
56122987 | 3945 | "items" : { |
7aacca6f | 3946 | "type" : "object", |
56122987 | 3947 | "properties" : { |
7aacca6f DM |
3948 | "comment" : { |
3949 | "optional" : 1, | |
56122987 DM |
3950 | "type" : "string" |
3951 | }, | |
7aacca6f DM |
3952 | "name" : { |
3953 | "type" : "string" | |
56122987 DM |
3954 | }, |
3955 | "digest" : { | |
3956 | "maxLength" : 40, | |
3957 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
3958 | "optional" : 0, | |
3959 | "type" : "string" | |
3960 | }, | |
3961 | "cidr" : { | |
3962 | "type" : "string" | |
3963 | } | |
7aacca6f | 3964 | } |
56122987 | 3965 | }, |
56122987 DM |
3966 | "links" : [ |
3967 | { | |
3968 | "href" : "{name}", | |
3969 | "rel" : "child" | |
3970 | } | |
3971 | ] | |
3972 | }, | |
7aacca6f DM |
3973 | "permissions" : { |
3974 | "check" : [ | |
3975 | "perm", | |
3976 | "/vms/{vmid}", | |
3977 | [ | |
3978 | "VM.Audit" | |
3979 | ] | |
3980 | ] | |
3981 | }, | |
3982 | "name" : "get_aliases", | |
56122987 | 3983 | "parameters" : { |
7aacca6f | 3984 | "additionalProperties" : 0, |
56122987 DM |
3985 | "properties" : { |
3986 | "vmid" : { | |
7aacca6f | 3987 | "type" : "integer", |
56122987 | 3988 | "description" : "The (unique) ID of the VM.", |
56122987 | 3989 | "format" : "pve-vmid", |
7aacca6f | 3990 | "minimum" : 1 |
56122987 DM |
3991 | }, |
3992 | "node" : { | |
56122987 | 3993 | "format" : "pve-node", |
7aacca6f | 3994 | "description" : "The cluster node name.", |
56122987 DM |
3995 | "type" : "string" |
3996 | } | |
7aacca6f | 3997 | } |
56122987 | 3998 | }, |
7aacca6f | 3999 | "description" : "List aliases" |
56122987 | 4000 | } |
7aacca6f | 4001 | } |
56122987 DM |
4002 | }, |
4003 | { | |
4004 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset", | |
7aacca6f | 4005 | "leaf" : 0, |
56122987 DM |
4006 | "children" : [ |
4007 | { | |
4008 | "leaf" : 0, | |
56122987 | 4009 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}", |
7aacca6f DM |
4010 | "info" : { |
4011 | "POST" : { | |
4012 | "returns" : { | |
4013 | "type" : "null" | |
4014 | }, | |
4015 | "method" : "POST", | |
4016 | "name" : "create_ip", | |
4017 | "parameters" : { | |
4018 | "properties" : { | |
4019 | "nomatch" : { | |
4020 | "type" : "boolean", | |
4021 | "optional" : 1 | |
56122987 | 4022 | }, |
7aacca6f DM |
4023 | "comment" : { |
4024 | "type" : "string", | |
4025 | "optional" : 1 | |
56122987 | 4026 | }, |
7aacca6f DM |
4027 | "name" : { |
4028 | "maxLength" : 64, | |
4029 | "type" : "string", | |
4030 | "minLength" : 2, | |
4031 | "description" : "IP set name.", | |
4032 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" | |
56122987 | 4033 | }, |
7aacca6f DM |
4034 | "node" : { |
4035 | "type" : "string", | |
4036 | "description" : "The cluster node name.", | |
4037 | "format" : "pve-node" | |
56122987 | 4038 | }, |
7aacca6f DM |
4039 | "cidr" : { |
4040 | "description" : "Network/IP specification in CIDR format.", | |
4041 | "type" : "string", | |
4042 | "format" : "IPorCIDRorAlias" | |
56122987 | 4043 | }, |
7aacca6f DM |
4044 | "vmid" : { |
4045 | "format" : "pve-vmid", | |
4046 | "minimum" : 1, | |
4047 | "description" : "The (unique) ID of the VM.", | |
4048 | "type" : "integer" | |
56122987 DM |
4049 | } |
4050 | }, | |
7aacca6f DM |
4051 | "additionalProperties" : 0 |
4052 | }, | |
56122987 DM |
4053 | "permissions" : { |
4054 | "check" : [ | |
4055 | "perm", | |
4056 | "/vms/{vmid}", | |
4057 | [ | |
4058 | "VM.Config.Network" | |
4059 | ] | |
4060 | ] | |
4061 | }, | |
4062 | "description" : "Add IP or Network to IPSet.", | |
7aacca6f | 4063 | "protected" : 1 |
56122987 DM |
4064 | }, |
4065 | "DELETE" : { | |
7aacca6f DM |
4066 | "method" : "DELETE", |
4067 | "returns" : { | |
4068 | "type" : "null" | |
4069 | }, | |
4070 | "description" : "Delete IPSet", | |
56122987 | 4071 | "protected" : 1, |
7aacca6f | 4072 | "name" : "delete_ipset", |
56122987 DM |
4073 | "permissions" : { |
4074 | "check" : [ | |
4075 | "perm", | |
4076 | "/vms/{vmid}", | |
4077 | [ | |
4078 | "VM.Config.Network" | |
4079 | ] | |
4080 | ] | |
4081 | }, | |
56122987 | 4082 | "parameters" : { |
7aacca6f | 4083 | "additionalProperties" : 0, |
56122987 | 4084 | "properties" : { |
56122987 DM |
4085 | "node" : { |
4086 | "format" : "pve-node", | |
4087 | "type" : "string", | |
4088 | "description" : "The cluster node name." | |
7aacca6f DM |
4089 | }, |
4090 | "name" : { | |
4091 | "type" : "string", | |
4092 | "description" : "IP set name.", | |
4093 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4094 | "minLength" : 2, | |
4095 | "maxLength" : 64 | |
4096 | }, | |
4097 | "vmid" : { | |
4098 | "description" : "The (unique) ID of the VM.", | |
4099 | "type" : "integer", | |
4100 | "format" : "pve-vmid", | |
4101 | "minimum" : 1 | |
56122987 | 4102 | } |
7aacca6f | 4103 | } |
56122987 DM |
4104 | } |
4105 | }, | |
4106 | "GET" : { | |
7aacca6f | 4107 | "method" : "GET", |
56122987 DM |
4108 | "returns" : { |
4109 | "links" : [ | |
4110 | { | |
7aacca6f DM |
4111 | "rel" : "child", |
4112 | "href" : "{cidr}" | |
56122987 DM |
4113 | } |
4114 | ], | |
4115 | "items" : { | |
4116 | "properties" : { | |
7aacca6f | 4117 | "cidr" : { |
56122987 DM |
4118 | "type" : "string" |
4119 | }, | |
56122987 | 4120 | "digest" : { |
56122987 DM |
4121 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", |
4122 | "optional" : 0, | |
7aacca6f DM |
4123 | "type" : "string", |
4124 | "maxLength" : 40 | |
56122987 | 4125 | }, |
7aacca6f DM |
4126 | "nomatch" : { |
4127 | "type" : "boolean", | |
4128 | "optional" : 1 | |
4129 | }, | |
4130 | "comment" : { | |
4131 | "type" : "string", | |
4132 | "optional" : 1 | |
56122987 DM |
4133 | } |
4134 | }, | |
4135 | "type" : "object" | |
4136 | }, | |
4137 | "type" : "array" | |
4138 | }, | |
7aacca6f | 4139 | "description" : "List IPSet content", |
56122987 DM |
4140 | "permissions" : { |
4141 | "check" : [ | |
4142 | "perm", | |
4143 | "/vms/{vmid}", | |
4144 | [ | |
4145 | "VM.Audit" | |
4146 | ] | |
4147 | ] | |
4148 | }, | |
7aacca6f DM |
4149 | "parameters" : { |
4150 | "properties" : { | |
4151 | "vmid" : { | |
4152 | "format" : "pve-vmid", | |
4153 | "minimum" : 1, | |
4154 | "description" : "The (unique) ID of the VM.", | |
4155 | "type" : "integer" | |
4156 | }, | |
4157 | "name" : { | |
4158 | "type" : "string", | |
4159 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4160 | "description" : "IP set name.", | |
4161 | "minLength" : 2, | |
4162 | "maxLength" : 64 | |
4163 | }, | |
4164 | "node" : { | |
4165 | "description" : "The cluster node name.", | |
4166 | "type" : "string", | |
4167 | "format" : "pve-node" | |
4168 | } | |
4169 | }, | |
4170 | "additionalProperties" : 0 | |
56122987 | 4171 | }, |
7aacca6f DM |
4172 | "name" : "get_ipset" |
4173 | } | |
56122987 | 4174 | }, |
7aacca6f DM |
4175 | "text" : "{name}", |
4176 | "children" : [ | |
4177 | { | |
4178 | "info" : { | |
4179 | "DELETE" : { | |
4180 | "method" : "DELETE", | |
4181 | "returns" : { | |
4182 | "type" : "null" | |
4183 | }, | |
4184 | "parameters" : { | |
4185 | "properties" : { | |
4186 | "name" : { | |
4187 | "maxLength" : 64, | |
4188 | "type" : "string", | |
4189 | "description" : "IP set name.", | |
4190 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4191 | "minLength" : 2 | |
4192 | }, | |
4193 | "node" : { | |
4194 | "description" : "The cluster node name.", | |
4195 | "type" : "string", | |
4196 | "format" : "pve-node" | |
4197 | }, | |
4198 | "vmid" : { | |
4199 | "minimum" : 1, | |
4200 | "format" : "pve-vmid", | |
4201 | "type" : "integer", | |
4202 | "description" : "The (unique) ID of the VM." | |
4203 | }, | |
4204 | "digest" : { | |
4205 | "maxLength" : 40, | |
4206 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
4207 | "type" : "string", | |
4208 | "optional" : 1 | |
4209 | }, | |
4210 | "cidr" : { | |
4211 | "format" : "IPorCIDRorAlias", | |
4212 | "type" : "string", | |
4213 | "description" : "Network/IP specification in CIDR format." | |
4214 | } | |
4215 | }, | |
4216 | "additionalProperties" : 0 | |
4217 | }, | |
4218 | "name" : "remove_ip", | |
4219 | "permissions" : { | |
4220 | "check" : [ | |
4221 | "perm", | |
4222 | "/vms/{vmid}", | |
4223 | [ | |
4224 | "VM.Config.Network" | |
4225 | ] | |
4226 | ] | |
4227 | }, | |
4228 | "protected" : 1, | |
4229 | "description" : "Remove IP or Network from IPSet." | |
56122987 | 4230 | }, |
7aacca6f DM |
4231 | "PUT" : { |
4232 | "description" : "Update IP or Network settings", | |
4233 | "protected" : 1, | |
4234 | "name" : "update_ip", | |
4235 | "permissions" : { | |
4236 | "check" : [ | |
4237 | "perm", | |
4238 | "/vms/{vmid}", | |
4239 | [ | |
4240 | "VM.Config.Network" | |
4241 | ] | |
4242 | ] | |
4243 | }, | |
4244 | "parameters" : { | |
4245 | "properties" : { | |
4246 | "vmid" : { | |
4247 | "description" : "The (unique) ID of the VM.", | |
4248 | "type" : "integer", | |
4249 | "format" : "pve-vmid", | |
4250 | "minimum" : 1 | |
4251 | }, | |
4252 | "cidr" : { | |
4253 | "format" : "IPorCIDRorAlias", | |
4254 | "type" : "string", | |
4255 | "description" : "Network/IP specification in CIDR format." | |
4256 | }, | |
4257 | "digest" : { | |
4258 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
4259 | "type" : "string", | |
4260 | "optional" : 1, | |
4261 | "maxLength" : 40 | |
4262 | }, | |
4263 | "node" : { | |
4264 | "type" : "string", | |
4265 | "description" : "The cluster node name.", | |
4266 | "format" : "pve-node" | |
4267 | }, | |
4268 | "name" : { | |
4269 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4270 | "description" : "IP set name.", | |
4271 | "minLength" : 2, | |
4272 | "type" : "string", | |
4273 | "maxLength" : 64 | |
4274 | }, | |
4275 | "comment" : { | |
4276 | "optional" : 1, | |
4277 | "type" : "string" | |
4278 | }, | |
4279 | "nomatch" : { | |
4280 | "optional" : 1, | |
4281 | "type" : "boolean" | |
4282 | } | |
4283 | }, | |
4284 | "additionalProperties" : 0 | |
4285 | }, | |
4286 | "method" : "PUT", | |
4287 | "returns" : { | |
4288 | "type" : "null" | |
4289 | } | |
56122987 | 4290 | }, |
7aacca6f DM |
4291 | "GET" : { |
4292 | "parameters" : { | |
4293 | "additionalProperties" : 0, | |
4294 | "properties" : { | |
4295 | "name" : { | |
4296 | "type" : "string", | |
4297 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4298 | "description" : "IP set name.", | |
4299 | "minLength" : 2, | |
4300 | "maxLength" : 64 | |
4301 | }, | |
4302 | "node" : { | |
4303 | "format" : "pve-node", | |
4304 | "description" : "The cluster node name.", | |
4305 | "type" : "string" | |
4306 | }, | |
4307 | "cidr" : { | |
4308 | "description" : "Network/IP specification in CIDR format.", | |
4309 | "type" : "string", | |
4310 | "format" : "IPorCIDRorAlias" | |
4311 | }, | |
4312 | "vmid" : { | |
4313 | "description" : "The (unique) ID of the VM.", | |
4314 | "type" : "integer", | |
4315 | "minimum" : 1, | |
4316 | "format" : "pve-vmid" | |
4317 | } | |
4318 | } | |
4319 | }, | |
4320 | "permissions" : { | |
4321 | "check" : [ | |
4322 | "perm", | |
4323 | "/vms/{vmid}", | |
4324 | [ | |
4325 | "VM.Audit" | |
4326 | ] | |
4327 | ] | |
4328 | }, | |
4329 | "name" : "read_ip", | |
4330 | "description" : "Read IP or Network settings from IPSet.", | |
4331 | "protected" : 1, | |
4332 | "method" : "GET", | |
4333 | "returns" : { | |
4334 | "type" : "object" | |
4335 | } | |
56122987 | 4336 | } |
7aacca6f DM |
4337 | }, |
4338 | "text" : "{cidr}", | |
4339 | "leaf" : 1, | |
4340 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}" | |
4341 | } | |
4342 | ] | |
4343 | } | |
4344 | ], | |
4345 | "text" : "ipset", | |
4346 | "info" : { | |
4347 | "POST" : { | |
4348 | "protected" : 1, | |
4349 | "description" : "Create new IPSet", | |
56122987 DM |
4350 | "parameters" : { |
4351 | "properties" : { | |
7aacca6f DM |
4352 | "digest" : { |
4353 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
4354 | "optional" : 1, | |
4355 | "type" : "string", | |
4356 | "maxLength" : 40 | |
56122987 DM |
4357 | }, |
4358 | "vmid" : { | |
56122987 | 4359 | "format" : "pve-vmid", |
7aacca6f DM |
4360 | "minimum" : 1, |
4361 | "description" : "The (unique) ID of the VM.", | |
56122987 | 4362 | "type" : "integer" |
7aacca6f DM |
4363 | }, |
4364 | "node" : { | |
4365 | "format" : "pve-node", | |
4366 | "description" : "The cluster node name.", | |
4367 | "type" : "string" | |
4368 | }, | |
4369 | "name" : { | |
4370 | "minLength" : 2, | |
4371 | "description" : "IP set name.", | |
4372 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4373 | "type" : "string", | |
4374 | "maxLength" : 64 | |
4375 | }, | |
4376 | "rename" : { | |
4377 | "optional" : 1, | |
4378 | "type" : "string", | |
4379 | "minLength" : 2, | |
4380 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4381 | "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", | |
4382 | "maxLength" : 64 | |
4383 | }, | |
4384 | "comment" : { | |
4385 | "type" : "string", | |
4386 | "optional" : 1 | |
56122987 DM |
4387 | } |
4388 | }, | |
4389 | "additionalProperties" : 0 | |
4390 | }, | |
7aacca6f | 4391 | "name" : "create_ipset", |
56122987 DM |
4392 | "permissions" : { |
4393 | "check" : [ | |
4394 | "perm", | |
4395 | "/vms/{vmid}", | |
4396 | [ | |
7aacca6f | 4397 | "VM.Config.Network" |
56122987 DM |
4398 | ] |
4399 | ] | |
4400 | }, | |
7aacca6f DM |
4401 | "returns" : { |
4402 | "type" : "null" | |
4403 | }, | |
4404 | "method" : "POST" | |
4405 | }, | |
56122987 | 4406 | "GET" : { |
7aacca6f DM |
4407 | "returns" : { |
4408 | "type" : "array", | |
4409 | "items" : { | |
4410 | "properties" : { | |
4411 | "name" : { | |
4412 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
4413 | "description" : "IP set name.", | |
4414 | "minLength" : 2, | |
4415 | "type" : "string", | |
4416 | "maxLength" : 64 | |
4417 | }, | |
4418 | "comment" : { | |
4419 | "optional" : 1, | |
4420 | "type" : "string" | |
4421 | }, | |
4422 | "digest" : { | |
4423 | "optional" : 0, | |
4424 | "type" : "string", | |
4425 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
4426 | "maxLength" : 40 | |
4427 | } | |
4428 | }, | |
4429 | "type" : "object" | |
4430 | }, | |
4431 | "links" : [ | |
4432 | { | |
4433 | "rel" : "child", | |
4434 | "href" : "{name}" | |
4435 | } | |
4436 | ] | |
4437 | }, | |
4438 | "method" : "GET", | |
4439 | "description" : "List IPSets", | |
4440 | "permissions" : { | |
4441 | "check" : [ | |
4442 | "perm", | |
4443 | "/vms/{vmid}", | |
4444 | [ | |
56122987 DM |
4445 | "VM.Audit" |
4446 | ] | |
4447 | ] | |
4448 | }, | |
56122987 DM |
4449 | "parameters" : { |
4450 | "additionalProperties" : 0, | |
4451 | "properties" : { | |
4452 | "vmid" : { | |
7aacca6f | 4453 | "type" : "integer", |
56122987 | 4454 | "description" : "The (unique) ID of the VM.", |
56122987 | 4455 | "format" : "pve-vmid", |
7aacca6f | 4456 | "minimum" : 1 |
56122987 DM |
4457 | }, |
4458 | "node" : { | |
4459 | "type" : "string", | |
7aacca6f DM |
4460 | "description" : "The cluster node name.", |
4461 | "format" : "pve-node" | |
56122987 DM |
4462 | } |
4463 | } | |
4464 | }, | |
7aacca6f DM |
4465 | "name" : "ipset_index" |
4466 | } | |
4467 | } | |
4468 | }, | |
4469 | { | |
4470 | "text" : "options", | |
4471 | "info" : { | |
4472 | "PUT" : { | |
4473 | "description" : "Set Firewall options.", | |
4474 | "proxyto" : "node", | |
4475 | "permissions" : { | |
4476 | "check" : [ | |
4477 | "perm", | |
4478 | "/vms/{vmid}", | |
4479 | [ | |
4480 | "VM.Config.Network" | |
4481 | ] | |
4482 | ] | |
4483 | }, | |
56122987 | 4484 | "returns" : { |
7aacca6f DM |
4485 | "type" : "null" |
4486 | }, | |
4487 | "protected" : 1, | |
4488 | "name" : "set_options", | |
4489 | "parameters" : { | |
4490 | "additionalProperties" : 0, | |
56122987 | 4491 | "properties" : { |
7aacca6f DM |
4492 | "ipfilter" : { |
4493 | "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.", | |
4494 | "type" : "boolean", | |
4495 | "optional" : 1 | |
4496 | }, | |
4497 | "node" : { | |
4498 | "description" : "The cluster node name.", | |
4499 | "type" : "string", | |
4500 | "format" : "pve-node" | |
4501 | }, | |
56122987 | 4502 | "radv" : { |
56122987 | 4503 | "optional" : 1, |
7aacca6f DM |
4504 | "type" : "boolean", |
4505 | "description" : "Allow sending Router Advertisement." | |
56122987 | 4506 | }, |
7aacca6f | 4507 | "policy_out" : { |
56122987 | 4508 | "enum" : [ |
7aacca6f DM |
4509 | "ACCEPT", |
4510 | "REJECT", | |
4511 | "DROP" | |
56122987 | 4512 | ], |
7aacca6f DM |
4513 | "description" : "Output policy.", |
4514 | "optional" : 1, | |
56122987 DM |
4515 | "type" : "string" |
4516 | }, | |
7aacca6f DM |
4517 | "delete" : { |
4518 | "type" : "string", | |
4519 | "optional" : 1, | |
4520 | "description" : "A list of settings you want to delete.", | |
4521 | "format" : "pve-configid-list" | |
4522 | }, | |
56122987 | 4523 | "log_level_in" : { |
7aacca6f | 4524 | "description" : "Log level for incoming traffic.", |
56122987 DM |
4525 | "enum" : [ |
4526 | "emerg", | |
4527 | "alert", | |
4528 | "crit", | |
4529 | "err", | |
4530 | "warning", | |
4531 | "notice", | |
4532 | "info", | |
4533 | "debug", | |
4534 | "nolog" | |
4535 | ], | |
56122987 DM |
4536 | "optional" : 1, |
4537 | "type" : "string" | |
4538 | }, | |
56122987 | 4539 | "dhcp" : { |
7aacca6f | 4540 | "description" : "Enable DHCP.", |
56122987 | 4541 | "optional" : 1, |
7aacca6f | 4542 | "type" : "boolean" |
56122987 DM |
4543 | }, |
4544 | "ndp" : { | |
56122987 | 4545 | "optional" : 1, |
56122987 | 4546 | "type" : "boolean", |
7aacca6f | 4547 | "description" : "Enable NDP." |
56122987 DM |
4548 | }, |
4549 | "policy_in" : { | |
4550 | "type" : "string", | |
4551 | "optional" : 1, | |
4552 | "description" : "Input policy.", | |
4553 | "enum" : [ | |
4554 | "ACCEPT", | |
4555 | "REJECT", | |
4556 | "DROP" | |
4557 | ] | |
4558 | }, | |
7aacca6f DM |
4559 | "macfilter" : { |
4560 | "optional" : 1, | |
4561 | "type" : "boolean", | |
4562 | "description" : "Enable/disable MAC address filter." | |
4563 | }, | |
4564 | "digest" : { | |
4565 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
4566 | "optional" : 1, | |
56122987 | 4567 | "type" : "string", |
7aacca6f DM |
4568 | "maxLength" : 40 |
4569 | }, | |
4570 | "enable" : { | |
4571 | "description" : "Enable/disable firewall rules.", | |
56122987 | 4572 | "optional" : 1, |
7aacca6f DM |
4573 | "type" : "boolean" |
4574 | }, | |
56122987 | 4575 | "log_level_out" : { |
56122987 | 4576 | "description" : "Log level for outgoing traffic.", |
56122987 DM |
4577 | "enum" : [ |
4578 | "emerg", | |
4579 | "alert", | |
4580 | "crit", | |
4581 | "err", | |
4582 | "warning", | |
4583 | "notice", | |
4584 | "info", | |
4585 | "debug", | |
4586 | "nolog" | |
7aacca6f | 4587 | ], |
56122987 | 4588 | "type" : "string", |
56122987 DM |
4589 | "optional" : 1 |
4590 | }, | |
7aacca6f DM |
4591 | "vmid" : { |
4592 | "format" : "pve-vmid", | |
4593 | "minimum" : 1, | |
4594 | "type" : "integer", | |
4595 | "description" : "The (unique) ID of the VM." | |
4596 | } | |
4597 | } | |
4598 | }, | |
4599 | "method" : "PUT" | |
4600 | }, | |
4601 | "GET" : { | |
4602 | "method" : "GET", | |
4603 | "returns" : { | |
4604 | "type" : "object", | |
4605 | "properties" : { | |
4606 | "policy_out" : { | |
4607 | "optional" : 1, | |
56122987 | 4608 | "type" : "string", |
7aacca6f DM |
4609 | "enum" : [ |
4610 | "ACCEPT", | |
4611 | "REJECT", | |
4612 | "DROP" | |
4613 | ], | |
4614 | "description" : "Output policy." | |
4615 | }, | |
4616 | "log_level_in" : { | |
56122987 DM |
4617 | "enum" : [ |
4618 | "emerg", | |
4619 | "alert", | |
4620 | "crit", | |
4621 | "err", | |
4622 | "warning", | |
4623 | "notice", | |
4624 | "info", | |
4625 | "debug", | |
4626 | "nolog" | |
4627 | ], | |
4628 | "description" : "Log level for incoming traffic.", | |
7aacca6f | 4629 | "type" : "string", |
56122987 DM |
4630 | "optional" : 1 |
4631 | }, | |
7aacca6f | 4632 | "ipfilter" : { |
56122987 DM |
4633 | "type" : "boolean", |
4634 | "optional" : 1, | |
7aacca6f | 4635 | "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added." |
56122987 | 4636 | }, |
7aacca6f DM |
4637 | "radv" : { |
4638 | "description" : "Allow sending Router Advertisement.", | |
4639 | "type" : "boolean", | |
4640 | "optional" : 1 | |
56122987 DM |
4641 | }, |
4642 | "macfilter" : { | |
56122987 | 4643 | "description" : "Enable/disable MAC address filter.", |
7aacca6f DM |
4644 | "optional" : 1, |
4645 | "type" : "boolean" | |
56122987 DM |
4646 | }, |
4647 | "policy_in" : { | |
56122987 DM |
4648 | "enum" : [ |
4649 | "ACCEPT", | |
4650 | "REJECT", | |
4651 | "DROP" | |
7aacca6f DM |
4652 | ], |
4653 | "description" : "Input policy.", | |
56122987 | 4654 | "optional" : 1, |
7aacca6f | 4655 | "type" : "string" |
56122987 DM |
4656 | }, |
4657 | "ndp" : { | |
56122987 | 4658 | "description" : "Enable NDP.", |
7aacca6f DM |
4659 | "type" : "boolean", |
4660 | "optional" : 1 | |
56122987 | 4661 | }, |
7aacca6f | 4662 | "dhcp" : { |
56122987 | 4663 | "optional" : 1, |
7aacca6f DM |
4664 | "type" : "boolean", |
4665 | "description" : "Enable DHCP." | |
56122987 | 4666 | }, |
7aacca6f | 4667 | "enable" : { |
56122987 | 4668 | "optional" : 1, |
7aacca6f DM |
4669 | "type" : "boolean", |
4670 | "description" : "Enable/disable firewall rules." | |
4671 | }, | |
4672 | "log_level_out" : { | |
4673 | "description" : "Log level for outgoing traffic.", | |
4674 | "enum" : [ | |
4675 | "emerg", | |
4676 | "alert", | |
4677 | "crit", | |
4678 | "err", | |
4679 | "warning", | |
4680 | "notice", | |
4681 | "info", | |
4682 | "debug", | |
4683 | "nolog" | |
56122987 | 4684 | ], |
7aacca6f DM |
4685 | "type" : "string", |
4686 | "optional" : 1 | |
4687 | } | |
4688 | } | |
4689 | }, | |
4690 | "name" : "get_options", | |
4691 | "parameters" : { | |
4692 | "additionalProperties" : 0, | |
4693 | "properties" : { | |
4694 | "node" : { | |
4695 | "description" : "The cluster node name.", | |
4696 | "type" : "string", | |
4697 | "format" : "pve-node" | |
4698 | }, | |
4699 | "vmid" : { | |
4700 | "description" : "The (unique) ID of the VM.", | |
4701 | "type" : "integer", | |
4702 | "minimum" : 1, | |
4703 | "format" : "pve-vmid" | |
56122987 DM |
4704 | } |
4705 | } | |
4706 | }, | |
56122987 DM |
4707 | "permissions" : { |
4708 | "check" : [ | |
4709 | "perm", | |
4710 | "/vms/{vmid}", | |
4711 | [ | |
7aacca6f | 4712 | "VM.Audit" |
56122987 DM |
4713 | ] |
4714 | ] | |
7aacca6f DM |
4715 | }, |
4716 | "proxyto" : "node", | |
4717 | "description" : "Get VM firewall options." | |
56122987 DM |
4718 | } |
4719 | }, | |
7aacca6f | 4720 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/options", |
56122987 DM |
4721 | "leaf" : 1 |
4722 | }, | |
4723 | { | |
56122987 DM |
4724 | "text" : "log", |
4725 | "info" : { | |
4726 | "GET" : { | |
4727 | "returns" : { | |
56122987 DM |
4728 | "items" : { |
4729 | "properties" : { | |
56122987 | 4730 | "t" : { |
7aacca6f DM |
4731 | "description" : "Line text", |
4732 | "type" : "string" | |
4733 | }, | |
4734 | "n" : { | |
4735 | "type" : "integer", | |
4736 | "description" : "Line number" | |
56122987 DM |
4737 | } |
4738 | }, | |
4739 | "type" : "object" | |
7aacca6f DM |
4740 | }, |
4741 | "type" : "array" | |
4742 | }, | |
4743 | "proxyto" : "node", | |
4744 | "description" : "Read firewall log", | |
4745 | "permissions" : { | |
4746 | "check" : [ | |
4747 | "perm", | |
4748 | "/vms/{vmid}", | |
4749 | [ | |
4750 | "VM.Console" | |
4751 | ] | |
4752 | ] | |
56122987 DM |
4753 | }, |
4754 | "method" : "GET", | |
7aacca6f | 4755 | "protected" : 1, |
56122987 | 4756 | "name" : "log", |
56122987 | 4757 | "parameters" : { |
56122987 DM |
4758 | "properties" : { |
4759 | "vmid" : { | |
56122987 | 4760 | "format" : "pve-vmid", |
7aacca6f DM |
4761 | "minimum" : 1, |
4762 | "description" : "The (unique) ID of the VM.", | |
4763 | "type" : "integer" | |
56122987 DM |
4764 | }, |
4765 | "start" : { | |
4766 | "optional" : 1, | |
7aacca6f DM |
4767 | "type" : "integer", |
4768 | "minimum" : 0 | |
56122987 DM |
4769 | }, |
4770 | "node" : { | |
7aacca6f | 4771 | "type" : "string", |
56122987 | 4772 | "description" : "The cluster node name.", |
7aacca6f | 4773 | "format" : "pve-node" |
56122987 DM |
4774 | }, |
4775 | "limit" : { | |
7aacca6f | 4776 | "optional" : 1, |
56122987 | 4777 | "type" : "integer", |
7aacca6f | 4778 | "minimum" : 0 |
56122987 | 4779 | } |
7aacca6f DM |
4780 | }, |
4781 | "additionalProperties" : 0 | |
4782 | } | |
4783 | } | |
4784 | }, | |
4785 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/log", | |
4786 | "leaf" : 1 | |
4787 | }, | |
4788 | { | |
4789 | "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs", | |
4790 | "leaf" : 1, | |
4791 | "text" : "refs", | |
4792 | "info" : { | |
4793 | "GET" : { | |
4794 | "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", | |
56122987 DM |
4795 | "permissions" : { |
4796 | "check" : [ | |
4797 | "perm", | |
4798 | "/vms/{vmid}", | |
4799 | [ | |
7aacca6f | 4800 | "VM.Audit" |
56122987 DM |
4801 | ] |
4802 | ] | |
4803 | }, | |
56122987 DM |
4804 | "parameters" : { |
4805 | "properties" : { | |
7aacca6f DM |
4806 | "vmid" : { |
4807 | "format" : "pve-vmid", | |
4808 | "minimum" : 1, | |
4809 | "type" : "integer", | |
4810 | "description" : "The (unique) ID of the VM." | |
4811 | }, | |
56122987 DM |
4812 | "node" : { |
4813 | "format" : "pve-node", | |
7aacca6f DM |
4814 | "description" : "The cluster node name.", |
4815 | "type" : "string" | |
56122987 DM |
4816 | }, |
4817 | "type" : { | |
56122987 DM |
4818 | "description" : "Only list references of specified type.", |
4819 | "enum" : [ | |
4820 | "alias", | |
4821 | "ipset" | |
7aacca6f DM |
4822 | ], |
4823 | "type" : "string", | |
4824 | "optional" : 1 | |
56122987 DM |
4825 | } |
4826 | }, | |
4827 | "additionalProperties" : 0 | |
4828 | }, | |
7aacca6f DM |
4829 | "name" : "refs", |
4830 | "method" : "GET", | |
56122987 | 4831 | "returns" : { |
56122987 DM |
4832 | "items" : { |
4833 | "properties" : { | |
7aacca6f DM |
4834 | "type" : { |
4835 | "enum" : [ | |
4836 | "alias", | |
4837 | "ipset" | |
4838 | ], | |
56122987 DM |
4839 | "type" : "string" |
4840 | }, | |
4841 | "name" : { | |
4842 | "type" : "string" | |
4843 | }, | |
7aacca6f DM |
4844 | "comment" : { |
4845 | "optional" : 1, | |
4846 | "type" : "string" | |
56122987 DM |
4847 | } |
4848 | }, | |
4849 | "type" : "object" | |
7aacca6f DM |
4850 | }, |
4851 | "type" : "array" | |
4852 | } | |
56122987 | 4853 | } |
7aacca6f | 4854 | } |
56122987 DM |
4855 | } |
4856 | ], | |
56122987 DM |
4857 | "info" : { |
4858 | "GET" : { | |
4859 | "method" : "GET", | |
56122987 DM |
4860 | "returns" : { |
4861 | "links" : [ | |
4862 | { | |
4863 | "href" : "{name}", | |
4864 | "rel" : "child" | |
4865 | } | |
4866 | ], | |
4867 | "items" : { | |
4868 | "type" : "object", | |
4869 | "properties" : {} | |
4870 | }, | |
4871 | "type" : "array" | |
4872 | }, | |
4873 | "parameters" : { | |
56122987 DM |
4874 | "properties" : { |
4875 | "node" : { | |
7aacca6f | 4876 | "type" : "string", |
56122987 | 4877 | "description" : "The cluster node name.", |
7aacca6f | 4878 | "format" : "pve-node" |
56122987 DM |
4879 | }, |
4880 | "vmid" : { | |
56122987 DM |
4881 | "format" : "pve-vmid", |
4882 | "minimum" : 1, | |
7aacca6f | 4883 | "type" : "integer", |
56122987 DM |
4884 | "description" : "The (unique) ID of the VM." |
4885 | } | |
7aacca6f DM |
4886 | }, |
4887 | "additionalProperties" : 0 | |
56122987 | 4888 | }, |
56122987 DM |
4889 | "permissions" : { |
4890 | "user" : "all" | |
7aacca6f DM |
4891 | }, |
4892 | "name" : "index", | |
4893 | "description" : "Directory index." | |
56122987 DM |
4894 | } |
4895 | } | |
4896 | }, | |
4897 | { | |
56122987 | 4898 | "path" : "/nodes/{node}/qemu/{vmid}/rrd", |
7aacca6f DM |
4899 | "leaf" : 1, |
4900 | "text" : "rrd", | |
56122987 DM |
4901 | "info" : { |
4902 | "GET" : { | |
7aacca6f | 4903 | "name" : "rrd", |
56122987 DM |
4904 | "parameters" : { |
4905 | "additionalProperties" : 0, | |
4906 | "properties" : { | |
7aacca6f DM |
4907 | "cf" : { |
4908 | "enum" : [ | |
4909 | "AVERAGE", | |
4910 | "MAX" | |
4911 | ], | |
4912 | "description" : "The RRD consolidation function", | |
4913 | "optional" : 1, | |
4914 | "type" : "string" | |
4915 | }, | |
4916 | "vmid" : { | |
4917 | "type" : "integer", | |
4918 | "description" : "The (unique) ID of the VM.", | |
4919 | "format" : "pve-vmid", | |
4920 | "minimum" : 1 | |
56122987 DM |
4921 | }, |
4922 | "node" : { | |
4923 | "format" : "pve-node", | |
4924 | "type" : "string", | |
4925 | "description" : "The cluster node name." | |
4926 | }, | |
4927 | "timeframe" : { | |
56122987 DM |
4928 | "enum" : [ |
4929 | "hour", | |
4930 | "day", | |
4931 | "week", | |
4932 | "month", | |
4933 | "year" | |
4934 | ], | |
7aacca6f | 4935 | "description" : "Specify the time frame you are interested in.", |
56122987 DM |
4936 | "type" : "string" |
4937 | }, | |
7aacca6f DM |
4938 | "ds" : { |
4939 | "description" : "The list of datasources you want to display.", | |
4940 | "type" : "string", | |
4941 | "format" : "pve-configid-list" | |
56122987 DM |
4942 | } |
4943 | } | |
4944 | }, | |
56122987 DM |
4945 | "permissions" : { |
4946 | "check" : [ | |
4947 | "perm", | |
4948 | "/vms/{vmid}", | |
4949 | [ | |
4950 | "VM.Audit" | |
4951 | ] | |
4952 | ] | |
4953 | }, | |
7aacca6f DM |
4954 | "description" : "Read VM RRD statistics (returns PNG)", |
4955 | "protected" : 1, | |
4956 | "returns" : { | |
4957 | "properties" : { | |
4958 | "filename" : { | |
4959 | "type" : "string" | |
4960 | } | |
4961 | }, | |
4962 | "type" : "object" | |
4963 | }, | |
4964 | "method" : "GET" | |
56122987 DM |
4965 | } |
4966 | } | |
4967 | }, | |
4968 | { | |
7aacca6f DM |
4969 | "leaf" : 1, |
4970 | "path" : "/nodes/{node}/qemu/{vmid}/rrddata", | |
4971 | "info" : { | |
56122987 | 4972 | "GET" : { |
7aacca6f DM |
4973 | "protected" : 1, |
4974 | "description" : "Read VM RRD statistics", | |
56122987 | 4975 | "name" : "rrddata", |
56122987 DM |
4976 | "parameters" : { |
4977 | "properties" : { | |
4978 | "node" : { | |
4979 | "format" : "pve-node", | |
4980 | "type" : "string", | |
4981 | "description" : "The cluster node name." | |
4982 | }, | |
4983 | "timeframe" : { | |
4984 | "type" : "string", | |
56122987 DM |
4985 | "enum" : [ |
4986 | "hour", | |
4987 | "day", | |
4988 | "week", | |
4989 | "month", | |
4990 | "year" | |
7aacca6f DM |
4991 | ], |
4992 | "description" : "Specify the time frame you are interested in." | |
4993 | }, | |
4994 | "vmid" : { | |
4995 | "type" : "integer", | |
4996 | "description" : "The (unique) ID of the VM.", | |
4997 | "format" : "pve-vmid", | |
4998 | "minimum" : 1 | |
56122987 DM |
4999 | }, |
5000 | "cf" : { | |
7aacca6f | 5001 | "description" : "The RRD consolidation function", |
56122987 DM |
5002 | "enum" : [ |
5003 | "AVERAGE", | |
5004 | "MAX" | |
5005 | ], | |
7aacca6f DM |
5006 | "type" : "string", |
5007 | "optional" : 1 | |
56122987 DM |
5008 | } |
5009 | }, | |
5010 | "additionalProperties" : 0 | |
5011 | }, | |
56122987 DM |
5012 | "permissions" : { |
5013 | "check" : [ | |
5014 | "perm", | |
5015 | "/vms/{vmid}", | |
5016 | [ | |
5017 | "VM.Audit" | |
5018 | ] | |
5019 | ] | |
5020 | }, | |
7aacca6f DM |
5021 | "method" : "GET", |
5022 | "returns" : { | |
5023 | "type" : "array", | |
5024 | "items" : { | |
5025 | "type" : "object", | |
5026 | "properties" : {} | |
5027 | } | |
5028 | } | |
56122987 DM |
5029 | } |
5030 | }, | |
56122987 DM |
5031 | "text" : "rrddata" |
5032 | }, | |
5033 | { | |
7aacca6f | 5034 | "leaf" : 1, |
56122987 DM |
5035 | "path" : "/nodes/{node}/qemu/{vmid}/config", |
5036 | "info" : { | |
7aacca6f DM |
5037 | "POST" : { |
5038 | "returns" : { | |
5039 | "type" : "string", | |
5040 | "optional" : 1 | |
5041 | }, | |
56122987 DM |
5042 | "permissions" : { |
5043 | "check" : [ | |
5044 | "perm", | |
5045 | "/vms/{vmid}", | |
5046 | [ | |
5047 | "VM.Config.Disk", | |
5048 | "VM.Config.CDROM", | |
5049 | "VM.Config.CPU", | |
5050 | "VM.Config.Memory", | |
5051 | "VM.Config.Network", | |
5052 | "VM.Config.HWType", | |
5053 | "VM.Config.Options" | |
5054 | ], | |
5055 | "any", | |
5056 | 1 | |
5057 | ] | |
5058 | }, | |
56122987 | 5059 | "proxyto" : "node", |
7aacca6f DM |
5060 | "description" : "Set virtual machine options (asynchrounous API).", |
5061 | "method" : "POST", | |
56122987 DM |
5062 | "parameters" : { |
5063 | "properties" : { | |
7aacca6f DM |
5064 | "cpulimit" : { |
5065 | "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", | |
5066 | "default" : 0, | |
5067 | "maximum" : 128, | |
5068 | "optional" : 1, | |
5069 | "type" : "number", | |
5070 | "minimum" : 0 | |
5071 | }, | |
5072 | "node" : { | |
5073 | "description" : "The cluster node name.", | |
56122987 | 5074 | "type" : "string", |
7aacca6f DM |
5075 | "format" : "pve-node" |
5076 | }, | |
5077 | "force" : { | |
56122987 | 5078 | "optional" : 1, |
7aacca6f DM |
5079 | "type" : "boolean", |
5080 | "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", | |
5081 | "requires" : "delete" | |
56122987 | 5082 | }, |
7aacca6f DM |
5083 | "kvm" : { |
5084 | "default" : 1, | |
5085 | "optional" : 1, | |
56122987 | 5086 | "type" : "boolean", |
7aacca6f | 5087 | "description" : "Enable/disable KVM hardware virtualization." |
56122987 | 5088 | }, |
7aacca6f DM |
5089 | "localtime" : { |
5090 | "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", | |
5091 | "optional" : 1, | |
5092 | "type" : "boolean" | |
5093 | }, | |
5094 | "migrate_speed" : { | |
5095 | "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", | |
5096 | "default" : 0, | |
56122987 | 5097 | "optional" : 1, |
7aacca6f DM |
5098 | "type" : "integer", |
5099 | "minimum" : 0 | |
5100 | }, | |
5101 | "startdate" : { | |
5102 | "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", | |
5103 | "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", | |
5104 | "type" : "string", | |
5105 | "optional" : 1, | |
5106 | "default" : "now", | |
5107 | "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" | |
5108 | }, | |
5109 | "sata[n]" : { | |
56122987 | 5110 | "format" : { |
7aacca6f DM |
5111 | "mbps" : { |
5112 | "format_description" : "mbps", | |
5113 | "description" : "Maximum r/w speed speed in megabytes per second.", | |
56122987 | 5114 | "type" : "number", |
7aacca6f | 5115 | "optional" : 1 |
56122987 DM |
5116 | }, |
5117 | "cyls" : { | |
56122987 | 5118 | "format_description" : "count", |
7aacca6f DM |
5119 | "optional" : 1, |
5120 | "type" : "integer", | |
5121 | "description" : "Force the drive's physical geometry to have a specific cylinder count." | |
56122987 | 5122 | }, |
7aacca6f DM |
5123 | "bps_rd" : { |
5124 | "description" : "Maximum read speed speed in bytes per second.", | |
56122987 | 5125 | "optional" : 1, |
7aacca6f DM |
5126 | "type" : "integer", |
5127 | "format_description" : "bps" | |
56122987 | 5128 | }, |
7aacca6f DM |
5129 | "trans" : { |
5130 | "format_description" : "none|lba|auto", | |
5131 | "type" : "string", | |
5132 | "optional" : 1, | |
5133 | "enum" : [ | |
5134 | "none", | |
5135 | "lba", | |
5136 | "auto" | |
5137 | ], | |
5138 | "description" : "Force disk geometry bios translation mode." | |
5139 | }, | |
5140 | "volume" : { | |
5141 | "alias" : "file" | |
5142 | }, | |
5143 | "iops" : { | |
5144 | "format_description" : "iops", | |
5145 | "description" : "Maximum r/w I/O speed in operations per second.", | |
56122987 | 5146 | "optional" : 1, |
56122987 DM |
5147 | "type" : "integer" |
5148 | }, | |
7aacca6f DM |
5149 | "file" : { |
5150 | "default_key" : 1, | |
5151 | "format_description" : "volume", | |
5152 | "format" : "pve-volume-id-or-qm-path", | |
5153 | "type" : "string", | |
5154 | "description" : "The drive's backing volume." | |
5155 | }, | |
5156 | "mbps_wr" : { | |
56122987 | 5157 | "optional" : 1, |
7aacca6f DM |
5158 | "type" : "number", |
5159 | "description" : "Maximum write speed speed in megabytes per second.", | |
56122987 DM |
5160 | "format_description" : "mbps" |
5161 | }, | |
7aacca6f DM |
5162 | "mbps_rd" : { |
5163 | "format_description" : "mbps", | |
5164 | "description" : "Maximum read speed speed in megabytes per second.", | |
5165 | "type" : "number", | |
5166 | "optional" : 1 | |
5167 | }, | |
56122987 | 5168 | "backup" : { |
56122987 | 5169 | "format_description" : "on|off", |
7aacca6f DM |
5170 | "type" : "boolean", |
5171 | "optional" : 1, | |
5172 | "description" : "Whether the drive should be included when making backups." | |
56122987 | 5173 | }, |
7aacca6f | 5174 | "iops_wr_max" : { |
56122987 DM |
5175 | "type" : "integer", |
5176 | "optional" : 1, | |
7aacca6f DM |
5177 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", |
5178 | "format_description" : "iops" | |
56122987 | 5179 | }, |
7aacca6f DM |
5180 | "aio" : { |
5181 | "format_description" : "native|threads", | |
5182 | "description" : "AIO type to use.", | |
56122987 | 5183 | "enum" : [ |
7aacca6f DM |
5184 | "native", |
5185 | "threads" | |
56122987 DM |
5186 | ], |
5187 | "optional" : 1, | |
56122987 DM |
5188 | "type" : "string" |
5189 | }, | |
7aacca6f DM |
5190 | "werror" : { |
5191 | "format_description" : "enospc|ignore|report|stop", | |
5192 | "optional" : 1, | |
5193 | "type" : "string", | |
56122987 | 5194 | "enum" : [ |
7aacca6f DM |
5195 | "enospc", |
5196 | "ignore", | |
5197 | "report", | |
5198 | "stop" | |
56122987 | 5199 | ], |
7aacca6f | 5200 | "description" : "Write error action." |
56122987 | 5201 | }, |
7aacca6f DM |
5202 | "size" : { |
5203 | "format" : "disk-size", | |
5204 | "type" : "string", | |
56122987 | 5205 | "optional" : 1, |
7aacca6f | 5206 | "description" : "Disk size. This is purely informational and has no effect." |
56122987 | 5207 | }, |
7aacca6f | 5208 | "iops_rd" : { |
56122987 | 5209 | "format_description" : "iops", |
7aacca6f DM |
5210 | "type" : "integer", |
5211 | "optional" : 1, | |
5212 | "description" : "Maximum read I/O speed in operations per second." | |
56122987 DM |
5213 | }, |
5214 | "mbps_max" : { | |
7aacca6f | 5215 | "format_description" : "mbps", |
56122987 DM |
5216 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", |
5217 | "optional" : 1, | |
7aacca6f | 5218 | "type" : "number" |
56122987 | 5219 | }, |
7aacca6f DM |
5220 | "bps_wr" : { |
5221 | "format_description" : "bps", | |
5222 | "type" : "integer", | |
56122987 | 5223 | "optional" : 1, |
7aacca6f | 5224 | "description" : "Maximum write speed speed in bytes per second." |
56122987 | 5225 | }, |
7aacca6f DM |
5226 | "mbps_rd_max" : { |
5227 | "format_description" : "mbps", | |
56122987 | 5228 | "optional" : 1, |
7aacca6f DM |
5229 | "type" : "number", |
5230 | "description" : "Maximum unthrottled read pool speed in megabytes per second." | |
5231 | }, | |
5232 | "discard" : { | |
56122987 DM |
5233 | "enum" : [ |
5234 | "ignore", | |
5235 | "on" | |
5236 | ], | |
7aacca6f | 5237 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", |
56122987 | 5238 | "type" : "string", |
56122987 | 5239 | "optional" : 1, |
7aacca6f | 5240 | "format_description" : "ignore|on" |
56122987 | 5241 | }, |
7aacca6f DM |
5242 | "serial" : { |
5243 | "maxLength" : 60, | |
5244 | "format" : "urlencoded", | |
5245 | "format_description" : "serial", | |
5246 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
5247 | "type" : "string", | |
5248 | "optional" : 1 | |
56122987 | 5249 | }, |
7aacca6f DM |
5250 | "heads" : { |
5251 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
56122987 DM |
5252 | "type" : "integer", |
5253 | "optional" : 1, | |
7aacca6f | 5254 | "format_description" : "count" |
56122987 | 5255 | }, |
7aacca6f DM |
5256 | "bps" : { |
5257 | "description" : "Maximum r/w speed speed in bytes per second.", | |
5258 | "type" : "integer", | |
56122987 | 5259 | "optional" : 1, |
7aacca6f | 5260 | "format_description" : "bps" |
56122987 | 5261 | }, |
7aacca6f DM |
5262 | "iops_rd_max" : { |
5263 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
56122987 | 5264 | "optional" : 1, |
56122987 | 5265 | "type" : "integer", |
7aacca6f | 5266 | "format_description" : "iops" |
56122987 | 5267 | }, |
7aacca6f DM |
5268 | "format" : { |
5269 | "format_description" : "drive format", | |
5270 | "description" : "The drive's backing file's data format.", | |
56122987 | 5271 | "enum" : [ |
7aacca6f DM |
5272 | "raw", |
5273 | "cow", | |
5274 | "qcow", | |
5275 | "qed", | |
5276 | "qcow2", | |
5277 | "vmdk", | |
5278 | "cloop" | |
56122987 DM |
5279 | ], |
5280 | "optional" : 1, | |
56122987 DM |
5281 | "type" : "string" |
5282 | }, | |
7aacca6f DM |
5283 | "mbps_wr_max" : { |
5284 | "format_description" : "mbps", | |
5285 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", | |
5286 | "type" : "number", | |
5287 | "optional" : 1 | |
5288 | }, | |
5289 | "detect_zeroes" : { | |
5290 | "description" : "Controls whether to detect and try to optimize writes of zeroes.", | |
56122987 | 5291 | "optional" : 1, |
7aacca6f | 5292 | "type" : "boolean" |
56122987 | 5293 | }, |
7aacca6f DM |
5294 | "secs" : { |
5295 | "format_description" : "count", | |
56122987 | 5296 | "optional" : 1, |
7aacca6f DM |
5297 | "type" : "integer", |
5298 | "description" : "Force the drive's physical geometry to have a specific sector count." | |
56122987 | 5299 | }, |
7aacca6f DM |
5300 | "iops_wr" : { |
5301 | "format_description" : "iops", | |
5302 | "description" : "Maximum write I/O speed in operations per second.", | |
56122987 | 5303 | "optional" : 1, |
7aacca6f | 5304 | "type" : "integer" |
56122987 DM |
5305 | }, |
5306 | "cache" : { | |
7aacca6f DM |
5307 | "optional" : 1, |
5308 | "type" : "string", | |
56122987 DM |
5309 | "enum" : [ |
5310 | "none", | |
5311 | "writethrough", | |
5312 | "writeback", | |
5313 | "unsafe", | |
5314 | "directsync" | |
5315 | ], | |
56122987 | 5316 | "description" : "The drive's cache mode", |
7aacca6f | 5317 | "format_description" : "none|writethrough|writeback|unsafe|directsync" |
56122987 DM |
5318 | }, |
5319 | "rerror" : { | |
56122987 DM |
5320 | "enum" : [ |
5321 | "ignore", | |
5322 | "report", | |
5323 | "stop" | |
56122987 | 5324 | ], |
7aacca6f DM |
5325 | "description" : "Read error action.", |
5326 | "type" : "string", | |
56122987 | 5327 | "optional" : 1, |
7aacca6f | 5328 | "format_description" : "ignore|report|stop" |
56122987 | 5329 | }, |
7aacca6f DM |
5330 | "media" : { |
5331 | "format_description" : "cdrom|disk", | |
5332 | "default" : "disk", | |
5333 | "type" : "string", | |
56122987 | 5334 | "optional" : 1, |
7aacca6f DM |
5335 | "description" : "The drive's media type.", |
5336 | "enum" : [ | |
5337 | "cdrom", | |
5338 | "disk" | |
5339 | ] | |
56122987 | 5340 | }, |
7aacca6f DM |
5341 | "snapshot" : { |
5342 | "description" : "Whether the drive should be included when making snapshots.", | |
5343 | "type" : "boolean", | |
56122987 | 5344 | "optional" : 1, |
7aacca6f | 5345 | "format_description" : "on|off" |
56122987 | 5346 | }, |
7aacca6f | 5347 | "iops_max" : { |
56122987 | 5348 | "optional" : 1, |
7aacca6f DM |
5349 | "type" : "integer", |
5350 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", | |
56122987 DM |
5351 | "format_description" : "iops" |
5352 | } | |
5353 | }, | |
7aacca6f | 5354 | "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", |
56122987 | 5355 | "type" : "string", |
7aacca6f | 5356 | "optional" : 1 |
56122987 DM |
5357 | }, |
5358 | "tablet" : { | |
5359 | "optional" : 1, | |
56122987 | 5360 | "type" : "boolean", |
7aacca6f DM |
5361 | "default" : 1, |
5362 | "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)." | |
56122987 | 5363 | }, |
7aacca6f DM |
5364 | "boot" : { |
5365 | "pattern" : "[acdn]{1,4}", | |
5366 | "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", | |
56122987 | 5367 | "optional" : 1, |
7aacca6f DM |
5368 | "type" : "string", |
5369 | "default" : "cdn" | |
56122987 | 5370 | }, |
7aacca6f DM |
5371 | "numa[n]" : { |
5372 | "optional" : 1, | |
5373 | "type" : "string", | |
5374 | "description" : "numa topology", | |
56122987 | 5375 | "format" : { |
7aacca6f DM |
5376 | "memory" : { |
5377 | "format_description" : "mb", | |
5378 | "description" : "Amount of memory this numa node provides.", | |
56122987 | 5379 | "optional" : 1, |
7aacca6f | 5380 | "type" : "number" |
56122987 | 5381 | }, |
7aacca6f DM |
5382 | "cpus" : { |
5383 | "type" : "string", | |
5384 | "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", | |
5385 | "description" : "CPUs accessing this numa node.", | |
5386 | "format_description" : "id[-id];..." | |
5387 | }, | |
5388 | "hostnodes" : { | |
5389 | "optional" : 1, | |
5390 | "type" : "string", | |
5391 | "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", | |
5392 | "description" : "host numa nodes to use", | |
5393 | "format_description" : "id[-id];..." | |
5394 | }, | |
5395 | "policy" : { | |
5396 | "optional" : 1, | |
5397 | "type" : "string", | |
5398 | "description" : "numa allocation policy.", | |
5399 | "enum" : [ | |
5400 | "preferred", | |
5401 | "bind", | |
5402 | "interleave" | |
5403 | ], | |
5404 | "format_description" : "preferred|bind|interleave" | |
56122987 | 5405 | } |
7aacca6f | 5406 | } |
56122987 DM |
5407 | }, |
5408 | "tdf" : { | |
56122987 | 5409 | "description" : "Enable/disable time drift fix.", |
7aacca6f | 5410 | "type" : "boolean", |
56122987 | 5411 | "optional" : 1, |
7aacca6f | 5412 | "default" : 0 |
56122987 | 5413 | }, |
7aacca6f DM |
5414 | "autostart" : { |
5415 | "description" : "Automatic restart after crash (currently ignored).", | |
5416 | "default" : 0, | |
5417 | "type" : "boolean", | |
5418 | "optional" : 1 | |
5419 | }, | |
5420 | "ostype" : { | |
5421 | "enum" : [ | |
5422 | "other", | |
5423 | "wxp", | |
5424 | "w2k", | |
5425 | "w2k3", | |
5426 | "w2k8", | |
5427 | "wvista", | |
5428 | "win7", | |
5429 | "win8", | |
5430 | "l24", | |
5431 | "l26", | |
5432 | "solaris" | |
5433 | ], | |
5434 | "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", | |
5435 | "optional" : 1, | |
56122987 DM |
5436 | "type" : "string" |
5437 | }, | |
7aacca6f DM |
5438 | "unused[n]" : { |
5439 | "format" : "pve-volume-id", | |
5440 | "type" : "string", | |
5441 | "optional" : 1, | |
5442 | "description" : "Reference to unused volumes." | |
5443 | }, | |
5444 | "template" : { | |
5445 | "description" : "Enable/disable Template.", | |
5446 | "default" : 0, | |
5447 | "type" : "boolean", | |
5448 | "optional" : 1 | |
5449 | }, | |
5450 | "shares" : { | |
5451 | "default" : 1000, | |
5452 | "maximum" : 50000, | |
5453 | "type" : "integer", | |
5454 | "optional" : 1, | |
5455 | "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", | |
5456 | "minimum" : 0 | |
5457 | }, | |
5458 | "bios" : { | |
5459 | "enum" : [ | |
5460 | "seabios", | |
5461 | "ovmf" | |
5462 | ], | |
5463 | "description" : "Select BIOS implementation.", | |
5464 | "optional" : 1, | |
5465 | "type" : "string", | |
5466 | "default" : "seabios" | |
5467 | }, | |
5468 | "protection" : { | |
5469 | "default" : 0, | |
5470 | "type" : "boolean", | |
5471 | "optional" : 1, | |
5472 | "description" : "Sets the protection flag of the VM. This will prevent the remove operation." | |
5473 | }, | |
5474 | "memory" : { | |
5475 | "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", | |
5476 | "default" : 512, | |
5477 | "type" : "integer", | |
5478 | "optional" : 1, | |
5479 | "minimum" : 16 | |
5480 | }, | |
5481 | "args" : { | |
5482 | "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", | |
5483 | "type" : "string", | |
5484 | "optional" : 1 | |
5485 | }, | |
5486 | "background_delay" : { | |
5487 | "minimum" : 1, | |
5488 | "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.", | |
5489 | "maximum" : 30, | |
5490 | "type" : "integer", | |
5491 | "optional" : 1 | |
5492 | }, | |
5493 | "cpu" : { | |
5494 | "description" : "Emulated CPU type.", | |
5495 | "type" : "string", | |
5496 | "optional" : 1, | |
56122987 | 5497 | "format" : { |
7aacca6f DM |
5498 | "cputype" : { |
5499 | "description" : "Emulated CPU type.", | |
5500 | "enum" : [ | |
5501 | "486", | |
5502 | "athlon", | |
5503 | "pentium", | |
5504 | "pentium2", | |
5505 | "pentium3", | |
5506 | "coreduo", | |
5507 | "core2duo", | |
5508 | "kvm32", | |
5509 | "kvm64", | |
5510 | "qemu32", | |
5511 | "qemu64", | |
5512 | "phenom", | |
5513 | "Conroe", | |
5514 | "Penryn", | |
5515 | "Nehalem", | |
5516 | "Westmere", | |
5517 | "SandyBridge", | |
5518 | "IvyBridge", | |
5519 | "Haswell", | |
5520 | "Haswell-noTSX", | |
5521 | "Broadwell", | |
5522 | "Broadwell-noTSX", | |
5523 | "Opteron_G1", | |
5524 | "Opteron_G2", | |
5525 | "Opteron_G3", | |
5526 | "Opteron_G4", | |
5527 | "Opteron_G5", | |
5528 | "host" | |
5529 | ], | |
5530 | "default" : "kvm64", | |
5531 | "type" : "string", | |
5532 | "format_description" : "cputype", | |
5533 | "default_key" : 1 | |
5534 | }, | |
5535 | "hidden" : { | |
5536 | "description" : "Do not identify as a KVM virtual machine.", | |
5537 | "default" : 0, | |
56122987 | 5538 | "optional" : 1, |
7aacca6f DM |
5539 | "type" : "boolean" |
5540 | } | |
5541 | } | |
5542 | }, | |
5543 | "scsihw" : { | |
5544 | "type" : "string", | |
5545 | "optional" : 1, | |
5546 | "default" : "lsi", | |
5547 | "enum" : [ | |
5548 | "lsi", | |
5549 | "lsi53c810", | |
5550 | "virtio-scsi-pci", | |
5551 | "virtio-scsi-single", | |
5552 | "megasas", | |
5553 | "pvscsi" | |
5554 | ], | |
5555 | "description" : "scsi controller model" | |
5556 | }, | |
5557 | "usb[n]" : { | |
5558 | "format" : { | |
5559 | "usb3" : { | |
5560 | "format_description" : "yes|no", | |
5561 | "description" : "Specifies whether if given host option is a USB3 device or port", | |
5562 | "optional" : 1, | |
5563 | "type" : "boolean" | |
56122987 | 5564 | }, |
7aacca6f DM |
5565 | "host" : { |
5566 | "description" : "The Host USB device or port or the value spice", | |
5567 | "type" : "string", | |
5568 | "format_description" : "HOSTUSBDEVICE|spice", | |
5569 | "format" : "pve-qm-usb-device", | |
5570 | "default_key" : 1 | |
5571 | } | |
5572 | }, | |
5573 | "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", | |
5574 | "optional" : 1, | |
5575 | "type" : "string" | |
5576 | }, | |
5577 | "cdrom" : { | |
5578 | "description" : "This is an alias for option -ide2", | |
5579 | "type" : "string", | |
5580 | "optional" : 1, | |
5581 | "format" : "pve-qm-drive", | |
5582 | "typetext" : "volume" | |
5583 | }, | |
5584 | "skiplock" : { | |
5585 | "type" : "boolean", | |
5586 | "optional" : 1, | |
5587 | "description" : "Ignore locks - only root is allowed to use this option." | |
5588 | }, | |
5589 | "net[n]" : { | |
5590 | "format" : "pve-qm-net", | |
5591 | "type" : "string", | |
5592 | "optional" : 1, | |
5593 | "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n" | |
5594 | }, | |
5595 | "scsi[n]" : { | |
5596 | "format" : { | |
5597 | "media" : { | |
5598 | "format_description" : "cdrom|disk", | |
5599 | "enum" : [ | |
5600 | "cdrom", | |
5601 | "disk" | |
5602 | ], | |
5603 | "description" : "The drive's media type.", | |
5604 | "type" : "string", | |
56122987 | 5605 | "optional" : 1, |
7aacca6f | 5606 | "default" : "disk" |
56122987 | 5607 | }, |
7aacca6f DM |
5608 | "iothread" : { |
5609 | "format_description" : "off|on", | |
56122987 | 5610 | "optional" : 1, |
7aacca6f DM |
5611 | "type" : "boolean", |
5612 | "description" : "Whether to use iothreads for this drive" | |
56122987 DM |
5613 | }, |
5614 | "cache" : { | |
7aacca6f | 5615 | "optional" : 1, |
56122987 DM |
5616 | "type" : "string", |
5617 | "enum" : [ | |
5618 | "none", | |
5619 | "writethrough", | |
5620 | "writeback", | |
5621 | "unsafe", | |
5622 | "directsync" | |
5623 | ], | |
56122987 DM |
5624 | "description" : "The drive's cache mode", |
5625 | "format_description" : "none|writethrough|writeback|unsafe|directsync" | |
5626 | }, | |
7aacca6f DM |
5627 | "secs" : { |
5628 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
5629 | "type" : "integer", | |
56122987 | 5630 | "optional" : 1, |
7aacca6f | 5631 | "format_description" : "count" |
56122987 | 5632 | }, |
7aacca6f DM |
5633 | "iops_wr" : { |
5634 | "description" : "Maximum write I/O speed in operations per second.", | |
56122987 | 5635 | "type" : "integer", |
7aacca6f DM |
5636 | "optional" : 1, |
5637 | "format_description" : "iops" | |
5638 | }, | |
5639 | "detect_zeroes" : { | |
5640 | "description" : "Controls whether to detect and try to optimize writes of zeroes.", | |
5641 | "type" : "boolean", | |
5642 | "optional" : 1 | |
5643 | }, | |
5644 | "iops_max" : { | |
56122987 | 5645 | "format_description" : "iops", |
7aacca6f | 5646 | "type" : "integer", |
56122987 | 5647 | "optional" : 1, |
7aacca6f | 5648 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." |
56122987 | 5649 | }, |
7aacca6f | 5650 | "snapshot" : { |
56122987 | 5651 | "optional" : 1, |
7aacca6f DM |
5652 | "type" : "boolean", |
5653 | "description" : "Whether the drive should be included when making snapshots.", | |
5654 | "format_description" : "on|off" | |
56122987 | 5655 | }, |
7aacca6f | 5656 | "bps_wr" : { |
56122987 | 5657 | "optional" : 1, |
7aacca6f DM |
5658 | "type" : "integer", |
5659 | "description" : "Maximum write speed speed in bytes per second.", | |
5660 | "format_description" : "bps" | |
56122987 | 5661 | }, |
7aacca6f DM |
5662 | "mbps_max" : { |
5663 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
5664 | "type" : "number", | |
5665 | "optional" : 1, | |
5666 | "format_description" : "mbps" | |
56122987 | 5667 | }, |
7aacca6f DM |
5668 | "iops_rd" : { |
5669 | "format_description" : "iops", | |
5670 | "type" : "integer", | |
56122987 | 5671 | "optional" : 1, |
7aacca6f DM |
5672 | "description" : "Maximum read I/O speed in operations per second." |
5673 | }, | |
5674 | "size" : { | |
5675 | "format" : "disk-size", | |
5676 | "description" : "Disk size. This is purely informational and has no effect.", | |
5677 | "type" : "string", | |
5678 | "optional" : 1 | |
5679 | }, | |
5680 | "iops_rd_max" : { | |
56122987 | 5681 | "format_description" : "iops", |
7aacca6f DM |
5682 | "optional" : 1, |
5683 | "type" : "integer", | |
5684 | "description" : "Maximum unthrottled read I/O pool speed in operations per second." | |
56122987 | 5685 | }, |
7aacca6f DM |
5686 | "format" : { |
5687 | "type" : "string", | |
5688 | "optional" : 1, | |
5689 | "enum" : [ | |
5690 | "raw", | |
5691 | "cow", | |
5692 | "qcow", | |
5693 | "qed", | |
5694 | "qcow2", | |
5695 | "vmdk", | |
5696 | "cloop" | |
5697 | ], | |
5698 | "description" : "The drive's backing file's data format.", | |
5699 | "format_description" : "drive format" | |
5700 | }, | |
5701 | "mbps_wr_max" : { | |
56122987 | 5702 | "format_description" : "mbps", |
7aacca6f | 5703 | "type" : "number", |
56122987 | 5704 | "optional" : 1, |
7aacca6f | 5705 | "description" : "Maximum unthrottled write pool speed in megabytes per second." |
56122987 | 5706 | }, |
7aacca6f DM |
5707 | "bps" : { |
5708 | "description" : "Maximum r/w speed speed in bytes per second.", | |
5709 | "optional" : 1, | |
56122987 | 5710 | "type" : "integer", |
7aacca6f | 5711 | "format_description" : "bps" |
56122987 | 5712 | }, |
7aacca6f DM |
5713 | "heads" : { |
5714 | "format_description" : "count", | |
5715 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
56122987 | 5716 | "optional" : 1, |
7aacca6f | 5717 | "type" : "integer" |
56122987 | 5718 | }, |
7aacca6f | 5719 | "serial" : { |
56122987 | 5720 | "type" : "string", |
7aacca6f DM |
5721 | "optional" : 1, |
5722 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
5723 | "format_description" : "serial", | |
5724 | "maxLength" : 60, | |
5725 | "format" : "urlencoded" | |
5726 | }, | |
5727 | "discard" : { | |
56122987 DM |
5728 | "enum" : [ |
5729 | "ignore", | |
5730 | "on" | |
5731 | ], | |
7aacca6f | 5732 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", |
56122987 | 5733 | "optional" : 1, |
7aacca6f DM |
5734 | "type" : "string", |
5735 | "format_description" : "ignore|on" | |
56122987 | 5736 | }, |
7aacca6f DM |
5737 | "mbps_rd_max" : { |
5738 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", | |
5739 | "type" : "number", | |
56122987 | 5740 | "optional" : 1, |
7aacca6f | 5741 | "format_description" : "mbps" |
56122987 | 5742 | }, |
7aacca6f | 5743 | "mbps_rd" : { |
56122987 | 5744 | "type" : "number", |
56122987 | 5745 | "optional" : 1, |
7aacca6f | 5746 | "description" : "Maximum read speed speed in megabytes per second.", |
56122987 DM |
5747 | "format_description" : "mbps" |
5748 | }, | |
7aacca6f DM |
5749 | "mbps_wr" : { |
5750 | "format_description" : "mbps", | |
5751 | "optional" : 1, | |
5752 | "type" : "number", | |
5753 | "description" : "Maximum write speed speed in megabytes per second." | |
5754 | }, | |
56122987 | 5755 | "file" : { |
7aacca6f | 5756 | "format" : "pve-volume-id-or-qm-path", |
56122987 | 5757 | "format_description" : "volume", |
56122987 | 5758 | "default_key" : 1, |
7aacca6f | 5759 | "description" : "The drive's backing volume.", |
56122987 DM |
5760 | "type" : "string" |
5761 | }, | |
7aacca6f DM |
5762 | "iops" : { |
5763 | "type" : "integer", | |
56122987 | 5764 | "optional" : 1, |
7aacca6f DM |
5765 | "description" : "Maximum r/w I/O speed in operations per second.", |
5766 | "format_description" : "iops" | |
56122987 | 5767 | }, |
7aacca6f DM |
5768 | "werror" : { |
5769 | "format_description" : "enospc|ignore|report|stop", | |
5770 | "description" : "Write error action.", | |
5771 | "enum" : [ | |
5772 | "enospc", | |
5773 | "ignore", | |
5774 | "report", | |
5775 | "stop" | |
5776 | ], | |
56122987 | 5777 | "type" : "string", |
7aacca6f DM |
5778 | "optional" : 1 |
5779 | }, | |
5780 | "aio" : { | |
5781 | "format_description" : "native|threads", | |
56122987 DM |
5782 | "enum" : [ |
5783 | "native", | |
5784 | "threads" | |
5785 | ], | |
5786 | "description" : "AIO type to use.", | |
56122987 | 5787 | "optional" : 1, |
7aacca6f | 5788 | "type" : "string" |
56122987 DM |
5789 | }, |
5790 | "iops_wr_max" : { | |
5791 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", | |
56122987 DM |
5792 | "type" : "integer", |
5793 | "optional" : 1, | |
7aacca6f | 5794 | "format_description" : "iops" |
56122987 DM |
5795 | }, |
5796 | "backup" : { | |
56122987 | 5797 | "format_description" : "on|off", |
56122987 DM |
5798 | "type" : "boolean", |
5799 | "optional" : 1, | |
7aacca6f | 5800 | "description" : "Whether the drive should be included when making backups." |
56122987 | 5801 | }, |
7aacca6f | 5802 | "bps_rd" : { |
56122987 DM |
5803 | "type" : "integer", |
5804 | "optional" : 1, | |
7aacca6f DM |
5805 | "description" : "Maximum read speed speed in bytes per second.", |
5806 | "format_description" : "bps" | |
56122987 | 5807 | }, |
7aacca6f DM |
5808 | "queues" : { |
5809 | "minimum" : 2, | |
5810 | "format_description" : "nbqueues", | |
5811 | "type" : "integer", | |
56122987 | 5812 | "optional" : 1, |
7aacca6f | 5813 | "description" : "Number of queues." |
56122987 DM |
5814 | }, |
5815 | "cyls" : { | |
5816 | "format_description" : "count", | |
56122987 | 5817 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", |
56122987 | 5818 | "optional" : 1, |
56122987 DM |
5819 | "type" : "integer" |
5820 | }, | |
7aacca6f | 5821 | "mbps" : { |
56122987 | 5822 | "format_description" : "mbps", |
7aacca6f DM |
5823 | "description" : "Maximum r/w speed speed in megabytes per second.", |
5824 | "type" : "number", | |
5825 | "optional" : 1 | |
56122987 | 5826 | }, |
7aacca6f DM |
5827 | "volume" : { |
5828 | "alias" : "file" | |
5829 | }, | |
5830 | "trans" : { | |
5831 | "format_description" : "none|lba|auto", | |
56122987 | 5832 | "optional" : 1, |
7aacca6f DM |
5833 | "type" : "string", |
5834 | "description" : "Force disk geometry bios translation mode.", | |
5835 | "enum" : [ | |
5836 | "none", | |
5837 | "lba", | |
5838 | "auto" | |
5839 | ] | |
56122987 DM |
5840 | } |
5841 | }, | |
5842 | "type" : "string", | |
7aacca6f DM |
5843 | "optional" : 1, |
5844 | "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." | |
56122987 | 5845 | }, |
7aacca6f | 5846 | "virtio[n]" : { |
56122987 DM |
5847 | "type" : "string", |
5848 | "optional" : 1, | |
7aacca6f | 5849 | "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", |
56122987 | 5850 | "format" : { |
7aacca6f DM |
5851 | "cyls" : { |
5852 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", | |
5853 | "optional" : 1, | |
56122987 | 5854 | "type" : "integer", |
7aacca6f | 5855 | "format_description" : "count" |
56122987 | 5856 | }, |
7aacca6f DM |
5857 | "mbps" : { |
5858 | "description" : "Maximum r/w speed speed in megabytes per second.", | |
56122987 | 5859 | "type" : "number", |
56122987 DM |
5860 | "optional" : 1, |
5861 | "format_description" : "mbps" | |
5862 | }, | |
7aacca6f DM |
5863 | "bps_rd" : { |
5864 | "description" : "Maximum read speed speed in bytes per second.", | |
56122987 | 5865 | "optional" : 1, |
7aacca6f DM |
5866 | "type" : "integer", |
5867 | "format_description" : "bps" | |
56122987 | 5868 | }, |
7aacca6f DM |
5869 | "trans" : { |
5870 | "format_description" : "none|lba|auto", | |
56122987 | 5871 | "optional" : 1, |
7aacca6f | 5872 | "type" : "string", |
56122987 | 5873 | "enum" : [ |
7aacca6f DM |
5874 | "none", |
5875 | "lba", | |
5876 | "auto" | |
56122987 | 5877 | ], |
7aacca6f | 5878 | "description" : "Force disk geometry bios translation mode." |
56122987 | 5879 | }, |
7aacca6f DM |
5880 | "volume" : { |
5881 | "alias" : "file" | |
56122987 | 5882 | }, |
7aacca6f DM |
5883 | "file" : { |
5884 | "default_key" : 1, | |
5885 | "format" : "pve-volume-id-or-qm-path", | |
5886 | "format_description" : "volume", | |
5887 | "type" : "string", | |
5888 | "description" : "The drive's backing volume." | |
5889 | }, | |
5890 | "iops" : { | |
56122987 | 5891 | "format_description" : "iops", |
7aacca6f DM |
5892 | "description" : "Maximum r/w I/O speed in operations per second.", |
5893 | "type" : "integer", | |
5894 | "optional" : 1 | |
56122987 | 5895 | }, |
7aacca6f DM |
5896 | "mbps_rd" : { |
5897 | "type" : "number", | |
56122987 | 5898 | "optional" : 1, |
7aacca6f DM |
5899 | "description" : "Maximum read speed speed in megabytes per second.", |
5900 | "format_description" : "mbps" | |
56122987 | 5901 | }, |
7aacca6f DM |
5902 | "mbps_wr" : { |
5903 | "type" : "number", | |
56122987 | 5904 | "optional" : 1, |
7aacca6f DM |
5905 | "description" : "Maximum write speed speed in megabytes per second.", |
5906 | "format_description" : "mbps" | |
56122987 DM |
5907 | }, |
5908 | "iops_wr_max" : { | |
7aacca6f | 5909 | "format_description" : "iops", |
56122987 | 5910 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", |
56122987 | 5911 | "type" : "integer", |
56122987 DM |
5912 | "optional" : 1 |
5913 | }, | |
7aacca6f DM |
5914 | "backup" : { |
5915 | "optional" : 1, | |
5916 | "type" : "boolean", | |
5917 | "description" : "Whether the drive should be included when making backups.", | |
5918 | "format_description" : "on|off" | |
5919 | }, | |
56122987 | 5920 | "aio" : { |
7aacca6f | 5921 | "type" : "string", |
56122987 | 5922 | "optional" : 1, |
56122987 DM |
5923 | "description" : "AIO type to use.", |
5924 | "enum" : [ | |
5925 | "native", | |
5926 | "threads" | |
5927 | ], | |
7aacca6f | 5928 | "format_description" : "native|threads" |
56122987 | 5929 | }, |
7aacca6f | 5930 | "werror" : { |
56122987 | 5931 | "type" : "string", |
7aacca6f DM |
5932 | "optional" : 1, |
5933 | "enum" : [ | |
5934 | "enospc", | |
5935 | "ignore", | |
5936 | "report", | |
5937 | "stop" | |
5938 | ], | |
5939 | "description" : "Write error action.", | |
5940 | "format_description" : "enospc|ignore|report|stop" | |
56122987 | 5941 | }, |
7aacca6f DM |
5942 | "iops_rd" : { |
5943 | "description" : "Maximum read I/O speed in operations per second.", | |
56122987 | 5944 | "optional" : 1, |
7aacca6f DM |
5945 | "type" : "integer", |
5946 | "format_description" : "iops" | |
56122987 | 5947 | }, |
7aacca6f | 5948 | "size" : { |
56122987 DM |
5949 | "type" : "string", |
5950 | "optional" : 1, | |
7aacca6f DM |
5951 | "description" : "Disk size. This is purely informational and has no effect.", |
5952 | "format" : "disk-size" | |
56122987 DM |
5953 | }, |
5954 | "mbps_max" : { | |
5955 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
7aacca6f | 5956 | "type" : "number", |
56122987 | 5957 | "optional" : 1, |
7aacca6f | 5958 | "format_description" : "mbps" |
56122987 | 5959 | }, |
7aacca6f DM |
5960 | "bps_wr" : { |
5961 | "format_description" : "bps", | |
5962 | "type" : "integer", | |
56122987 | 5963 | "optional" : 1, |
7aacca6f | 5964 | "description" : "Maximum write speed speed in bytes per second." |
56122987 | 5965 | }, |
7aacca6f DM |
5966 | "discard" : { |
5967 | "enum" : [ | |
5968 | "ignore", | |
5969 | "on" | |
5970 | ], | |
5971 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
5972 | "optional" : 1, | |
5973 | "type" : "string", | |
5974 | "format_description" : "ignore|on" | |
5975 | }, | |
5976 | "mbps_rd_max" : { | |
56122987 DM |
5977 | "type" : "number", |
5978 | "optional" : 1, | |
7aacca6f | 5979 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", |
56122987 DM |
5980 | "format_description" : "mbps" |
5981 | }, | |
7aacca6f DM |
5982 | "heads" : { |
5983 | "format_description" : "count", | |
56122987 DM |
5984 | "type" : "integer", |
5985 | "optional" : 1, | |
7aacca6f DM |
5986 | "description" : "Force the drive's physical geometry to have a specific head count." |
5987 | }, | |
5988 | "serial" : { | |
5989 | "format_description" : "serial", | |
5990 | "format" : "urlencoded", | |
5991 | "maxLength" : 60, | |
5992 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
5993 | "optional" : 1, | |
5994 | "type" : "string" | |
56122987 DM |
5995 | }, |
5996 | "iops_rd_max" : { | |
5997 | "type" : "integer", | |
5998 | "optional" : 1, | |
5999 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
6000 | "format_description" : "iops" | |
6001 | }, | |
7aacca6f DM |
6002 | "mbps_wr_max" : { |
6003 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", | |
6004 | "type" : "number", | |
6005 | "optional" : 1, | |
6006 | "format_description" : "mbps" | |
56122987 | 6007 | }, |
7aacca6f DM |
6008 | "bps" : { |
6009 | "format_description" : "bps", | |
6010 | "type" : "integer", | |
56122987 | 6011 | "optional" : 1, |
7aacca6f | 6012 | "description" : "Maximum r/w speed speed in bytes per second." |
56122987 | 6013 | }, |
7aacca6f DM |
6014 | "format" : { |
6015 | "format_description" : "drive format", | |
6016 | "type" : "string", | |
56122987 | 6017 | "optional" : 1, |
56122987 | 6018 | "enum" : [ |
7aacca6f DM |
6019 | "raw", |
6020 | "cow", | |
6021 | "qcow", | |
6022 | "qed", | |
6023 | "qcow2", | |
6024 | "vmdk", | |
6025 | "cloop" | |
6026 | ], | |
6027 | "description" : "The drive's backing file's data format." | |
56122987 | 6028 | }, |
7aacca6f DM |
6029 | "secs" : { |
6030 | "format_description" : "count", | |
6031 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
56122987 | 6032 | "optional" : 1, |
7aacca6f | 6033 | "type" : "integer" |
56122987 | 6034 | }, |
7aacca6f DM |
6035 | "iops_wr" : { |
6036 | "format_description" : "iops", | |
6037 | "description" : "Maximum write I/O speed in operations per second.", | |
6038 | "type" : "integer", | |
6039 | "optional" : 1 | |
6040 | }, | |
6041 | "detect_zeroes" : { | |
56122987 | 6042 | "optional" : 1, |
7aacca6f DM |
6043 | "type" : "boolean", |
6044 | "description" : "Controls whether to detect and try to optimize writes of zeroes." | |
6045 | }, | |
6046 | "rerror" : { | |
6047 | "description" : "Read error action.", | |
56122987 | 6048 | "enum" : [ |
56122987 DM |
6049 | "ignore", |
6050 | "report", | |
6051 | "stop" | |
7aacca6f DM |
6052 | ], |
6053 | "optional" : 1, | |
6054 | "type" : "string", | |
6055 | "format_description" : "ignore|report|stop" | |
56122987 DM |
6056 | }, |
6057 | "cache" : { | |
7aacca6f | 6058 | "description" : "The drive's cache mode", |
56122987 DM |
6059 | "enum" : [ |
6060 | "none", | |
6061 | "writethrough", | |
6062 | "writeback", | |
6063 | "unsafe", | |
6064 | "directsync" | |
6065 | ], | |
7aacca6f | 6066 | "type" : "string", |
56122987 | 6067 | "optional" : 1, |
7aacca6f | 6068 | "format_description" : "none|writethrough|writeback|unsafe|directsync" |
56122987 | 6069 | }, |
7aacca6f DM |
6070 | "iothread" : { |
6071 | "format_description" : "off|on", | |
6072 | "description" : "Whether to use iothreads for this drive", | |
56122987 | 6073 | "optional" : 1, |
56122987 DM |
6074 | "type" : "boolean" |
6075 | }, | |
7aacca6f DM |
6076 | "media" : { |
6077 | "enum" : [ | |
6078 | "cdrom", | |
6079 | "disk" | |
6080 | ], | |
6081 | "description" : "The drive's media type.", | |
6082 | "type" : "string", | |
56122987 | 6083 | "optional" : 1, |
7aacca6f DM |
6084 | "default" : "disk", |
6085 | "format_description" : "cdrom|disk" | |
56122987 | 6086 | }, |
7aacca6f DM |
6087 | "snapshot" : { |
6088 | "description" : "Whether the drive should be included when making snapshots.", | |
6089 | "optional" : 1, | |
6090 | "type" : "boolean", | |
6091 | "format_description" : "on|off" | |
6092 | }, | |
6093 | "iops_max" : { | |
6094 | "format_description" : "iops", | |
56122987 DM |
6095 | "type" : "integer", |
6096 | "optional" : 1, | |
7aacca6f | 6097 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." |
56122987 | 6098 | } |
7aacca6f | 6099 | } |
56122987 | 6100 | }, |
7aacca6f DM |
6101 | "vga" : { |
6102 | "optional" : 1, | |
56122987 | 6103 | "type" : "string", |
7aacca6f DM |
6104 | "enum" : [ |
6105 | "std", | |
6106 | "cirrus", | |
6107 | "vmware", | |
6108 | "qxl", | |
6109 | "serial0", | |
6110 | "serial1", | |
6111 | "serial2", | |
6112 | "serial3", | |
6113 | "qxl2", | |
6114 | "qxl3", | |
6115 | "qxl4" | |
6116 | ], | |
6117 | "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal." | |
56122987 | 6118 | }, |
7aacca6f DM |
6119 | "balloon" : { |
6120 | "optional" : 1, | |
6121 | "type" : "integer", | |
6122 | "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", | |
6123 | "minimum" : 0 | |
6124 | }, | |
6125 | "smp" : { | |
6126 | "description" : "The number of CPUs. Please use option -sockets instead.", | |
56122987 | 6127 | "default" : 1, |
56122987 | 6128 | "optional" : 1, |
7aacca6f DM |
6129 | "type" : "integer", |
6130 | "minimum" : 1 | |
56122987 | 6131 | }, |
7aacca6f DM |
6132 | "machine" : { |
6133 | "description" : "Specific the Qemu machine type.", | |
6134 | "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", | |
6135 | "optional" : 1, | |
56122987 | 6136 | "type" : "string", |
7aacca6f | 6137 | "maxLength" : 40 |
56122987 | 6138 | }, |
7aacca6f DM |
6139 | "delete" : { |
6140 | "format" : "pve-configid-list", | |
56122987 | 6141 | "optional" : 1, |
56122987 | 6142 | "type" : "string", |
7aacca6f | 6143 | "description" : "A list of settings you want to delete." |
56122987 | 6144 | }, |
7aacca6f DM |
6145 | "cores" : { |
6146 | "minimum" : 1, | |
6147 | "description" : "The number of cores per socket.", | |
6148 | "type" : "integer", | |
6149 | "optional" : 1, | |
6150 | "default" : 1 | |
6151 | }, | |
6152 | "name" : { | |
6153 | "description" : "Set a name for the VM. Only used on the configuration web interface.", | |
56122987 | 6154 | "type" : "string", |
7aacca6f DM |
6155 | "optional" : 1, |
6156 | "format" : "dns-name" | |
56122987 | 6157 | }, |
7aacca6f | 6158 | "agent" : { |
56122987 | 6159 | "default" : 0, |
7aacca6f | 6160 | "optional" : 1, |
56122987 | 6161 | "type" : "boolean", |
7aacca6f DM |
6162 | "description" : "Enable/disable Qemu GuestAgent." |
6163 | }, | |
6164 | "digest" : { | |
6165 | "maxLength" : 40, | |
6166 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
6167 | "type" : "string", | |
56122987 DM |
6168 | "optional" : 1 |
6169 | }, | |
7aacca6f DM |
6170 | "startup" : { |
6171 | "optional" : 1, | |
56122987 | 6172 | "type" : "string", |
7aacca6f DM |
6173 | "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", |
6174 | "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", | |
6175 | "format" : "pve-startup-order" | |
6176 | }, | |
6177 | "onboot" : { | |
6178 | "type" : "boolean", | |
56122987 | 6179 | "optional" : 1, |
7aacca6f DM |
6180 | "default" : 0, |
6181 | "description" : "Specifies whether a VM will be started during system bootup." | |
56122987 | 6182 | }, |
7aacca6f DM |
6183 | "freeze" : { |
6184 | "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", | |
6185 | "type" : "boolean", | |
56122987 DM |
6186 | "optional" : 1 |
6187 | }, | |
7aacca6f DM |
6188 | "sockets" : { |
6189 | "type" : "integer", | |
56122987 | 6190 | "optional" : 1, |
7aacca6f DM |
6191 | "default" : 1, |
6192 | "description" : "The number of CPU sockets.", | |
6193 | "minimum" : 1 | |
6194 | }, | |
6195 | "vcpus" : { | |
56122987 | 6196 | "description" : "Number of hotplugged vcpus.", |
56122987 | 6197 | "default" : 0, |
7aacca6f DM |
6198 | "optional" : 1, |
6199 | "type" : "integer", | |
56122987 DM |
6200 | "minimum" : 1 |
6201 | }, | |
7aacca6f DM |
6202 | "serial[n]" : { |
6203 | "type" : "string", | |
6204 | "optional" : 1, | |
6205 | "pattern" : "(/dev/.+|socket)", | |
6206 | "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" | |
6207 | }, | |
6208 | "description" : { | |
6209 | "type" : "string", | |
6210 | "optional" : 1, | |
6211 | "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file." | |
6212 | }, | |
6213 | "acpi" : { | |
6214 | "description" : "Enable/disable ACPI.", | |
6215 | "optional" : 1, | |
6216 | "type" : "boolean", | |
6217 | "default" : 1 | |
6218 | }, | |
56122987 DM |
6219 | "migrate_downtime" : { |
6220 | "description" : "Set maximum tolerated downtime (in seconds) for migrations.", | |
56122987 | 6221 | "type" : "number", |
7aacca6f | 6222 | "optional" : 1, |
56122987 DM |
6223 | "default" : 0.1, |
6224 | "minimum" : 0 | |
6225 | }, | |
7aacca6f DM |
6226 | "parallel[n]" : { |
6227 | "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", | |
6228 | "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", | |
6229 | "type" : "string", | |
6230 | "optional" : 1 | |
56122987 | 6231 | }, |
7aacca6f DM |
6232 | "hotplug" : { |
6233 | "format" : "pve-hotplug-features", | |
6234 | "default" : "network,disk,usb", | |
56122987 DM |
6235 | "type" : "string", |
6236 | "optional" : 1, | |
7aacca6f | 6237 | "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'." |
56122987 | 6238 | }, |
7aacca6f | 6239 | "watchdog" : { |
56122987 | 6240 | "optional" : 1, |
56122987 | 6241 | "type" : "string", |
7aacca6f DM |
6242 | "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", |
6243 | "format" : "pve-qm-watchdog" | |
56122987 | 6244 | }, |
7aacca6f | 6245 | "ide[n]" : { |
56122987 | 6246 | "optional" : 1, |
7aacca6f DM |
6247 | "type" : "string", |
6248 | "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", | |
56122987 | 6249 | "format" : { |
7aacca6f DM |
6250 | "volume" : { |
6251 | "alias" : "file" | |
6252 | }, | |
6253 | "trans" : { | |
6254 | "format_description" : "none|lba|auto", | |
56122987 DM |
6255 | "enum" : [ |
6256 | "none", | |
7aacca6f DM |
6257 | "lba", |
6258 | "auto" | |
56122987 | 6259 | ], |
7aacca6f | 6260 | "description" : "Force disk geometry bios translation mode.", |
56122987 DM |
6261 | "optional" : 1, |
6262 | "type" : "string" | |
6263 | }, | |
7aacca6f | 6264 | "bps_rd" : { |
56122987 | 6265 | "format_description" : "bps", |
7aacca6f DM |
6266 | "description" : "Maximum read speed speed in bytes per second.", |
6267 | "type" : "integer", | |
6268 | "optional" : 1 | |
56122987 | 6269 | }, |
7aacca6f DM |
6270 | "cyls" : { |
6271 | "format_description" : "count", | |
6272 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", | |
56122987 | 6273 | "type" : "integer", |
7aacca6f DM |
6274 | "optional" : 1 |
6275 | }, | |
6276 | "mbps" : { | |
6277 | "format_description" : "mbps", | |
6278 | "description" : "Maximum r/w speed speed in megabytes per second.", | |
6279 | "type" : "number", | |
56122987 DM |
6280 | "optional" : 1 |
6281 | }, | |
6282 | "werror" : { | |
56122987 DM |
6283 | "format_description" : "enospc|ignore|report|stop", |
6284 | "optional" : 1, | |
7aacca6f | 6285 | "type" : "string", |
56122987 DM |
6286 | "enum" : [ |
6287 | "enospc", | |
6288 | "ignore", | |
6289 | "report", | |
6290 | "stop" | |
6291 | ], | |
7aacca6f | 6292 | "description" : "Write error action." |
56122987 | 6293 | }, |
7aacca6f | 6294 | "aio" : { |
56122987 | 6295 | "optional" : 1, |
7aacca6f DM |
6296 | "type" : "string", |
6297 | "description" : "AIO type to use.", | |
56122987 | 6298 | "enum" : [ |
7aacca6f DM |
6299 | "native", |
6300 | "threads" | |
56122987 | 6301 | ], |
7aacca6f | 6302 | "format_description" : "native|threads" |
56122987 | 6303 | }, |
7aacca6f DM |
6304 | "iops_wr_max" : { |
6305 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", | |
56122987 | 6306 | "optional" : 1, |
7aacca6f DM |
6307 | "type" : "integer", |
6308 | "format_description" : "iops" | |
56122987 | 6309 | }, |
7aacca6f DM |
6310 | "backup" : { |
6311 | "format_description" : "on|off", | |
6312 | "type" : "boolean", | |
56122987 | 6313 | "optional" : 1, |
7aacca6f | 6314 | "description" : "Whether the drive should be included when making backups." |
56122987 | 6315 | }, |
7aacca6f DM |
6316 | "mbps_rd" : { |
6317 | "format_description" : "mbps", | |
6318 | "description" : "Maximum read speed speed in megabytes per second.", | |
6319 | "type" : "number", | |
6320 | "optional" : 1 | |
6321 | }, | |
6322 | "mbps_wr" : { | |
6323 | "format_description" : "mbps", | |
6324 | "description" : "Maximum write speed speed in megabytes per second.", | |
6325 | "type" : "number", | |
6326 | "optional" : 1 | |
6327 | }, | |
6328 | "model" : { | |
6329 | "type" : "string", | |
56122987 | 6330 | "optional" : 1, |
7aacca6f DM |
6331 | "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", |
6332 | "format_description" : "model", | |
6333 | "format" : "urlencoded", | |
6334 | "maxLength" : 120 | |
56122987 DM |
6335 | }, |
6336 | "file" : { | |
56122987 | 6337 | "type" : "string", |
56122987 | 6338 | "description" : "The drive's backing volume.", |
7aacca6f DM |
6339 | "default_key" : 1, |
6340 | "format" : "pve-volume-id-or-qm-path", | |
6341 | "format_description" : "volume" | |
56122987 | 6342 | }, |
7aacca6f DM |
6343 | "iops" : { |
6344 | "description" : "Maximum r/w I/O speed in operations per second.", | |
6345 | "optional" : 1, | |
6346 | "type" : "integer", | |
6347 | "format_description" : "iops" | |
6348 | }, | |
6349 | "mbps_wr_max" : { | |
6350 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", | |
6351 | "optional" : 1, | |
6352 | "type" : "number", | |
6353 | "format_description" : "mbps" | |
6354 | }, | |
6355 | "format" : { | |
6356 | "format_description" : "drive format", | |
6357 | "description" : "The drive's backing file's data format.", | |
6358 | "enum" : [ | |
6359 | "raw", | |
6360 | "cow", | |
6361 | "qcow", | |
6362 | "qed", | |
6363 | "qcow2", | |
6364 | "vmdk", | |
6365 | "cloop" | |
56122987 DM |
6366 | ], |
6367 | "optional" : 1, | |
56122987 DM |
6368 | "type" : "string" |
6369 | }, | |
7aacca6f DM |
6370 | "bps" : { |
6371 | "type" : "integer", | |
56122987 | 6372 | "optional" : 1, |
7aacca6f DM |
6373 | "description" : "Maximum r/w speed speed in bytes per second.", |
6374 | "format_description" : "bps" | |
56122987 | 6375 | }, |
7aacca6f DM |
6376 | "iops_rd_max" : { |
6377 | "format_description" : "iops", | |
6378 | "type" : "integer", | |
56122987 | 6379 | "optional" : 1, |
7aacca6f | 6380 | "description" : "Maximum unthrottled read I/O pool speed in operations per second." |
56122987 | 6381 | }, |
7aacca6f DM |
6382 | "heads" : { |
6383 | "format_description" : "count", | |
6384 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
56122987 | 6385 | "optional" : 1, |
56122987 DM |
6386 | "type" : "integer" |
6387 | }, | |
7aacca6f DM |
6388 | "serial" : { |
6389 | "format_description" : "serial", | |
6390 | "format" : "urlencoded", | |
6391 | "maxLength" : 60, | |
56122987 DM |
6392 | "type" : "string", |
6393 | "optional" : 1, | |
7aacca6f | 6394 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long." |
56122987 | 6395 | }, |
7aacca6f DM |
6396 | "discard" : { |
6397 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
6398 | "enum" : [ | |
6399 | "ignore", | |
6400 | "on" | |
6401 | ], | |
6402 | "optional" : 1, | |
6403 | "type" : "string", | |
6404 | "format_description" : "ignore|on" | |
56122987 DM |
6405 | }, |
6406 | "mbps_rd_max" : { | |
56122987 | 6407 | "format_description" : "mbps", |
7aacca6f DM |
6408 | "optional" : 1, |
6409 | "type" : "number", | |
56122987 DM |
6410 | "description" : "Maximum unthrottled read pool speed in megabytes per second." |
6411 | }, | |
7aacca6f DM |
6412 | "bps_wr" : { |
6413 | "format_description" : "bps", | |
6414 | "description" : "Maximum write speed speed in bytes per second.", | |
56122987 DM |
6415 | "optional" : 1, |
6416 | "type" : "integer" | |
6417 | }, | |
7aacca6f DM |
6418 | "mbps_max" : { |
6419 | "format_description" : "mbps", | |
6420 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
6421 | "type" : "number", | |
6422 | "optional" : 1 | |
6423 | }, | |
6424 | "iops_rd" : { | |
6425 | "description" : "Maximum read I/O speed in operations per second.", | |
56122987 | 6426 | "optional" : 1, |
7aacca6f DM |
6427 | "type" : "integer", |
6428 | "format_description" : "iops" | |
56122987 DM |
6429 | }, |
6430 | "size" : { | |
6431 | "description" : "Disk size. This is purely informational and has no effect.", | |
56122987 | 6432 | "type" : "string", |
7aacca6f | 6433 | "optional" : 1, |
56122987 DM |
6434 | "format" : "disk-size" |
6435 | }, | |
7aacca6f | 6436 | "iops_max" : { |
56122987 DM |
6437 | "type" : "integer", |
6438 | "optional" : 1, | |
7aacca6f DM |
6439 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", |
6440 | "format_description" : "iops" | |
56122987 | 6441 | }, |
7aacca6f DM |
6442 | "snapshot" : { |
6443 | "description" : "Whether the drive should be included when making snapshots.", | |
6444 | "type" : "boolean", | |
56122987 | 6445 | "optional" : 1, |
7aacca6f | 6446 | "format_description" : "on|off" |
56122987 DM |
6447 | }, |
6448 | "media" : { | |
56122987 | 6449 | "format_description" : "cdrom|disk", |
7aacca6f DM |
6450 | "type" : "string", |
6451 | "optional" : 1, | |
6452 | "default" : "disk", | |
56122987 DM |
6453 | "enum" : [ |
6454 | "cdrom", | |
6455 | "disk" | |
6456 | ], | |
7aacca6f | 6457 | "description" : "The drive's media type." |
56122987 | 6458 | }, |
7aacca6f | 6459 | "rerror" : { |
56122987 | 6460 | "enum" : [ |
7aacca6f DM |
6461 | "ignore", |
6462 | "report", | |
6463 | "stop" | |
56122987 | 6464 | ], |
7aacca6f DM |
6465 | "description" : "Read error action.", |
6466 | "type" : "string", | |
56122987 | 6467 | "optional" : 1, |
7aacca6f | 6468 | "format_description" : "ignore|report|stop" |
56122987 | 6469 | }, |
7aacca6f DM |
6470 | "cache" : { |
6471 | "format_description" : "none|writethrough|writeback|unsafe|directsync", | |
6472 | "description" : "The drive's cache mode", | |
6473 | "enum" : [ | |
6474 | "none", | |
6475 | "writethrough", | |
6476 | "writeback", | |
6477 | "unsafe", | |
6478 | "directsync" | |
6479 | ], | |
56122987 | 6480 | "optional" : 1, |
7aacca6f | 6481 | "type" : "string" |
56122987 | 6482 | }, |
7aacca6f DM |
6483 | "iops_wr" : { |
6484 | "type" : "integer", | |
56122987 | 6485 | "optional" : 1, |
7aacca6f DM |
6486 | "description" : "Maximum write I/O speed in operations per second.", |
6487 | "format_description" : "iops" | |
56122987 | 6488 | }, |
7aacca6f DM |
6489 | "secs" : { |
6490 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
56122987 | 6491 | "optional" : 1, |
56122987 | 6492 | "type" : "integer", |
7aacca6f | 6493 | "format_description" : "count" |
56122987 | 6494 | }, |
7aacca6f | 6495 | "detect_zeroes" : { |
56122987 | 6496 | "optional" : 1, |
7aacca6f DM |
6497 | "type" : "boolean", |
6498 | "description" : "Controls whether to detect and try to optimize writes of zeroes." | |
56122987 | 6499 | } |
7aacca6f DM |
6500 | } |
6501 | }, | |
6502 | "lock" : { | |
56122987 DM |
6503 | "type" : "string", |
6504 | "optional" : 1, | |
7aacca6f DM |
6505 | "enum" : [ |
6506 | "migrate", | |
6507 | "backup", | |
6508 | "snapshot", | |
6509 | "rollback" | |
6510 | ], | |
6511 | "description" : "Lock/unlock the VM." | |
56122987 | 6512 | }, |
7aacca6f DM |
6513 | "hostpci[n]" : { |
6514 | "format" : "pve-qm-hostpci", | |
56122987 | 6515 | "type" : "string", |
56122987 | 6516 | "optional" : 1, |
7aacca6f DM |
6517 | "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" |
6518 | }, | |
6519 | "keyboard" : { | |
6520 | "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", | |
6521 | "enum" : [ | |
6522 | "da", | |
6523 | "sv", | |
6524 | "en-gb", | |
6525 | "lt", | |
6526 | "is", | |
6527 | "mk", | |
6528 | "pl", | |
6529 | "hu", | |
6530 | "fr-be", | |
6531 | "pt-br", | |
6532 | "de-ch", | |
6533 | "nl", | |
6534 | "no", | |
6535 | "tr", | |
6536 | "sl", | |
6537 | "de", | |
6538 | "fr-ca", | |
6539 | "ja", | |
6540 | "es", | |
6541 | "it", | |
6542 | "pt", | |
6543 | "fr", | |
6544 | "en-us", | |
6545 | "fi", | |
6546 | "fr-ch" | |
6547 | ], | |
6548 | "default" : "en-us", | |
56122987 | 6549 | "type" : "string", |
7aacca6f | 6550 | "optional" : 1 |
56122987 | 6551 | }, |
7aacca6f DM |
6552 | "bootdisk" : { |
6553 | "type" : "string", | |
56122987 | 6554 | "optional" : 1, |
7aacca6f DM |
6555 | "pattern" : "(ide|sata|scsi|virtio)\\d+", |
6556 | "description" : "Enable booting from specified disk.", | |
6557 | "format" : "pve-qm-bootdisk" | |
56122987 | 6558 | }, |
7aacca6f DM |
6559 | "revert" : { |
6560 | "description" : "Revert a pending change.", | |
56122987 | 6561 | "optional" : 1, |
7aacca6f DM |
6562 | "type" : "string", |
6563 | "format" : "pve-configid-list" | |
56122987 | 6564 | }, |
7aacca6f DM |
6565 | "reboot" : { |
6566 | "description" : "Allow reboot. If set to '0' the VM exit on reboot.", | |
6567 | "default" : 1, | |
56122987 | 6568 | "type" : "boolean", |
56122987 DM |
6569 | "optional" : 1 |
6570 | }, | |
7aacca6f DM |
6571 | "cpuunits" : { |
6572 | "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", | |
6573 | "maximum" : 500000, | |
6574 | "default" : 1000, | |
56122987 | 6575 | "optional" : 1, |
7aacca6f DM |
6576 | "type" : "integer", |
6577 | "minimum" : 0 | |
56122987 | 6578 | }, |
7aacca6f DM |
6579 | "numa" : { |
6580 | "description" : "Enable/disable NUMA.", | |
6581 | "default" : 0, | |
56122987 | 6582 | "optional" : 1, |
7aacca6f | 6583 | "type" : "boolean" |
56122987 | 6584 | }, |
7aacca6f DM |
6585 | "smbios1" : { |
6586 | "description" : "Specify SMBIOS type 1 fields.", | |
56122987 | 6587 | "optional" : 1, |
7aacca6f DM |
6588 | "type" : "string", |
6589 | "format" : "pve-qm-smbios1", | |
6590 | "maxLength" : 256 | |
56122987 | 6591 | }, |
7aacca6f DM |
6592 | "vmid" : { |
6593 | "description" : "The (unique) ID of the VM.", | |
6594 | "type" : "integer", | |
6595 | "format" : "pve-vmid", | |
6596 | "minimum" : 1 | |
6597 | } | |
6598 | }, | |
6599 | "additionalProperties" : 0 | |
6600 | }, | |
6601 | "name" : "update_vm_async", | |
6602 | "protected" : 1 | |
6603 | }, | |
6604 | "GET" : { | |
6605 | "returns" : { | |
6606 | "type" : "object", | |
6607 | "properties" : { | |
6608 | "digest" : { | |
6609 | "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", | |
56122987 | 6610 | "type" : "string" |
7aacca6f DM |
6611 | } |
6612 | } | |
6613 | }, | |
6614 | "method" : "GET", | |
6615 | "name" : "vm_config", | |
6616 | "parameters" : { | |
6617 | "properties" : { | |
6618 | "node" : { | |
6619 | "description" : "The cluster node name.", | |
6620 | "type" : "string", | |
6621 | "format" : "pve-node" | |
56122987 | 6622 | }, |
7aacca6f DM |
6623 | "current" : { |
6624 | "description" : "Get current values (instead of pending values).", | |
56122987 | 6625 | "optional" : 1, |
7aacca6f DM |
6626 | "type" : "boolean", |
6627 | "default" : 0 | |
56122987 DM |
6628 | }, |
6629 | "vmid" : { | |
56122987 DM |
6630 | "format" : "pve-vmid", |
6631 | "minimum" : 1, | |
7aacca6f | 6632 | "type" : "integer", |
56122987 | 6633 | "description" : "The (unique) ID of the VM." |
56122987 DM |
6634 | } |
6635 | }, | |
6636 | "additionalProperties" : 0 | |
6637 | }, | |
7aacca6f DM |
6638 | "permissions" : { |
6639 | "check" : [ | |
6640 | "perm", | |
6641 | "/vms/{vmid}", | |
6642 | [ | |
6643 | "VM.Audit" | |
6644 | ] | |
6645 | ] | |
56122987 | 6646 | }, |
7aacca6f DM |
6647 | "proxyto" : "node", |
6648 | "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API)." | |
56122987 | 6649 | }, |
7aacca6f | 6650 | "PUT" : { |
56122987 | 6651 | "parameters" : { |
7aacca6f | 6652 | "additionalProperties" : 0, |
56122987 | 6653 | "properties" : { |
7aacca6f DM |
6654 | "numa" : { |
6655 | "description" : "Enable/disable NUMA.", | |
56122987 | 6656 | "type" : "boolean", |
7aacca6f DM |
6657 | "optional" : 1, |
6658 | "default" : 0 | |
6659 | }, | |
6660 | "cpuunits" : { | |
6661 | "type" : "integer", | |
6662 | "optional" : 1, | |
6663 | "maximum" : 500000, | |
6664 | "default" : 1000, | |
6665 | "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", | |
6666 | "minimum" : 0 | |
6667 | }, | |
6668 | "vmid" : { | |
6669 | "type" : "integer", | |
6670 | "description" : "The (unique) ID of the VM.", | |
6671 | "format" : "pve-vmid", | |
6672 | "minimum" : 1 | |
6673 | }, | |
6674 | "smbios1" : { | |
6675 | "format" : "pve-qm-smbios1", | |
6676 | "maxLength" : 256, | |
6677 | "type" : "string", | |
6678 | "optional" : 1, | |
6679 | "description" : "Specify SMBIOS type 1 fields." | |
6680 | }, | |
6681 | "bootdisk" : { | |
6682 | "format" : "pve-qm-bootdisk", | |
6683 | "description" : "Enable booting from specified disk.", | |
6684 | "pattern" : "(ide|sata|scsi|virtio)\\d+", | |
6685 | "type" : "string", | |
56122987 DM |
6686 | "optional" : 1 |
6687 | }, | |
7aacca6f DM |
6688 | "revert" : { |
6689 | "format" : "pve-configid-list", | |
6690 | "description" : "Revert a pending change.", | |
6691 | "optional" : 1, | |
6692 | "type" : "string" | |
6693 | }, | |
6694 | "reboot" : { | |
6695 | "description" : "Allow reboot. If set to '0' the VM exit on reboot.", | |
6696 | "default" : 1, | |
6697 | "optional" : 1, | |
6698 | "type" : "boolean" | |
6699 | }, | |
6700 | "lock" : { | |
6701 | "enum" : [ | |
6702 | "migrate", | |
6703 | "backup", | |
6704 | "snapshot", | |
6705 | "rollback" | |
6706 | ], | |
6707 | "description" : "Lock/unlock the VM.", | |
56122987 | 6708 | "optional" : 1, |
7aacca6f DM |
6709 | "type" : "string" |
6710 | }, | |
6711 | "hostpci[n]" : { | |
6712 | "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", | |
56122987 | 6713 | "type" : "string", |
7aacca6f DM |
6714 | "optional" : 1, |
6715 | "format" : "pve-qm-hostpci" | |
56122987 | 6716 | }, |
7aacca6f DM |
6717 | "keyboard" : { |
6718 | "enum" : [ | |
6719 | "da", | |
6720 | "sv", | |
6721 | "en-gb", | |
6722 | "lt", | |
6723 | "is", | |
6724 | "mk", | |
6725 | "pl", | |
6726 | "hu", | |
6727 | "fr-be", | |
6728 | "pt-br", | |
6729 | "de-ch", | |
6730 | "nl", | |
6731 | "no", | |
6732 | "tr", | |
6733 | "sl", | |
6734 | "de", | |
6735 | "fr-ca", | |
6736 | "ja", | |
6737 | "es", | |
6738 | "it", | |
6739 | "pt", | |
6740 | "fr", | |
6741 | "en-us", | |
6742 | "fi", | |
6743 | "fr-ch" | |
6744 | ], | |
6745 | "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", | |
56122987 | 6746 | "optional" : 1, |
7aacca6f DM |
6747 | "type" : "string", |
6748 | "default" : "en-us" | |
56122987 | 6749 | }, |
7aacca6f DM |
6750 | "hotplug" : { |
6751 | "format" : "pve-hotplug-features", | |
6752 | "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", | |
6753 | "default" : "network,disk,usb", | |
56122987 | 6754 | "optional" : 1, |
56122987 DM |
6755 | "type" : "string" |
6756 | }, | |
6757 | "ide[n]" : { | |
6758 | "type" : "string", | |
7aacca6f DM |
6759 | "optional" : 1, |
6760 | "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", | |
56122987 | 6761 | "format" : { |
7aacca6f DM |
6762 | "mbps_max" : { |
6763 | "format_description" : "mbps", | |
6764 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
56122987 | 6765 | "optional" : 1, |
7aacca6f | 6766 | "type" : "number" |
56122987 | 6767 | }, |
7aacca6f DM |
6768 | "size" : { |
6769 | "format" : "disk-size", | |
56122987 | 6770 | "optional" : 1, |
7aacca6f DM |
6771 | "type" : "string", |
6772 | "description" : "Disk size. This is purely informational and has no effect." | |
56122987 | 6773 | }, |
7aacca6f DM |
6774 | "iops_rd" : { |
6775 | "format_description" : "iops", | |
6776 | "type" : "integer", | |
56122987 | 6777 | "optional" : 1, |
7aacca6f | 6778 | "description" : "Maximum read I/O speed in operations per second." |
56122987 | 6779 | }, |
7aacca6f | 6780 | "bps_wr" : { |
56122987 | 6781 | "format_description" : "bps", |
7aacca6f DM |
6782 | "description" : "Maximum write speed speed in bytes per second.", |
6783 | "type" : "integer", | |
6784 | "optional" : 1 | |
6785 | }, | |
6786 | "mbps_rd_max" : { | |
56122987 | 6787 | "optional" : 1, |
7aacca6f DM |
6788 | "type" : "number", |
6789 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", | |
6790 | "format_description" : "mbps" | |
56122987 | 6791 | }, |
7aacca6f DM |
6792 | "discard" : { |
6793 | "format_description" : "ignore|on", | |
6794 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
56122987 | 6795 | "enum" : [ |
7aacca6f DM |
6796 | "ignore", |
6797 | "on" | |
56122987 | 6798 | ], |
7aacca6f DM |
6799 | "type" : "string", |
6800 | "optional" : 1 | |
6801 | }, | |
6802 | "bps" : { | |
6803 | "type" : "integer", | |
56122987 | 6804 | "optional" : 1, |
7aacca6f DM |
6805 | "description" : "Maximum r/w speed speed in bytes per second.", |
6806 | "format_description" : "bps" | |
6807 | }, | |
6808 | "mbps_wr_max" : { | |
6809 | "format_description" : "mbps", | |
6810 | "type" : "number", | |
6811 | "optional" : 1, | |
6812 | "description" : "Maximum unthrottled write pool speed in megabytes per second." | |
6813 | }, | |
6814 | "format" : { | |
6815 | "format_description" : "drive format", | |
6816 | "enum" : [ | |
6817 | "raw", | |
6818 | "cow", | |
6819 | "qcow", | |
6820 | "qed", | |
6821 | "qcow2", | |
6822 | "vmdk", | |
6823 | "cloop" | |
6824 | ], | |
6825 | "description" : "The drive's backing file's data format.", | |
6826 | "type" : "string", | |
6827 | "optional" : 1 | |
56122987 DM |
6828 | }, |
6829 | "iops_rd_max" : { | |
6830 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
7aacca6f | 6831 | "type" : "integer", |
56122987 | 6832 | "optional" : 1, |
7aacca6f | 6833 | "format_description" : "iops" |
56122987 | 6834 | }, |
7aacca6f DM |
6835 | "serial" : { |
6836 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
6837 | "optional" : 1, | |
6838 | "type" : "string", | |
6839 | "format" : "urlencoded", | |
6840 | "maxLength" : 60, | |
6841 | "format_description" : "serial" | |
56122987 | 6842 | }, |
7aacca6f DM |
6843 | "heads" : { |
6844 | "format_description" : "count", | |
56122987 | 6845 | "optional" : 1, |
7aacca6f DM |
6846 | "type" : "integer", |
6847 | "description" : "Force the drive's physical geometry to have a specific head count." | |
6848 | }, | |
6849 | "cache" : { | |
6850 | "format_description" : "none|writethrough|writeback|unsafe|directsync", | |
6851 | "enum" : [ | |
6852 | "none", | |
6853 | "writethrough", | |
6854 | "writeback", | |
6855 | "unsafe", | |
6856 | "directsync" | |
6857 | ], | |
6858 | "description" : "The drive's cache mode", | |
6859 | "type" : "string", | |
6860 | "optional" : 1 | |
6861 | }, | |
6862 | "rerror" : { | |
56122987 | 6863 | "format_description" : "ignore|report|stop", |
7aacca6f | 6864 | "description" : "Read error action.", |
56122987 DM |
6865 | "enum" : [ |
6866 | "ignore", | |
6867 | "report", | |
6868 | "stop" | |
6869 | ], | |
7aacca6f | 6870 | "optional" : 1, |
56122987 DM |
6871 | "type" : "string" |
6872 | }, | |
7aacca6f | 6873 | "detect_zeroes" : { |
56122987 | 6874 | "optional" : 1, |
7aacca6f DM |
6875 | "type" : "boolean", |
6876 | "description" : "Controls whether to detect and try to optimize writes of zeroes." | |
56122987 | 6877 | }, |
7aacca6f | 6878 | "iops_wr" : { |
56122987 | 6879 | "optional" : 1, |
7aacca6f DM |
6880 | "type" : "integer", |
6881 | "description" : "Maximum write I/O speed in operations per second.", | |
6882 | "format_description" : "iops" | |
6883 | }, | |
6884 | "secs" : { | |
6885 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
6886 | "type" : "integer", | |
6887 | "optional" : 1, | |
6888 | "format_description" : "count" | |
6889 | }, | |
6890 | "media" : { | |
6891 | "format_description" : "cdrom|disk", | |
56122987 | 6892 | "enum" : [ |
7aacca6f DM |
6893 | "cdrom", |
6894 | "disk" | |
56122987 | 6895 | ], |
7aacca6f DM |
6896 | "description" : "The drive's media type.", |
6897 | "optional" : 1, | |
6898 | "type" : "string", | |
6899 | "default" : "disk" | |
56122987 | 6900 | }, |
7aacca6f DM |
6901 | "iops_max" : { |
6902 | "type" : "integer", | |
6903 | "optional" : 1, | |
6904 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", | |
6905 | "format_description" : "iops" | |
6906 | }, | |
6907 | "snapshot" : { | |
6908 | "format_description" : "on|off", | |
6909 | "description" : "Whether the drive should be included when making snapshots.", | |
6910 | "type" : "boolean", | |
6911 | "optional" : 1 | |
6912 | }, | |
6913 | "mbps" : { | |
6914 | "format_description" : "mbps", | |
6915 | "type" : "number", | |
6916 | "optional" : 1, | |
6917 | "description" : "Maximum r/w speed speed in megabytes per second." | |
6918 | }, | |
6919 | "cyls" : { | |
6920 | "optional" : 1, | |
6921 | "type" : "integer", | |
6922 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", | |
6923 | "format_description" : "count" | |
6924 | }, | |
6925 | "bps_rd" : { | |
6926 | "type" : "integer", | |
6927 | "optional" : 1, | |
6928 | "description" : "Maximum read speed speed in bytes per second.", | |
6929 | "format_description" : "bps" | |
6930 | }, | |
6931 | "volume" : { | |
6932 | "alias" : "file" | |
6933 | }, | |
6934 | "trans" : { | |
6935 | "optional" : 1, | |
6936 | "type" : "string", | |
6937 | "description" : "Force disk geometry bios translation mode.", | |
56122987 | 6938 | "enum" : [ |
7aacca6f DM |
6939 | "none", |
6940 | "lba", | |
6941 | "auto" | |
56122987 | 6942 | ], |
7aacca6f | 6943 | "format_description" : "none|lba|auto" |
56122987 | 6944 | }, |
7aacca6f | 6945 | "model" : { |
56122987 | 6946 | "format" : "urlencoded", |
7aacca6f DM |
6947 | "maxLength" : 120, |
6948 | "format_description" : "model", | |
56122987 DM |
6949 | "type" : "string", |
6950 | "optional" : 1, | |
7aacca6f | 6951 | "description" : "The drive's reported model name, url-encoded, up to 40 bytes long." |
56122987 | 6952 | }, |
7aacca6f DM |
6953 | "iops" : { |
6954 | "format_description" : "iops", | |
56122987 | 6955 | "optional" : 1, |
7aacca6f DM |
6956 | "type" : "integer", |
6957 | "description" : "Maximum r/w I/O speed in operations per second." | |
56122987 DM |
6958 | }, |
6959 | "file" : { | |
7aacca6f | 6960 | "description" : "The drive's backing volume.", |
56122987 DM |
6961 | "type" : "string", |
6962 | "format" : "pve-volume-id-or-qm-path", | |
56122987 | 6963 | "format_description" : "volume", |
7aacca6f | 6964 | "default_key" : 1 |
56122987 | 6965 | }, |
7aacca6f DM |
6966 | "mbps_wr" : { |
6967 | "format_description" : "mbps", | |
56122987 | 6968 | "optional" : 1, |
7aacca6f DM |
6969 | "type" : "number", |
6970 | "description" : "Maximum write speed speed in megabytes per second." | |
56122987 | 6971 | }, |
7aacca6f DM |
6972 | "mbps_rd" : { |
6973 | "description" : "Maximum read speed speed in megabytes per second.", | |
56122987 DM |
6974 | "type" : "number", |
6975 | "optional" : 1, | |
7aacca6f | 6976 | "format_description" : "mbps" |
56122987 | 6977 | }, |
7aacca6f DM |
6978 | "backup" : { |
6979 | "format_description" : "on|off", | |
56122987 | 6980 | "optional" : 1, |
7aacca6f DM |
6981 | "type" : "boolean", |
6982 | "description" : "Whether the drive should be included when making backups." | |
56122987 DM |
6983 | }, |
6984 | "iops_wr_max" : { | |
6985 | "format_description" : "iops", | |
7aacca6f | 6986 | "type" : "integer", |
56122987 | 6987 | "optional" : 1, |
7aacca6f | 6988 | "description" : "Maximum unthrottled write I/O pool speed in operations per second." |
56122987 | 6989 | }, |
7aacca6f DM |
6990 | "werror" : { |
6991 | "enum" : [ | |
6992 | "enospc", | |
6993 | "ignore", | |
6994 | "report", | |
6995 | "stop" | |
6996 | ], | |
6997 | "description" : "Write error action.", | |
56122987 | 6998 | "type" : "string", |
56122987 | 6999 | "optional" : 1, |
7aacca6f | 7000 | "format_description" : "enospc|ignore|report|stop" |
56122987 DM |
7001 | }, |
7002 | "aio" : { | |
7aacca6f | 7003 | "format_description" : "native|threads", |
56122987 DM |
7004 | "enum" : [ |
7005 | "native", | |
7006 | "threads" | |
7007 | ], | |
56122987 | 7008 | "description" : "AIO type to use.", |
7aacca6f | 7009 | "type" : "string", |
56122987 | 7010 | "optional" : 1 |
7aacca6f DM |
7011 | } |
7012 | } | |
7013 | }, | |
7014 | "watchdog" : { | |
7015 | "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", | |
7016 | "optional" : 1, | |
7017 | "type" : "string", | |
7018 | "format" : "pve-qm-watchdog" | |
7019 | }, | |
7020 | "acpi" : { | |
7021 | "default" : 1, | |
7022 | "optional" : 1, | |
7023 | "type" : "boolean", | |
7024 | "description" : "Enable/disable ACPI." | |
7025 | }, | |
7026 | "migrate_downtime" : { | |
7027 | "minimum" : 0, | |
7028 | "type" : "number", | |
7029 | "optional" : 1, | |
7030 | "default" : 0.1, | |
7031 | "description" : "Set maximum tolerated downtime (in seconds) for migrations." | |
7032 | }, | |
7033 | "parallel[n]" : { | |
7034 | "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", | |
7035 | "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", | |
7036 | "type" : "string", | |
7037 | "optional" : 1 | |
7038 | }, | |
7039 | "description" : { | |
7040 | "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", | |
7041 | "type" : "string", | |
7042 | "optional" : 1 | |
7043 | }, | |
7044 | "vcpus" : { | |
7045 | "default" : 0, | |
7046 | "optional" : 1, | |
7047 | "type" : "integer", | |
7048 | "description" : "Number of hotplugged vcpus.", | |
7049 | "minimum" : 1 | |
7050 | }, | |
7051 | "serial[n]" : { | |
7052 | "optional" : 1, | |
7053 | "type" : "string", | |
7054 | "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", | |
7055 | "pattern" : "(/dev/.+|socket)" | |
7056 | }, | |
7057 | "digest" : { | |
7058 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
7059 | "type" : "string", | |
7060 | "optional" : 1, | |
7061 | "maxLength" : 40 | |
7062 | }, | |
7063 | "startup" : { | |
7064 | "type" : "string", | |
7065 | "optional" : 1, | |
7066 | "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", | |
7067 | "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", | |
7068 | "format" : "pve-startup-order" | |
7069 | }, | |
7070 | "agent" : { | |
7071 | "type" : "boolean", | |
7072 | "optional" : 1, | |
7073 | "default" : 0, | |
7074 | "description" : "Enable/disable Qemu GuestAgent." | |
7075 | }, | |
7076 | "sockets" : { | |
7077 | "minimum" : 1, | |
7078 | "default" : 1, | |
7079 | "optional" : 1, | |
7080 | "type" : "integer", | |
7081 | "description" : "The number of CPU sockets." | |
7082 | }, | |
7083 | "onboot" : { | |
7084 | "description" : "Specifies whether a VM will be started during system bootup.", | |
7085 | "type" : "boolean", | |
7086 | "optional" : 1, | |
7087 | "default" : 0 | |
7088 | }, | |
7089 | "freeze" : { | |
7090 | "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", | |
7091 | "optional" : 1, | |
7092 | "type" : "boolean" | |
7093 | }, | |
7094 | "cores" : { | |
7095 | "default" : 1, | |
7096 | "type" : "integer", | |
7097 | "optional" : 1, | |
7098 | "description" : "The number of cores per socket.", | |
7099 | "minimum" : 1 | |
7100 | }, | |
7101 | "delete" : { | |
7102 | "description" : "A list of settings you want to delete.", | |
7103 | "optional" : 1, | |
7104 | "type" : "string", | |
7105 | "format" : "pve-configid-list" | |
7106 | }, | |
7107 | "name" : { | |
7108 | "format" : "dns-name", | |
7109 | "description" : "Set a name for the VM. Only used on the configuration web interface.", | |
7110 | "optional" : 1, | |
7111 | "type" : "string" | |
7112 | }, | |
7113 | "smp" : { | |
7114 | "description" : "The number of CPUs. Please use option -sockets instead.", | |
7115 | "default" : 1, | |
7116 | "optional" : 1, | |
7117 | "type" : "integer", | |
7118 | "minimum" : 1 | |
7119 | }, | |
7120 | "machine" : { | |
7121 | "maxLength" : 40, | |
7122 | "type" : "string", | |
7123 | "optional" : 1, | |
7124 | "description" : "Specific the Qemu machine type.", | |
7125 | "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)" | |
7126 | }, | |
7127 | "net[n]" : { | |
7128 | "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n", | |
7129 | "optional" : 1, | |
7130 | "type" : "string", | |
7131 | "format" : "pve-qm-net" | |
7132 | }, | |
7133 | "vga" : { | |
7134 | "type" : "string", | |
7135 | "optional" : 1, | |
7136 | "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", | |
7137 | "enum" : [ | |
7138 | "std", | |
7139 | "cirrus", | |
7140 | "vmware", | |
7141 | "qxl", | |
7142 | "serial0", | |
7143 | "serial1", | |
7144 | "serial2", | |
7145 | "serial3", | |
7146 | "qxl2", | |
7147 | "qxl3", | |
7148 | "qxl4" | |
7149 | ] | |
7150 | }, | |
7151 | "virtio[n]" : { | |
7152 | "type" : "string", | |
7153 | "optional" : 1, | |
7154 | "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", | |
7155 | "format" : { | |
7156 | "bps_wr" : { | |
7157 | "format_description" : "bps", | |
7158 | "description" : "Maximum write speed speed in bytes per second.", | |
7159 | "optional" : 1, | |
7160 | "type" : "integer" | |
56122987 | 7161 | }, |
7aacca6f DM |
7162 | "mbps_max" : { |
7163 | "type" : "number", | |
7164 | "optional" : 1, | |
7165 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
7166 | "format_description" : "mbps" | |
7167 | }, | |
7168 | "iops_rd" : { | |
7169 | "format_description" : "iops", | |
7170 | "optional" : 1, | |
7171 | "type" : "integer", | |
7172 | "description" : "Maximum read I/O speed in operations per second." | |
7173 | }, | |
7174 | "size" : { | |
7175 | "optional" : 1, | |
56122987 | 7176 | "type" : "string", |
7aacca6f DM |
7177 | "description" : "Disk size. This is purely informational and has no effect.", |
7178 | "format" : "disk-size" | |
7179 | }, | |
7180 | "mbps_wr_max" : { | |
7181 | "optional" : 1, | |
7182 | "type" : "number", | |
7183 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", | |
7184 | "format_description" : "mbps" | |
7185 | }, | |
7186 | "bps" : { | |
7187 | "format_description" : "bps", | |
7188 | "description" : "Maximum r/w speed speed in bytes per second.", | |
7189 | "optional" : 1, | |
7190 | "type" : "integer" | |
7191 | }, | |
7192 | "iops_rd_max" : { | |
7193 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
7194 | "type" : "integer", | |
7195 | "optional" : 1, | |
7196 | "format_description" : "iops" | |
7197 | }, | |
7198 | "format" : { | |
7199 | "format_description" : "drive format", | |
7200 | "description" : "The drive's backing file's data format.", | |
56122987 DM |
7201 | "enum" : [ |
7202 | "raw", | |
7203 | "cow", | |
7204 | "qcow", | |
7205 | "qed", | |
7206 | "qcow2", | |
7207 | "vmdk", | |
7208 | "cloop" | |
7209 | ], | |
7210 | "optional" : 1, | |
7aacca6f | 7211 | "type" : "string" |
56122987 | 7212 | }, |
7aacca6f | 7213 | "heads" : { |
56122987 | 7214 | "optional" : 1, |
7aacca6f DM |
7215 | "type" : "integer", |
7216 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
7217 | "format_description" : "count" | |
56122987 | 7218 | }, |
7aacca6f | 7219 | "serial" : { |
56122987 | 7220 | "optional" : 1, |
7aacca6f DM |
7221 | "type" : "string", |
7222 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
7223 | "format_description" : "serial", | |
56122987 | 7224 | "format" : "urlencoded", |
7aacca6f DM |
7225 | "maxLength" : 60 |
7226 | }, | |
7227 | "discard" : { | |
56122987 | 7228 | "type" : "string", |
7aacca6f DM |
7229 | "optional" : 1, |
7230 | "enum" : [ | |
7231 | "ignore", | |
7232 | "on" | |
7233 | ], | |
7234 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
7235 | "format_description" : "ignore|on" | |
56122987 | 7236 | }, |
7aacca6f DM |
7237 | "mbps_rd_max" : { |
7238 | "type" : "number", | |
56122987 | 7239 | "optional" : 1, |
7aacca6f DM |
7240 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", |
7241 | "format_description" : "mbps" | |
7242 | }, | |
7243 | "media" : { | |
56122987 DM |
7244 | "format_description" : "cdrom|disk", |
7245 | "description" : "The drive's media type.", | |
7246 | "enum" : [ | |
7247 | "cdrom", | |
7248 | "disk" | |
7249 | ], | |
7aacca6f | 7250 | "default" : "disk", |
56122987 | 7251 | "optional" : 1, |
7aacca6f | 7252 | "type" : "string" |
56122987 | 7253 | }, |
7aacca6f DM |
7254 | "iothread" : { |
7255 | "format_description" : "off|on", | |
7256 | "description" : "Whether to use iothreads for this drive", | |
7257 | "type" : "boolean", | |
56122987 DM |
7258 | "optional" : 1 |
7259 | }, | |
7aacca6f DM |
7260 | "rerror" : { |
7261 | "format_description" : "ignore|report|stop", | |
56122987 | 7262 | "optional" : 1, |
7aacca6f DM |
7263 | "type" : "string", |
7264 | "description" : "Read error action.", | |
7265 | "enum" : [ | |
7266 | "ignore", | |
7267 | "report", | |
7268 | "stop" | |
7269 | ] | |
56122987 | 7270 | }, |
7aacca6f DM |
7271 | "cache" : { |
7272 | "format_description" : "none|writethrough|writeback|unsafe|directsync", | |
56122987 | 7273 | "optional" : 1, |
56122987 | 7274 | "type" : "string", |
7aacca6f | 7275 | "description" : "The drive's cache mode", |
56122987 | 7276 | "enum" : [ |
7aacca6f DM |
7277 | "none", |
7278 | "writethrough", | |
7279 | "writeback", | |
7280 | "unsafe", | |
7281 | "directsync" | |
56122987 DM |
7282 | ] |
7283 | }, | |
7aacca6f DM |
7284 | "secs" : { |
7285 | "format_description" : "count", | |
7286 | "type" : "integer", | |
56122987 | 7287 | "optional" : 1, |
7aacca6f | 7288 | "description" : "Force the drive's physical geometry to have a specific sector count." |
56122987 | 7289 | }, |
7aacca6f DM |
7290 | "iops_wr" : { |
7291 | "format_description" : "iops", | |
56122987 | 7292 | "type" : "integer", |
56122987 | 7293 | "optional" : 1, |
7aacca6f | 7294 | "description" : "Maximum write I/O speed in operations per second." |
56122987 | 7295 | }, |
7aacca6f DM |
7296 | "detect_zeroes" : { |
7297 | "description" : "Controls whether to detect and try to optimize writes of zeroes.", | |
7298 | "type" : "boolean", | |
7299 | "optional" : 1 | |
56122987 | 7300 | }, |
7aacca6f | 7301 | "iops_max" : { |
56122987 | 7302 | "optional" : 1, |
56122987 | 7303 | "type" : "integer", |
7aacca6f DM |
7304 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", |
7305 | "format_description" : "iops" | |
56122987 DM |
7306 | }, |
7307 | "snapshot" : { | |
56122987 | 7308 | "format_description" : "on|off", |
7aacca6f DM |
7309 | "description" : "Whether the drive should be included when making snapshots.", |
7310 | "type" : "boolean", | |
7311 | "optional" : 1 | |
56122987 | 7312 | }, |
7aacca6f | 7313 | "bps_rd" : { |
56122987 | 7314 | "format_description" : "bps", |
56122987 | 7315 | "optional" : 1, |
7aacca6f DM |
7316 | "type" : "integer", |
7317 | "description" : "Maximum read speed speed in bytes per second." | |
56122987 | 7318 | }, |
7aacca6f | 7319 | "cyls" : { |
56122987 DM |
7320 | "type" : "integer", |
7321 | "optional" : 1, | |
7aacca6f DM |
7322 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", |
7323 | "format_description" : "count" | |
56122987 | 7324 | }, |
7aacca6f DM |
7325 | "mbps" : { |
7326 | "format_description" : "mbps", | |
56122987 | 7327 | "optional" : 1, |
7aacca6f DM |
7328 | "type" : "number", |
7329 | "description" : "Maximum r/w speed speed in megabytes per second." | |
56122987 DM |
7330 | }, |
7331 | "volume" : { | |
7332 | "alias" : "file" | |
7333 | }, | |
56122987 | 7334 | "trans" : { |
7aacca6f | 7335 | "description" : "Force disk geometry bios translation mode.", |
56122987 DM |
7336 | "enum" : [ |
7337 | "none", | |
7338 | "lba", | |
7339 | "auto" | |
7340 | ], | |
7341 | "optional" : 1, | |
7aacca6f DM |
7342 | "type" : "string", |
7343 | "format_description" : "none|lba|auto" | |
56122987 | 7344 | }, |
7aacca6f DM |
7345 | "mbps_rd" : { |
7346 | "type" : "number", | |
56122987 | 7347 | "optional" : 1, |
7aacca6f DM |
7348 | "description" : "Maximum read speed speed in megabytes per second.", |
7349 | "format_description" : "mbps" | |
56122987 | 7350 | }, |
7aacca6f DM |
7351 | "mbps_wr" : { |
7352 | "type" : "number", | |
56122987 | 7353 | "optional" : 1, |
7aacca6f DM |
7354 | "description" : "Maximum write speed speed in megabytes per second.", |
7355 | "format_description" : "mbps" | |
56122987 DM |
7356 | }, |
7357 | "file" : { | |
7358 | "description" : "The drive's backing volume.", | |
7aacca6f | 7359 | "type" : "string", |
56122987 | 7360 | "format" : "pve-volume-id-or-qm-path", |
7aacca6f DM |
7361 | "format_description" : "volume", |
7362 | "default_key" : 1 | |
56122987 | 7363 | }, |
7aacca6f DM |
7364 | "iops" : { |
7365 | "format_description" : "iops", | |
7366 | "type" : "integer", | |
56122987 | 7367 | "optional" : 1, |
7aacca6f | 7368 | "description" : "Maximum r/w I/O speed in operations per second." |
56122987 | 7369 | }, |
7aacca6f | 7370 | "werror" : { |
56122987 | 7371 | "optional" : 1, |
56122987 | 7372 | "type" : "string", |
56122987 | 7373 | "enum" : [ |
7aacca6f | 7374 | "enospc", |
56122987 | 7375 | "ignore", |
7aacca6f DM |
7376 | "report", |
7377 | "stop" | |
7378 | ], | |
7379 | "description" : "Write error action.", | |
7380 | "format_description" : "enospc|ignore|report|stop" | |
56122987 DM |
7381 | }, |
7382 | "aio" : { | |
56122987 | 7383 | "format_description" : "native|threads", |
7aacca6f DM |
7384 | "optional" : 1, |
7385 | "type" : "string", | |
7386 | "description" : "AIO type to use.", | |
56122987 DM |
7387 | "enum" : [ |
7388 | "native", | |
7389 | "threads" | |
7aacca6f | 7390 | ] |
56122987 DM |
7391 | }, |
7392 | "iops_wr_max" : { | |
7aacca6f | 7393 | "type" : "integer", |
56122987 DM |
7394 | "optional" : 1, |
7395 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", | |
7aacca6f | 7396 | "format_description" : "iops" |
56122987 | 7397 | }, |
7aacca6f DM |
7398 | "backup" : { |
7399 | "type" : "boolean", | |
56122987 | 7400 | "optional" : 1, |
7aacca6f DM |
7401 | "description" : "Whether the drive should be included when making backups.", |
7402 | "format_description" : "on|off" | |
56122987 | 7403 | } |
7aacca6f | 7404 | } |
56122987 | 7405 | }, |
7aacca6f DM |
7406 | "balloon" : { |
7407 | "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", | |
56122987 | 7408 | "type" : "integer", |
56122987 | 7409 | "optional" : 1, |
7aacca6f | 7410 | "minimum" : 0 |
56122987 | 7411 | }, |
7aacca6f | 7412 | "scsi[n]" : { |
56122987 | 7413 | "optional" : 1, |
56122987 | 7414 | "type" : "string", |
7aacca6f | 7415 | "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).", |
56122987 | 7416 | "format" : { |
7aacca6f DM |
7417 | "heads" : { |
7418 | "optional" : 1, | |
7419 | "type" : "integer", | |
7420 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
7421 | "format_description" : "count" | |
56122987 | 7422 | }, |
7aacca6f DM |
7423 | "serial" : { |
7424 | "optional" : 1, | |
56122987 | 7425 | "type" : "string", |
7aacca6f DM |
7426 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", |
7427 | "format_description" : "serial", | |
7428 | "maxLength" : 60, | |
7429 | "format" : "urlencoded" | |
7430 | }, | |
7431 | "iops_rd_max" : { | |
7432 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
56122987 | 7433 | "optional" : 1, |
7aacca6f DM |
7434 | "type" : "integer", |
7435 | "format_description" : "iops" | |
56122987 DM |
7436 | }, |
7437 | "bps" : { | |
56122987 | 7438 | "optional" : 1, |
7aacca6f DM |
7439 | "type" : "integer", |
7440 | "description" : "Maximum r/w speed speed in bytes per second.", | |
7441 | "format_description" : "bps" | |
56122987 DM |
7442 | }, |
7443 | "mbps_wr_max" : { | |
7444 | "type" : "number", | |
7445 | "optional" : 1, | |
7aacca6f DM |
7446 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", |
7447 | "format_description" : "mbps" | |
56122987 | 7448 | }, |
7aacca6f DM |
7449 | "format" : { |
7450 | "enum" : [ | |
7451 | "raw", | |
7452 | "cow", | |
7453 | "qcow", | |
7454 | "qed", | |
7455 | "qcow2", | |
7456 | "vmdk", | |
7457 | "cloop" | |
7458 | ], | |
7459 | "description" : "The drive's backing file's data format.", | |
7460 | "type" : "string", | |
56122987 | 7461 | "optional" : 1, |
7aacca6f | 7462 | "format_description" : "drive format" |
56122987 | 7463 | }, |
7aacca6f DM |
7464 | "discard" : { |
7465 | "format_description" : "ignore|on", | |
56122987 | 7466 | "type" : "string", |
56122987 | 7467 | "optional" : 1, |
7aacca6f | 7468 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", |
56122987 DM |
7469 | "enum" : [ |
7470 | "ignore", | |
7aacca6f | 7471 | "on" |
56122987 DM |
7472 | ] |
7473 | }, | |
7aacca6f DM |
7474 | "mbps_rd_max" : { |
7475 | "format_description" : "mbps", | |
7476 | "optional" : 1, | |
7477 | "type" : "number", | |
7478 | "description" : "Maximum unthrottled read pool speed in megabytes per second." | |
56122987 DM |
7479 | }, |
7480 | "bps_wr" : { | |
56122987 | 7481 | "format_description" : "bps", |
7aacca6f DM |
7482 | "description" : "Maximum write speed speed in bytes per second.", |
7483 | "type" : "integer", | |
56122987 DM |
7484 | "optional" : 1 |
7485 | }, | |
7aacca6f DM |
7486 | "iops_rd" : { |
7487 | "format_description" : "iops", | |
7488 | "type" : "integer", | |
7489 | "optional" : 1, | |
7490 | "description" : "Maximum read I/O speed in operations per second." | |
56122987 | 7491 | }, |
7aacca6f DM |
7492 | "size" : { |
7493 | "description" : "Disk size. This is purely informational and has no effect.", | |
56122987 | 7494 | "optional" : 1, |
7aacca6f DM |
7495 | "type" : "string", |
7496 | "format" : "disk-size" | |
56122987 DM |
7497 | }, |
7498 | "mbps_max" : { | |
7499 | "format_description" : "mbps", | |
7aacca6f | 7500 | "type" : "number", |
56122987 | 7501 | "optional" : 1, |
7aacca6f | 7502 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second." |
56122987 | 7503 | }, |
7aacca6f | 7504 | "snapshot" : { |
56122987 | 7505 | "optional" : 1, |
7aacca6f DM |
7506 | "type" : "boolean", |
7507 | "description" : "Whether the drive should be included when making snapshots.", | |
7508 | "format_description" : "on|off" | |
56122987 DM |
7509 | }, |
7510 | "iops_max" : { | |
7aacca6f DM |
7511 | "format_description" : "iops", |
7512 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", | |
56122987 | 7513 | "type" : "integer", |
7aacca6f DM |
7514 | "optional" : 1 |
7515 | }, | |
7516 | "iothread" : { | |
7517 | "format_description" : "off|on", | |
7518 | "type" : "boolean", | |
56122987 | 7519 | "optional" : 1, |
7aacca6f | 7520 | "description" : "Whether to use iothreads for this drive" |
56122987 | 7521 | }, |
7aacca6f DM |
7522 | "media" : { |
7523 | "format_description" : "cdrom|disk", | |
56122987 | 7524 | "enum" : [ |
7aacca6f DM |
7525 | "cdrom", |
7526 | "disk" | |
56122987 | 7527 | ], |
7aacca6f DM |
7528 | "description" : "The drive's media type.", |
7529 | "type" : "string", | |
56122987 | 7530 | "optional" : 1, |
7aacca6f | 7531 | "default" : "disk" |
56122987 | 7532 | }, |
7aacca6f DM |
7533 | "secs" : { |
7534 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
7535 | "type" : "integer", | |
56122987 | 7536 | "optional" : 1, |
7aacca6f | 7537 | "format_description" : "count" |
56122987 | 7538 | }, |
7aacca6f | 7539 | "iops_wr" : { |
56122987 | 7540 | "format_description" : "iops", |
7aacca6f DM |
7541 | "description" : "Maximum write I/O speed in operations per second.", |
7542 | "optional" : 1, | |
56122987 DM |
7543 | "type" : "integer" |
7544 | }, | |
7aacca6f DM |
7545 | "detect_zeroes" : { |
7546 | "optional" : 1, | |
7547 | "type" : "boolean", | |
7548 | "description" : "Controls whether to detect and try to optimize writes of zeroes." | |
7549 | }, | |
7550 | "cache" : { | |
56122987 | 7551 | "type" : "string", |
56122987 | 7552 | "optional" : 1, |
7aacca6f DM |
7553 | "description" : "The drive's cache mode", |
7554 | "enum" : [ | |
7555 | "none", | |
7556 | "writethrough", | |
7557 | "writeback", | |
7558 | "unsafe", | |
7559 | "directsync" | |
7560 | ], | |
7561 | "format_description" : "none|writethrough|writeback|unsafe|directsync" | |
56122987 | 7562 | }, |
7aacca6f | 7563 | "trans" : { |
56122987 | 7564 | "optional" : 1, |
7aacca6f DM |
7565 | "type" : "string", |
7566 | "description" : "Force disk geometry bios translation mode.", | |
7567 | "enum" : [ | |
7568 | "none", | |
7569 | "lba", | |
7570 | "auto" | |
7571 | ], | |
7572 | "format_description" : "none|lba|auto" | |
56122987 | 7573 | }, |
7aacca6f DM |
7574 | "volume" : { |
7575 | "alias" : "file" | |
7576 | }, | |
7577 | "bps_rd" : { | |
7578 | "format_description" : "bps", | |
56122987 | 7579 | "optional" : 1, |
7aacca6f DM |
7580 | "type" : "integer", |
7581 | "description" : "Maximum read speed speed in bytes per second." | |
56122987 | 7582 | }, |
7aacca6f DM |
7583 | "queues" : { |
7584 | "format_description" : "nbqueues", | |
7585 | "minimum" : 2, | |
7586 | "description" : "Number of queues.", | |
7587 | "optional" : 1, | |
7588 | "type" : "integer" | |
56122987 | 7589 | }, |
7aacca6f DM |
7590 | "cyls" : { |
7591 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", | |
56122987 DM |
7592 | "type" : "integer", |
7593 | "optional" : 1, | |
7aacca6f | 7594 | "format_description" : "count" |
56122987 | 7595 | }, |
7aacca6f DM |
7596 | "mbps" : { |
7597 | "description" : "Maximum r/w speed speed in megabytes per second.", | |
7598 | "type" : "number", | |
56122987 | 7599 | "optional" : 1, |
7aacca6f | 7600 | "format_description" : "mbps" |
56122987 | 7601 | }, |
7aacca6f | 7602 | "aio" : { |
56122987 | 7603 | "optional" : 1, |
7aacca6f | 7604 | "type" : "string", |
56122987 | 7605 | "enum" : [ |
7aacca6f DM |
7606 | "native", |
7607 | "threads" | |
56122987 | 7608 | ], |
7aacca6f DM |
7609 | "description" : "AIO type to use.", |
7610 | "format_description" : "native|threads" | |
56122987 | 7611 | }, |
7aacca6f DM |
7612 | "werror" : { |
7613 | "format_description" : "enospc|ignore|report|stop", | |
7614 | "type" : "string", | |
56122987 | 7615 | "optional" : 1, |
7aacca6f DM |
7616 | "description" : "Write error action.", |
7617 | "enum" : [ | |
7618 | "enospc", | |
7619 | "ignore", | |
7620 | "report", | |
7621 | "stop" | |
7622 | ] | |
56122987 | 7623 | }, |
7aacca6f DM |
7624 | "iops_wr_max" : { |
7625 | "format_description" : "iops", | |
7626 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", | |
7627 | "type" : "integer", | |
7628 | "optional" : 1 | |
7629 | }, | |
7630 | "backup" : { | |
7631 | "format_description" : "on|off", | |
7632 | "description" : "Whether the drive should be included when making backups.", | |
7633 | "type" : "boolean", | |
7634 | "optional" : 1 | |
56122987 DM |
7635 | }, |
7636 | "mbps_rd" : { | |
56122987 | 7637 | "format_description" : "mbps", |
7aacca6f DM |
7638 | "optional" : 1, |
7639 | "type" : "number", | |
56122987 DM |
7640 | "description" : "Maximum read speed speed in megabytes per second." |
7641 | }, | |
7aacca6f DM |
7642 | "mbps_wr" : { |
7643 | "format_description" : "mbps", | |
7644 | "type" : "number", | |
56122987 | 7645 | "optional" : 1, |
7aacca6f | 7646 | "description" : "Maximum write speed speed in megabytes per second." |
56122987 | 7647 | }, |
7aacca6f DM |
7648 | "file" : { |
7649 | "format_description" : "volume", | |
7650 | "format" : "pve-volume-id-or-qm-path", | |
7651 | "default_key" : 1, | |
7652 | "description" : "The drive's backing volume.", | |
7653 | "type" : "string" | |
7654 | }, | |
7655 | "iops" : { | |
56122987 | 7656 | "optional" : 1, |
7aacca6f DM |
7657 | "type" : "integer", |
7658 | "description" : "Maximum r/w I/O speed in operations per second.", | |
7659 | "format_description" : "iops" | |
56122987 | 7660 | } |
7aacca6f | 7661 | } |
56122987 | 7662 | }, |
7aacca6f | 7663 | "protection" : { |
56122987 | 7664 | "default" : 0, |
56122987 | 7665 | "optional" : 1, |
56122987 | 7666 | "type" : "boolean", |
7aacca6f | 7667 | "description" : "Sets the protection flag of the VM. This will prevent the remove operation." |
56122987 | 7668 | }, |
7aacca6f | 7669 | "usb[n]" : { |
56122987 | 7670 | "type" : "string", |
56122987 | 7671 | "optional" : 1, |
7aacca6f DM |
7672 | "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", |
7673 | "format" : { | |
7674 | "host" : { | |
7675 | "description" : "The Host USB device or port or the value spice", | |
7676 | "type" : "string", | |
7677 | "format_description" : "HOSTUSBDEVICE|spice", | |
7678 | "format" : "pve-qm-usb-device", | |
7679 | "default_key" : 1 | |
7680 | }, | |
7681 | "usb3" : { | |
7682 | "description" : "Specifies whether if given host option is a USB3 device or port", | |
7683 | "optional" : 1, | |
7684 | "type" : "boolean", | |
7685 | "format_description" : "yes|no" | |
7686 | } | |
7687 | } | |
56122987 DM |
7688 | }, |
7689 | "scsihw" : { | |
7aacca6f | 7690 | "description" : "scsi controller model", |
56122987 DM |
7691 | "enum" : [ |
7692 | "lsi", | |
7693 | "lsi53c810", | |
7694 | "virtio-scsi-pci", | |
7695 | "virtio-scsi-single", | |
7696 | "megasas", | |
7697 | "pvscsi" | |
7698 | ], | |
7aacca6f | 7699 | "default" : "lsi", |
56122987 | 7700 | "optional" : 1, |
56122987 DM |
7701 | "type" : "string" |
7702 | }, | |
7aacca6f | 7703 | "cdrom" : { |
56122987 DM |
7704 | "optional" : 1, |
7705 | "type" : "string", | |
7aacca6f DM |
7706 | "description" : "This is an alias for option -ide2", |
7707 | "typetext" : "volume", | |
7708 | "format" : "pve-qm-drive" | |
56122987 DM |
7709 | }, |
7710 | "cpu" : { | |
56122987 | 7711 | "description" : "Emulated CPU type.", |
7aacca6f | 7712 | "optional" : 1, |
56122987 DM |
7713 | "type" : "string", |
7714 | "format" : { | |
7715 | "cputype" : { | |
56122987 | 7716 | "default" : "kvm64", |
7aacca6f DM |
7717 | "type" : "string", |
7718 | "description" : "Emulated CPU type.", | |
56122987 DM |
7719 | "enum" : [ |
7720 | "486", | |
7721 | "athlon", | |
7722 | "pentium", | |
7723 | "pentium2", | |
7724 | "pentium3", | |
7725 | "coreduo", | |
7726 | "core2duo", | |
7727 | "kvm32", | |
7728 | "kvm64", | |
7729 | "qemu32", | |
7730 | "qemu64", | |
7731 | "phenom", | |
7732 | "Conroe", | |
7733 | "Penryn", | |
7734 | "Nehalem", | |
7735 | "Westmere", | |
7736 | "SandyBridge", | |
7737 | "IvyBridge", | |
7738 | "Haswell", | |
7739 | "Haswell-noTSX", | |
7740 | "Broadwell", | |
7741 | "Broadwell-noTSX", | |
7742 | "Opteron_G1", | |
7743 | "Opteron_G2", | |
7744 | "Opteron_G3", | |
7745 | "Opteron_G4", | |
7746 | "Opteron_G5", | |
7747 | "host" | |
7748 | ], | |
7aacca6f DM |
7749 | "default_key" : 1, |
7750 | "format_description" : "cputype" | |
56122987 DM |
7751 | }, |
7752 | "hidden" : { | |
56122987 | 7753 | "description" : "Do not identify as a KVM virtual machine.", |
7aacca6f | 7754 | "optional" : 1, |
56122987 DM |
7755 | "type" : "boolean", |
7756 | "default" : 0 | |
7757 | } | |
7758 | } | |
7759 | }, | |
7aacca6f DM |
7760 | "skiplock" : { |
7761 | "description" : "Ignore locks - only root is allowed to use this option.", | |
56122987 | 7762 | "type" : "boolean", |
7aacca6f | 7763 | "optional" : 1 |
56122987 | 7764 | }, |
7aacca6f DM |
7765 | "memory" : { |
7766 | "minimum" : 16, | |
7767 | "type" : "integer", | |
56122987 | 7768 | "optional" : 1, |
7aacca6f DM |
7769 | "default" : 512, |
7770 | "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device." | |
56122987 | 7771 | }, |
7aacca6f DM |
7772 | "args" : { |
7773 | "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", | |
56122987 | 7774 | "optional" : 1, |
7aacca6f | 7775 | "type" : "string" |
56122987 | 7776 | }, |
7aacca6f | 7777 | "template" : { |
56122987 | 7778 | "optional" : 1, |
56122987 | 7779 | "type" : "boolean", |
7aacca6f DM |
7780 | "default" : 0, |
7781 | "description" : "Enable/disable Template." | |
56122987 | 7782 | }, |
7aacca6f DM |
7783 | "bios" : { |
7784 | "enum" : [ | |
7785 | "seabios", | |
7786 | "ovmf" | |
7787 | ], | |
7788 | "description" : "Select BIOS implementation.", | |
7789 | "type" : "string", | |
7790 | "optional" : 1, | |
7791 | "default" : "seabios" | |
7792 | }, | |
7793 | "shares" : { | |
7794 | "default" : 1000, | |
7795 | "maximum" : 50000, | |
7796 | "optional" : 1, | |
7797 | "type" : "integer", | |
7798 | "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", | |
7799 | "minimum" : 0 | |
7800 | }, | |
7801 | "ostype" : { | |
7802 | "enum" : [ | |
7803 | "other", | |
7804 | "wxp", | |
7805 | "w2k", | |
7806 | "w2k3", | |
7807 | "w2k8", | |
7808 | "wvista", | |
7809 | "win7", | |
7810 | "win8", | |
7811 | "l24", | |
7812 | "l26", | |
7813 | "solaris" | |
7814 | ], | |
7815 | "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", | |
7816 | "optional" : 1, | |
7817 | "type" : "string" | |
7818 | }, | |
7819 | "unused[n]" : { | |
7820 | "type" : "string", | |
7821 | "optional" : 1, | |
7822 | "description" : "Reference to unused volumes.", | |
7823 | "format" : "pve-volume-id" | |
7824 | }, | |
7825 | "boot" : { | |
7826 | "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", | |
7827 | "pattern" : "[acdn]{1,4}", | |
7828 | "default" : "cdn", | |
7829 | "optional" : 1, | |
7830 | "type" : "string" | |
7831 | }, | |
7832 | "numa[n]" : { | |
7833 | "description" : "numa topology", | |
7834 | "type" : "string", | |
7835 | "optional" : 1, | |
56122987 | 7836 | "format" : { |
7aacca6f DM |
7837 | "hostnodes" : { |
7838 | "format_description" : "id[-id];...", | |
7839 | "type" : "string", | |
56122987 | 7840 | "optional" : 1, |
7aacca6f DM |
7841 | "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", |
7842 | "description" : "host numa nodes to use" | |
56122987 | 7843 | }, |
7aacca6f DM |
7844 | "cpus" : { |
7845 | "format_description" : "id[-id];...", | |
7846 | "type" : "string", | |
7847 | "description" : "CPUs accessing this numa node.", | |
7848 | "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)" | |
7849 | }, | |
7850 | "policy" : { | |
7851 | "type" : "string", | |
7852 | "optional" : 1, | |
7853 | "enum" : [ | |
7854 | "preferred", | |
7855 | "bind", | |
7856 | "interleave" | |
7857 | ], | |
7858 | "description" : "numa allocation policy.", | |
7859 | "format_description" : "preferred|bind|interleave" | |
7860 | }, | |
7861 | "memory" : { | |
7862 | "format_description" : "mb", | |
7863 | "description" : "Amount of memory this numa node provides.", | |
7864 | "optional" : 1, | |
7865 | "type" : "number" | |
7866 | } | |
7867 | } | |
7868 | }, | |
7869 | "autostart" : { | |
7870 | "default" : 0, | |
7871 | "type" : "boolean", | |
7872 | "optional" : 1, | |
7873 | "description" : "Automatic restart after crash (currently ignored)." | |
7874 | }, | |
7875 | "tdf" : { | |
7876 | "optional" : 1, | |
7877 | "type" : "boolean", | |
7878 | "default" : 0, | |
7879 | "description" : "Enable/disable time drift fix." | |
7880 | }, | |
7881 | "tablet" : { | |
7882 | "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", | |
7883 | "default" : 1, | |
7884 | "type" : "boolean", | |
7885 | "optional" : 1 | |
7886 | }, | |
7887 | "cpulimit" : { | |
7888 | "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", | |
7889 | "type" : "number", | |
7890 | "optional" : 1, | |
7891 | "default" : 0, | |
7892 | "maximum" : 128, | |
7893 | "minimum" : 0 | |
7894 | }, | |
7895 | "kvm" : { | |
7896 | "default" : 1, | |
7897 | "type" : "boolean", | |
7898 | "optional" : 1, | |
7899 | "description" : "Enable/disable KVM hardware virtualization." | |
7900 | }, | |
7901 | "sata[n]" : { | |
7902 | "format" : { | |
7903 | "file" : { | |
7904 | "type" : "string", | |
7905 | "description" : "The drive's backing volume.", | |
7906 | "default_key" : 1, | |
7907 | "format" : "pve-volume-id-or-qm-path", | |
7908 | "format_description" : "volume" | |
7909 | }, | |
7910 | "iops" : { | |
7911 | "description" : "Maximum r/w I/O speed in operations per second.", | |
56122987 DM |
7912 | "type" : "integer", |
7913 | "optional" : 1, | |
7aacca6f | 7914 | "format_description" : "iops" |
56122987 DM |
7915 | }, |
7916 | "mbps_rd" : { | |
56122987 | 7917 | "format_description" : "mbps", |
7aacca6f DM |
7918 | "type" : "number", |
7919 | "optional" : 1, | |
7920 | "description" : "Maximum read speed speed in megabytes per second." | |
56122987 DM |
7921 | }, |
7922 | "mbps_wr" : { | |
7923 | "description" : "Maximum write speed speed in megabytes per second.", | |
7924 | "optional" : 1, | |
7aacca6f DM |
7925 | "type" : "number", |
7926 | "format_description" : "mbps" | |
56122987 | 7927 | }, |
7aacca6f | 7928 | "iops_wr_max" : { |
56122987 DM |
7929 | "type" : "integer", |
7930 | "optional" : 1, | |
7aacca6f DM |
7931 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", |
7932 | "format_description" : "iops" | |
56122987 | 7933 | }, |
7aacca6f DM |
7934 | "backup" : { |
7935 | "format_description" : "on|off", | |
7936 | "description" : "Whether the drive should be included when making backups.", | |
7937 | "type" : "boolean", | |
7938 | "optional" : 1 | |
7939 | }, | |
7940 | "aio" : { | |
7941 | "format_description" : "native|threads", | |
56122987 | 7942 | "optional" : 1, |
7aacca6f DM |
7943 | "type" : "string", |
7944 | "description" : "AIO type to use.", | |
56122987 | 7945 | "enum" : [ |
7aacca6f DM |
7946 | "native", |
7947 | "threads" | |
56122987 DM |
7948 | ] |
7949 | }, | |
7aacca6f | 7950 | "werror" : { |
56122987 | 7951 | "type" : "string", |
56122987 | 7952 | "optional" : 1, |
7aacca6f | 7953 | "description" : "Write error action.", |
56122987 | 7954 | "enum" : [ |
7aacca6f DM |
7955 | "enospc", |
7956 | "ignore", | |
7957 | "report", | |
7958 | "stop" | |
7959 | ], | |
7960 | "format_description" : "enospc|ignore|report|stop" | |
56122987 | 7961 | }, |
7aacca6f DM |
7962 | "cyls" : { |
7963 | "type" : "integer", | |
56122987 | 7964 | "optional" : 1, |
7aacca6f DM |
7965 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", |
7966 | "format_description" : "count" | |
7967 | }, | |
7968 | "mbps" : { | |
7969 | "format_description" : "mbps", | |
7970 | "optional" : 1, | |
7971 | "type" : "number", | |
7972 | "description" : "Maximum r/w speed speed in megabytes per second." | |
56122987 DM |
7973 | }, |
7974 | "bps_rd" : { | |
7aacca6f | 7975 | "description" : "Maximum read speed speed in bytes per second.", |
56122987 DM |
7976 | "type" : "integer", |
7977 | "optional" : 1, | |
56122987 DM |
7978 | "format_description" : "bps" |
7979 | }, | |
7aacca6f DM |
7980 | "trans" : { |
7981 | "format_description" : "none|lba|auto", | |
7982 | "enum" : [ | |
7983 | "none", | |
7984 | "lba", | |
7985 | "auto" | |
7986 | ], | |
7987 | "description" : "Force disk geometry bios translation mode.", | |
7988 | "type" : "string", | |
56122987 DM |
7989 | "optional" : 1 |
7990 | }, | |
7aacca6f DM |
7991 | "volume" : { |
7992 | "alias" : "file" | |
56122987 | 7993 | }, |
7aacca6f DM |
7994 | "iops_wr" : { |
7995 | "format_description" : "iops", | |
7996 | "description" : "Maximum write I/O speed in operations per second.", | |
56122987 | 7997 | "optional" : 1, |
7aacca6f | 7998 | "type" : "integer" |
56122987 | 7999 | }, |
7aacca6f DM |
8000 | "secs" : { |
8001 | "format_description" : "count", | |
8002 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
56122987 | 8003 | "optional" : 1, |
7aacca6f | 8004 | "type" : "integer" |
56122987 | 8005 | }, |
7aacca6f DM |
8006 | "detect_zeroes" : { |
8007 | "description" : "Controls whether to detect and try to optimize writes of zeroes.", | |
8008 | "type" : "boolean", | |
8009 | "optional" : 1 | |
56122987 | 8010 | }, |
7aacca6f DM |
8011 | "rerror" : { |
8012 | "format_description" : "ignore|report|stop", | |
8013 | "optional" : 1, | |
56122987 DM |
8014 | "type" : "string", |
8015 | "enum" : [ | |
7aacca6f DM |
8016 | "ignore", |
8017 | "report", | |
8018 | "stop" | |
56122987 | 8019 | ], |
7aacca6f | 8020 | "description" : "Read error action." |
56122987 | 8021 | }, |
7aacca6f DM |
8022 | "cache" : { |
8023 | "enum" : [ | |
8024 | "none", | |
8025 | "writethrough", | |
8026 | "writeback", | |
8027 | "unsafe", | |
8028 | "directsync" | |
8029 | ], | |
8030 | "description" : "The drive's cache mode", | |
56122987 | 8031 | "optional" : 1, |
56122987 | 8032 | "type" : "string", |
7aacca6f DM |
8033 | "format_description" : "none|writethrough|writeback|unsafe|directsync" |
8034 | }, | |
8035 | "media" : { | |
8036 | "description" : "The drive's media type.", | |
56122987 | 8037 | "enum" : [ |
7aacca6f DM |
8038 | "cdrom", |
8039 | "disk" | |
56122987 | 8040 | ], |
7aacca6f | 8041 | "default" : "disk", |
56122987 | 8042 | "optional" : 1, |
7aacca6f DM |
8043 | "type" : "string", |
8044 | "format_description" : "cdrom|disk" | |
56122987 | 8045 | }, |
7aacca6f DM |
8046 | "snapshot" : { |
8047 | "description" : "Whether the drive should be included when making snapshots.", | |
8048 | "type" : "boolean", | |
56122987 | 8049 | "optional" : 1, |
7aacca6f | 8050 | "format_description" : "on|off" |
56122987 | 8051 | }, |
7aacca6f DM |
8052 | "iops_max" : { |
8053 | "type" : "integer", | |
56122987 | 8054 | "optional" : 1, |
7aacca6f DM |
8055 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", |
8056 | "format_description" : "iops" | |
56122987 | 8057 | }, |
7aacca6f DM |
8058 | "iops_rd" : { |
8059 | "format_description" : "iops", | |
8060 | "type" : "integer", | |
8061 | "optional" : 1, | |
8062 | "description" : "Maximum read I/O speed in operations per second." | |
56122987 | 8063 | }, |
7aacca6f DM |
8064 | "size" : { |
8065 | "description" : "Disk size. This is purely informational and has no effect.", | |
8066 | "type" : "string", | |
8067 | "optional" : 1, | |
8068 | "format" : "disk-size" | |
8069 | }, | |
8070 | "mbps_max" : { | |
8071 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
56122987 DM |
8072 | "type" : "number", |
8073 | "optional" : 1, | |
7aacca6f | 8074 | "format_description" : "mbps" |
56122987 DM |
8075 | }, |
8076 | "bps_wr" : { | |
56122987 DM |
8077 | "description" : "Maximum write speed speed in bytes per second.", |
8078 | "optional" : 1, | |
7aacca6f DM |
8079 | "type" : "integer", |
8080 | "format_description" : "bps" | |
56122987 | 8081 | }, |
7aacca6f DM |
8082 | "discard" : { |
8083 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
56122987 | 8084 | "enum" : [ |
7aacca6f DM |
8085 | "ignore", |
8086 | "on" | |
56122987 | 8087 | ], |
7aacca6f | 8088 | "type" : "string", |
56122987 | 8089 | "optional" : 1, |
7aacca6f | 8090 | "format_description" : "ignore|on" |
56122987 | 8091 | }, |
7aacca6f DM |
8092 | "mbps_rd_max" : { |
8093 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", | |
56122987 | 8094 | "optional" : 1, |
7aacca6f DM |
8095 | "type" : "number", |
8096 | "format_description" : "mbps" | |
56122987 | 8097 | }, |
7aacca6f DM |
8098 | "heads" : { |
8099 | "type" : "integer", | |
56122987 | 8100 | "optional" : 1, |
7aacca6f DM |
8101 | "description" : "Force the drive's physical geometry to have a specific head count.", |
8102 | "format_description" : "count" | |
56122987 | 8103 | }, |
7aacca6f DM |
8104 | "serial" : { |
8105 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
56122987 | 8106 | "optional" : 1, |
7aacca6f DM |
8107 | "type" : "string", |
8108 | "format" : "urlencoded", | |
8109 | "maxLength" : 60, | |
8110 | "format_description" : "serial" | |
56122987 | 8111 | }, |
7aacca6f DM |
8112 | "format" : { |
8113 | "format_description" : "drive format", | |
8114 | "description" : "The drive's backing file's data format.", | |
56122987 | 8115 | "enum" : [ |
7aacca6f DM |
8116 | "raw", |
8117 | "cow", | |
8118 | "qcow", | |
8119 | "qed", | |
8120 | "qcow2", | |
8121 | "vmdk", | |
8122 | "cloop" | |
56122987 | 8123 | ], |
7aacca6f DM |
8124 | "type" : "string", |
8125 | "optional" : 1 | |
56122987 DM |
8126 | }, |
8127 | "bps" : { | |
56122987 | 8128 | "optional" : 1, |
7aacca6f | 8129 | "type" : "integer", |
56122987 DM |
8130 | "description" : "Maximum r/w speed speed in bytes per second.", |
8131 | "format_description" : "bps" | |
8132 | }, | |
7aacca6f DM |
8133 | "iops_rd_max" : { |
8134 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
8135 | "optional" : 1, | |
8136 | "type" : "integer", | |
8137 | "format_description" : "iops" | |
8138 | }, | |
56122987 | 8139 | "mbps_wr_max" : { |
7aacca6f | 8140 | "optional" : 1, |
56122987 DM |
8141 | "type" : "number", |
8142 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", | |
56122987 DM |
8143 | "format_description" : "mbps" |
8144 | } | |
8145 | }, | |
7aacca6f | 8146 | "optional" : 1, |
56122987 | 8147 | "type" : "string", |
7aacca6f DM |
8148 | "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5)." |
8149 | }, | |
8150 | "localtime" : { | |
8151 | "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", | |
8152 | "type" : "boolean", | |
8153 | "optional" : 1 | |
8154 | }, | |
8155 | "migrate_speed" : { | |
8156 | "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", | |
8157 | "default" : 0, | |
56122987 | 8158 | "optional" : 1, |
7aacca6f DM |
8159 | "type" : "integer", |
8160 | "minimum" : 0 | |
56122987 | 8161 | }, |
7aacca6f DM |
8162 | "startdate" : { |
8163 | "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)", | |
56122987 | 8164 | "type" : "string", |
56122987 | 8165 | "optional" : 1, |
7aacca6f DM |
8166 | "default" : "now", |
8167 | "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", | |
8168 | "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'." | |
56122987 | 8169 | }, |
7aacca6f DM |
8170 | "force" : { |
8171 | "requires" : "delete", | |
8172 | "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", | |
8173 | "type" : "boolean", | |
56122987 DM |
8174 | "optional" : 1 |
8175 | }, | |
7aacca6f | 8176 | "node" : { |
56122987 | 8177 | "type" : "string", |
7aacca6f DM |
8178 | "description" : "The cluster node name.", |
8179 | "format" : "pve-node" | |
56122987 | 8180 | } |
7aacca6f | 8181 | } |
56122987 | 8182 | }, |
7aacca6f DM |
8183 | "name" : "update_vm", |
8184 | "protected" : 1, | |
8185 | "method" : "PUT", | |
56122987 DM |
8186 | "permissions" : { |
8187 | "check" : [ | |
8188 | "perm", | |
8189 | "/vms/{vmid}", | |
8190 | [ | |
8191 | "VM.Config.Disk", | |
8192 | "VM.Config.CDROM", | |
8193 | "VM.Config.CPU", | |
8194 | "VM.Config.Memory", | |
8195 | "VM.Config.Network", | |
8196 | "VM.Config.HWType", | |
8197 | "VM.Config.Options" | |
8198 | ], | |
8199 | "any", | |
8200 | 1 | |
8201 | ] | |
8202 | }, | |
7aacca6f DM |
8203 | "proxyto" : "node", |
8204 | "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.", | |
56122987 | 8205 | "returns" : { |
7aacca6f DM |
8206 | "type" : "null" |
8207 | } | |
8208 | } | |
8209 | }, | |
8210 | "text" : "config" | |
8211 | }, | |
8212 | { | |
8213 | "info" : { | |
56122987 | 8214 | "GET" : { |
56122987 DM |
8215 | "returns" : { |
8216 | "type" : "array", | |
8217 | "items" : { | |
8218 | "properties" : { | |
56122987 | 8219 | "key" : { |
7aacca6f DM |
8220 | "description" : "Configuration option name.", |
8221 | "type" : "string" | |
56122987 DM |
8222 | }, |
8223 | "value" : { | |
7aacca6f DM |
8224 | "description" : "Current value.", |
8225 | "optional" : 1, | |
8226 | "type" : "string" | |
8227 | }, | |
8228 | "delete" : { | |
8229 | "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.", | |
8230 | "type" : "integer", | |
56122987 | 8231 | "optional" : 1, |
7aacca6f DM |
8232 | "maximum" : 2, |
8233 | "minimum" : 0 | |
56122987 DM |
8234 | }, |
8235 | "pending" : { | |
8236 | "type" : "string", | |
8237 | "optional" : 1, | |
8238 | "description" : "Pending value." | |
8239 | } | |
8240 | }, | |
8241 | "type" : "object" | |
8242 | } | |
8243 | }, | |
56122987 | 8244 | "method" : "GET", |
7aacca6f DM |
8245 | "parameters" : { |
8246 | "properties" : { | |
8247 | "node" : { | |
8248 | "format" : "pve-node", | |
8249 | "description" : "The cluster node name.", | |
8250 | "type" : "string" | |
8251 | }, | |
8252 | "vmid" : { | |
8253 | "minimum" : 1, | |
8254 | "format" : "pve-vmid", | |
8255 | "type" : "integer", | |
8256 | "description" : "The (unique) ID of the VM." | |
8257 | } | |
8258 | }, | |
8259 | "additionalProperties" : 0 | |
8260 | }, | |
56122987 DM |
8261 | "permissions" : { |
8262 | "check" : [ | |
8263 | "perm", | |
8264 | "/vms/{vmid}", | |
8265 | [ | |
8266 | "VM.Audit" | |
8267 | ] | |
8268 | ] | |
8269 | }, | |
7aacca6f DM |
8270 | "name" : "vm_pending", |
8271 | "proxyto" : "node", | |
56122987 DM |
8272 | "description" : "Get virtual machine configuration, including pending changes." |
8273 | } | |
8274 | }, | |
56122987 | 8275 | "text" : "pending", |
7aacca6f DM |
8276 | "leaf" : 1, |
8277 | "path" : "/nodes/{node}/qemu/{vmid}/pending" | |
56122987 DM |
8278 | }, |
8279 | { | |
56122987 | 8280 | "text" : "unlink", |
56122987 DM |
8281 | "info" : { |
8282 | "PUT" : { | |
56122987 DM |
8283 | "returns" : { |
8284 | "type" : "null" | |
8285 | }, | |
7aacca6f DM |
8286 | "description" : "Unlink/delete disk images.", |
8287 | "proxyto" : "node", | |
56122987 DM |
8288 | "permissions" : { |
8289 | "check" : [ | |
8290 | "perm", | |
8291 | "/vms/{vmid}", | |
8292 | [ | |
8293 | "VM.Config.Disk" | |
8294 | ] | |
8295 | ] | |
8296 | }, | |
7aacca6f | 8297 | "method" : "PUT", |
56122987 | 8298 | "protected" : 1, |
7aacca6f | 8299 | "name" : "unlink", |
56122987 DM |
8300 | "parameters" : { |
8301 | "properties" : { | |
7aacca6f DM |
8302 | "node" : { |
8303 | "type" : "string", | |
8304 | "description" : "The cluster node name.", | |
8305 | "format" : "pve-node" | |
8306 | }, | |
8307 | "force" : { | |
8308 | "type" : "boolean", | |
8309 | "optional" : 1, | |
8310 | "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal." | |
8311 | }, | |
56122987 DM |
8312 | "idlist" : { |
8313 | "description" : "A list of disk IDs you want to delete.", | |
8314 | "type" : "string", | |
8315 | "format" : "pve-configid-list" | |
8316 | }, | |
8317 | "vmid" : { | |
56122987 | 8318 | "type" : "integer", |
7aacca6f DM |
8319 | "description" : "The (unique) ID of the VM.", |
8320 | "minimum" : 1, | |
8321 | "format" : "pve-vmid" | |
56122987 DM |
8322 | } |
8323 | }, | |
8324 | "additionalProperties" : 0 | |
7aacca6f | 8325 | } |
56122987 | 8326 | } |
7aacca6f DM |
8327 | }, |
8328 | "path" : "/nodes/{node}/qemu/{vmid}/unlink", | |
8329 | "leaf" : 1 | |
56122987 DM |
8330 | }, |
8331 | { | |
7aacca6f | 8332 | "leaf" : 1, |
56122987 DM |
8333 | "path" : "/nodes/{node}/qemu/{vmid}/vncproxy", |
8334 | "info" : { | |
8335 | "POST" : { | |
7aacca6f DM |
8336 | "protected" : 1, |
8337 | "description" : "Creates a TCP VNC proxy connections.", | |
56122987 DM |
8338 | "permissions" : { |
8339 | "check" : [ | |
8340 | "perm", | |
8341 | "/vms/{vmid}", | |
8342 | [ | |
8343 | "VM.Console" | |
8344 | ] | |
8345 | ] | |
8346 | }, | |
56122987 | 8347 | "parameters" : { |
56122987 DM |
8348 | "properties" : { |
8349 | "vmid" : { | |
7aacca6f | 8350 | "description" : "The (unique) ID of the VM.", |
56122987 | 8351 | "type" : "integer", |
56122987 | 8352 | "minimum" : 1, |
7aacca6f | 8353 | "format" : "pve-vmid" |
56122987 DM |
8354 | }, |
8355 | "node" : { | |
56122987 | 8356 | "type" : "string", |
7aacca6f | 8357 | "description" : "The cluster node name.", |
56122987 | 8358 | "format" : "pve-node" |
7aacca6f DM |
8359 | }, |
8360 | "websocket" : { | |
8361 | "description" : "starts websockify instead of vncproxy", | |
8362 | "type" : "boolean", | |
8363 | "optional" : 1 | |
56122987 | 8364 | } |
7aacca6f DM |
8365 | }, |
8366 | "additionalProperties" : 0 | |
56122987 | 8367 | }, |
7aacca6f DM |
8368 | "name" : "vncproxy", |
8369 | "method" : "POST", | |
56122987 | 8370 | "returns" : { |
7aacca6f | 8371 | "additionalProperties" : 0, |
56122987 | 8372 | "properties" : { |
7aacca6f | 8373 | "cert" : { |
56122987 DM |
8374 | "type" : "string" |
8375 | }, | |
7aacca6f | 8376 | "upid" : { |
56122987 DM |
8377 | "type" : "string" |
8378 | }, | |
8379 | "port" : { | |
8380 | "type" : "integer" | |
8381 | }, | |
7aacca6f DM |
8382 | "ticket" : { |
8383 | "type" : "string" | |
8384 | }, | |
8385 | "user" : { | |
56122987 DM |
8386 | "type" : "string" |
8387 | } | |
7aacca6f | 8388 | } |
56122987 DM |
8389 | } |
8390 | } | |
8391 | }, | |
7aacca6f | 8392 | "text" : "vncproxy" |
56122987 DM |
8393 | }, |
8394 | { | |
56122987 DM |
8395 | "info" : { |
8396 | "GET" : { | |
7aacca6f DM |
8397 | "permissions" : { |
8398 | "check" : [ | |
8399 | "perm", | |
8400 | "/vms/{vmid}", | |
8401 | [ | |
8402 | "VM.Console" | |
8403 | ] | |
8404 | ], | |
8405 | "description" : "You also need to pass a valid ticket (vncticket)." | |
56122987 DM |
8406 | }, |
8407 | "parameters" : { | |
8408 | "properties" : { | |
56122987 | 8409 | "port" : { |
56122987 | 8410 | "minimum" : 5900, |
7aacca6f | 8411 | "description" : "Port number returned by previous vncproxy call.", |
56122987 DM |
8412 | "type" : "integer", |
8413 | "maximum" : 5999 | |
8414 | }, | |
7aacca6f DM |
8415 | "node" : { |
8416 | "format" : "pve-node", | |
8417 | "description" : "The cluster node name.", | |
8418 | "type" : "string" | |
8419 | }, | |
56122987 | 8420 | "vncticket" : { |
56122987 | 8421 | "maxLength" : 512, |
7aacca6f | 8422 | "description" : "Ticket from previous call to vncproxy.", |
56122987 DM |
8423 | "type" : "string" |
8424 | }, | |
7aacca6f DM |
8425 | "vmid" : { |
8426 | "format" : "pve-vmid", | |
8427 | "minimum" : 1, | |
8428 | "type" : "integer", | |
8429 | "description" : "The (unique) ID of the VM." | |
56122987 DM |
8430 | } |
8431 | }, | |
8432 | "additionalProperties" : 0 | |
8433 | }, | |
7aacca6f DM |
8434 | "name" : "vncwebsocket", |
8435 | "description" : "Opens a weksocket for VNC traffic.", | |
8436 | "method" : "GET", | |
8437 | "returns" : { | |
8438 | "properties" : { | |
8439 | "port" : { | |
8440 | "type" : "string" | |
8441 | } | |
8442 | }, | |
8443 | "type" : "object" | |
8444 | } | |
56122987 DM |
8445 | } |
8446 | }, | |
7aacca6f DM |
8447 | "text" : "vncwebsocket", |
8448 | "leaf" : 1, | |
56122987 DM |
8449 | "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket" |
8450 | }, | |
8451 | { | |
7aacca6f DM |
8452 | "leaf" : 1, |
8453 | "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy", | |
56122987 DM |
8454 | "info" : { |
8455 | "POST" : { | |
7aacca6f DM |
8456 | "protected" : 1, |
8457 | "name" : "spiceproxy", | |
8458 | "parameters" : { | |
56122987 | 8459 | "properties" : { |
7aacca6f DM |
8460 | "proxy" : { |
8461 | "format" : "address", | |
8462 | "type" : "string", | |
8463 | "optional" : 1, | |
8464 | "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI)." | |
56122987 | 8465 | }, |
7aacca6f DM |
8466 | "vmid" : { |
8467 | "format" : "pve-vmid", | |
8468 | "minimum" : 1, | |
8469 | "type" : "integer", | |
8470 | "description" : "The (unique) ID of the VM." | |
56122987 | 8471 | }, |
7aacca6f DM |
8472 | "node" : { |
8473 | "format" : "pve-node", | |
8474 | "type" : "string", | |
8475 | "description" : "The cluster node name." | |
56122987 DM |
8476 | } |
8477 | }, | |
7aacca6f | 8478 | "additionalProperties" : 0 |
56122987 | 8479 | }, |
56122987 | 8480 | "method" : "POST", |
7aacca6f DM |
8481 | "description" : "Returns a SPICE configuration to connect to the VM.", |
8482 | "proxyto" : "node", | |
56122987 DM |
8483 | "permissions" : { |
8484 | "check" : [ | |
8485 | "perm", | |
8486 | "/vms/{vmid}", | |
8487 | [ | |
8488 | "VM.Console" | |
8489 | ] | |
8490 | ] | |
8491 | }, | |
7aacca6f | 8492 | "returns" : { |
56122987 DM |
8493 | "properties" : { |
8494 | "proxy" : { | |
7aacca6f DM |
8495 | "type" : "string" |
8496 | }, | |
8497 | "tls-port" : { | |
8498 | "type" : "integer" | |
8499 | }, | |
8500 | "password" : { | |
8501 | "type" : "string" | |
8502 | }, | |
8503 | "type" : { | |
8504 | "type" : "string" | |
8505 | }, | |
8506 | "host" : { | |
8507 | "type" : "string" | |
8508 | } | |
8509 | }, | |
8510 | "description" : "Returned values can be directly passed to the 'remote-viewer' application.", | |
8511 | "additionalProperties" : 1 | |
8512 | } | |
8513 | } | |
8514 | }, | |
8515 | "text" : "spiceproxy" | |
8516 | }, | |
8517 | { | |
8518 | "info" : { | |
8519 | "GET" : { | |
8520 | "method" : "GET", | |
8521 | "returns" : { | |
8522 | "links" : [ | |
8523 | { | |
8524 | "href" : "{subdir}", | |
8525 | "rel" : "child" | |
8526 | } | |
8527 | ], | |
8528 | "items" : { | |
8529 | "properties" : { | |
8530 | "subdir" : { | |
8531 | "type" : "string" | |
8532 | } | |
56122987 | 8533 | }, |
7aacca6f DM |
8534 | "type" : "object" |
8535 | }, | |
8536 | "type" : "array" | |
8537 | }, | |
8538 | "description" : "Directory index", | |
8539 | "proxyto" : "node", | |
8540 | "permissions" : { | |
8541 | "user" : "all" | |
8542 | }, | |
8543 | "parameters" : { | |
8544 | "properties" : { | |
56122987 | 8545 | "vmid" : { |
7aacca6f | 8546 | "minimum" : 1, |
56122987 DM |
8547 | "format" : "pve-vmid", |
8548 | "type" : "integer", | |
56122987 DM |
8549 | "description" : "The (unique) ID of the VM." |
8550 | }, | |
8551 | "node" : { | |
8552 | "description" : "The cluster node name.", | |
7aacca6f DM |
8553 | "type" : "string", |
8554 | "format" : "pve-node" | |
56122987 | 8555 | } |
7aacca6f DM |
8556 | }, |
8557 | "additionalProperties" : 0 | |
56122987 | 8558 | }, |
7aacca6f | 8559 | "name" : "vmcmdidx" |
56122987 DM |
8560 | } |
8561 | }, | |
56122987 DM |
8562 | "children" : [ |
8563 | { | |
56122987 DM |
8564 | "info" : { |
8565 | "GET" : { | |
56122987 DM |
8566 | "parameters" : { |
8567 | "properties" : { | |
56122987 | 8568 | "vmid" : { |
7aacca6f | 8569 | "format" : "pve-vmid", |
56122987 | 8570 | "minimum" : 1, |
7aacca6f DM |
8571 | "description" : "The (unique) ID of the VM.", |
8572 | "type" : "integer" | |
8573 | }, | |
8574 | "node" : { | |
8575 | "type" : "string", | |
8576 | "description" : "The cluster node name.", | |
8577 | "format" : "pve-node" | |
56122987 DM |
8578 | } |
8579 | }, | |
8580 | "additionalProperties" : 0 | |
8581 | }, | |
7aacca6f DM |
8582 | "name" : "vm_status", |
8583 | "protected" : 1, | |
8584 | "method" : "GET", | |
56122987 DM |
8585 | "permissions" : { |
8586 | "check" : [ | |
8587 | "perm", | |
8588 | "/vms/{vmid}", | |
8589 | [ | |
8590 | "VM.Audit" | |
8591 | ] | |
8592 | ] | |
8593 | }, | |
7aacca6f DM |
8594 | "proxyto" : "node", |
8595 | "description" : "Get virtual machine status.", | |
56122987 DM |
8596 | "returns" : { |
8597 | "type" : "object" | |
7aacca6f | 8598 | } |
56122987 | 8599 | } |
7aacca6f DM |
8600 | }, |
8601 | "text" : "current", | |
8602 | "leaf" : 1, | |
8603 | "path" : "/nodes/{node}/qemu/{vmid}/status/current" | |
56122987 DM |
8604 | }, |
8605 | { | |
7aacca6f | 8606 | "path" : "/nodes/{node}/qemu/{vmid}/status/start", |
56122987 | 8607 | "leaf" : 1, |
7aacca6f | 8608 | "text" : "start", |
56122987 DM |
8609 | "info" : { |
8610 | "POST" : { | |
8611 | "method" : "POST", | |
7aacca6f | 8612 | "protected" : 1, |
56122987 DM |
8613 | "parameters" : { |
8614 | "properties" : { | |
7aacca6f DM |
8615 | "stateuri" : { |
8616 | "description" : "Some command save/restore state from this location.", | |
8617 | "type" : "string", | |
56122987 | 8618 | "optional" : 1, |
7aacca6f | 8619 | "maxLength" : 128 |
56122987 | 8620 | }, |
7aacca6f | 8621 | "node" : { |
56122987 | 8622 | "type" : "string", |
7aacca6f DM |
8623 | "description" : "The cluster node name.", |
8624 | "format" : "pve-node" | |
8625 | }, | |
8626 | "machine" : { | |
56122987 DM |
8627 | "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", |
8628 | "description" : "Specific the Qemu machine type.", | |
56122987 | 8629 | "type" : "string", |
7aacca6f DM |
8630 | "optional" : 1, |
8631 | "maxLength" : 40 | |
56122987 | 8632 | }, |
7aacca6f DM |
8633 | "skiplock" : { |
8634 | "type" : "boolean", | |
56122987 | 8635 | "optional" : 1, |
7aacca6f | 8636 | "description" : "Ignore locks - only root is allowed to use this option." |
56122987 DM |
8637 | }, |
8638 | "vmid" : { | |
56122987 | 8639 | "minimum" : 1, |
7aacca6f DM |
8640 | "format" : "pve-vmid", |
8641 | "description" : "The (unique) ID of the VM.", | |
8642 | "type" : "integer" | |
56122987 DM |
8643 | }, |
8644 | "migratedfrom" : { | |
8645 | "description" : "The cluster node name.", | |
56122987 | 8646 | "type" : "string", |
7aacca6f | 8647 | "optional" : 1, |
56122987 DM |
8648 | "format" : "pve-node" |
8649 | } | |
8650 | }, | |
8651 | "additionalProperties" : 0 | |
8652 | }, | |
7aacca6f DM |
8653 | "name" : "vm_start", |
8654 | "returns" : { | |
8655 | "type" : "string" | |
8656 | }, | |
8657 | "proxyto" : "node", | |
8658 | "description" : "Start virtual machine.", | |
56122987 DM |
8659 | "permissions" : { |
8660 | "check" : [ | |
8661 | "perm", | |
8662 | "/vms/{vmid}", | |
8663 | [ | |
8664 | "VM.PowerMgmt" | |
8665 | ] | |
8666 | ] | |
8667 | } | |
8668 | } | |
7aacca6f | 8669 | } |
56122987 DM |
8670 | }, |
8671 | { | |
7aacca6f | 8672 | "text" : "stop", |
56122987 DM |
8673 | "info" : { |
8674 | "POST" : { | |
7aacca6f DM |
8675 | "description" : "Stop virtual machine. The qemu process will exit immediately. Thisis akin to pulling the power plug of a running computer and may damage the VM data", |
8676 | "proxyto" : "node", | |
56122987 DM |
8677 | "permissions" : { |
8678 | "check" : [ | |
8679 | "perm", | |
8680 | "/vms/{vmid}", | |
8681 | [ | |
8682 | "VM.PowerMgmt" | |
8683 | ] | |
8684 | ] | |
8685 | }, | |
7aacca6f DM |
8686 | "returns" : { |
8687 | "type" : "string" | |
8688 | }, | |
56122987 DM |
8689 | "protected" : 1, |
8690 | "parameters" : { | |
8691 | "properties" : { | |
7aacca6f DM |
8692 | "timeout" : { |
8693 | "minimum" : 0, | |
56122987 | 8694 | "optional" : 1, |
56122987 | 8695 | "type" : "integer", |
7aacca6f | 8696 | "description" : "Wait maximal timeout seconds." |
56122987 DM |
8697 | }, |
8698 | "migratedfrom" : { | |
56122987 | 8699 | "description" : "The cluster node name.", |
56122987 | 8700 | "type" : "string", |
7aacca6f DM |
8701 | "optional" : 1, |
8702 | "format" : "pve-node" | |
8703 | }, | |
8704 | "vmid" : { | |
8705 | "minimum" : 1, | |
8706 | "format" : "pve-vmid", | |
8707 | "description" : "The (unique) ID of the VM.", | |
8708 | "type" : "integer" | |
56122987 DM |
8709 | }, |
8710 | "skiplock" : { | |
8711 | "description" : "Ignore locks - only root is allowed to use this option.", | |
8712 | "optional" : 1, | |
8713 | "type" : "boolean" | |
8714 | }, | |
7aacca6f DM |
8715 | "keepActive" : { |
8716 | "description" : "Do not decativate storage volumes.", | |
8717 | "type" : "boolean", | |
56122987 | 8718 | "optional" : 1, |
7aacca6f DM |
8719 | "default" : 0 |
8720 | }, | |
8721 | "node" : { | |
8722 | "format" : "pve-node", | |
8723 | "type" : "string", | |
8724 | "description" : "The cluster node name." | |
56122987 DM |
8725 | } |
8726 | }, | |
8727 | "additionalProperties" : 0 | |
8728 | }, | |
7aacca6f DM |
8729 | "name" : "vm_stop", |
8730 | "method" : "POST" | |
56122987 DM |
8731 | } |
8732 | }, | |
7aacca6f DM |
8733 | "path" : "/nodes/{node}/qemu/{vmid}/status/stop", |
8734 | "leaf" : 1 | |
56122987 DM |
8735 | }, |
8736 | { | |
7aacca6f DM |
8737 | "path" : "/nodes/{node}/qemu/{vmid}/status/reset", |
8738 | "leaf" : 1, | |
8739 | "text" : "reset", | |
56122987 DM |
8740 | "info" : { |
8741 | "POST" : { | |
7aacca6f DM |
8742 | "proxyto" : "node", |
8743 | "description" : "Reset virtual machine.", | |
56122987 DM |
8744 | "permissions" : { |
8745 | "check" : [ | |
8746 | "perm", | |
8747 | "/vms/{vmid}", | |
8748 | [ | |
8749 | "VM.PowerMgmt" | |
8750 | ] | |
8751 | ] | |
8752 | }, | |
7aacca6f DM |
8753 | "returns" : { |
8754 | "type" : "string" | |
8755 | }, | |
56122987 | 8756 | "protected" : 1, |
56122987 | 8757 | "parameters" : { |
7aacca6f | 8758 | "additionalProperties" : 0, |
56122987 | 8759 | "properties" : { |
56122987 | 8760 | "node" : { |
7aacca6f | 8761 | "type" : "string", |
56122987 | 8762 | "description" : "The cluster node name.", |
7aacca6f | 8763 | "format" : "pve-node" |
56122987 DM |
8764 | }, |
8765 | "skiplock" : { | |
8766 | "type" : "boolean", | |
7aacca6f DM |
8767 | "optional" : 1, |
8768 | "description" : "Ignore locks - only root is allowed to use this option." | |
8769 | }, | |
8770 | "vmid" : { | |
8771 | "format" : "pve-vmid", | |
8772 | "minimum" : 1, | |
8773 | "type" : "integer", | |
8774 | "description" : "The (unique) ID of the VM." | |
56122987 | 8775 | } |
7aacca6f | 8776 | } |
56122987 | 8777 | }, |
56122987 | 8778 | "name" : "vm_reset", |
7aacca6f | 8779 | "method" : "POST" |
56122987 | 8780 | } |
7aacca6f | 8781 | } |
56122987 DM |
8782 | }, |
8783 | { | |
7aacca6f | 8784 | "text" : "shutdown", |
56122987 DM |
8785 | "info" : { |
8786 | "POST" : { | |
7aacca6f DM |
8787 | "permissions" : { |
8788 | "check" : [ | |
8789 | "perm", | |
8790 | "/vms/{vmid}", | |
8791 | [ | |
8792 | "VM.PowerMgmt" | |
8793 | ] | |
8794 | ] | |
8795 | }, | |
8796 | "description" : "Shutdown virtual machine. This is similar to pressing the power button on a physical machine.This will send an ACPI event for the guest OS, which should then proceed to a clean shutdown.", | |
8797 | "proxyto" : "node", | |
56122987 DM |
8798 | "returns" : { |
8799 | "type" : "string" | |
8800 | }, | |
56122987 | 8801 | "name" : "vm_shutdown", |
56122987 | 8802 | "parameters" : { |
7aacca6f | 8803 | "additionalProperties" : 0, |
56122987 | 8804 | "properties" : { |
56122987 | 8805 | "node" : { |
7aacca6f | 8806 | "format" : "pve-node", |
56122987 | 8807 | "description" : "The cluster node name.", |
7aacca6f | 8808 | "type" : "string" |
56122987 DM |
8809 | }, |
8810 | "forceStop" : { | |
56122987 | 8811 | "default" : 0, |
7aacca6f DM |
8812 | "optional" : 1, |
8813 | "type" : "boolean", | |
8814 | "description" : "Make sure the VM stops." | |
56122987 DM |
8815 | }, |
8816 | "keepActive" : { | |
8817 | "type" : "boolean", | |
56122987 | 8818 | "optional" : 1, |
7aacca6f | 8819 | "default" : 0, |
56122987 DM |
8820 | "description" : "Do not decativate storage volumes." |
8821 | }, | |
7aacca6f DM |
8822 | "timeout" : { |
8823 | "minimum" : 0, | |
8824 | "description" : "Wait maximal timeout seconds.", | |
8825 | "optional" : 1, | |
8826 | "type" : "integer" | |
8827 | }, | |
56122987 | 8828 | "vmid" : { |
7aacca6f | 8829 | "minimum" : 1, |
56122987 | 8830 | "format" : "pve-vmid", |
7aacca6f DM |
8831 | "description" : "The (unique) ID of the VM.", |
8832 | "type" : "integer" | |
8833 | }, | |
8834 | "skiplock" : { | |
8835 | "description" : "Ignore locks - only root is allowed to use this option.", | |
8836 | "optional" : 1, | |
8837 | "type" : "boolean" | |
56122987 | 8838 | } |
7aacca6f | 8839 | } |
56122987 | 8840 | }, |
7aacca6f DM |
8841 | "protected" : 1, |
8842 | "method" : "POST" | |
56122987 DM |
8843 | } |
8844 | }, | |
7aacca6f DM |
8845 | "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown", |
8846 | "leaf" : 1 | |
56122987 DM |
8847 | }, |
8848 | { | |
7aacca6f | 8849 | "text" : "suspend", |
56122987 DM |
8850 | "info" : { |
8851 | "POST" : { | |
56122987 | 8852 | "method" : "POST", |
7aacca6f DM |
8853 | "parameters" : { |
8854 | "properties" : { | |
8855 | "node" : { | |
8856 | "type" : "string", | |
8857 | "description" : "The cluster node name.", | |
8858 | "format" : "pve-node" | |
8859 | }, | |
8860 | "vmid" : { | |
8861 | "minimum" : 1, | |
8862 | "format" : "pve-vmid", | |
8863 | "description" : "The (unique) ID of the VM.", | |
8864 | "type" : "integer" | |
8865 | }, | |
8866 | "skiplock" : { | |
8867 | "description" : "Ignore locks - only root is allowed to use this option.", | |
8868 | "type" : "boolean", | |
8869 | "optional" : 1 | |
8870 | } | |
8871 | }, | |
8872 | "additionalProperties" : 0 | |
8873 | }, | |
56122987 | 8874 | "name" : "vm_suspend", |
7aacca6f | 8875 | "protected" : 1, |
56122987 DM |
8876 | "returns" : { |
8877 | "type" : "string" | |
8878 | }, | |
8879 | "permissions" : { | |
8880 | "check" : [ | |
8881 | "perm", | |
8882 | "/vms/{vmid}", | |
8883 | [ | |
8884 | "VM.PowerMgmt" | |
8885 | ] | |
8886 | ] | |
8887 | }, | |
7aacca6f DM |
8888 | "description" : "Suspend virtual machine.", |
8889 | "proxyto" : "node" | |
56122987 DM |
8890 | } |
8891 | }, | |
7aacca6f | 8892 | "path" : "/nodes/{node}/qemu/{vmid}/status/suspend", |
56122987 DM |
8893 | "leaf" : 1 |
8894 | }, | |
8895 | { | |
56122987 | 8896 | "leaf" : 1, |
7aacca6f | 8897 | "path" : "/nodes/{node}/qemu/{vmid}/status/resume", |
56122987 DM |
8898 | "info" : { |
8899 | "POST" : { | |
7aacca6f DM |
8900 | "protected" : 1, |
8901 | "name" : "vm_resume", | |
56122987 DM |
8902 | "parameters" : { |
8903 | "additionalProperties" : 0, | |
8904 | "properties" : { | |
7aacca6f DM |
8905 | "node" : { |
8906 | "format" : "pve-node", | |
8907 | "type" : "string", | |
8908 | "description" : "The cluster node name." | |
56122987 DM |
8909 | }, |
8910 | "skiplock" : { | |
56122987 | 8911 | "description" : "Ignore locks - only root is allowed to use this option.", |
7aacca6f DM |
8912 | "type" : "boolean", |
8913 | "optional" : 1 | |
56122987 | 8914 | }, |
7aacca6f DM |
8915 | "vmid" : { |
8916 | "type" : "integer", | |
8917 | "description" : "The (unique) ID of the VM.", | |
8918 | "format" : "pve-vmid", | |
8919 | "minimum" : 1 | |
56122987 DM |
8920 | }, |
8921 | "nocheck" : { | |
8922 | "type" : "boolean", | |
8923 | "optional" : 1 | |
8924 | } | |
8925 | } | |
8926 | }, | |
7aacca6f DM |
8927 | "method" : "POST", |
8928 | "description" : "Resume virtual machine.", | |
8929 | "proxyto" : "node", | |
56122987 DM |
8930 | "permissions" : { |
8931 | "check" : [ | |
8932 | "perm", | |
8933 | "/vms/{vmid}", | |
8934 | [ | |
8935 | "VM.PowerMgmt" | |
8936 | ] | |
8937 | ] | |
8938 | }, | |
56122987 DM |
8939 | "returns" : { |
8940 | "type" : "string" | |
7aacca6f | 8941 | } |
56122987 DM |
8942 | } |
8943 | }, | |
7aacca6f | 8944 | "text" : "resume" |
56122987 DM |
8945 | } |
8946 | ], | |
7aacca6f DM |
8947 | "text" : "status", |
8948 | "leaf" : 0, | |
8949 | "path" : "/nodes/{node}/qemu/{vmid}/status" | |
8950 | }, | |
8951 | { | |
8952 | "text" : "sendkey", | |
56122987 | 8953 | "info" : { |
7aacca6f DM |
8954 | "PUT" : { |
8955 | "proxyto" : "node", | |
8956 | "description" : "Send key event to virtual machine.", | |
56122987 | 8957 | "permissions" : { |
7aacca6f DM |
8958 | "check" : [ |
8959 | "perm", | |
8960 | "/vms/{vmid}", | |
8961 | [ | |
8962 | "VM.Console" | |
8963 | ] | |
8964 | ] | |
56122987 | 8965 | }, |
7aacca6f DM |
8966 | "returns" : { |
8967 | "type" : "null" | |
8968 | }, | |
8969 | "protected" : 1, | |
56122987 DM |
8970 | "parameters" : { |
8971 | "properties" : { | |
7aacca6f DM |
8972 | "key" : { |
8973 | "description" : "The key (qemu monitor encoding).", | |
8974 | "type" : "string" | |
8975 | }, | |
8976 | "skiplock" : { | |
8977 | "optional" : 1, | |
8978 | "type" : "boolean", | |
8979 | "description" : "Ignore locks - only root is allowed to use this option." | |
56122987 DM |
8980 | }, |
8981 | "vmid" : { | |
56122987 | 8982 | "minimum" : 1, |
7aacca6f DM |
8983 | "format" : "pve-vmid", |
8984 | "description" : "The (unique) ID of the VM.", | |
8985 | "type" : "integer" | |
8986 | }, | |
8987 | "node" : { | |
8988 | "format" : "pve-node", | |
8989 | "description" : "The cluster node name.", | |
8990 | "type" : "string" | |
56122987 DM |
8991 | } |
8992 | }, | |
8993 | "additionalProperties" : 0 | |
8994 | }, | |
7aacca6f DM |
8995 | "name" : "vm_sendkey", |
8996 | "method" : "PUT" | |
56122987 | 8997 | } |
7aacca6f DM |
8998 | }, |
8999 | "path" : "/nodes/{node}/qemu/{vmid}/sendkey", | |
9000 | "leaf" : 1 | |
56122987 DM |
9001 | }, |
9002 | { | |
56122987 | 9003 | "info" : { |
7aacca6f | 9004 | "GET" : { |
56122987 | 9005 | "returns" : { |
7aacca6f | 9006 | "type" : "object", |
56122987 | 9007 | "properties" : { |
7aacca6f | 9008 | "hasFeature" : { |
56122987 | 9009 | "type" : "boolean" |
7aacca6f | 9010 | }, |
56122987 | 9011 | "nodes" : { |
7aacca6f | 9012 | "type" : "array", |
56122987 DM |
9013 | "items" : { |
9014 | "type" : "string" | |
7aacca6f | 9015 | } |
56122987 | 9016 | } |
7aacca6f | 9017 | } |
56122987 | 9018 | }, |
7aacca6f DM |
9019 | "description" : "Check if feature for virtual machine is available.", |
9020 | "proxyto" : "node", | |
56122987 DM |
9021 | "permissions" : { |
9022 | "check" : [ | |
9023 | "perm", | |
9024 | "/vms/{vmid}", | |
9025 | [ | |
9026 | "VM.Audit" | |
9027 | ] | |
9028 | ] | |
9029 | }, | |
7aacca6f DM |
9030 | "method" : "GET", |
9031 | "protected" : 1, | |
9032 | "name" : "vm_feature", | |
56122987 DM |
9033 | "parameters" : { |
9034 | "properties" : { | |
9035 | "vmid" : { | |
56122987 | 9036 | "minimum" : 1, |
7aacca6f | 9037 | "format" : "pve-vmid", |
56122987 | 9038 | "type" : "integer", |
7aacca6f | 9039 | "description" : "The (unique) ID of the VM." |
56122987 DM |
9040 | }, |
9041 | "feature" : { | |
56122987 DM |
9042 | "enum" : [ |
9043 | "snapshot", | |
9044 | "clone", | |
9045 | "copy" | |
9046 | ], | |
7aacca6f DM |
9047 | "description" : "Feature to check.", |
9048 | "type" : "string" | |
56122987 DM |
9049 | }, |
9050 | "snapname" : { | |
56122987 | 9051 | "maxLength" : 40, |
7aacca6f | 9052 | "format" : "pve-configid", |
56122987 | 9053 | "description" : "The name of the snapshot.", |
7aacca6f DM |
9054 | "optional" : 1, |
9055 | "type" : "string" | |
9056 | }, | |
9057 | "node" : { | |
56122987 | 9058 | "type" : "string", |
7aacca6f DM |
9059 | "description" : "The cluster node name.", |
9060 | "format" : "pve-node" | |
56122987 DM |
9061 | } |
9062 | }, | |
9063 | "additionalProperties" : 0 | |
9064 | } | |
9065 | } | |
9066 | }, | |
7aacca6f DM |
9067 | "text" : "feature", |
9068 | "leaf" : 1, | |
56122987 DM |
9069 | "path" : "/nodes/{node}/qemu/{vmid}/feature" |
9070 | }, | |
9071 | { | |
7aacca6f | 9072 | "leaf" : 1, |
56122987 DM |
9073 | "path" : "/nodes/{node}/qemu/{vmid}/clone", |
9074 | "info" : { | |
9075 | "POST" : { | |
56122987 | 9076 | "method" : "POST", |
7aacca6f DM |
9077 | "protected" : 1, |
9078 | "name" : "clone_vm", | |
56122987 DM |
9079 | "parameters" : { |
9080 | "additionalProperties" : 0, | |
9081 | "properties" : { | |
7aacca6f DM |
9082 | "newid" : { |
9083 | "minimum" : 1, | |
9084 | "format" : "pve-vmid", | |
9085 | "description" : "VMID for the clone.", | |
9086 | "type" : "integer" | |
56122987 | 9087 | }, |
7aacca6f DM |
9088 | "storage" : { |
9089 | "format" : "pve-storage-id", | |
9090 | "description" : "Target storage for full clone.", | |
9091 | "requires" : "full", | |
56122987 | 9092 | "optional" : 1, |
7aacca6f | 9093 | "type" : "string" |
56122987 DM |
9094 | }, |
9095 | "target" : { | |
56122987 | 9096 | "format" : "pve-node", |
7aacca6f DM |
9097 | "description" : "Target node. Only allowed if the original VM is on shared storage.", |
9098 | "type" : "string", | |
9099 | "optional" : 1 | |
56122987 | 9100 | }, |
7aacca6f DM |
9101 | "snapname" : { |
9102 | "format" : "pve-configid", | |
9103 | "maxLength" : 40, | |
9104 | "description" : "The name of the snapshot.", | |
56122987 | 9105 | "type" : "string", |
56122987 DM |
9106 | "optional" : 1 |
9107 | }, | |
9108 | "node" : { | |
56122987 | 9109 | "format" : "pve-node", |
7aacca6f | 9110 | "description" : "The cluster node name.", |
56122987 DM |
9111 | "type" : "string" |
9112 | }, | |
9113 | "name" : { | |
7aacca6f DM |
9114 | "optional" : 1, |
9115 | "type" : "string", | |
56122987 | 9116 | "description" : "Set a name for the new VM.", |
7aacca6f DM |
9117 | "format" : "dns-name" |
9118 | }, | |
9119 | "pool" : { | |
9120 | "description" : "Add the new VM to the specified pool.", | |
9121 | "type" : "string", | |
56122987 | 9122 | "optional" : 1, |
7aacca6f | 9123 | "format" : "pve-poolid" |
56122987 | 9124 | }, |
7aacca6f | 9125 | "vmid" : { |
56122987 | 9126 | "type" : "integer", |
7aacca6f DM |
9127 | "description" : "The (unique) ID of the VM.", |
9128 | "minimum" : 1, | |
9129 | "format" : "pve-vmid" | |
56122987 DM |
9130 | }, |
9131 | "format" : { | |
56122987 DM |
9132 | "enum" : [ |
9133 | "raw", | |
9134 | "qcow2", | |
9135 | "vmdk" | |
9136 | ], | |
9137 | "description" : "Target format for file storage.", | |
7aacca6f DM |
9138 | "requires" : "full", |
9139 | "optional" : 1, | |
9140 | "type" : "string" | |
56122987 | 9141 | }, |
7aacca6f DM |
9142 | "full" : { |
9143 | "optional" : 1, | |
9144 | "type" : "boolean", | |
9145 | "default" : 0, | |
9146 | "description" : "Create a full copy of all disk. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default." | |
56122987 | 9147 | }, |
7aacca6f DM |
9148 | "description" : { |
9149 | "description" : "Description for the new VM.", | |
56122987 | 9150 | "optional" : 1, |
56122987 DM |
9151 | "type" : "string" |
9152 | } | |
9153 | } | |
9154 | }, | |
7aacca6f DM |
9155 | "returns" : { |
9156 | "type" : "string" | |
9157 | }, | |
9158 | "description" : "Create a copy of virtual machine/template.", | |
9159 | "proxyto" : "node", | |
56122987 | 9160 | "permissions" : { |
7aacca6f | 9161 | "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage.", |
56122987 DM |
9162 | "check" : [ |
9163 | "and", | |
9164 | [ | |
9165 | "perm", | |
9166 | "/vms/{vmid}", | |
9167 | [ | |
9168 | "VM.Clone" | |
9169 | ] | |
9170 | ], | |
9171 | [ | |
9172 | "or", | |
9173 | [ | |
9174 | "perm", | |
9175 | "/vms/{newid}", | |
9176 | [ | |
9177 | "VM.Allocate" | |
9178 | ] | |
9179 | ], | |
9180 | [ | |
9181 | "perm", | |
9182 | "/pool/{pool}", | |
9183 | [ | |
9184 | "VM.Allocate" | |
9185 | ], | |
9186 | "require_param", | |
9187 | "pool" | |
9188 | ] | |
9189 | ] | |
7aacca6f | 9190 | ] |
56122987 DM |
9191 | } |
9192 | } | |
9193 | }, | |
56122987 DM |
9194 | "text" : "clone" |
9195 | }, | |
9196 | { | |
56122987 | 9197 | "text" : "move_disk", |
56122987 DM |
9198 | "info" : { |
9199 | "POST" : { | |
7aacca6f DM |
9200 | "proxyto" : "node", |
9201 | "description" : "Move volume to different storage.", | |
56122987 DM |
9202 | "permissions" : { |
9203 | "check" : [ | |
9204 | "and", | |
9205 | [ | |
9206 | "perm", | |
9207 | "/vms/{vmid}", | |
9208 | [ | |
9209 | "VM.Config.Disk" | |
9210 | ] | |
9211 | ], | |
9212 | [ | |
9213 | "perm", | |
9214 | "/storage/{storage}", | |
9215 | [ | |
9216 | "Datastore.AllocateSpace" | |
9217 | ] | |
9218 | ] | |
9219 | ], | |
9220 | "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage." | |
9221 | }, | |
7aacca6f DM |
9222 | "returns" : { |
9223 | "type" : "string", | |
9224 | "description" : "the task ID." | |
9225 | }, | |
56122987 | 9226 | "protected" : 1, |
56122987 DM |
9227 | "parameters" : { |
9228 | "additionalProperties" : 0, | |
9229 | "properties" : { | |
7aacca6f DM |
9230 | "node" : { |
9231 | "format" : "pve-node", | |
9232 | "description" : "The cluster node name.", | |
9233 | "type" : "string" | |
9234 | }, | |
56122987 | 9235 | "delete" : { |
56122987 | 9236 | "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.", |
7aacca6f DM |
9237 | "type" : "boolean", |
9238 | "optional" : 1, | |
9239 | "default" : 0 | |
56122987 | 9240 | }, |
7aacca6f | 9241 | "storage" : { |
56122987 | 9242 | "type" : "string", |
7aacca6f DM |
9243 | "description" : "Target storage.", |
9244 | "format" : "pve-storage-id" | |
56122987 DM |
9245 | }, |
9246 | "vmid" : { | |
9247 | "description" : "The (unique) ID of the VM.", | |
56122987 | 9248 | "type" : "integer", |
7aacca6f | 9249 | "format" : "pve-vmid", |
56122987 DM |
9250 | "minimum" : 1 |
9251 | }, | |
56122987 DM |
9252 | "disk" : { |
9253 | "type" : "string", | |
9254 | "description" : "The disk you want to move.", | |
9255 | "enum" : [ | |
9256 | "ide0", | |
9257 | "ide1", | |
9258 | "ide2", | |
9259 | "ide3", | |
9260 | "scsi0", | |
9261 | "scsi1", | |
9262 | "scsi2", | |
9263 | "scsi3", | |
9264 | "scsi4", | |
9265 | "scsi5", | |
9266 | "scsi6", | |
9267 | "scsi7", | |
9268 | "scsi8", | |
9269 | "scsi9", | |
9270 | "scsi10", | |
9271 | "scsi11", | |
9272 | "scsi12", | |
9273 | "scsi13", | |
9274 | "virtio0", | |
9275 | "virtio1", | |
9276 | "virtio2", | |
9277 | "virtio3", | |
9278 | "virtio4", | |
9279 | "virtio5", | |
9280 | "virtio6", | |
9281 | "virtio7", | |
9282 | "virtio8", | |
9283 | "virtio9", | |
9284 | "virtio10", | |
9285 | "virtio11", | |
9286 | "virtio12", | |
9287 | "virtio13", | |
9288 | "virtio14", | |
9289 | "virtio15", | |
9290 | "sata0", | |
9291 | "sata1", | |
9292 | "sata2", | |
9293 | "sata3", | |
9294 | "sata4", | |
9295 | "sata5" | |
9296 | ] | |
9297 | }, | |
9298 | "digest" : { | |
9299 | "maxLength" : 40, | |
9300 | "optional" : 1, | |
56122987 | 9301 | "type" : "string", |
7aacca6f DM |
9302 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
9303 | }, | |
9304 | "format" : { | |
9305 | "description" : "Target Format.", | |
9306 | "enum" : [ | |
9307 | "raw", | |
9308 | "qcow2", | |
9309 | "vmdk" | |
9310 | ], | |
9311 | "optional" : 1, | |
9312 | "type" : "string" | |
56122987 DM |
9313 | } |
9314 | } | |
9315 | }, | |
56122987 | 9316 | "name" : "move_vm_disk", |
7aacca6f | 9317 | "method" : "POST" |
56122987 | 9318 | } |
7aacca6f DM |
9319 | }, |
9320 | "path" : "/nodes/{node}/qemu/{vmid}/move_disk", | |
9321 | "leaf" : 1 | |
56122987 DM |
9322 | }, |
9323 | { | |
56122987 DM |
9324 | "leaf" : 1, |
9325 | "path" : "/nodes/{node}/qemu/{vmid}/migrate", | |
9326 | "info" : { | |
9327 | "POST" : { | |
7aacca6f DM |
9328 | "permissions" : { |
9329 | "check" : [ | |
9330 | "perm", | |
9331 | "/vms/{vmid}", | |
9332 | [ | |
9333 | "VM.Migrate" | |
9334 | ] | |
9335 | ] | |
9336 | }, | |
56122987 | 9337 | "proxyto" : "node", |
7aacca6f DM |
9338 | "description" : "Migrate virtual machine. Creates a new migration task.", |
9339 | "returns" : { | |
9340 | "type" : "string", | |
9341 | "description" : "the task ID." | |
9342 | }, | |
9343 | "name" : "migrate_vm", | |
56122987 | 9344 | "parameters" : { |
56122987 | 9345 | "properties" : { |
7aacca6f DM |
9346 | "node" : { |
9347 | "format" : "pve-node", | |
9348 | "type" : "string", | |
9349 | "description" : "The cluster node name." | |
56122987 DM |
9350 | }, |
9351 | "online" : { | |
9352 | "optional" : 1, | |
7aacca6f DM |
9353 | "type" : "boolean", |
9354 | "description" : "Use online/live migration." | |
56122987 DM |
9355 | }, |
9356 | "force" : { | |
9357 | "type" : "boolean", | |
9358 | "optional" : 1, | |
9359 | "description" : "Allow to migrate VMs which use local devices. Only root may use this option." | |
9360 | }, | |
7aacca6f DM |
9361 | "vmid" : { |
9362 | "type" : "integer", | |
9363 | "description" : "The (unique) ID of the VM.", | |
9364 | "minimum" : 1, | |
9365 | "format" : "pve-vmid" | |
9366 | }, | |
56122987 | 9367 | "target" : { |
7aacca6f | 9368 | "type" : "string", |
56122987 | 9369 | "description" : "Target node.", |
7aacca6f | 9370 | "format" : "pve-node" |
56122987 | 9371 | } |
7aacca6f DM |
9372 | }, |
9373 | "additionalProperties" : 0 | |
56122987 DM |
9374 | }, |
9375 | "protected" : 1, | |
7aacca6f | 9376 | "method" : "POST" |
56122987 | 9377 | } |
7aacca6f DM |
9378 | }, |
9379 | "text" : "migrate" | |
56122987 DM |
9380 | }, |
9381 | { | |
7aacca6f DM |
9382 | "path" : "/nodes/{node}/qemu/{vmid}/monitor", |
9383 | "leaf" : 1, | |
9384 | "text" : "monitor", | |
56122987 DM |
9385 | "info" : { |
9386 | "POST" : { | |
9387 | "method" : "POST", | |
56122987 | 9388 | "parameters" : { |
7aacca6f | 9389 | "additionalProperties" : 0, |
56122987 DM |
9390 | "properties" : { |
9391 | "node" : { | |
7aacca6f | 9392 | "format" : "pve-node", |
56122987 | 9393 | "type" : "string", |
7aacca6f | 9394 | "description" : "The cluster node name." |
56122987 DM |
9395 | }, |
9396 | "command" : { | |
7aacca6f DM |
9397 | "type" : "string", |
9398 | "description" : "The monitor command." | |
56122987 DM |
9399 | }, |
9400 | "vmid" : { | |
56122987 | 9401 | "format" : "pve-vmid", |
7aacca6f DM |
9402 | "minimum" : 1, |
9403 | "type" : "integer", | |
9404 | "description" : "The (unique) ID of the VM." | |
56122987 | 9405 | } |
7aacca6f | 9406 | } |
56122987 | 9407 | }, |
7aacca6f | 9408 | "name" : "monitor", |
56122987 | 9409 | "protected" : 1, |
7aacca6f DM |
9410 | "returns" : { |
9411 | "type" : "string" | |
9412 | }, | |
56122987 DM |
9413 | "permissions" : { |
9414 | "check" : [ | |
9415 | "perm", | |
9416 | "/vms/{vmid}", | |
9417 | [ | |
9418 | "VM.Monitor" | |
9419 | ] | |
9420 | ] | |
7aacca6f DM |
9421 | }, |
9422 | "description" : "Execute Qemu monitor commands.", | |
9423 | "proxyto" : "node" | |
56122987 | 9424 | } |
7aacca6f | 9425 | } |
56122987 DM |
9426 | }, |
9427 | { | |
9428 | "leaf" : 1, | |
56122987 DM |
9429 | "path" : "/nodes/{node}/qemu/{vmid}/resize", |
9430 | "info" : { | |
9431 | "PUT" : { | |
56122987 DM |
9432 | "protected" : 1, |
9433 | "parameters" : { | |
9434 | "properties" : { | |
7aacca6f DM |
9435 | "node" : { |
9436 | "format" : "pve-node", | |
9437 | "type" : "string", | |
9438 | "description" : "The cluster node name." | |
9439 | }, | |
56122987 DM |
9440 | "size" : { |
9441 | "description" : "The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.", | |
9442 | "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?", | |
9443 | "type" : "string" | |
9444 | }, | |
56122987 | 9445 | "disk" : { |
7aacca6f | 9446 | "type" : "string", |
56122987 DM |
9447 | "description" : "The disk you want to resize.", |
9448 | "enum" : [ | |
9449 | "ide0", | |
9450 | "ide1", | |
9451 | "ide2", | |
9452 | "ide3", | |
9453 | "scsi0", | |
9454 | "scsi1", | |
9455 | "scsi2", | |
9456 | "scsi3", | |
9457 | "scsi4", | |
9458 | "scsi5", | |
9459 | "scsi6", | |
9460 | "scsi7", | |
9461 | "scsi8", | |
9462 | "scsi9", | |
9463 | "scsi10", | |
9464 | "scsi11", | |
9465 | "scsi12", | |
9466 | "scsi13", | |
9467 | "virtio0", | |
9468 | "virtio1", | |
9469 | "virtio2", | |
9470 | "virtio3", | |
9471 | "virtio4", | |
9472 | "virtio5", | |
9473 | "virtio6", | |
9474 | "virtio7", | |
9475 | "virtio8", | |
9476 | "virtio9", | |
9477 | "virtio10", | |
9478 | "virtio11", | |
9479 | "virtio12", | |
9480 | "virtio13", | |
9481 | "virtio14", | |
9482 | "virtio15", | |
9483 | "sata0", | |
9484 | "sata1", | |
9485 | "sata2", | |
9486 | "sata3", | |
9487 | "sata4", | |
9488 | "sata5" | |
7aacca6f | 9489 | ] |
56122987 DM |
9490 | }, |
9491 | "digest" : { | |
56122987 DM |
9492 | "maxLength" : 40, |
9493 | "optional" : 1, | |
56122987 | 9494 | "type" : "string", |
7aacca6f DM |
9495 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
9496 | }, | |
9497 | "vmid" : { | |
9498 | "type" : "integer", | |
9499 | "description" : "The (unique) ID of the VM.", | |
9500 | "minimum" : 1, | |
9501 | "format" : "pve-vmid" | |
56122987 DM |
9502 | }, |
9503 | "skiplock" : { | |
9504 | "description" : "Ignore locks - only root is allowed to use this option.", | |
9505 | "optional" : 1, | |
9506 | "type" : "boolean" | |
9507 | } | |
9508 | }, | |
9509 | "additionalProperties" : 0 | |
9510 | }, | |
56122987 | 9511 | "name" : "resize_vm", |
7aacca6f DM |
9512 | "method" : "PUT", |
9513 | "description" : "Extend volume size.", | |
9514 | "proxyto" : "node", | |
56122987 DM |
9515 | "permissions" : { |
9516 | "check" : [ | |
9517 | "perm", | |
9518 | "/vms/{vmid}", | |
9519 | [ | |
7aacca6f | 9520 | "VM.Config.Disk" |
56122987 DM |
9521 | ] |
9522 | ] | |
9523 | }, | |
7aacca6f DM |
9524 | "returns" : { |
9525 | "type" : "null" | |
9526 | } | |
9527 | } | |
9528 | }, | |
9529 | "text" : "resize" | |
9530 | }, | |
9531 | { | |
9532 | "leaf" : 0, | |
9533 | "path" : "/nodes/{node}/qemu/{vmid}/snapshot", | |
9534 | "info" : { | |
9535 | "POST" : { | |
56122987 | 9536 | "protected" : 1, |
7aacca6f | 9537 | "name" : "snapshot", |
56122987 | 9538 | "parameters" : { |
7aacca6f | 9539 | "additionalProperties" : 0, |
56122987 | 9540 | "properties" : { |
56122987 | 9541 | "vmstate" : { |
7aacca6f | 9542 | "description" : "Save the vmstate", |
56122987 | 9543 | "optional" : 1, |
7aacca6f | 9544 | "type" : "boolean" |
56122987 DM |
9545 | }, |
9546 | "vmid" : { | |
56122987 | 9547 | "type" : "integer", |
7aacca6f | 9548 | "description" : "The (unique) ID of the VM.", |
56122987 DM |
9549 | "format" : "pve-vmid", |
9550 | "minimum" : 1 | |
7aacca6f DM |
9551 | }, |
9552 | "snapname" : { | |
56122987 | 9553 | "type" : "string", |
7aacca6f DM |
9554 | "description" : "The name of the snapshot.", |
9555 | "format" : "pve-configid", | |
9556 | "maxLength" : 40 | |
9557 | }, | |
9558 | "node" : { | |
56122987 | 9559 | "format" : "pve-node", |
7aacca6f DM |
9560 | "description" : "The cluster node name.", |
9561 | "type" : "string" | |
56122987 | 9562 | }, |
7aacca6f DM |
9563 | "description" : { |
9564 | "description" : "A textual description or comment.", | |
9565 | "optional" : 1, | |
9566 | "type" : "string" | |
56122987 DM |
9567 | } |
9568 | } | |
9569 | }, | |
7aacca6f DM |
9570 | "method" : "POST", |
9571 | "proxyto" : "node", | |
9572 | "description" : "Snapshot a VM.", | |
56122987 DM |
9573 | "permissions" : { |
9574 | "check" : [ | |
9575 | "perm", | |
9576 | "/vms/{vmid}", | |
9577 | [ | |
7aacca6f | 9578 | "VM.Snapshot" |
56122987 DM |
9579 | ] |
9580 | ] | |
9581 | }, | |
56122987 | 9582 | "returns" : { |
7aacca6f DM |
9583 | "type" : "string", |
9584 | "description" : "the task ID." | |
9585 | } | |
9586 | }, | |
9587 | "GET" : { | |
56122987 | 9588 | "method" : "GET", |
7aacca6f DM |
9589 | "name" : "snapshot_list", |
9590 | "parameters" : { | |
9591 | "properties" : { | |
9592 | "vmid" : { | |
9593 | "type" : "integer", | |
9594 | "description" : "The (unique) ID of the VM.", | |
9595 | "format" : "pve-vmid", | |
9596 | "minimum" : 1 | |
9597 | }, | |
9598 | "node" : { | |
9599 | "type" : "string", | |
9600 | "description" : "The cluster node name.", | |
9601 | "format" : "pve-node" | |
9602 | } | |
9603 | }, | |
9604 | "additionalProperties" : 0 | |
9605 | }, | |
9606 | "protected" : 1, | |
9607 | "returns" : { | |
9608 | "items" : { | |
9609 | "properties" : {}, | |
9610 | "type" : "object" | |
9611 | }, | |
9612 | "links" : [ | |
9613 | { | |
9614 | "href" : "{name}", | |
9615 | "rel" : "child" | |
9616 | } | |
9617 | ], | |
9618 | "type" : "array" | |
9619 | }, | |
9620 | "permissions" : { | |
9621 | "check" : [ | |
9622 | "perm", | |
9623 | "/vms/{vmid}", | |
9624 | [ | |
9625 | "VM.Audit" | |
9626 | ] | |
9627 | ] | |
9628 | }, | |
9629 | "proxyto" : "node", | |
9630 | "description" : "List all snapshots." | |
9631 | } | |
9632 | }, | |
56122987 DM |
9633 | "children" : [ |
9634 | { | |
7aacca6f DM |
9635 | "leaf" : 0, |
9636 | "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}", | |
9637 | "info" : { | |
9638 | "GET" : { | |
9639 | "method" : "GET", | |
9640 | "returns" : { | |
9641 | "type" : "array", | |
9642 | "items" : { | |
9643 | "properties" : {}, | |
9644 | "type" : "object" | |
9645 | }, | |
9646 | "links" : [ | |
9647 | { | |
9648 | "href" : "{cmd}", | |
9649 | "rel" : "child" | |
9650 | } | |
9651 | ] | |
9652 | }, | |
9653 | "name" : "snapshot_cmd_idx", | |
9654 | "permissions" : { | |
9655 | "user" : "all" | |
9656 | }, | |
9657 | "parameters" : { | |
9658 | "properties" : { | |
9659 | "vmid" : { | |
9660 | "minimum" : 1, | |
9661 | "format" : "pve-vmid", | |
9662 | "type" : "integer", | |
9663 | "description" : "The (unique) ID of the VM." | |
9664 | }, | |
9665 | "node" : { | |
9666 | "format" : "pve-node", | |
9667 | "type" : "string", | |
9668 | "description" : "The cluster node name." | |
9669 | }, | |
9670 | "snapname" : { | |
9671 | "format" : "pve-configid", | |
9672 | "maxLength" : 40, | |
9673 | "description" : "The name of the snapshot.", | |
9674 | "type" : "string" | |
9675 | } | |
9676 | }, | |
9677 | "additionalProperties" : 0 | |
9678 | }, | |
9679 | "description" : "" | |
9680 | }, | |
9681 | "DELETE" : { | |
9682 | "proxyto" : "node", | |
9683 | "description" : "Delete a VM snapshot.", | |
9684 | "permissions" : { | |
9685 | "check" : [ | |
9686 | "perm", | |
9687 | "/vms/{vmid}", | |
9688 | [ | |
9689 | "VM.Snapshot" | |
9690 | ] | |
9691 | ] | |
9692 | }, | |
9693 | "returns" : { | |
9694 | "type" : "string", | |
9695 | "description" : "the task ID." | |
9696 | }, | |
9697 | "protected" : 1, | |
9698 | "parameters" : { | |
9699 | "properties" : { | |
9700 | "vmid" : { | |
9701 | "description" : "The (unique) ID of the VM.", | |
9702 | "type" : "integer", | |
9703 | "format" : "pve-vmid", | |
9704 | "minimum" : 1 | |
9705 | }, | |
9706 | "node" : { | |
9707 | "description" : "The cluster node name.", | |
9708 | "type" : "string", | |
9709 | "format" : "pve-node" | |
9710 | }, | |
9711 | "snapname" : { | |
9712 | "maxLength" : 40, | |
9713 | "format" : "pve-configid", | |
9714 | "description" : "The name of the snapshot.", | |
9715 | "type" : "string" | |
9716 | }, | |
9717 | "force" : { | |
9718 | "description" : "For removal from config file, even if removing disk snapshots fails.", | |
9719 | "optional" : 1, | |
9720 | "type" : "boolean" | |
9721 | } | |
9722 | }, | |
9723 | "additionalProperties" : 0 | |
9724 | }, | |
9725 | "name" : "delsnapshot", | |
9726 | "method" : "DELETE" | |
9727 | } | |
9728 | }, | |
9729 | "text" : "{snapname}", | |
56122987 DM |
9730 | "children" : [ |
9731 | { | |
9732 | "text" : "config", | |
56122987 | 9733 | "info" : { |
7aacca6f DM |
9734 | "PUT" : { |
9735 | "protected" : 1, | |
56122987 | 9736 | "parameters" : { |
56122987 | 9737 | "properties" : { |
7aacca6f | 9738 | "description" : { |
56122987 | 9739 | "type" : "string", |
7aacca6f DM |
9740 | "optional" : 1, |
9741 | "description" : "A textual description or comment." | |
56122987 DM |
9742 | }, |
9743 | "node" : { | |
56122987 | 9744 | "format" : "pve-node", |
7aacca6f | 9745 | "type" : "string", |
56122987 | 9746 | "description" : "The cluster node name." |
7aacca6f DM |
9747 | }, |
9748 | "snapname" : { | |
9749 | "maxLength" : 40, | |
9750 | "format" : "pve-configid", | |
9751 | "type" : "string", | |
9752 | "description" : "The name of the snapshot." | |
9753 | }, | |
9754 | "vmid" : { | |
9755 | "format" : "pve-vmid", | |
9756 | "minimum" : 1, | |
9757 | "type" : "integer", | |
9758 | "description" : "The (unique) ID of the VM." | |
56122987 | 9759 | } |
7aacca6f DM |
9760 | }, |
9761 | "additionalProperties" : 0 | |
56122987 | 9762 | }, |
7aacca6f DM |
9763 | "name" : "update_snapshot_config", |
9764 | "method" : "PUT", | |
9765 | "proxyto" : "node", | |
9766 | "description" : "Update snapshot metadata.", | |
56122987 DM |
9767 | "permissions" : { |
9768 | "check" : [ | |
9769 | "perm", | |
9770 | "/vms/{vmid}", | |
9771 | [ | |
9772 | "VM.Snapshot" | |
9773 | ] | |
9774 | ] | |
9775 | }, | |
56122987 DM |
9776 | "returns" : { |
9777 | "type" : "null" | |
7aacca6f DM |
9778 | } |
9779 | }, | |
9780 | "GET" : { | |
9781 | "method" : "GET", | |
9782 | "returns" : { | |
9783 | "type" : "object" | |
56122987 | 9784 | }, |
7aacca6f DM |
9785 | "proxyto" : "node", |
9786 | "description" : "Get snapshot configuration", | |
56122987 DM |
9787 | "parameters" : { |
9788 | "properties" : { | |
56122987 | 9789 | "node" : { |
56122987 | 9790 | "type" : "string", |
7aacca6f | 9791 | "description" : "The cluster node name.", |
56122987 DM |
9792 | "format" : "pve-node" |
9793 | }, | |
56122987 DM |
9794 | "snapname" : { |
9795 | "description" : "The name of the snapshot.", | |
56122987 | 9796 | "type" : "string", |
7aacca6f | 9797 | "maxLength" : 40, |
56122987 | 9798 | "format" : "pve-configid" |
7aacca6f DM |
9799 | }, |
9800 | "vmid" : { | |
9801 | "description" : "The (unique) ID of the VM.", | |
9802 | "type" : "integer", | |
9803 | "minimum" : 1, | |
9804 | "format" : "pve-vmid" | |
56122987 DM |
9805 | } |
9806 | }, | |
9807 | "additionalProperties" : 0 | |
9808 | }, | |
7aacca6f DM |
9809 | "name" : "get_snapshot_config", |
9810 | "permissions" : { | |
9811 | "check" : [ | |
9812 | "perm", | |
9813 | "/vms/{vmid}", | |
9814 | [ | |
9815 | "VM.Snapshot" | |
9816 | ] | |
9817 | ] | |
9818 | } | |
56122987 DM |
9819 | } |
9820 | }, | |
7aacca6f DM |
9821 | "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config", |
9822 | "leaf" : 1 | |
56122987 DM |
9823 | }, |
9824 | { | |
9825 | "leaf" : 1, | |
7aacca6f | 9826 | "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback", |
56122987 DM |
9827 | "info" : { |
9828 | "POST" : { | |
7aacca6f | 9829 | "method" : "POST", |
56122987 DM |
9830 | "parameters" : { |
9831 | "additionalProperties" : 0, | |
9832 | "properties" : { | |
56122987 | 9833 | "snapname" : { |
56122987 DM |
9834 | "format" : "pve-configid", |
9835 | "maxLength" : 40, | |
7aacca6f | 9836 | "type" : "string", |
56122987 DM |
9837 | "description" : "The name of the snapshot." |
9838 | }, | |
7aacca6f DM |
9839 | "node" : { |
9840 | "format" : "pve-node", | |
9841 | "description" : "The cluster node name.", | |
9842 | "type" : "string" | |
9843 | }, | |
56122987 | 9844 | "vmid" : { |
7aacca6f | 9845 | "description" : "The (unique) ID of the VM.", |
56122987 | 9846 | "type" : "integer", |
56122987 | 9847 | "minimum" : 1, |
7aacca6f | 9848 | "format" : "pve-vmid" |
56122987 DM |
9849 | } |
9850 | } | |
9851 | }, | |
7aacca6f | 9852 | "name" : "rollback", |
56122987 | 9853 | "protected" : 1, |
7aacca6f DM |
9854 | "returns" : { |
9855 | "type" : "string", | |
9856 | "description" : "the task ID." | |
9857 | }, | |
9858 | "permissions" : { | |
56122987 DM |
9859 | "check" : [ |
9860 | "perm", | |
9861 | "/vms/{vmid}", | |
9862 | [ | |
9863 | "VM.Snapshot" | |
9864 | ] | |
9865 | ] | |
9866 | }, | |
7aacca6f | 9867 | "proxyto" : "node", |
56122987 DM |
9868 | "description" : "Rollback VM state to specified snapshot." |
9869 | } | |
9870 | }, | |
7aacca6f | 9871 | "text" : "rollback" |
56122987 | 9872 | } |
7aacca6f | 9873 | ] |
56122987 DM |
9874 | } |
9875 | ], | |
7aacca6f | 9876 | "text" : "snapshot" |
56122987 DM |
9877 | }, |
9878 | { | |
9879 | "text" : "template", | |
56122987 DM |
9880 | "info" : { |
9881 | "POST" : { | |
56122987 | 9882 | "name" : "template", |
56122987 | 9883 | "parameters" : { |
7aacca6f | 9884 | "additionalProperties" : 0, |
56122987 DM |
9885 | "properties" : { |
9886 | "node" : { | |
56122987 | 9887 | "format" : "pve-node", |
7aacca6f DM |
9888 | "type" : "string", |
9889 | "description" : "The cluster node name." | |
56122987 DM |
9890 | }, |
9891 | "disk" : { | |
56122987 DM |
9892 | "description" : "If you want to convert only 1 disk to base image.", |
9893 | "enum" : [ | |
9894 | "ide0", | |
9895 | "ide1", | |
9896 | "ide2", | |
9897 | "ide3", | |
9898 | "scsi0", | |
9899 | "scsi1", | |
9900 | "scsi2", | |
9901 | "scsi3", | |
9902 | "scsi4", | |
9903 | "scsi5", | |
9904 | "scsi6", | |
9905 | "scsi7", | |
9906 | "scsi8", | |
9907 | "scsi9", | |
9908 | "scsi10", | |
9909 | "scsi11", | |
9910 | "scsi12", | |
9911 | "scsi13", | |
9912 | "virtio0", | |
9913 | "virtio1", | |
9914 | "virtio2", | |
9915 | "virtio3", | |
9916 | "virtio4", | |
9917 | "virtio5", | |
9918 | "virtio6", | |
9919 | "virtio7", | |
9920 | "virtio8", | |
9921 | "virtio9", | |
9922 | "virtio10", | |
9923 | "virtio11", | |
9924 | "virtio12", | |
9925 | "virtio13", | |
9926 | "virtio14", | |
9927 | "virtio15", | |
9928 | "sata0", | |
9929 | "sata1", | |
9930 | "sata2", | |
9931 | "sata3", | |
9932 | "sata4", | |
9933 | "sata5" | |
9934 | ], | |
7aacca6f | 9935 | "optional" : 1, |
56122987 DM |
9936 | "type" : "string" |
9937 | }, | |
9938 | "vmid" : { | |
7aacca6f | 9939 | "description" : "The (unique) ID of the VM.", |
56122987 | 9940 | "type" : "integer", |
7aacca6f DM |
9941 | "format" : "pve-vmid", |
9942 | "minimum" : 1 | |
56122987 | 9943 | } |
7aacca6f | 9944 | } |
56122987 | 9945 | }, |
7aacca6f DM |
9946 | "protected" : 1, |
9947 | "method" : "POST", | |
9948 | "permissions" : { | |
9949 | "check" : [ | |
9950 | "perm", | |
9951 | "/vms/{vmid}", | |
9952 | [ | |
9953 | "VM.Allocate" | |
9954 | ] | |
9955 | ], | |
9956 | "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" | |
9957 | }, | |
9958 | "proxyto" : "node", | |
9959 | "description" : "Create a Template.", | |
9960 | "returns" : { | |
9961 | "type" : "null" | |
9962 | } | |
56122987 DM |
9963 | } |
9964 | }, | |
7aacca6f DM |
9965 | "path" : "/nodes/{node}/qemu/{vmid}/template", |
9966 | "leaf" : 1 | |
56122987 DM |
9967 | } |
9968 | ], | |
7aacca6f DM |
9969 | "info" : { |
9970 | "GET" : { | |
9971 | "returns" : { | |
9972 | "items" : { | |
9973 | "type" : "object", | |
9974 | "properties" : { | |
9975 | "subdir" : { | |
9976 | "type" : "string" | |
9977 | } | |
9978 | } | |
9979 | }, | |
9980 | "links" : [ | |
9981 | { | |
9982 | "href" : "{subdir}", | |
9983 | "rel" : "child" | |
9984 | } | |
9985 | ], | |
9986 | "type" : "array" | |
9987 | }, | |
9988 | "method" : "GET", | |
9989 | "permissions" : { | |
9990 | "user" : "all" | |
9991 | }, | |
9992 | "name" : "vmdiridx", | |
9993 | "parameters" : { | |
9994 | "properties" : { | |
9995 | "node" : { | |
9996 | "format" : "pve-node", | |
9997 | "type" : "string", | |
9998 | "description" : "The cluster node name." | |
9999 | }, | |
10000 | "vmid" : { | |
10001 | "minimum" : 1, | |
10002 | "format" : "pve-vmid", | |
10003 | "type" : "integer", | |
10004 | "description" : "The (unique) ID of the VM." | |
10005 | } | |
10006 | }, | |
10007 | "additionalProperties" : 0 | |
10008 | }, | |
10009 | "description" : "Directory index", | |
10010 | "proxyto" : "node" | |
10011 | }, | |
10012 | "DELETE" : { | |
10013 | "proxyto" : "node", | |
10014 | "description" : "Destroy the vm (also delete all used/owned volumes).", | |
10015 | "permissions" : { | |
10016 | "check" : [ | |
10017 | "perm", | |
10018 | "/vms/{vmid}", | |
10019 | [ | |
10020 | "VM.Allocate" | |
10021 | ] | |
10022 | ] | |
10023 | }, | |
10024 | "returns" : { | |
10025 | "type" : "string" | |
10026 | }, | |
10027 | "protected" : 1, | |
10028 | "parameters" : { | |
10029 | "properties" : { | |
10030 | "vmid" : { | |
10031 | "minimum" : 1, | |
10032 | "format" : "pve-vmid", | |
10033 | "type" : "integer", | |
10034 | "description" : "The (unique) ID of the VM." | |
10035 | }, | |
10036 | "skiplock" : { | |
10037 | "optional" : 1, | |
10038 | "type" : "boolean", | |
10039 | "description" : "Ignore locks - only root is allowed to use this option." | |
10040 | }, | |
10041 | "node" : { | |
10042 | "type" : "string", | |
10043 | "description" : "The cluster node name.", | |
10044 | "format" : "pve-node" | |
10045 | } | |
10046 | }, | |
10047 | "additionalProperties" : 0 | |
10048 | }, | |
10049 | "name" : "destroy_vm", | |
10050 | "method" : "DELETE" | |
10051 | } | |
10052 | } | |
56122987 DM |
10053 | } |
10054 | ], | |
7aacca6f | 10055 | "text" : "qemu", |
56122987 DM |
10056 | "info" : { |
10057 | "POST" : { | |
56122987 | 10058 | "method" : "POST", |
56122987 | 10059 | "parameters" : { |
56122987 | 10060 | "properties" : { |
7aacca6f DM |
10061 | "serial[n]" : { |
10062 | "type" : "string", | |
56122987 | 10063 | "optional" : 1, |
7aacca6f DM |
10064 | "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", |
10065 | "pattern" : "(/dev/.+|socket)" | |
56122987 | 10066 | }, |
7aacca6f DM |
10067 | "vcpus" : { |
10068 | "minimum" : 1, | |
10069 | "default" : 0, | |
10070 | "type" : "integer", | |
56122987 | 10071 | "optional" : 1, |
7aacca6f | 10072 | "description" : "Number of hotplugged vcpus." |
56122987 | 10073 | }, |
7aacca6f DM |
10074 | "description" : { |
10075 | "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", | |
56122987 | 10076 | "optional" : 1, |
7aacca6f | 10077 | "type" : "string" |
56122987 | 10078 | }, |
7aacca6f DM |
10079 | "parallel[n]" : { |
10080 | "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", | |
10081 | "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", | |
10082 | "type" : "string", | |
56122987 DM |
10083 | "optional" : 1 |
10084 | }, | |
7aacca6f DM |
10085 | "acpi" : { |
10086 | "description" : "Enable/disable ACPI.", | |
10087 | "default" : 1, | |
56122987 | 10088 | "optional" : 1, |
7aacca6f | 10089 | "type" : "boolean" |
56122987 | 10090 | }, |
7aacca6f | 10091 | "migrate_downtime" : { |
56122987 | 10092 | "minimum" : 0, |
7aacca6f DM |
10093 | "default" : 0.1, |
10094 | "optional" : 1, | |
10095 | "type" : "number", | |
10096 | "description" : "Set maximum tolerated downtime (in seconds) for migrations." | |
56122987 DM |
10097 | }, |
10098 | "name" : { | |
56122987 | 10099 | "description" : "Set a name for the VM. Only used on the configuration web interface.", |
7aacca6f DM |
10100 | "type" : "string", |
10101 | "optional" : 1, | |
10102 | "format" : "dns-name" | |
56122987 | 10103 | }, |
7aacca6f DM |
10104 | "pool" : { |
10105 | "format" : "pve-poolid", | |
10106 | "description" : "Add the VM to the specified pool.", | |
56122987 | 10107 | "type" : "string", |
7aacca6f DM |
10108 | "optional" : 1 |
10109 | }, | |
10110 | "cores" : { | |
10111 | "minimum" : 1, | |
10112 | "default" : 1, | |
56122987 | 10113 | "optional" : 1, |
7aacca6f DM |
10114 | "type" : "integer", |
10115 | "description" : "The number of cores per socket." | |
56122987 | 10116 | }, |
7aacca6f DM |
10117 | "sockets" : { |
10118 | "description" : "The number of CPU sockets.", | |
10119 | "default" : 1, | |
10120 | "optional" : 1, | |
56122987 | 10121 | "type" : "integer", |
56122987 DM |
10122 | "minimum" : 1 |
10123 | }, | |
7aacca6f DM |
10124 | "storage" : { |
10125 | "type" : "string", | |
56122987 | 10126 | "optional" : 1, |
7aacca6f DM |
10127 | "description" : "Default storage.", |
10128 | "format" : "pve-storage-id" | |
56122987 | 10129 | }, |
7aacca6f | 10130 | "freeze" : { |
56122987 | 10131 | "optional" : 1, |
7aacca6f DM |
10132 | "type" : "boolean", |
10133 | "description" : "Freeze CPU at startup (use 'c' monitor command to start execution)." | |
56122987 | 10134 | }, |
7aacca6f DM |
10135 | "onboot" : { |
10136 | "optional" : 1, | |
56122987 | 10137 | "type" : "boolean", |
7aacca6f DM |
10138 | "default" : 0, |
10139 | "description" : "Specifies whether a VM will be started during system bootup." | |
10140 | }, | |
10141 | "startup" : { | |
10142 | "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", | |
10143 | "format" : "pve-startup-order", | |
10144 | "type" : "string", | |
56122987 | 10145 | "optional" : 1, |
7aacca6f | 10146 | "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped." |
56122987 | 10147 | }, |
7aacca6f DM |
10148 | "agent" : { |
10149 | "default" : 0, | |
10150 | "type" : "boolean", | |
56122987 | 10151 | "optional" : 1, |
7aacca6f | 10152 | "description" : "Enable/disable Qemu GuestAgent." |
56122987 | 10153 | }, |
7aacca6f DM |
10154 | "reboot" : { |
10155 | "description" : "Allow reboot. If set to '0' the VM exit on reboot.", | |
10156 | "type" : "boolean", | |
56122987 | 10157 | "optional" : 1, |
7aacca6f | 10158 | "default" : 1 |
56122987 | 10159 | }, |
7aacca6f DM |
10160 | "bootdisk" : { |
10161 | "description" : "Enable booting from specified disk.", | |
10162 | "pattern" : "(ide|sata|scsi|virtio)\\d+", | |
56122987 | 10163 | "type" : "string", |
56122987 | 10164 | "optional" : 1, |
7aacca6f | 10165 | "format" : "pve-qm-bootdisk" |
56122987 | 10166 | }, |
7aacca6f DM |
10167 | "vmid" : { |
10168 | "format" : "pve-vmid", | |
10169 | "minimum" : 1, | |
10170 | "description" : "The (unique) ID of the VM.", | |
10171 | "type" : "integer" | |
10172 | }, | |
10173 | "smbios1" : { | |
10174 | "description" : "Specify SMBIOS type 1 fields.", | |
56122987 DM |
10175 | "type" : "string", |
10176 | "optional" : 1, | |
7aacca6f DM |
10177 | "maxLength" : 256, |
10178 | "format" : "pve-qm-smbios1" | |
56122987 | 10179 | }, |
7aacca6f DM |
10180 | "numa" : { |
10181 | "description" : "Enable/disable NUMA.", | |
10182 | "default" : 0, | |
10183 | "optional" : 1, | |
10184 | "type" : "boolean" | |
10185 | }, | |
10186 | "cpuunits" : { | |
10187 | "minimum" : 0, | |
10188 | "default" : 1000, | |
10189 | "maximum" : 500000, | |
10190 | "type" : "integer", | |
56122987 | 10191 | "optional" : 1, |
7aacca6f DM |
10192 | "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0." |
10193 | }, | |
10194 | "ide[n]" : { | |
56122987 | 10195 | "format" : { |
7aacca6f DM |
10196 | "bps_rd" : { |
10197 | "format_description" : "bps", | |
56122987 DM |
10198 | "type" : "integer", |
10199 | "optional" : 1, | |
7aacca6f | 10200 | "description" : "Maximum read speed speed in bytes per second." |
56122987 | 10201 | }, |
7aacca6f DM |
10202 | "cyls" : { |
10203 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", | |
56122987 | 10204 | "optional" : 1, |
7aacca6f | 10205 | "type" : "integer", |
56122987 DM |
10206 | "format_description" : "count" |
10207 | }, | |
7aacca6f DM |
10208 | "mbps" : { |
10209 | "description" : "Maximum r/w speed speed in megabytes per second.", | |
10210 | "type" : "number", | |
56122987 | 10211 | "optional" : 1, |
7aacca6f | 10212 | "format_description" : "mbps" |
56122987 | 10213 | }, |
7aacca6f | 10214 | "trans" : { |
56122987 | 10215 | "enum" : [ |
7aacca6f DM |
10216 | "none", |
10217 | "lba", | |
10218 | "auto" | |
56122987 | 10219 | ], |
7aacca6f | 10220 | "description" : "Force disk geometry bios translation mode.", |
56122987 | 10221 | "type" : "string", |
56122987 | 10222 | "optional" : 1, |
7aacca6f | 10223 | "format_description" : "none|lba|auto" |
56122987 | 10224 | }, |
7aacca6f DM |
10225 | "volume" : { |
10226 | "alias" : "file" | |
10227 | }, | |
10228 | "mbps_rd" : { | |
10229 | "description" : "Maximum read speed speed in megabytes per second.", | |
10230 | "type" : "number", | |
56122987 | 10231 | "optional" : 1, |
7aacca6f | 10232 | "format_description" : "mbps" |
56122987 | 10233 | }, |
7aacca6f DM |
10234 | "mbps_wr" : { |
10235 | "format_description" : "mbps", | |
10236 | "type" : "number", | |
56122987 | 10237 | "optional" : 1, |
7aacca6f | 10238 | "description" : "Maximum write speed speed in megabytes per second." |
56122987 | 10239 | }, |
7aacca6f DM |
10240 | "file" : { |
10241 | "description" : "The drive's backing volume.", | |
10242 | "type" : "string", | |
10243 | "format" : "pve-volume-id-or-qm-path", | |
10244 | "format_description" : "volume", | |
10245 | "default_key" : 1 | |
10246 | }, | |
10247 | "iops" : { | |
56122987 | 10248 | "format_description" : "iops", |
7aacca6f DM |
10249 | "description" : "Maximum r/w I/O speed in operations per second.", |
10250 | "type" : "integer", | |
10251 | "optional" : 1 | |
56122987 | 10252 | }, |
7aacca6f DM |
10253 | "model" : { |
10254 | "maxLength" : 120, | |
10255 | "format" : "urlencoded", | |
10256 | "format_description" : "model", | |
10257 | "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", | |
56122987 | 10258 | "optional" : 1, |
7aacca6f | 10259 | "type" : "string" |
56122987 DM |
10260 | }, |
10261 | "aio" : { | |
56122987 DM |
10262 | "format_description" : "native|threads", |
10263 | "enum" : [ | |
10264 | "native", | |
10265 | "threads" | |
7aacca6f DM |
10266 | ], |
10267 | "description" : "AIO type to use.", | |
10268 | "optional" : 1, | |
10269 | "type" : "string" | |
56122987 | 10270 | }, |
7aacca6f DM |
10271 | "werror" : { |
10272 | "format_description" : "enospc|ignore|report|stop", | |
10273 | "type" : "string", | |
56122987 | 10274 | "optional" : 1, |
7aacca6f DM |
10275 | "enum" : [ |
10276 | "enospc", | |
10277 | "ignore", | |
10278 | "report", | |
10279 | "stop" | |
10280 | ], | |
10281 | "description" : "Write error action." | |
56122987 DM |
10282 | }, |
10283 | "iops_wr_max" : { | |
7aacca6f | 10284 | "format_description" : "iops", |
56122987 | 10285 | "type" : "integer", |
56122987 | 10286 | "optional" : 1, |
7aacca6f | 10287 | "description" : "Maximum unthrottled write I/O pool speed in operations per second." |
56122987 | 10288 | }, |
7aacca6f | 10289 | "backup" : { |
56122987 | 10290 | "type" : "boolean", |
56122987 | 10291 | "optional" : 1, |
7aacca6f DM |
10292 | "description" : "Whether the drive should be included when making backups.", |
10293 | "format_description" : "on|off" | |
56122987 DM |
10294 | }, |
10295 | "bps_wr" : { | |
56122987 | 10296 | "format_description" : "bps", |
7aacca6f DM |
10297 | "description" : "Maximum write speed speed in bytes per second.", |
10298 | "type" : "integer", | |
10299 | "optional" : 1 | |
56122987 | 10300 | }, |
7aacca6f | 10301 | "iops_rd" : { |
56122987 | 10302 | "format_description" : "iops", |
7aacca6f DM |
10303 | "description" : "Maximum read I/O speed in operations per second.", |
10304 | "type" : "integer", | |
10305 | "optional" : 1 | |
10306 | }, | |
10307 | "size" : { | |
10308 | "format" : "disk-size", | |
10309 | "description" : "Disk size. This is purely informational and has no effect.", | |
56122987 | 10310 | "optional" : 1, |
7aacca6f | 10311 | "type" : "string" |
56122987 DM |
10312 | }, |
10313 | "mbps_max" : { | |
56122987 | 10314 | "format_description" : "mbps", |
7aacca6f | 10315 | "type" : "number", |
56122987 | 10316 | "optional" : 1, |
7aacca6f DM |
10317 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second." |
10318 | }, | |
10319 | "heads" : { | |
10320 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
10321 | "optional" : 1, | |
10322 | "type" : "integer", | |
10323 | "format_description" : "count" | |
56122987 DM |
10324 | }, |
10325 | "serial" : { | |
7aacca6f | 10326 | "optional" : 1, |
56122987 | 10327 | "type" : "string", |
7aacca6f | 10328 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", |
56122987 | 10329 | "format" : "urlencoded", |
56122987 | 10330 | "maxLength" : 60, |
7aacca6f | 10331 | "format_description" : "serial" |
56122987 | 10332 | }, |
7aacca6f DM |
10333 | "mbps_wr_max" : { |
10334 | "format_description" : "mbps", | |
10335 | "type" : "number", | |
56122987 | 10336 | "optional" : 1, |
7aacca6f | 10337 | "description" : "Maximum unthrottled write pool speed in megabytes per second." |
56122987 | 10338 | }, |
7aacca6f DM |
10339 | "format" : { |
10340 | "optional" : 1, | |
56122987 | 10341 | "type" : "string", |
7aacca6f DM |
10342 | "description" : "The drive's backing file's data format.", |
10343 | "enum" : [ | |
10344 | "raw", | |
10345 | "cow", | |
10346 | "qcow", | |
10347 | "qed", | |
10348 | "qcow2", | |
10349 | "vmdk", | |
10350 | "cloop" | |
10351 | ], | |
10352 | "format_description" : "drive format" | |
56122987 | 10353 | }, |
7aacca6f DM |
10354 | "iops_rd_max" : { |
10355 | "optional" : 1, | |
10356 | "type" : "integer", | |
10357 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
10358 | "format_description" : "iops" | |
10359 | }, | |
10360 | "bps" : { | |
10361 | "description" : "Maximum r/w speed speed in bytes per second.", | |
56122987 DM |
10362 | "type" : "integer", |
10363 | "optional" : 1, | |
7aacca6f | 10364 | "format_description" : "bps" |
56122987 | 10365 | }, |
7aacca6f DM |
10366 | "discard" : { |
10367 | "format_description" : "ignore|on", | |
10368 | "type" : "string", | |
10369 | "optional" : 1, | |
10370 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
56122987 | 10371 | "enum" : [ |
56122987 | 10372 | "ignore", |
7aacca6f DM |
10373 | "on" |
10374 | ] | |
56122987 | 10375 | }, |
7aacca6f DM |
10376 | "mbps_rd_max" : { |
10377 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", | |
10378 | "type" : "number", | |
56122987 | 10379 | "optional" : 1, |
7aacca6f DM |
10380 | "format_description" : "mbps" |
10381 | }, | |
10382 | "media" : { | |
56122987 | 10383 | "enum" : [ |
7aacca6f DM |
10384 | "cdrom", |
10385 | "disk" | |
56122987 | 10386 | ], |
7aacca6f DM |
10387 | "description" : "The drive's media type.", |
10388 | "optional" : 1, | |
10389 | "type" : "string", | |
10390 | "default" : "disk", | |
10391 | "format_description" : "cdrom|disk" | |
56122987 | 10392 | }, |
7aacca6f DM |
10393 | "secs" : { |
10394 | "optional" : 1, | |
10395 | "type" : "integer", | |
10396 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
10397 | "format_description" : "count" | |
56122987 | 10398 | }, |
7aacca6f | 10399 | "iops_wr" : { |
56122987 DM |
10400 | "type" : "integer", |
10401 | "optional" : 1, | |
7aacca6f | 10402 | "description" : "Maximum write I/O speed in operations per second.", |
56122987 DM |
10403 | "format_description" : "iops" |
10404 | }, | |
7aacca6f | 10405 | "detect_zeroes" : { |
56122987 | 10406 | "optional" : 1, |
56122987 | 10407 | "type" : "boolean", |
7aacca6f | 10408 | "description" : "Controls whether to detect and try to optimize writes of zeroes." |
56122987 | 10409 | }, |
7aacca6f DM |
10410 | "rerror" : { |
10411 | "format_description" : "ignore|report|stop", | |
10412 | "type" : "string", | |
56122987 | 10413 | "optional" : 1, |
7aacca6f DM |
10414 | "description" : "Read error action.", |
10415 | "enum" : [ | |
10416 | "ignore", | |
10417 | "report", | |
10418 | "stop" | |
10419 | ] | |
56122987 | 10420 | }, |
7aacca6f DM |
10421 | "cache" : { |
10422 | "format_description" : "none|writethrough|writeback|unsafe|directsync", | |
56122987 | 10423 | "optional" : 1, |
7aacca6f DM |
10424 | "type" : "string", |
10425 | "description" : "The drive's cache mode", | |
10426 | "enum" : [ | |
10427 | "none", | |
10428 | "writethrough", | |
10429 | "writeback", | |
10430 | "unsafe", | |
10431 | "directsync" | |
10432 | ] | |
10433 | }, | |
10434 | "snapshot" : { | |
10435 | "format_description" : "on|off", | |
10436 | "optional" : 1, | |
10437 | "type" : "boolean", | |
10438 | "description" : "Whether the drive should be included when making snapshots." | |
10439 | }, | |
10440 | "iops_max" : { | |
10441 | "optional" : 1, | |
10442 | "type" : "integer", | |
10443 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", | |
10444 | "format_description" : "iops" | |
56122987 DM |
10445 | } |
10446 | }, | |
7aacca6f DM |
10447 | "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", |
10448 | "optional" : 1, | |
56122987 DM |
10449 | "type" : "string" |
10450 | }, | |
7aacca6f DM |
10451 | "archive" : { |
10452 | "maxLength" : 255, | |
10453 | "description" : "The backup file.", | |
56122987 | 10454 | "optional" : 1, |
7aacca6f | 10455 | "type" : "string" |
56122987 | 10456 | }, |
7aacca6f DM |
10457 | "watchdog" : { |
10458 | "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", | |
56122987 | 10459 | "type" : "string", |
7aacca6f DM |
10460 | "optional" : 1, |
10461 | "format" : "pve-qm-watchdog" | |
56122987 | 10462 | }, |
7aacca6f DM |
10463 | "hotplug" : { |
10464 | "type" : "string", | |
56122987 | 10465 | "optional" : 1, |
7aacca6f DM |
10466 | "default" : "network,disk,usb", |
10467 | "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", | |
10468 | "format" : "pve-hotplug-features" | |
56122987 DM |
10469 | }, |
10470 | "keyboard" : { | |
7aacca6f | 10471 | "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", |
56122987 | 10472 | "enum" : [ |
7aacca6f DM |
10473 | "da", |
10474 | "sv", | |
56122987 | 10475 | "en-gb", |
7aacca6f DM |
10476 | "lt", |
10477 | "is", | |
56122987 | 10478 | "mk", |
7aacca6f DM |
10479 | "pl", |
10480 | "hu", | |
56122987 | 10481 | "fr-be", |
56122987 | 10482 | "pt-br", |
7aacca6f DM |
10483 | "de-ch", |
10484 | "nl", | |
56122987 | 10485 | "no", |
7aacca6f | 10486 | "tr", |
56122987 | 10487 | "sl", |
7aacca6f | 10488 | "de", |
56122987 | 10489 | "fr-ca", |
56122987 | 10490 | "ja", |
7aacca6f DM |
10491 | "es", |
10492 | "it", | |
10493 | "pt", | |
10494 | "fr", | |
10495 | "en-us", | |
10496 | "fi", | |
10497 | "fr-ch" | |
56122987 | 10498 | ], |
7aacca6f DM |
10499 | "default" : "en-us", |
10500 | "type" : "string", | |
56122987 DM |
10501 | "optional" : 1 |
10502 | }, | |
7aacca6f DM |
10503 | "hostpci[n]" : { |
10504 | "format" : "pve-qm-hostpci", | |
10505 | "optional" : 1, | |
56122987 | 10506 | "type" : "string", |
7aacca6f DM |
10507 | "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" |
10508 | }, | |
10509 | "lock" : { | |
56122987 | 10510 | "optional" : 1, |
7aacca6f DM |
10511 | "type" : "string", |
10512 | "enum" : [ | |
10513 | "migrate", | |
10514 | "backup", | |
10515 | "snapshot", | |
10516 | "rollback" | |
10517 | ], | |
10518 | "description" : "Lock/unlock the VM." | |
56122987 | 10519 | }, |
7aacca6f DM |
10520 | "autostart" : { |
10521 | "description" : "Automatic restart after crash (currently ignored).", | |
56122987 | 10522 | "default" : 0, |
56122987 | 10523 | "optional" : 1, |
7aacca6f | 10524 | "type" : "boolean" |
56122987 | 10525 | }, |
7aacca6f DM |
10526 | "tdf" : { |
10527 | "description" : "Enable/disable time drift fix.", | |
10528 | "default" : 0, | |
10529 | "type" : "boolean", | |
10530 | "optional" : 1 | |
56122987 | 10531 | }, |
7aacca6f DM |
10532 | "numa[n]" : { |
10533 | "format" : { | |
10534 | "hostnodes" : { | |
10535 | "description" : "host numa nodes to use", | |
10536 | "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", | |
10537 | "optional" : 1, | |
10538 | "type" : "string", | |
10539 | "format_description" : "id[-id];..." | |
10540 | }, | |
10541 | "cpus" : { | |
10542 | "format_description" : "id[-id];...", | |
10543 | "type" : "string", | |
10544 | "description" : "CPUs accessing this numa node.", | |
10545 | "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)" | |
10546 | }, | |
10547 | "policy" : { | |
10548 | "description" : "numa allocation policy.", | |
10549 | "enum" : [ | |
10550 | "preferred", | |
10551 | "bind", | |
10552 | "interleave" | |
10553 | ], | |
10554 | "type" : "string", | |
10555 | "optional" : 1, | |
10556 | "format_description" : "preferred|bind|interleave" | |
10557 | }, | |
10558 | "memory" : { | |
10559 | "format_description" : "mb", | |
10560 | "type" : "number", | |
10561 | "optional" : 1, | |
10562 | "description" : "Amount of memory this numa node provides." | |
10563 | } | |
10564 | }, | |
56122987 | 10565 | "optional" : 1, |
7aacca6f DM |
10566 | "type" : "string", |
10567 | "description" : "numa topology" | |
56122987 | 10568 | }, |
7aacca6f DM |
10569 | "boot" : { |
10570 | "default" : "cdn", | |
56122987 | 10571 | "optional" : 1, |
7aacca6f DM |
10572 | "type" : "string", |
10573 | "pattern" : "[acdn]{1,4}", | |
10574 | "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)." | |
56122987 | 10575 | }, |
7aacca6f DM |
10576 | "unused[n]" : { |
10577 | "format" : "pve-volume-id", | |
10578 | "description" : "Reference to unused volumes.", | |
10579 | "type" : "string", | |
10580 | "optional" : 1 | |
56122987 DM |
10581 | }, |
10582 | "ostype" : { | |
10583 | "type" : "string", | |
7aacca6f DM |
10584 | "optional" : 1, |
10585 | "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", | |
56122987 DM |
10586 | "enum" : [ |
10587 | "other", | |
10588 | "wxp", | |
10589 | "w2k", | |
10590 | "w2k3", | |
10591 | "w2k8", | |
10592 | "wvista", | |
10593 | "win7", | |
10594 | "win8", | |
10595 | "l24", | |
10596 | "l26", | |
10597 | "solaris" | |
7aacca6f | 10598 | ] |
56122987 | 10599 | }, |
7aacca6f DM |
10600 | "unique" : { |
10601 | "requires" : "archive", | |
10602 | "description" : "Assign a unique random ethernet address.", | |
56122987 | 10603 | "optional" : 1, |
7aacca6f | 10604 | "type" : "boolean" |
56122987 | 10605 | }, |
7aacca6f DM |
10606 | "migrate_speed" : { |
10607 | "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", | |
56122987 | 10608 | "default" : 0, |
56122987 | 10609 | "optional" : 1, |
7aacca6f DM |
10610 | "type" : "integer", |
10611 | "minimum" : 0 | |
56122987 | 10612 | }, |
7aacca6f DM |
10613 | "startdate" : { |
10614 | "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", | |
10615 | "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", | |
10616 | "default" : "now", | |
56122987 | 10617 | "optional" : 1, |
7aacca6f DM |
10618 | "type" : "string", |
10619 | "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" | |
56122987 | 10620 | }, |
7aacca6f | 10621 | "localtime" : { |
56122987 | 10622 | "optional" : 1, |
7aacca6f DM |
10623 | "type" : "boolean", |
10624 | "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS." | |
56122987 | 10625 | }, |
7aacca6f DM |
10626 | "kvm" : { |
10627 | "description" : "Enable/disable KVM hardware virtualization.", | |
10628 | "default" : 1, | |
56122987 | 10629 | "type" : "boolean", |
56122987 DM |
10630 | "optional" : 1 |
10631 | }, | |
56122987 | 10632 | "sata[n]" : { |
56122987 | 10633 | "format" : { |
7aacca6f | 10634 | "mbps_rd" : { |
56122987 | 10635 | "format_description" : "mbps", |
7aacca6f | 10636 | "description" : "Maximum read speed speed in megabytes per second.", |
56122987 DM |
10637 | "optional" : 1, |
10638 | "type" : "number" | |
10639 | }, | |
7aacca6f DM |
10640 | "mbps_wr" : { |
10641 | "type" : "number", | |
56122987 | 10642 | "optional" : 1, |
7aacca6f DM |
10643 | "description" : "Maximum write speed speed in megabytes per second.", |
10644 | "format_description" : "mbps" | |
56122987 | 10645 | }, |
7aacca6f DM |
10646 | "file" : { |
10647 | "description" : "The drive's backing volume.", | |
10648 | "type" : "string", | |
10649 | "format" : "pve-volume-id-or-qm-path", | |
10650 | "format_description" : "volume", | |
10651 | "default_key" : 1 | |
10652 | }, | |
10653 | "iops" : { | |
10654 | "type" : "integer", | |
56122987 | 10655 | "optional" : 1, |
7aacca6f DM |
10656 | "description" : "Maximum r/w I/O speed in operations per second.", |
10657 | "format_description" : "iops" | |
56122987 | 10658 | }, |
7aacca6f DM |
10659 | "werror" : { |
10660 | "description" : "Write error action.", | |
56122987 | 10661 | "enum" : [ |
7aacca6f | 10662 | "enospc", |
56122987 DM |
10663 | "ignore", |
10664 | "report", | |
10665 | "stop" | |
10666 | ], | |
7aacca6f | 10667 | "type" : "string", |
56122987 | 10668 | "optional" : 1, |
7aacca6f | 10669 | "format_description" : "enospc|ignore|report|stop" |
56122987 | 10670 | }, |
7aacca6f | 10671 | "aio" : { |
56122987 | 10672 | "enum" : [ |
7aacca6f DM |
10673 | "native", |
10674 | "threads" | |
56122987 | 10675 | ], |
7aacca6f DM |
10676 | "description" : "AIO type to use.", |
10677 | "type" : "string", | |
56122987 | 10678 | "optional" : 1, |
7aacca6f DM |
10679 | "format_description" : "native|threads" |
10680 | }, | |
10681 | "iops_wr_max" : { | |
10682 | "format_description" : "iops", | |
10683 | "optional" : 1, | |
10684 | "type" : "integer", | |
10685 | "description" : "Maximum unthrottled write I/O pool speed in operations per second." | |
10686 | }, | |
10687 | "backup" : { | |
10688 | "type" : "boolean", | |
10689 | "optional" : 1, | |
10690 | "description" : "Whether the drive should be included when making backups.", | |
10691 | "format_description" : "on|off" | |
10692 | }, | |
10693 | "bps_rd" : { | |
10694 | "type" : "integer", | |
10695 | "optional" : 1, | |
10696 | "description" : "Maximum read speed speed in bytes per second.", | |
10697 | "format_description" : "bps" | |
10698 | }, | |
10699 | "cyls" : { | |
10700 | "optional" : 1, | |
10701 | "type" : "integer", | |
10702 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", | |
10703 | "format_description" : "count" | |
10704 | }, | |
10705 | "mbps" : { | |
10706 | "optional" : 1, | |
10707 | "type" : "number", | |
10708 | "description" : "Maximum r/w speed speed in megabytes per second.", | |
10709 | "format_description" : "mbps" | |
56122987 DM |
10710 | }, |
10711 | "volume" : { | |
10712 | "alias" : "file" | |
10713 | }, | |
7aacca6f DM |
10714 | "trans" : { |
10715 | "format_description" : "none|lba|auto", | |
10716 | "type" : "string", | |
10717 | "optional" : 1, | |
10718 | "enum" : [ | |
10719 | "none", | |
10720 | "lba", | |
10721 | "auto" | |
10722 | ], | |
10723 | "description" : "Force disk geometry bios translation mode." | |
56122987 | 10724 | }, |
7aacca6f DM |
10725 | "media" : { |
10726 | "format_description" : "cdrom|disk", | |
10727 | "type" : "string", | |
56122987 | 10728 | "optional" : 1, |
7aacca6f DM |
10729 | "default" : "disk", |
10730 | "enum" : [ | |
10731 | "cdrom", | |
10732 | "disk" | |
10733 | ], | |
10734 | "description" : "The drive's media type." | |
10735 | }, | |
10736 | "rerror" : { | |
10737 | "description" : "Read error action.", | |
56122987 | 10738 | "enum" : [ |
56122987 DM |
10739 | "ignore", |
10740 | "report", | |
10741 | "stop" | |
10742 | ], | |
56122987 | 10743 | "optional" : 1, |
7aacca6f DM |
10744 | "type" : "string", |
10745 | "format_description" : "ignore|report|stop" | |
56122987 | 10746 | }, |
7aacca6f | 10747 | "cache" : { |
56122987 DM |
10748 | "type" : "string", |
10749 | "optional" : 1, | |
7aacca6f DM |
10750 | "description" : "The drive's cache mode", |
10751 | "enum" : [ | |
10752 | "none", | |
10753 | "writethrough", | |
10754 | "writeback", | |
10755 | "unsafe", | |
10756 | "directsync" | |
10757 | ], | |
10758 | "format_description" : "none|writethrough|writeback|unsafe|directsync" | |
56122987 | 10759 | }, |
7aacca6f DM |
10760 | "secs" : { |
10761 | "format_description" : "count", | |
10762 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
10763 | "type" : "integer", | |
10764 | "optional" : 1 | |
10765 | }, | |
10766 | "iops_wr" : { | |
10767 | "format_description" : "iops", | |
10768 | "description" : "Maximum write I/O speed in operations per second.", | |
56122987 | 10769 | "optional" : 1, |
7aacca6f | 10770 | "type" : "integer" |
56122987 | 10771 | }, |
7aacca6f DM |
10772 | "detect_zeroes" : { |
10773 | "description" : "Controls whether to detect and try to optimize writes of zeroes.", | |
56122987 | 10774 | "optional" : 1, |
7aacca6f | 10775 | "type" : "boolean" |
56122987 | 10776 | }, |
7aacca6f DM |
10777 | "iops_max" : { |
10778 | "format_description" : "iops", | |
10779 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", | |
10780 | "type" : "integer", | |
10781 | "optional" : 1 | |
56122987 | 10782 | }, |
7aacca6f DM |
10783 | "snapshot" : { |
10784 | "format_description" : "on|off", | |
10785 | "description" : "Whether the drive should be included when making snapshots.", | |
56122987 | 10786 | "optional" : 1, |
7aacca6f | 10787 | "type" : "boolean" |
56122987 DM |
10788 | }, |
10789 | "bps_wr" : { | |
10790 | "format_description" : "bps", | |
7aacca6f | 10791 | "type" : "integer", |
56122987 | 10792 | "optional" : 1, |
7aacca6f | 10793 | "description" : "Maximum write speed speed in bytes per second." |
56122987 | 10794 | }, |
7aacca6f DM |
10795 | "mbps_max" : { |
10796 | "format_description" : "mbps", | |
10797 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
10798 | "type" : "number", | |
10799 | "optional" : 1 | |
10800 | }, | |
10801 | "iops_rd" : { | |
56122987 | 10802 | "format_description" : "iops", |
7aacca6f DM |
10803 | "optional" : 1, |
10804 | "type" : "integer", | |
10805 | "description" : "Maximum read I/O speed in operations per second." | |
56122987 DM |
10806 | }, |
10807 | "size" : { | |
56122987 | 10808 | "format" : "disk-size", |
7aacca6f | 10809 | "type" : "string", |
56122987 DM |
10810 | "optional" : 1, |
10811 | "description" : "Disk size. This is purely informational and has no effect." | |
10812 | }, | |
7aacca6f | 10813 | "iops_rd_max" : { |
56122987 DM |
10814 | "format_description" : "iops", |
10815 | "optional" : 1, | |
7aacca6f DM |
10816 | "type" : "integer", |
10817 | "description" : "Maximum unthrottled read I/O pool speed in operations per second." | |
56122987 | 10818 | }, |
7aacca6f | 10819 | "mbps_wr_max" : { |
56122987 | 10820 | "format_description" : "mbps", |
56122987 | 10821 | "optional" : 1, |
7aacca6f DM |
10822 | "type" : "number", |
10823 | "description" : "Maximum unthrottled write pool speed in megabytes per second." | |
56122987 | 10824 | }, |
7aacca6f | 10825 | "bps" : { |
56122987 | 10826 | "format_description" : "bps", |
7aacca6f DM |
10827 | "description" : "Maximum r/w speed speed in bytes per second.", |
10828 | "optional" : 1, | |
56122987 DM |
10829 | "type" : "integer" |
10830 | }, | |
10831 | "format" : { | |
10832 | "enum" : [ | |
10833 | "raw", | |
10834 | "cow", | |
10835 | "qcow", | |
10836 | "qed", | |
10837 | "qcow2", | |
10838 | "vmdk", | |
10839 | "cloop" | |
10840 | ], | |
10841 | "description" : "The drive's backing file's data format.", | |
7aacca6f | 10842 | "type" : "string", |
56122987 | 10843 | "optional" : 1, |
7aacca6f | 10844 | "format_description" : "drive format" |
56122987 | 10845 | }, |
7aacca6f | 10846 | "heads" : { |
56122987 | 10847 | "optional" : 1, |
7aacca6f DM |
10848 | "type" : "integer", |
10849 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
10850 | "format_description" : "count" | |
56122987 | 10851 | }, |
7aacca6f DM |
10852 | "serial" : { |
10853 | "format_description" : "serial", | |
10854 | "format" : "urlencoded", | |
10855 | "maxLength" : 60, | |
10856 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
10857 | "type" : "string", | |
56122987 DM |
10858 | "optional" : 1 |
10859 | }, | |
7aacca6f DM |
10860 | "discard" : { |
10861 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
10862 | "enum" : [ | |
10863 | "ignore", | |
10864 | "on" | |
10865 | ], | |
10866 | "type" : "string", | |
56122987 | 10867 | "optional" : 1, |
7aacca6f | 10868 | "format_description" : "ignore|on" |
56122987 | 10869 | }, |
7aacca6f | 10870 | "mbps_rd_max" : { |
56122987 | 10871 | "format_description" : "mbps", |
56122987 | 10872 | "optional" : 1, |
56122987 | 10873 | "type" : "number", |
7aacca6f | 10874 | "description" : "Maximum unthrottled read pool speed in megabytes per second." |
56122987 DM |
10875 | } |
10876 | }, | |
10877 | "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", | |
7aacca6f | 10878 | "type" : "string", |
56122987 DM |
10879 | "optional" : 1 |
10880 | }, | |
7aacca6f | 10881 | "node" : { |
56122987 | 10882 | "type" : "string", |
7aacca6f DM |
10883 | "description" : "The cluster node name.", |
10884 | "format" : "pve-node" | |
56122987 | 10885 | }, |
7aacca6f DM |
10886 | "force" : { |
10887 | "requires" : "archive", | |
10888 | "description" : "Allow to overwrite existing VM.", | |
10889 | "type" : "boolean", | |
10890 | "optional" : 1 | |
10891 | }, | |
10892 | "cpulimit" : { | |
10893 | "minimum" : 0, | |
10894 | "default" : 0, | |
10895 | "maximum" : 128, | |
10896 | "type" : "number", | |
10897 | "optional" : 1, | |
10898 | "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit." | |
10899 | }, | |
10900 | "tablet" : { | |
10901 | "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", | |
56122987 DM |
10902 | "optional" : 1, |
10903 | "type" : "boolean", | |
7aacca6f | 10904 | "default" : 1 |
56122987 | 10905 | }, |
7aacca6f | 10906 | "vga" : { |
56122987 | 10907 | "type" : "string", |
56122987 | 10908 | "optional" : 1, |
7aacca6f DM |
10909 | "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", |
10910 | "enum" : [ | |
10911 | "std", | |
10912 | "cirrus", | |
10913 | "vmware", | |
10914 | "qxl", | |
10915 | "serial0", | |
10916 | "serial1", | |
10917 | "serial2", | |
10918 | "serial3", | |
10919 | "qxl2", | |
10920 | "qxl3", | |
10921 | "qxl4" | |
10922 | ] | |
56122987 | 10923 | }, |
7aacca6f DM |
10924 | "virtio[n]" : { |
10925 | "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", | |
10926 | "optional" : 1, | |
10927 | "type" : "string", | |
56122987 | 10928 | "format" : { |
7aacca6f DM |
10929 | "snapshot" : { |
10930 | "description" : "Whether the drive should be included when making snapshots.", | |
10931 | "type" : "boolean", | |
56122987 | 10932 | "optional" : 1, |
7aacca6f | 10933 | "format_description" : "on|off" |
56122987 | 10934 | }, |
7aacca6f DM |
10935 | "iops_max" : { |
10936 | "format_description" : "iops", | |
56122987 | 10937 | "optional" : 1, |
7aacca6f DM |
10938 | "type" : "integer", |
10939 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." | |
56122987 | 10940 | }, |
7aacca6f DM |
10941 | "iothread" : { |
10942 | "format_description" : "off|on", | |
10943 | "type" : "boolean", | |
56122987 | 10944 | "optional" : 1, |
7aacca6f | 10945 | "description" : "Whether to use iothreads for this drive" |
56122987 DM |
10946 | }, |
10947 | "media" : { | |
7aacca6f | 10948 | "format_description" : "cdrom|disk", |
56122987 | 10949 | "default" : "disk", |
7aacca6f DM |
10950 | "optional" : 1, |
10951 | "type" : "string", | |
10952 | "description" : "The drive's media type.", | |
56122987 DM |
10953 | "enum" : [ |
10954 | "cdrom", | |
10955 | "disk" | |
7aacca6f DM |
10956 | ] |
10957 | }, | |
10958 | "secs" : { | |
10959 | "format_description" : "count", | |
10960 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
56122987 | 10961 | "optional" : 1, |
7aacca6f | 10962 | "type" : "integer" |
56122987 DM |
10963 | }, |
10964 | "iops_wr" : { | |
7aacca6f | 10965 | "type" : "integer", |
56122987 | 10966 | "optional" : 1, |
7aacca6f DM |
10967 | "description" : "Maximum write I/O speed in operations per second.", |
10968 | "format_description" : "iops" | |
56122987 DM |
10969 | }, |
10970 | "detect_zeroes" : { | |
7aacca6f | 10971 | "optional" : 1, |
56122987 | 10972 | "type" : "boolean", |
7aacca6f DM |
10973 | "description" : "Controls whether to detect and try to optimize writes of zeroes." |
10974 | }, | |
10975 | "rerror" : { | |
10976 | "optional" : 1, | |
10977 | "type" : "string", | |
10978 | "enum" : [ | |
10979 | "ignore", | |
10980 | "report", | |
10981 | "stop" | |
10982 | ], | |
10983 | "description" : "Read error action.", | |
10984 | "format_description" : "ignore|report|stop" | |
10985 | }, | |
10986 | "cache" : { | |
10987 | "format_description" : "none|writethrough|writeback|unsafe|directsync", | |
10988 | "enum" : [ | |
10989 | "none", | |
10990 | "writethrough", | |
10991 | "writeback", | |
10992 | "unsafe", | |
10993 | "directsync" | |
10994 | ], | |
10995 | "description" : "The drive's cache mode", | |
10996 | "optional" : 1, | |
10997 | "type" : "string" | |
10998 | }, | |
10999 | "heads" : { | |
11000 | "type" : "integer", | |
11001 | "optional" : 1, | |
11002 | "description" : "Force the drive's physical geometry to have a specific head count.", | |
11003 | "format_description" : "count" | |
11004 | }, | |
11005 | "serial" : { | |
11006 | "format_description" : "serial", | |
11007 | "maxLength" : 60, | |
11008 | "format" : "urlencoded", | |
11009 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
11010 | "type" : "string", | |
11011 | "optional" : 1 | |
11012 | }, | |
11013 | "mbps_wr_max" : { | |
11014 | "format_description" : "mbps", | |
11015 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", | |
11016 | "type" : "number", | |
56122987 DM |
11017 | "optional" : 1 |
11018 | }, | |
7aacca6f DM |
11019 | "iops_rd_max" : { |
11020 | "description" : "Maximum unthrottled read I/O pool speed in operations per second.", | |
11021 | "type" : "integer", | |
11022 | "optional" : 1, | |
11023 | "format_description" : "iops" | |
11024 | }, | |
56122987 | 11025 | "format" : { |
56122987 DM |
11026 | "enum" : [ |
11027 | "raw", | |
11028 | "cow", | |
11029 | "qcow", | |
11030 | "qed", | |
11031 | "qcow2", | |
11032 | "vmdk", | |
11033 | "cloop" | |
11034 | ], | |
11035 | "description" : "The drive's backing file's data format.", | |
56122987 | 11036 | "optional" : 1, |
7aacca6f DM |
11037 | "type" : "string", |
11038 | "format_description" : "drive format" | |
56122987 | 11039 | }, |
7aacca6f DM |
11040 | "bps" : { |
11041 | "format_description" : "bps", | |
56122987 | 11042 | "optional" : 1, |
7aacca6f DM |
11043 | "type" : "integer", |
11044 | "description" : "Maximum r/w speed speed in bytes per second." | |
56122987 | 11045 | }, |
7aacca6f DM |
11046 | "discard" : { |
11047 | "format_description" : "ignore|on", | |
11048 | "enum" : [ | |
11049 | "ignore", | |
11050 | "on" | |
11051 | ], | |
11052 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
11053 | "type" : "string", | |
56122987 DM |
11054 | "optional" : 1 |
11055 | }, | |
7aacca6f | 11056 | "mbps_rd_max" : { |
56122987 | 11057 | "optional" : 1, |
7aacca6f DM |
11058 | "type" : "number", |
11059 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", | |
11060 | "format_description" : "mbps" | |
56122987 | 11061 | }, |
7aacca6f DM |
11062 | "bps_wr" : { |
11063 | "description" : "Maximum write speed speed in bytes per second.", | |
11064 | "type" : "integer", | |
56122987 | 11065 | "optional" : 1, |
7aacca6f | 11066 | "format_description" : "bps" |
56122987 | 11067 | }, |
7aacca6f DM |
11068 | "iops_rd" : { |
11069 | "format_description" : "iops", | |
11070 | "description" : "Maximum read I/O speed in operations per second.", | |
11071 | "type" : "integer", | |
11072 | "optional" : 1 | |
11073 | }, | |
11074 | "size" : { | |
11075 | "description" : "Disk size. This is purely informational and has no effect.", | |
56122987 | 11076 | "optional" : 1, |
7aacca6f DM |
11077 | "type" : "string", |
11078 | "format" : "disk-size" | |
56122987 | 11079 | }, |
7aacca6f DM |
11080 | "mbps_max" : { |
11081 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
56122987 | 11082 | "optional" : 1, |
7aacca6f DM |
11083 | "type" : "number", |
11084 | "format_description" : "mbps" | |
56122987 | 11085 | }, |
7aacca6f | 11086 | "aio" : { |
56122987 | 11087 | "type" : "string", |
56122987 DM |
11088 | "optional" : 1, |
11089 | "enum" : [ | |
7aacca6f DM |
11090 | "native", |
11091 | "threads" | |
11092 | ], | |
11093 | "description" : "AIO type to use.", | |
11094 | "format_description" : "native|threads" | |
56122987 DM |
11095 | }, |
11096 | "werror" : { | |
11097 | "optional" : 1, | |
7aacca6f | 11098 | "type" : "string", |
56122987 DM |
11099 | "description" : "Write error action.", |
11100 | "enum" : [ | |
11101 | "enospc", | |
11102 | "ignore", | |
11103 | "report", | |
11104 | "stop" | |
11105 | ], | |
7aacca6f | 11106 | "format_description" : "enospc|ignore|report|stop" |
56122987 | 11107 | }, |
7aacca6f | 11108 | "iops_wr_max" : { |
56122987 | 11109 | "format_description" : "iops", |
7aacca6f | 11110 | "description" : "Maximum unthrottled write I/O pool speed in operations per second.", |
56122987 DM |
11111 | "optional" : 1, |
11112 | "type" : "integer" | |
11113 | }, | |
7aacca6f DM |
11114 | "backup" : { |
11115 | "format_description" : "on|off", | |
11116 | "type" : "boolean", | |
11117 | "optional" : 1, | |
11118 | "description" : "Whether the drive should be included when making backups." | |
11119 | }, | |
11120 | "mbps_rd" : { | |
11121 | "format_description" : "mbps", | |
11122 | "description" : "Maximum read speed speed in megabytes per second.", | |
11123 | "type" : "number", | |
11124 | "optional" : 1 | |
11125 | }, | |
11126 | "mbps_wr" : { | |
11127 | "format_description" : "mbps", | |
11128 | "type" : "number", | |
11129 | "optional" : 1, | |
11130 | "description" : "Maximum write speed speed in megabytes per second." | |
11131 | }, | |
11132 | "file" : { | |
56122987 | 11133 | "type" : "string", |
7aacca6f DM |
11134 | "description" : "The drive's backing volume.", |
11135 | "default_key" : 1, | |
11136 | "format_description" : "volume", | |
11137 | "format" : "pve-volume-id-or-qm-path" | |
11138 | }, | |
11139 | "iops" : { | |
11140 | "format_description" : "iops", | |
11141 | "type" : "integer", | |
56122987 | 11142 | "optional" : 1, |
7aacca6f | 11143 | "description" : "Maximum r/w I/O speed in operations per second." |
56122987 DM |
11144 | }, |
11145 | "trans" : { | |
7aacca6f DM |
11146 | "type" : "string", |
11147 | "optional" : 1, | |
11148 | "description" : "Force disk geometry bios translation mode.", | |
56122987 DM |
11149 | "enum" : [ |
11150 | "none", | |
11151 | "lba", | |
11152 | "auto" | |
11153 | ], | |
7aacca6f | 11154 | "format_description" : "none|lba|auto" |
56122987 DM |
11155 | }, |
11156 | "volume" : { | |
11157 | "alias" : "file" | |
11158 | }, | |
7aacca6f DM |
11159 | "bps_rd" : { |
11160 | "description" : "Maximum read speed speed in bytes per second.", | |
56122987 DM |
11161 | "type" : "integer", |
11162 | "optional" : 1, | |
7aacca6f | 11163 | "format_description" : "bps" |
56122987 | 11164 | }, |
7aacca6f DM |
11165 | "cyls" : { |
11166 | "type" : "integer", | |
56122987 | 11167 | "optional" : 1, |
7aacca6f DM |
11168 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", |
11169 | "format_description" : "count" | |
11170 | }, | |
11171 | "mbps" : { | |
56122987 | 11172 | "description" : "Maximum r/w speed speed in megabytes per second.", |
7aacca6f DM |
11173 | "optional" : 1, |
11174 | "type" : "number", | |
11175 | "format_description" : "mbps" | |
11176 | } | |
11177 | } | |
11178 | }, | |
11179 | "balloon" : { | |
11180 | "optional" : 1, | |
11181 | "type" : "integer", | |
11182 | "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", | |
11183 | "minimum" : 0 | |
11184 | }, | |
11185 | "scsi[n]" : { | |
11186 | "format" : { | |
11187 | "volume" : { | |
11188 | "alias" : "file" | |
56122987 | 11189 | }, |
7aacca6f DM |
11190 | "trans" : { |
11191 | "type" : "string", | |
56122987 | 11192 | "optional" : 1, |
7aacca6f DM |
11193 | "enum" : [ |
11194 | "none", | |
11195 | "lba", | |
11196 | "auto" | |
11197 | ], | |
11198 | "description" : "Force disk geometry bios translation mode.", | |
11199 | "format_description" : "none|lba|auto" | |
56122987 | 11200 | }, |
7aacca6f DM |
11201 | "queues" : { |
11202 | "minimum" : 2, | |
11203 | "format_description" : "nbqueues", | |
11204 | "optional" : 1, | |
11205 | "type" : "integer", | |
11206 | "description" : "Number of queues." | |
11207 | }, | |
11208 | "bps_rd" : { | |
11209 | "format_description" : "bps", | |
56122987 | 11210 | "type" : "integer", |
56122987 | 11211 | "optional" : 1, |
7aacca6f | 11212 | "description" : "Maximum read speed speed in bytes per second." |
56122987 | 11213 | }, |
7aacca6f DM |
11214 | "mbps" : { |
11215 | "format_description" : "mbps", | |
11216 | "description" : "Maximum r/w speed speed in megabytes per second.", | |
56122987 | 11217 | "optional" : 1, |
7aacca6f | 11218 | "type" : "number" |
56122987 | 11219 | }, |
7aacca6f DM |
11220 | "cyls" : { |
11221 | "description" : "Force the drive's physical geometry to have a specific cylinder count.", | |
11222 | "optional" : 1, | |
11223 | "type" : "integer", | |
11224 | "format_description" : "count" | |
11225 | }, | |
11226 | "werror" : { | |
56122987 | 11227 | "enum" : [ |
7aacca6f | 11228 | "enospc", |
56122987 | 11229 | "ignore", |
7aacca6f DM |
11230 | "report", |
11231 | "stop" | |
56122987 | 11232 | ], |
7aacca6f | 11233 | "description" : "Write error action.", |
56122987 | 11234 | "optional" : 1, |
7aacca6f DM |
11235 | "type" : "string", |
11236 | "format_description" : "enospc|ignore|report|stop" | |
56122987 | 11237 | }, |
7aacca6f DM |
11238 | "aio" : { |
11239 | "format_description" : "native|threads", | |
11240 | "optional" : 1, | |
11241 | "type" : "string", | |
11242 | "enum" : [ | |
11243 | "native", | |
11244 | "threads" | |
11245 | ], | |
11246 | "description" : "AIO type to use." | |
11247 | }, | |
11248 | "backup" : { | |
11249 | "format_description" : "on|off", | |
56122987 | 11250 | "optional" : 1, |
7aacca6f DM |
11251 | "type" : "boolean", |
11252 | "description" : "Whether the drive should be included when making backups." | |
11253 | }, | |
11254 | "iops_wr_max" : { | |
11255 | "format_description" : "iops", | |
11256 | "type" : "integer", | |
11257 | "optional" : 1, | |
11258 | "description" : "Maximum unthrottled write I/O pool speed in operations per second." | |
11259 | }, | |
11260 | "mbps_wr" : { | |
56122987 | 11261 | "format_description" : "mbps", |
7aacca6f DM |
11262 | "description" : "Maximum write speed speed in megabytes per second.", |
11263 | "type" : "number", | |
11264 | "optional" : 1 | |
11265 | }, | |
11266 | "mbps_rd" : { | |
11267 | "format_description" : "mbps", | |
11268 | "type" : "number", | |
11269 | "optional" : 1, | |
11270 | "description" : "Maximum read speed speed in megabytes per second." | |
11271 | }, | |
11272 | "iops" : { | |
11273 | "format_description" : "iops", | |
11274 | "description" : "Maximum r/w I/O speed in operations per second.", | |
11275 | "optional" : 1, | |
11276 | "type" : "integer" | |
56122987 DM |
11277 | }, |
11278 | "file" : { | |
56122987 | 11279 | "format" : "pve-volume-id-or-qm-path", |
56122987 | 11280 | "format_description" : "volume", |
7aacca6f DM |
11281 | "default_key" : 1, |
11282 | "description" : "The drive's backing volume.", | |
11283 | "type" : "string" | |
56122987 | 11284 | }, |
7aacca6f DM |
11285 | "bps" : { |
11286 | "type" : "integer", | |
56122987 | 11287 | "optional" : 1, |
7aacca6f DM |
11288 | "description" : "Maximum r/w speed speed in bytes per second.", |
11289 | "format_description" : "bps" | |
56122987 | 11290 | }, |
7aacca6f | 11291 | "mbps_wr_max" : { |
56122987 | 11292 | "optional" : 1, |
7aacca6f DM |
11293 | "type" : "number", |
11294 | "description" : "Maximum unthrottled write pool speed in megabytes per second.", | |
11295 | "format_description" : "mbps" | |
11296 | }, | |
11297 | "format" : { | |
11298 | "optional" : 1, | |
11299 | "type" : "string", | |
56122987 | 11300 | "enum" : [ |
7aacca6f DM |
11301 | "raw", |
11302 | "cow", | |
11303 | "qcow", | |
11304 | "qed", | |
11305 | "qcow2", | |
11306 | "vmdk", | |
11307 | "cloop" | |
56122987 | 11308 | ], |
7aacca6f DM |
11309 | "description" : "The drive's backing file's data format.", |
11310 | "format_description" : "drive format" | |
56122987 | 11311 | }, |
7aacca6f DM |
11312 | "iops_rd_max" : { |
11313 | "format_description" : "iops", | |
56122987 DM |
11314 | "type" : "integer", |
11315 | "optional" : 1, | |
7aacca6f | 11316 | "description" : "Maximum unthrottled read I/O pool speed in operations per second." |
56122987 | 11317 | }, |
7aacca6f DM |
11318 | "serial" : { |
11319 | "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", | |
11320 | "optional" : 1, | |
56122987 | 11321 | "type" : "string", |
7aacca6f DM |
11322 | "format_description" : "serial", |
11323 | "format" : "urlencoded", | |
11324 | "maxLength" : 60 | |
56122987 DM |
11325 | }, |
11326 | "heads" : { | |
7aacca6f | 11327 | "description" : "Force the drive's physical geometry to have a specific head count.", |
56122987 DM |
11328 | "type" : "integer", |
11329 | "optional" : 1, | |
56122987 DM |
11330 | "format_description" : "count" |
11331 | }, | |
7aacca6f | 11332 | "mbps_rd_max" : { |
56122987 | 11333 | "format_description" : "mbps", |
7aacca6f DM |
11334 | "description" : "Maximum unthrottled read pool speed in megabytes per second.", |
11335 | "type" : "number", | |
11336 | "optional" : 1 | |
56122987 | 11337 | }, |
7aacca6f DM |
11338 | "discard" : { |
11339 | "enum" : [ | |
11340 | "ignore", | |
11341 | "on" | |
11342 | ], | |
11343 | "description" : "Controls whether to pass discard/trim requests to the underlying storage.", | |
11344 | "type" : "string", | |
56122987 | 11345 | "optional" : 1, |
7aacca6f | 11346 | "format_description" : "ignore|on" |
56122987 | 11347 | }, |
7aacca6f DM |
11348 | "bps_wr" : { |
11349 | "format_description" : "bps", | |
11350 | "description" : "Maximum write speed speed in bytes per second.", | |
56122987 | 11351 | "optional" : 1, |
56122987 DM |
11352 | "type" : "integer" |
11353 | }, | |
7aacca6f DM |
11354 | "mbps_max" : { |
11355 | "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", | |
11356 | "type" : "number", | |
56122987 | 11357 | "optional" : 1, |
7aacca6f | 11358 | "format_description" : "mbps" |
56122987 | 11359 | }, |
7aacca6f DM |
11360 | "size" : { |
11361 | "format" : "disk-size", | |
11362 | "description" : "Disk size. This is purely informational and has no effect.", | |
11363 | "type" : "string", | |
11364 | "optional" : 1 | |
56122987 | 11365 | }, |
7aacca6f | 11366 | "iops_rd" : { |
56122987 | 11367 | "format_description" : "iops", |
7aacca6f | 11368 | "description" : "Maximum read I/O speed in operations per second.", |
56122987 | 11369 | "optional" : 1, |
56122987 DM |
11370 | "type" : "integer" |
11371 | }, | |
7aacca6f DM |
11372 | "iops_max" : { |
11373 | "format_description" : "iops", | |
56122987 | 11374 | "optional" : 1, |
7aacca6f DM |
11375 | "type" : "integer", |
11376 | "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." | |
56122987 | 11377 | }, |
7aacca6f DM |
11378 | "snapshot" : { |
11379 | "description" : "Whether the drive should be included when making snapshots.", | |
11380 | "optional" : 1, | |
56122987 | 11381 | "type" : "boolean", |
7aacca6f | 11382 | "format_description" : "on|off" |
56122987 | 11383 | }, |
7aacca6f DM |
11384 | "media" : { |
11385 | "format_description" : "cdrom|disk", | |
11386 | "description" : "The drive's media type.", | |
11387 | "enum" : [ | |
11388 | "cdrom", | |
11389 | "disk" | |
11390 | ], | |
11391 | "default" : "disk", | |
56122987 | 11392 | "type" : "string", |
7aacca6f | 11393 | "optional" : 1 |
56122987 DM |
11394 | }, |
11395 | "iothread" : { | |
56122987 | 11396 | "format_description" : "off|on", |
7aacca6f DM |
11397 | "description" : "Whether to use iothreads for this drive", |
11398 | "type" : "boolean", | |
56122987 DM |
11399 | "optional" : 1 |
11400 | }, | |
7aacca6f DM |
11401 | "cache" : { |
11402 | "description" : "The drive's cache mode", | |
56122987 | 11403 | "enum" : [ |
7aacca6f DM |
11404 | "none", |
11405 | "writethrough", | |
11406 | "writeback", | |
11407 | "unsafe", | |
11408 | "directsync" | |
56122987 | 11409 | ], |
56122987 | 11410 | "optional" : 1, |
56122987 | 11411 | "type" : "string", |
7aacca6f | 11412 | "format_description" : "none|writethrough|writeback|unsafe|directsync" |
56122987 | 11413 | }, |
7aacca6f DM |
11414 | "detect_zeroes" : { |
11415 | "description" : "Controls whether to detect and try to optimize writes of zeroes.", | |
11416 | "type" : "boolean", | |
56122987 DM |
11417 | "optional" : 1 |
11418 | }, | |
7aacca6f DM |
11419 | "iops_wr" : { |
11420 | "format_description" : "iops", | |
11421 | "description" : "Maximum write I/O speed in operations per second.", | |
56122987 | 11422 | "type" : "integer", |
7aacca6f | 11423 | "optional" : 1 |
56122987 | 11424 | }, |
7aacca6f DM |
11425 | "secs" : { |
11426 | "format_description" : "count", | |
11427 | "description" : "Force the drive's physical geometry to have a specific sector count.", | |
56122987 | 11428 | "type" : "integer", |
56122987 | 11429 | "optional" : 1 |
56122987 DM |
11430 | } |
11431 | }, | |
7aacca6f DM |
11432 | "type" : "string", |
11433 | "optional" : 1, | |
11434 | "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." | |
56122987 | 11435 | }, |
7aacca6f DM |
11436 | "net[n]" : { |
11437 | "optional" : 1, | |
11438 | "type" : "string", | |
11439 | "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n", | |
11440 | "format" : "pve-qm-net" | |
11441 | }, | |
11442 | "machine" : { | |
11443 | "maxLength" : 40, | |
11444 | "description" : "Specific the Qemu machine type.", | |
11445 | "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", | |
11446 | "optional" : 1, | |
11447 | "type" : "string" | |
11448 | }, | |
11449 | "smp" : { | |
11450 | "description" : "The number of CPUs. Please use option -sockets instead.", | |
56122987 | 11451 | "optional" : 1, |
7aacca6f DM |
11452 | "type" : "integer", |
11453 | "default" : 1, | |
11454 | "minimum" : 1 | |
11455 | }, | |
11456 | "bios" : { | |
56122987 DM |
11457 | "description" : "Select BIOS implementation.", |
11458 | "enum" : [ | |
11459 | "seabios", | |
11460 | "ovmf" | |
11461 | ], | |
11462 | "default" : "seabios", | |
7aacca6f | 11463 | "optional" : 1, |
56122987 DM |
11464 | "type" : "string" |
11465 | }, | |
7aacca6f DM |
11466 | "shares" : { |
11467 | "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", | |
11468 | "type" : "integer", | |
56122987 | 11469 | "optional" : 1, |
7aacca6f DM |
11470 | "default" : 1000, |
11471 | "maximum" : 50000, | |
11472 | "minimum" : 0 | |
11473 | }, | |
11474 | "template" : { | |
11475 | "description" : "Enable/disable Template.", | |
11476 | "default" : 0, | |
11477 | "optional" : 1, | |
11478 | "type" : "boolean" | |
11479 | }, | |
11480 | "scsihw" : { | |
11481 | "enum" : [ | |
11482 | "lsi", | |
11483 | "lsi53c810", | |
11484 | "virtio-scsi-pci", | |
11485 | "virtio-scsi-single", | |
11486 | "megasas", | |
11487 | "pvscsi" | |
11488 | ], | |
11489 | "description" : "scsi controller model", | |
11490 | "type" : "string", | |
11491 | "optional" : 1, | |
11492 | "default" : "lsi" | |
56122987 DM |
11493 | }, |
11494 | "usb[n]" : { | |
7aacca6f DM |
11495 | "type" : "string", |
11496 | "optional" : 1, | |
11497 | "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", | |
56122987 | 11498 | "format" : { |
7aacca6f DM |
11499 | "host" : { |
11500 | "default_key" : 1, | |
11501 | "format_description" : "HOSTUSBDEVICE|spice", | |
11502 | "format" : "pve-qm-usb-device", | |
11503 | "type" : "string", | |
11504 | "description" : "The Host USB device or port or the value spice" | |
11505 | }, | |
56122987 | 11506 | "usb3" : { |
7aacca6f | 11507 | "format_description" : "yes|no", |
56122987 DM |
11508 | "description" : "Specifies whether if given host option is a USB3 device or port", |
11509 | "optional" : 1, | |
56122987 | 11510 | "type" : "boolean" |
7aacca6f DM |
11511 | } |
11512 | } | |
11513 | }, | |
11514 | "cpu" : { | |
11515 | "format" : { | |
11516 | "hidden" : { | |
11517 | "description" : "Do not identify as a KVM virtual machine.", | |
11518 | "type" : "boolean", | |
11519 | "optional" : 1, | |
11520 | "default" : 0 | |
56122987 | 11521 | }, |
7aacca6f DM |
11522 | "cputype" : { |
11523 | "description" : "Emulated CPU type.", | |
11524 | "enum" : [ | |
11525 | "486", | |
11526 | "athlon", | |
11527 | "pentium", | |
11528 | "pentium2", | |
11529 | "pentium3", | |
11530 | "coreduo", | |
11531 | "core2duo", | |
11532 | "kvm32", | |
11533 | "kvm64", | |
11534 | "qemu32", | |
11535 | "qemu64", | |
11536 | "phenom", | |
11537 | "Conroe", | |
11538 | "Penryn", | |
11539 | "Nehalem", | |
11540 | "Westmere", | |
11541 | "SandyBridge", | |
11542 | "IvyBridge", | |
11543 | "Haswell", | |
11544 | "Haswell-noTSX", | |
11545 | "Broadwell", | |
11546 | "Broadwell-noTSX", | |
11547 | "Opteron_G1", | |
11548 | "Opteron_G2", | |
11549 | "Opteron_G3", | |
11550 | "Opteron_G4", | |
11551 | "Opteron_G5", | |
11552 | "host" | |
11553 | ], | |
11554 | "default" : "kvm64", | |
11555 | "type" : "string", | |
11556 | "format_description" : "cputype", | |
11557 | "default_key" : 1 | |
56122987 DM |
11558 | } |
11559 | }, | |
11560 | "type" : "string", | |
11561 | "optional" : 1, | |
7aacca6f | 11562 | "description" : "Emulated CPU type." |
56122987 | 11563 | }, |
7aacca6f DM |
11564 | "cdrom" : { |
11565 | "format" : "pve-qm-drive", | |
11566 | "typetext" : "volume", | |
11567 | "description" : "This is an alias for option -ide2", | |
11568 | "type" : "string", | |
56122987 DM |
11569 | "optional" : 1 |
11570 | }, | |
7aacca6f DM |
11571 | "memory" : { |
11572 | "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", | |
11573 | "default" : 512, | |
56122987 | 11574 | "optional" : 1, |
7aacca6f DM |
11575 | "type" : "integer", |
11576 | "minimum" : 16 | |
11577 | }, | |
11578 | "args" : { | |
11579 | "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", | |
11580 | "type" : "string", | |
11581 | "optional" : 1 | |
11582 | }, | |
11583 | "protection" : { | |
11584 | "description" : "Sets the protection flag of the VM. This will prevent the remove operation.", | |
11585 | "default" : 0, | |
11586 | "type" : "boolean", | |
11587 | "optional" : 1 | |
56122987 | 11588 | } |
7aacca6f DM |
11589 | }, |
11590 | "additionalProperties" : 0 | |
56122987 | 11591 | }, |
7aacca6f | 11592 | "name" : "create_vm", |
56122987 | 11593 | "protected" : 1, |
7aacca6f DM |
11594 | "returns" : { |
11595 | "type" : "string" | |
11596 | }, | |
56122987 | 11597 | "permissions" : { |
7aacca6f DM |
11598 | "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore (option 'archive'), it is enough if the user has 'VM.Backup' permission and the VM already exists. If you create disks you need 'Datastore.AllocateSpace' on any used storage.", |
11599 | "user" : "all" | |
11600 | }, | |
11601 | "description" : "Create or restore a virtual machine.", | |
11602 | "proxyto" : "node" | |
56122987 DM |
11603 | }, |
11604 | "GET" : { | |
7aacca6f | 11605 | "protected" : 1, |
56122987 | 11606 | "parameters" : { |
56122987 | 11607 | "properties" : { |
56122987 | 11608 | "node" : { |
56122987 | 11609 | "format" : "pve-node", |
7aacca6f DM |
11610 | "type" : "string", |
11611 | "description" : "The cluster node name." | |
11612 | }, | |
11613 | "full" : { | |
11614 | "optional" : 1, | |
11615 | "type" : "boolean", | |
11616 | "description" : "Determine the full status of active VMs." | |
56122987 | 11617 | } |
7aacca6f DM |
11618 | }, |
11619 | "additionalProperties" : 0 | |
56122987 | 11620 | }, |
7aacca6f DM |
11621 | "name" : "vmlist", |
11622 | "method" : "GET", | |
11623 | "description" : "Virtual machine index (per node).", | |
56122987 | 11624 | "proxyto" : "node", |
56122987 | 11625 | "permissions" : { |
7aacca6f DM |
11626 | "user" : "all", |
11627 | "description" : "Only list VMs where you have VM.Audit permissons on /vms/<vmid>." | |
56122987 DM |
11628 | }, |
11629 | "returns" : { | |
7aacca6f | 11630 | "type" : "array", |
56122987 DM |
11631 | "links" : [ |
11632 | { | |
7aacca6f DM |
11633 | "href" : "{vmid}", |
11634 | "rel" : "child" | |
56122987 DM |
11635 | } |
11636 | ], | |
11637 | "items" : { | |
11638 | "properties" : {}, | |
11639 | "type" : "object" | |
7aacca6f DM |
11640 | } |
11641 | } | |
56122987 | 11642 | } |
7aacca6f DM |
11643 | }, |
11644 | "path" : "/nodes/{node}/qemu", | |
11645 | "leaf" : 0 | |
56122987 DM |
11646 | }, |
11647 | { | |
7aacca6f DM |
11648 | "path" : "/nodes/{node}/lxc", |
11649 | "leaf" : 0, | |
11650 | "text" : "lxc", | |
56122987 DM |
11651 | "children" : [ |
11652 | { | |
7aacca6f | 11653 | "path" : "/nodes/{node}/lxc/{vmid}", |
56122987 | 11654 | "leaf" : 0, |
56122987 DM |
11655 | "children" : [ |
11656 | { | |
56122987 | 11657 | "text" : "config", |
56122987 DM |
11658 | "info" : { |
11659 | "PUT" : { | |
7aacca6f | 11660 | "protected" : 1, |
56122987 DM |
11661 | "parameters" : { |
11662 | "properties" : { | |
7aacca6f DM |
11663 | "cmode" : { |
11664 | "optional" : 1, | |
11665 | "type" : "string", | |
11666 | "default" : "tty", | |
11667 | "enum" : [ | |
11668 | "shell", | |
11669 | "console", | |
11670 | "tty" | |
11671 | ], | |
11672 | "description" : "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login)." | |
11673 | }, | |
11674 | "description" : { | |
11675 | "type" : "string", | |
11676 | "optional" : 1, | |
11677 | "description" : "Container description. Only used on the configuration web interface." | |
11678 | }, | |
11679 | "swap" : { | |
11680 | "minimum" : 0, | |
11681 | "description" : "Amount of SWAP for the VM in MB.", | |
11682 | "optional" : 1, | |
11683 | "type" : "integer", | |
11684 | "default" : 512 | |
11685 | }, | |
11686 | "ostype" : { | |
11687 | "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", | |
11688 | "enum" : [ | |
11689 | "debian", | |
11690 | "ubuntu", | |
11691 | "centos", | |
11692 | "fedora", | |
11693 | "opensuse", | |
11694 | "archlinux", | |
11695 | "alpine", | |
11696 | "unmanaged" | |
11697 | ], | |
11698 | "type" : "string", | |
11699 | "optional" : 1 | |
11700 | }, | |
11701 | "unprivileged" : { | |
11702 | "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", | |
11703 | "type" : "boolean", | |
11704 | "optional" : 1, | |
11705 | "default" : 0 | |
11706 | }, | |
11707 | "unused[n]" : { | |
11708 | "type" : "string", | |
11709 | "optional" : 1, | |
11710 | "description" : "Reference to unused volumes.", | |
11711 | "format" : "pve-volume-id" | |
11712 | }, | |
11713 | "delete" : { | |
11714 | "format" : "pve-configid-list", | |
11715 | "optional" : 1, | |
11716 | "type" : "string", | |
11717 | "description" : "A list of settings you want to delete." | |
11718 | }, | |
56122987 | 11719 | "console" : { |
7aacca6f | 11720 | "description" : "Attach a console device (/dev/console) to the container.", |
56122987 | 11721 | "default" : 1, |
56122987 | 11722 | "optional" : 1, |
7aacca6f DM |
11723 | "type" : "boolean" |
11724 | }, | |
11725 | "mp[n]" : { | |
11726 | "format" : { | |
11727 | "ro" : { | |
11728 | "format_description" : "ro", | |
11729 | "description" : "Read-only mountpoint (not supported with bind mounts)", | |
11730 | "type" : "boolean", | |
11731 | "optional" : 1 | |
11732 | }, | |
11733 | "acl" : { | |
11734 | "description" : "Explicitly enable or disable ACL support.", | |
11735 | "type" : "boolean", | |
11736 | "optional" : 1, | |
11737 | "format_description" : "acl" | |
11738 | }, | |
11739 | "size" : { | |
11740 | "format_description" : "DiskSize", | |
11741 | "format" : "disk-size", | |
11742 | "optional" : 1, | |
11743 | "type" : "string", | |
11744 | "description" : "Volume size (read only value)." | |
11745 | }, | |
11746 | "backup" : { | |
11747 | "description" : "Whether to include the mountpoint in backups.", | |
11748 | "optional" : 1, | |
11749 | "type" : "boolean", | |
11750 | "format_description" : "[1|0]" | |
11751 | }, | |
11752 | "quota" : { | |
11753 | "type" : "boolean", | |
11754 | "optional" : 1, | |
11755 | "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", | |
11756 | "format_description" : "[0|1]" | |
11757 | }, | |
11758 | "volume" : { | |
11759 | "default_key" : 1, | |
11760 | "format_description" : "volume", | |
11761 | "format" : "pve-lxc-mp-string", | |
11762 | "type" : "string", | |
11763 | "description" : "Volume, device or directory to mount into the container." | |
11764 | }, | |
11765 | "mp" : { | |
11766 | "description" : "Path to the mountpoint as seen from inside the container.", | |
11767 | "type" : "string", | |
11768 | "format" : "pve-lxc-mp-string", | |
11769 | "format_description" : "Path" | |
11770 | } | |
11771 | }, | |
11772 | "type" : "string", | |
11773 | "optional" : 1, | |
11774 | "description" : "Use volume as container mount point (experimental feature)." | |
56122987 DM |
11775 | }, |
11776 | "cpulimit" : { | |
7aacca6f | 11777 | "optional" : 1, |
56122987 | 11778 | "type" : "number", |
7aacca6f | 11779 | "maximum" : 128, |
56122987 DM |
11780 | "default" : 0, |
11781 | "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.", | |
7aacca6f DM |
11782 | "minimum" : 0 |
11783 | }, | |
11784 | "node" : { | |
11785 | "type" : "string", | |
11786 | "description" : "The cluster node name.", | |
11787 | "format" : "pve-node" | |
11788 | }, | |
11789 | "startup" : { | |
11790 | "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", | |
11791 | "type" : "string", | |
11792 | "optional" : 1, | |
11793 | "format" : "pve-startup-order", | |
11794 | "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " | |
11795 | }, | |
11796 | "digest" : { | |
11797 | "type" : "string", | |
11798 | "optional" : 1, | |
11799 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
11800 | "maxLength" : 40 | |
11801 | }, | |
11802 | "onboot" : { | |
11803 | "description" : "Specifies whether a VM will be started during system bootup.", | |
11804 | "default" : 0, | |
11805 | "type" : "boolean", | |
56122987 DM |
11806 | "optional" : 1 |
11807 | }, | |
7aacca6f | 11808 | "tty" : { |
56122987 DM |
11809 | "minimum" : 0, |
11810 | "type" : "integer", | |
56122987 | 11811 | "optional" : 1, |
7aacca6f DM |
11812 | "default" : 2, |
11813 | "maximum" : 6, | |
11814 | "description" : "Specify the number of tty available to the container" | |
11815 | }, | |
11816 | "arch" : { | |
11817 | "description" : "OS architecture type.", | |
11818 | "enum" : [ | |
11819 | "amd64", | |
11820 | "i386" | |
11821 | ], | |
11822 | "default" : "amd64", | |
11823 | "type" : "string", | |
11824 | "optional" : 1 | |
56122987 DM |
11825 | }, |
11826 | "net[n]" : { | |
56122987 | 11827 | "format" : { |
7aacca6f DM |
11828 | "firewall" : { |
11829 | "format_description" : "[1|0]", | |
11830 | "optional" : 1, | |
11831 | "type" : "boolean", | |
11832 | "description" : "Controls whether this interface's firewall rules should be used." | |
11833 | }, | |
11834 | "type" : { | |
56122987 | 11835 | "type" : "string", |
56122987 | 11836 | "optional" : 1, |
7aacca6f DM |
11837 | "enum" : [ |
11838 | "veth" | |
11839 | ], | |
11840 | "description" : "Network interface type." | |
56122987 | 11841 | }, |
7aacca6f DM |
11842 | "ip" : { |
11843 | "description" : "IPv4 address in CIDR format.", | |
56122987 | 11844 | "optional" : 1, |
7aacca6f DM |
11845 | "type" : "string", |
11846 | "format_description" : "IPv4Format/CIDR", | |
11847 | "format" : "pve-ipv4-config" | |
56122987 | 11848 | }, |
7aacca6f DM |
11849 | "trunks" : { |
11850 | "type" : "string", | |
56122987 | 11851 | "optional" : 1, |
7aacca6f DM |
11852 | "description" : "VLAN ids to pass through the interface", |
11853 | "pattern" : "(?^:\\d+(?:;\\d+)*)", | |
11854 | "format_description" : "vlanid[;vlanid...]" | |
56122987 DM |
11855 | }, |
11856 | "gw6" : { | |
56122987 | 11857 | "format_description" : "GatewayIPv6", |
56122987 | 11858 | "format" : "ipv6", |
7aacca6f DM |
11859 | "description" : "Default gateway for IPv6 traffic.", |
11860 | "optional" : 1, | |
56122987 DM |
11861 | "type" : "string" |
11862 | }, | |
7aacca6f DM |
11863 | "tag" : { |
11864 | "format_description" : "VlanNo", | |
11865 | "minimum" : "2", | |
11866 | "description" : "VLAN tag for this interface.", | |
56122987 | 11867 | "optional" : 1, |
7aacca6f DM |
11868 | "type" : "integer", |
11869 | "maximum" : "4094" | |
56122987 | 11870 | }, |
7aacca6f | 11871 | "ip6" : { |
56122987 DM |
11872 | "optional" : 1, |
11873 | "type" : "string", | |
7aacca6f DM |
11874 | "description" : "IPv6 address in CIDR format.", |
11875 | "format" : "pve-ipv6-config", | |
11876 | "format_description" : "IPv6Format/CIDR" | |
56122987 | 11877 | }, |
7aacca6f DM |
11878 | "gw" : { |
11879 | "format" : "ipv4", | |
11880 | "format_description" : "GatewayIPv4", | |
11881 | "optional" : 1, | |
56122987 | 11882 | "type" : "string", |
7aacca6f | 11883 | "description" : "Default gateway for IPv4 traffic." |
56122987 | 11884 | }, |
7aacca6f DM |
11885 | "bridge" : { |
11886 | "format_description" : "vmbr<Number>", | |
56122987 | 11887 | "optional" : 1, |
7aacca6f DM |
11888 | "type" : "string", |
11889 | "description" : "Bridge to attach the network device to.", | |
11890 | "pattern" : "[-_.\\w\\d]+" | |
56122987 DM |
11891 | }, |
11892 | "name" : { | |
7aacca6f | 11893 | "format_description" : "String", |
56122987 DM |
11894 | "type" : "string", |
11895 | "pattern" : "[-_.\\w\\d]+", | |
56122987 DM |
11896 | "description" : "Name of the network device as seen from inside the container. (lxc.network.name)" |
11897 | }, | |
7aacca6f DM |
11898 | "hwaddr" : { |
11899 | "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", | |
11900 | "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", | |
56122987 | 11901 | "optional" : 1, |
56122987 | 11902 | "type" : "string", |
7aacca6f DM |
11903 | "format_description" : "MAC" |
11904 | }, | |
11905 | "mtu" : { | |
11906 | "minimum" : 64, | |
11907 | "format_description" : "Number", | |
11908 | "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", | |
56122987 | 11909 | "optional" : 1, |
7aacca6f | 11910 | "type" : "integer" |
56122987 | 11911 | }, |
7aacca6f DM |
11912 | "rate" : { |
11913 | "description" : "Apply rate limiting to the interface", | |
11914 | "type" : "number", | |
56122987 | 11915 | "optional" : 1, |
7aacca6f | 11916 | "format_description" : "mbps" |
56122987 DM |
11917 | } |
11918 | }, | |
7aacca6f DM |
11919 | "description" : "Specifies network interfaces for the container.", |
11920 | "optional" : 1, | |
56122987 DM |
11921 | "type" : "string" |
11922 | }, | |
7aacca6f DM |
11923 | "searchdomain" : { |
11924 | "type" : "string", | |
56122987 | 11925 | "optional" : 1, |
7aacca6f DM |
11926 | "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", |
11927 | "format" : "dns-name-list" | |
56122987 | 11928 | }, |
7aacca6f | 11929 | "cpuunits" : { |
56122987 | 11930 | "minimum" : 0, |
7aacca6f | 11931 | "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", |
56122987 | 11932 | "type" : "integer", |
56122987 | 11933 | "optional" : 1, |
7aacca6f DM |
11934 | "default" : 1024, |
11935 | "maximum" : 500000 | |
56122987 | 11936 | }, |
7aacca6f DM |
11937 | "nameserver" : { |
11938 | "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", | |
56122987 | 11939 | "type" : "string", |
56122987 | 11940 | "optional" : 1, |
7aacca6f | 11941 | "format" : "address-list" |
56122987 | 11942 | }, |
7aacca6f DM |
11943 | "vmid" : { |
11944 | "description" : "The (unique) ID of the VM.", | |
56122987 | 11945 | "type" : "integer", |
7aacca6f DM |
11946 | "format" : "pve-vmid", |
11947 | "minimum" : 1 | |
56122987 DM |
11948 | }, |
11949 | "hostname" : { | |
56122987 | 11950 | "maxLength" : 255, |
7aacca6f | 11951 | "format" : "dns-name", |
56122987 | 11952 | "type" : "string", |
56122987 | 11953 | "optional" : 1, |
7aacca6f | 11954 | "description" : "Set a host name for the container." |
56122987 | 11955 | }, |
7aacca6f DM |
11956 | "rootfs" : { |
11957 | "description" : "Use volume as container root.", | |
56122987 | 11958 | "optional" : 1, |
56122987 DM |
11959 | "type" : "string", |
11960 | "format" : { | |
11961 | "acl" : { | |
7aacca6f | 11962 | "format_description" : "acl", |
56122987 DM |
11963 | "type" : "boolean", |
11964 | "optional" : 1, | |
56122987 DM |
11965 | "description" : "Explicitly enable or disable ACL support." |
11966 | }, | |
11967 | "ro" : { | |
7aacca6f | 11968 | "format_description" : "ro", |
56122987 | 11969 | "description" : "Read-only mountpoint (not supported with bind mounts)", |
7aacca6f DM |
11970 | "optional" : 1, |
11971 | "type" : "boolean" | |
56122987 DM |
11972 | }, |
11973 | "backup" : { | |
56122987 | 11974 | "format_description" : "[1|0]", |
7aacca6f DM |
11975 | "description" : "Whether to include the mountpoint in backups.", |
11976 | "optional" : 1, | |
56122987 DM |
11977 | "type" : "boolean" |
11978 | }, | |
56122987 | 11979 | "size" : { |
56122987 | 11980 | "optional" : 1, |
7aacca6f DM |
11981 | "type" : "string", |
11982 | "description" : "Volume size (read only value).", | |
56122987 | 11983 | "format_description" : "DiskSize", |
7aacca6f | 11984 | "format" : "disk-size" |
56122987 DM |
11985 | }, |
11986 | "quota" : { | |
7aacca6f | 11987 | "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", |
56122987 | 11988 | "optional" : 1, |
7aacca6f DM |
11989 | "type" : "boolean", |
11990 | "format_description" : "[0|1]" | |
11991 | }, | |
11992 | "volume" : { | |
11993 | "format" : "pve-lxc-mp-string", | |
11994 | "format_description" : "volume", | |
11995 | "default_key" : 1, | |
11996 | "description" : "Volume, device or directory to mount into the container.", | |
11997 | "type" : "string" | |
56122987 DM |
11998 | } |
11999 | } | |
12000 | }, | |
56122987 | 12001 | "template" : { |
7aacca6f | 12002 | "description" : "Enable/disable Template.", |
56122987 | 12003 | "optional" : 1, |
7aacca6f DM |
12004 | "type" : "boolean", |
12005 | "default" : 0 | |
56122987 | 12006 | }, |
7aacca6f DM |
12007 | "lock" : { |
12008 | "description" : "Lock/unlock the VM.", | |
56122987 | 12009 | "enum" : [ |
7aacca6f DM |
12010 | "migrate", |
12011 | "backup", | |
12012 | "snapshot", | |
12013 | "rollback" | |
12014 | ], | |
56122987 | 12015 | "type" : "string", |
56122987 DM |
12016 | "optional" : 1 |
12017 | }, | |
12018 | "protection" : { | |
56122987 | 12019 | "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", |
56122987 | 12020 | "type" : "boolean", |
56122987 | 12021 | "optional" : 1, |
7aacca6f | 12022 | "default" : 0 |
56122987 | 12023 | }, |
7aacca6f DM |
12024 | "memory" : { |
12025 | "description" : "Amount of RAM for the VM in MB.", | |
12026 | "default" : 512, | |
12027 | "type" : "integer", | |
56122987 | 12028 | "optional" : 1, |
7aacca6f | 12029 | "minimum" : 16 |
56122987 DM |
12030 | } |
12031 | }, | |
12032 | "additionalProperties" : 0 | |
12033 | }, | |
7aacca6f DM |
12034 | "name" : "update_vm", |
12035 | "method" : "PUT", | |
56122987 | 12036 | "proxyto" : "node", |
7aacca6f | 12037 | "description" : "Set container options.", |
56122987 DM |
12038 | "permissions" : { |
12039 | "check" : [ | |
12040 | "perm", | |
12041 | "/vms/{vmid}", | |
12042 | [ | |
12043 | "VM.Config.Disk", | |
12044 | "VM.Config.CPU", | |
12045 | "VM.Config.Memory", | |
12046 | "VM.Config.Network", | |
12047 | "VM.Config.Options" | |
12048 | ], | |
12049 | "any", | |
12050 | 1 | |
12051 | ] | |
12052 | }, | |
12053 | "returns" : { | |
12054 | "type" : "null" | |
7aacca6f | 12055 | } |
56122987 DM |
12056 | }, |
12057 | "GET" : { | |
12058 | "method" : "GET", | |
56122987 DM |
12059 | "returns" : { |
12060 | "type" : "object", | |
12061 | "properties" : { | |
12062 | "digest" : { | |
7aacca6f DM |
12063 | "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", |
12064 | "type" : "string" | |
56122987 DM |
12065 | } |
12066 | } | |
12067 | }, | |
56122987 DM |
12068 | "parameters" : { |
12069 | "additionalProperties" : 0, | |
12070 | "properties" : { | |
7aacca6f DM |
12071 | "node" : { |
12072 | "format" : "pve-node", | |
12073 | "description" : "The cluster node name.", | |
12074 | "type" : "string" | |
12075 | }, | |
56122987 | 12076 | "vmid" : { |
7aacca6f | 12077 | "description" : "The (unique) ID of the VM.", |
56122987 DM |
12078 | "type" : "integer", |
12079 | "minimum" : 1, | |
7aacca6f | 12080 | "format" : "pve-vmid" |
56122987 DM |
12081 | } |
12082 | } | |
12083 | }, | |
56122987 DM |
12084 | "permissions" : { |
12085 | "check" : [ | |
12086 | "perm", | |
12087 | "/vms/{vmid}", | |
12088 | [ | |
12089 | "VM.Audit" | |
12090 | ] | |
12091 | ] | |
7aacca6f DM |
12092 | }, |
12093 | "name" : "vm_config", | |
12094 | "description" : "Get container configuration.", | |
12095 | "proxyto" : "node" | |
56122987 | 12096 | } |
7aacca6f DM |
12097 | }, |
12098 | "path" : "/nodes/{node}/lxc/{vmid}/config", | |
12099 | "leaf" : 1 | |
56122987 DM |
12100 | }, |
12101 | { | |
12102 | "path" : "/nodes/{node}/lxc/{vmid}/status", | |
7aacca6f DM |
12103 | "leaf" : 0, |
12104 | "text" : "status", | |
56122987 DM |
12105 | "children" : [ |
12106 | { | |
7aacca6f DM |
12107 | "leaf" : 1, |
12108 | "path" : "/nodes/{node}/lxc/{vmid}/status/current", | |
56122987 DM |
12109 | "info" : { |
12110 | "GET" : { | |
7aacca6f | 12111 | "method" : "GET", |
56122987 | 12112 | "parameters" : { |
56122987 | 12113 | "properties" : { |
56122987 DM |
12114 | "node" : { |
12115 | "format" : "pve-node", | |
12116 | "type" : "string", | |
12117 | "description" : "The cluster node name." | |
7aacca6f DM |
12118 | }, |
12119 | "vmid" : { | |
12120 | "description" : "The (unique) ID of the VM.", | |
12121 | "type" : "integer", | |
12122 | "minimum" : 1, | |
12123 | "format" : "pve-vmid" | |
56122987 | 12124 | } |
7aacca6f DM |
12125 | }, |
12126 | "additionalProperties" : 0 | |
56122987 | 12127 | }, |
56122987 | 12128 | "name" : "vm_status", |
7aacca6f | 12129 | "protected" : 1, |
56122987 DM |
12130 | "returns" : { |
12131 | "type" : "object" | |
7aacca6f DM |
12132 | }, |
12133 | "permissions" : { | |
12134 | "check" : [ | |
12135 | "perm", | |
12136 | "/vms/{vmid}", | |
12137 | [ | |
12138 | "VM.Audit" | |
12139 | ] | |
12140 | ] | |
12141 | }, | |
12142 | "proxyto" : "node", | |
12143 | "description" : "Get virtual machine status." | |
56122987 DM |
12144 | } |
12145 | }, | |
56122987 DM |
12146 | "text" : "current" |
12147 | }, | |
12148 | { | |
56122987 DM |
12149 | "info" : { |
12150 | "POST" : { | |
7aacca6f DM |
12151 | "proxyto" : "node", |
12152 | "description" : "Start the container.", | |
12153 | "permissions" : { | |
12154 | "check" : [ | |
12155 | "perm", | |
12156 | "/vms/{vmid}", | |
12157 | [ | |
12158 | "VM.PowerMgmt" | |
12159 | ] | |
12160 | ] | |
12161 | }, | |
56122987 DM |
12162 | "returns" : { |
12163 | "type" : "string" | |
12164 | }, | |
7aacca6f DM |
12165 | "protected" : 1, |
12166 | "name" : "vm_start", | |
56122987 DM |
12167 | "parameters" : { |
12168 | "additionalProperties" : 0, | |
12169 | "properties" : { | |
56122987 | 12170 | "node" : { |
56122987 | 12171 | "type" : "string", |
7aacca6f | 12172 | "description" : "The cluster node name.", |
56122987 DM |
12173 | "format" : "pve-node" |
12174 | }, | |
7aacca6f DM |
12175 | "skiplock" : { |
12176 | "optional" : 1, | |
12177 | "type" : "boolean", | |
12178 | "description" : "Ignore locks - only root is allowed to use this option." | |
12179 | }, | |
56122987 | 12180 | "vmid" : { |
7aacca6f | 12181 | "description" : "The (unique) ID of the VM.", |
56122987 | 12182 | "type" : "integer", |
56122987 | 12183 | "minimum" : 1, |
7aacca6f | 12184 | "format" : "pve-vmid" |
56122987 DM |
12185 | } |
12186 | } | |
12187 | }, | |
7aacca6f DM |
12188 | "method" : "POST" |
12189 | } | |
12190 | }, | |
12191 | "text" : "start", | |
12192 | "leaf" : 1, | |
12193 | "path" : "/nodes/{node}/lxc/{vmid}/status/start" | |
12194 | }, | |
12195 | { | |
12196 | "info" : { | |
12197 | "POST" : { | |
12198 | "returns" : { | |
12199 | "type" : "string" | |
12200 | }, | |
56122987 DM |
12201 | "permissions" : { |
12202 | "check" : [ | |
12203 | "perm", | |
12204 | "/vms/{vmid}", | |
12205 | [ | |
12206 | "VM.PowerMgmt" | |
12207 | ] | |
12208 | ] | |
12209 | }, | |
7aacca6f DM |
12210 | "description" : "Stop the container. This will abruptly stop all processes running in the container.", |
12211 | "proxyto" : "node", | |
12212 | "method" : "POST", | |
12213 | "name" : "vm_stop", | |
12214 | "parameters" : { | |
12215 | "properties" : { | |
12216 | "skiplock" : { | |
12217 | "description" : "Ignore locks - only root is allowed to use this option.", | |
12218 | "type" : "boolean", | |
12219 | "optional" : 1 | |
12220 | }, | |
12221 | "vmid" : { | |
12222 | "format" : "pve-vmid", | |
12223 | "minimum" : 1, | |
12224 | "description" : "The (unique) ID of the VM.", | |
12225 | "type" : "integer" | |
12226 | }, | |
12227 | "node" : { | |
12228 | "format" : "pve-node", | |
12229 | "description" : "The cluster node name.", | |
12230 | "type" : "string" | |
12231 | } | |
12232 | }, | |
12233 | "additionalProperties" : 0 | |
12234 | }, | |
56122987 DM |
12235 | "protected" : 1 |
12236 | } | |
7aacca6f DM |
12237 | }, |
12238 | "text" : "stop", | |
12239 | "leaf" : 1, | |
12240 | "path" : "/nodes/{node}/lxc/{vmid}/status/stop" | |
56122987 DM |
12241 | }, |
12242 | { | |
7aacca6f DM |
12243 | "leaf" : 1, |
12244 | "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown", | |
56122987 DM |
12245 | "info" : { |
12246 | "POST" : { | |
7aacca6f DM |
12247 | "protected" : 1, |
12248 | "name" : "vm_shutdown", | |
56122987 DM |
12249 | "parameters" : { |
12250 | "properties" : { | |
12251 | "node" : { | |
7aacca6f | 12252 | "format" : "pve-node", |
56122987 | 12253 | "description" : "The cluster node name.", |
7aacca6f | 12254 | "type" : "string" |
56122987 | 12255 | }, |
7aacca6f DM |
12256 | "forceStop" : { |
12257 | "description" : "Make sure the Container stops.", | |
12258 | "optional" : 1, | |
56122987 | 12259 | "type" : "boolean", |
7aacca6f DM |
12260 | "default" : 0 |
12261 | }, | |
12262 | "timeout" : { | |
12263 | "description" : "Wait maximal timeout seconds.", | |
12264 | "default" : 60, | |
12265 | "type" : "integer", | |
56122987 | 12266 | "optional" : 1, |
7aacca6f | 12267 | "minimum" : 0 |
56122987 DM |
12268 | }, |
12269 | "vmid" : { | |
56122987 | 12270 | "minimum" : 1, |
7aacca6f DM |
12271 | "format" : "pve-vmid", |
12272 | "description" : "The (unique) ID of the VM.", | |
12273 | "type" : "integer" | |
56122987 DM |
12274 | } |
12275 | }, | |
12276 | "additionalProperties" : 0 | |
12277 | }, | |
7aacca6f DM |
12278 | "method" : "POST", |
12279 | "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.", | |
12280 | "proxyto" : "node", | |
56122987 DM |
12281 | "permissions" : { |
12282 | "check" : [ | |
12283 | "perm", | |
12284 | "/vms/{vmid}", | |
12285 | [ | |
12286 | "VM.PowerMgmt" | |
12287 | ] | |
12288 | ] | |
12289 | }, | |
7aacca6f DM |
12290 | "returns" : { |
12291 | "type" : "string" | |
12292 | } | |
56122987 DM |
12293 | } |
12294 | }, | |
7aacca6f | 12295 | "text" : "shutdown" |
56122987 DM |
12296 | }, |
12297 | { | |
7aacca6f DM |
12298 | "leaf" : 1, |
12299 | "path" : "/nodes/{node}/lxc/{vmid}/status/suspend", | |
56122987 DM |
12300 | "info" : { |
12301 | "POST" : { | |
56122987 DM |
12302 | "returns" : { |
12303 | "type" : "string" | |
12304 | }, | |
7aacca6f DM |
12305 | "proxyto" : "node", |
12306 | "description" : "Suspend the container.", | |
56122987 DM |
12307 | "permissions" : { |
12308 | "check" : [ | |
12309 | "perm", | |
12310 | "/vms/{vmid}", | |
12311 | [ | |
12312 | "VM.PowerMgmt" | |
12313 | ] | |
12314 | ] | |
12315 | }, | |
7aacca6f DM |
12316 | "method" : "POST", |
12317 | "protected" : 1, | |
12318 | "name" : "vm_suspend", | |
56122987 DM |
12319 | "parameters" : { |
12320 | "additionalProperties" : 0, | |
12321 | "properties" : { | |
7aacca6f | 12322 | "vmid" : { |
56122987 | 12323 | "type" : "integer", |
7aacca6f DM |
12324 | "description" : "The (unique) ID of the VM.", |
12325 | "format" : "pve-vmid", | |
12326 | "minimum" : 1 | |
56122987 DM |
12327 | }, |
12328 | "node" : { | |
12329 | "description" : "The cluster node name.", | |
7aacca6f DM |
12330 | "type" : "string", |
12331 | "format" : "pve-node" | |
56122987 DM |
12332 | } |
12333 | } | |
12334 | } | |
12335 | } | |
12336 | }, | |
7aacca6f | 12337 | "text" : "suspend" |
56122987 DM |
12338 | }, |
12339 | { | |
7aacca6f DM |
12340 | "leaf" : 1, |
12341 | "path" : "/nodes/{node}/lxc/{vmid}/status/resume", | |
56122987 DM |
12342 | "info" : { |
12343 | "POST" : { | |
7aacca6f DM |
12344 | "returns" : { |
12345 | "type" : "string" | |
12346 | }, | |
12347 | "description" : "Resume the container.", | |
12348 | "proxyto" : "node", | |
56122987 DM |
12349 | "permissions" : { |
12350 | "check" : [ | |
12351 | "perm", | |
12352 | "/vms/{vmid}", | |
12353 | [ | |
12354 | "VM.PowerMgmt" | |
12355 | ] | |
12356 | ] | |
12357 | }, | |
7aacca6f DM |
12358 | "method" : "POST", |
12359 | "protected" : 1, | |
56122987 | 12360 | "parameters" : { |
56122987 DM |
12361 | "properties" : { |
12362 | "node" : { | |
56122987 | 12363 | "type" : "string", |
7aacca6f DM |
12364 | "description" : "The cluster node name.", |
12365 | "format" : "pve-node" | |
56122987 DM |
12366 | }, |
12367 | "vmid" : { | |
56122987 | 12368 | "type" : "integer", |
7aacca6f | 12369 | "description" : "The (unique) ID of the VM.", |
56122987 | 12370 | "format" : "pve-vmid", |
7aacca6f | 12371 | "minimum" : 1 |
56122987 | 12372 | } |
7aacca6f DM |
12373 | }, |
12374 | "additionalProperties" : 0 | |
56122987 | 12375 | }, |
7aacca6f DM |
12376 | "name" : "vm_resume" |
12377 | } | |
12378 | }, | |
12379 | "text" : "resume" | |
12380 | } | |
12381 | ], | |
12382 | "info" : { | |
12383 | "GET" : { | |
12384 | "proxyto" : "node", | |
12385 | "description" : "Directory index", | |
12386 | "name" : "vmcmdidx", | |
12387 | "permissions" : { | |
12388 | "user" : "all" | |
12389 | }, | |
12390 | "parameters" : { | |
12391 | "additionalProperties" : 0, | |
12392 | "properties" : { | |
12393 | "node" : { | |
12394 | "description" : "The cluster node name.", | |
12395 | "type" : "string", | |
12396 | "format" : "pve-node" | |
56122987 | 12397 | }, |
7aacca6f DM |
12398 | "vmid" : { |
12399 | "format" : "pve-vmid", | |
12400 | "minimum" : 1, | |
12401 | "type" : "integer", | |
12402 | "description" : "The (unique) ID of the VM." | |
12403 | } | |
56122987 DM |
12404 | } |
12405 | }, | |
7aacca6f DM |
12406 | "method" : "GET", |
12407 | "returns" : { | |
12408 | "type" : "array", | |
12409 | "items" : { | |
12410 | "properties" : { | |
12411 | "subdir" : { | |
12412 | "type" : "string" | |
12413 | } | |
12414 | }, | |
12415 | "type" : "object" | |
12416 | }, | |
12417 | "links" : [ | |
12418 | { | |
12419 | "rel" : "child", | |
12420 | "href" : "{subdir}" | |
12421 | } | |
12422 | ] | |
12423 | } | |
12424 | } | |
12425 | } | |
12426 | }, | |
12427 | { | |
12428 | "path" : "/nodes/{node}/lxc/{vmid}/snapshot", | |
12429 | "leaf" : 0, | |
12430 | "text" : "snapshot", | |
12431 | "children" : [ | |
56122987 | 12432 | { |
7aacca6f DM |
12433 | "text" : "{snapname}", |
12434 | "children" : [ | |
12435 | { | |
12436 | "info" : { | |
12437 | "POST" : { | |
12438 | "returns" : { | |
12439 | "type" : "string", | |
12440 | "description" : "the task ID." | |
12441 | }, | |
12442 | "proxyto" : "node", | |
12443 | "description" : "Rollback LXC state to specified snapshot.", | |
12444 | "permissions" : { | |
12445 | "check" : [ | |
12446 | "perm", | |
12447 | "/vms/{vmid}", | |
12448 | [ | |
12449 | "VM.Snapshot" | |
12450 | ] | |
12451 | ] | |
12452 | }, | |
12453 | "method" : "POST", | |
12454 | "protected" : 1, | |
12455 | "parameters" : { | |
12456 | "properties" : { | |
12457 | "snapname" : { | |
12458 | "format" : "pve-configid", | |
12459 | "maxLength" : 40, | |
12460 | "description" : "The name of the snapshot.", | |
12461 | "type" : "string" | |
12462 | }, | |
12463 | "node" : { | |
12464 | "description" : "The cluster node name.", | |
12465 | "type" : "string", | |
12466 | "format" : "pve-node" | |
12467 | }, | |
12468 | "vmid" : { | |
12469 | "minimum" : 1, | |
12470 | "format" : "pve-vmid", | |
12471 | "type" : "integer", | |
12472 | "description" : "The (unique) ID of the VM." | |
12473 | } | |
12474 | }, | |
12475 | "additionalProperties" : 0 | |
12476 | }, | |
12477 | "name" : "rollback" | |
12478 | } | |
12479 | }, | |
12480 | "text" : "rollback", | |
12481 | "leaf" : 1, | |
12482 | "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback" | |
12483 | }, | |
12484 | { | |
12485 | "text" : "config", | |
12486 | "info" : { | |
12487 | "GET" : { | |
12488 | "returns" : { | |
12489 | "type" : "object" | |
12490 | }, | |
12491 | "method" : "GET", | |
12492 | "description" : "Get snapshot configuration", | |
12493 | "proxyto" : "node", | |
12494 | "parameters" : { | |
12495 | "additionalProperties" : 0, | |
12496 | "properties" : { | |
12497 | "vmid" : { | |
12498 | "type" : "integer", | |
12499 | "description" : "The (unique) ID of the VM.", | |
12500 | "minimum" : 1, | |
12501 | "format" : "pve-vmid" | |
12502 | }, | |
12503 | "node" : { | |
12504 | "format" : "pve-node", | |
12505 | "description" : "The cluster node name.", | |
12506 | "type" : "string" | |
12507 | }, | |
12508 | "snapname" : { | |
12509 | "format" : "pve-configid", | |
12510 | "maxLength" : 40, | |
12511 | "type" : "string", | |
12512 | "description" : "The name of the snapshot." | |
12513 | } | |
12514 | } | |
12515 | }, | |
12516 | "permissions" : { | |
12517 | "check" : [ | |
12518 | "perm", | |
12519 | "/vms/{vmid}", | |
12520 | [ | |
12521 | "VM.Snapshot" | |
12522 | ] | |
12523 | ] | |
12524 | }, | |
12525 | "name" : "get_snapshot_config" | |
12526 | }, | |
12527 | "PUT" : { | |
12528 | "protected" : 1, | |
12529 | "name" : "update_snapshot_config", | |
12530 | "parameters" : { | |
12531 | "additionalProperties" : 0, | |
12532 | "properties" : { | |
12533 | "node" : { | |
12534 | "type" : "string", | |
12535 | "description" : "The cluster node name.", | |
12536 | "format" : "pve-node" | |
12537 | }, | |
12538 | "snapname" : { | |
12539 | "description" : "The name of the snapshot.", | |
12540 | "type" : "string", | |
12541 | "format" : "pve-configid", | |
12542 | "maxLength" : 40 | |
12543 | }, | |
12544 | "description" : { | |
12545 | "description" : "A textual description or comment.", | |
12546 | "type" : "string", | |
12547 | "optional" : 1 | |
12548 | }, | |
12549 | "vmid" : { | |
12550 | "minimum" : 1, | |
12551 | "format" : "pve-vmid", | |
12552 | "type" : "integer", | |
12553 | "description" : "The (unique) ID of the VM." | |
12554 | } | |
12555 | } | |
12556 | }, | |
12557 | "method" : "PUT", | |
12558 | "description" : "Update snapshot metadata.", | |
12559 | "proxyto" : "node", | |
12560 | "permissions" : { | |
12561 | "check" : [ | |
12562 | "perm", | |
12563 | "/vms/{vmid}", | |
12564 | [ | |
12565 | "VM.Snapshot" | |
12566 | ] | |
12567 | ] | |
12568 | }, | |
12569 | "returns" : { | |
12570 | "type" : "null" | |
12571 | } | |
12572 | } | |
12573 | }, | |
12574 | "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config", | |
12575 | "leaf" : 1 | |
12576 | } | |
12577 | ], | |
56122987 | 12578 | "info" : { |
7aacca6f | 12579 | "GET" : { |
56122987 | 12580 | "parameters" : { |
56122987 | 12581 | "properties" : { |
56122987 DM |
12582 | "vmid" : { |
12583 | "description" : "The (unique) ID of the VM.", | |
56122987 | 12584 | "type" : "integer", |
7aacca6f | 12585 | "minimum" : 1, |
56122987 | 12586 | "format" : "pve-vmid" |
7aacca6f DM |
12587 | }, |
12588 | "snapname" : { | |
12589 | "type" : "string", | |
12590 | "description" : "The name of the snapshot.", | |
12591 | "format" : "pve-configid", | |
12592 | "maxLength" : 40 | |
12593 | }, | |
12594 | "node" : { | |
12595 | "format" : "pve-node", | |
12596 | "description" : "The cluster node name.", | |
12597 | "type" : "string" | |
56122987 | 12598 | } |
7aacca6f DM |
12599 | }, |
12600 | "additionalProperties" : 0 | |
56122987 | 12601 | }, |
7aacca6f DM |
12602 | "name" : "snapshot_cmd_idx", |
12603 | "permissions" : { | |
12604 | "user" : "all" | |
12605 | }, | |
12606 | "description" : "", | |
12607 | "returns" : { | |
12608 | "items" : { | |
12609 | "properties" : {}, | |
12610 | "type" : "object" | |
12611 | }, | |
12612 | "links" : [ | |
12613 | { | |
12614 | "href" : "{cmd}", | |
12615 | "rel" : "child" | |
12616 | } | |
12617 | ], | |
12618 | "type" : "array" | |
12619 | }, | |
12620 | "method" : "GET" | |
12621 | }, | |
12622 | "DELETE" : { | |
56122987 DM |
12623 | "permissions" : { |
12624 | "check" : [ | |
12625 | "perm", | |
12626 | "/vms/{vmid}", | |
12627 | [ | |
7aacca6f | 12628 | "VM.Snapshot" |
56122987 DM |
12629 | ] |
12630 | ] | |
12631 | }, | |
7aacca6f DM |
12632 | "proxyto" : "node", |
12633 | "description" : "Delete a LXC snapshot.", | |
56122987 | 12634 | "returns" : { |
7aacca6f | 12635 | "description" : "the task ID.", |
56122987 DM |
12636 | "type" : "string" |
12637 | }, | |
7aacca6f DM |
12638 | "name" : "delsnapshot", |
12639 | "parameters" : { | |
12640 | "additionalProperties" : 0, | |
12641 | "properties" : { | |
12642 | "vmid" : { | |
12643 | "type" : "integer", | |
12644 | "description" : "The (unique) ID of the VM.", | |
12645 | "minimum" : 1, | |
12646 | "format" : "pve-vmid" | |
12647 | }, | |
12648 | "node" : { | |
12649 | "format" : "pve-node", | |
12650 | "type" : "string", | |
12651 | "description" : "The cluster node name." | |
12652 | }, | |
12653 | "force" : { | |
12654 | "description" : "For removal from config file, even if removing disk snapshots fails.", | |
12655 | "type" : "boolean", | |
12656 | "optional" : 1 | |
12657 | }, | |
12658 | "snapname" : { | |
12659 | "maxLength" : 40, | |
12660 | "format" : "pve-configid", | |
12661 | "type" : "string", | |
12662 | "description" : "The name of the snapshot." | |
12663 | } | |
12664 | } | |
12665 | }, | |
12666 | "protected" : 1, | |
12667 | "method" : "DELETE" | |
56122987 DM |
12668 | } |
12669 | }, | |
7aacca6f DM |
12670 | "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}", |
12671 | "leaf" : 0 | |
56122987 DM |
12672 | } |
12673 | ], | |
12674 | "info" : { | |
12675 | "GET" : { | |
56122987 | 12676 | "permissions" : { |
7aacca6f DM |
12677 | "check" : [ |
12678 | "perm", | |
12679 | "/vms/{vmid}", | |
12680 | [ | |
12681 | "VM.Audit" | |
12682 | ] | |
12683 | ] | |
12684 | }, | |
12685 | "description" : "List all snapshots.", | |
56122987 | 12686 | "proxyto" : "node", |
7aacca6f DM |
12687 | "returns" : { |
12688 | "links" : [ | |
12689 | { | |
12690 | "href" : "{name}", | |
12691 | "rel" : "child" | |
12692 | } | |
12693 | ], | |
12694 | "items" : { | |
12695 | "properties" : {}, | |
12696 | "type" : "object" | |
12697 | }, | |
12698 | "type" : "array" | |
12699 | }, | |
56122987 DM |
12700 | "parameters" : { |
12701 | "properties" : { | |
12702 | "node" : { | |
12703 | "format" : "pve-node", | |
12704 | "type" : "string", | |
12705 | "description" : "The cluster node name." | |
12706 | }, | |
12707 | "vmid" : { | |
7aacca6f | 12708 | "format" : "pve-vmid", |
56122987 | 12709 | "minimum" : 1, |
7aacca6f DM |
12710 | "description" : "The (unique) ID of the VM.", |
12711 | "type" : "integer" | |
56122987 DM |
12712 | } |
12713 | }, | |
12714 | "additionalProperties" : 0 | |
12715 | }, | |
7aacca6f | 12716 | "name" : "list", |
56122987 | 12717 | "protected" : 1, |
7aacca6f DM |
12718 | "method" : "GET" |
12719 | }, | |
12720 | "POST" : { | |
56122987 DM |
12721 | "parameters" : { |
12722 | "additionalProperties" : 0, | |
12723 | "properties" : { | |
12724 | "vmid" : { | |
7aacca6f | 12725 | "description" : "The (unique) ID of the VM.", |
56122987 | 12726 | "type" : "integer", |
7aacca6f DM |
12727 | "format" : "pve-vmid", |
12728 | "minimum" : 1 | |
12729 | }, | |
12730 | "description" : { | |
12731 | "type" : "string", | |
12732 | "optional" : 1, | |
12733 | "description" : "A textual description or comment." | |
56122987 DM |
12734 | }, |
12735 | "snapname" : { | |
56122987 | 12736 | "description" : "The name of the snapshot.", |
56122987 | 12737 | "type" : "string", |
7aacca6f DM |
12738 | "maxLength" : 40, |
12739 | "format" : "pve-configid" | |
56122987 | 12740 | }, |
56122987 DM |
12741 | "node" : { |
12742 | "format" : "pve-node", | |
12743 | "type" : "string", | |
12744 | "description" : "The cluster node name." | |
56122987 | 12745 | } |
7aacca6f | 12746 | } |
56122987 | 12747 | }, |
7aacca6f | 12748 | "name" : "snapshot", |
56122987 | 12749 | "protected" : 1, |
7aacca6f | 12750 | "method" : "POST", |
56122987 DM |
12751 | "permissions" : { |
12752 | "check" : [ | |
12753 | "perm", | |
12754 | "/vms/{vmid}", | |
12755 | [ | |
7aacca6f | 12756 | "VM.Snapshot" |
56122987 DM |
12757 | ] |
12758 | ] | |
7aacca6f DM |
12759 | }, |
12760 | "description" : "Snapshot a container.", | |
12761 | "proxyto" : "node", | |
12762 | "returns" : { | |
12763 | "description" : "the task ID.", | |
12764 | "type" : "string" | |
56122987 DM |
12765 | } |
12766 | } | |
7aacca6f DM |
12767 | } |
12768 | }, | |
12769 | { | |
56122987 DM |
12770 | "children" : [ |
12771 | { | |
7aacca6f | 12772 | "text" : "rules", |
56122987 DM |
12773 | "children" : [ |
12774 | { | |
7aacca6f | 12775 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}", |
56122987 | 12776 | "leaf" : 1, |
7aacca6f | 12777 | "text" : "{pos}", |
56122987 | 12778 | "info" : { |
7aacca6f | 12779 | "GET" : { |
56122987 | 12780 | "returns" : { |
56122987 | 12781 | "properties" : { |
7aacca6f DM |
12782 | "pos" : { |
12783 | "type" : "integer" | |
56122987 DM |
12784 | } |
12785 | }, | |
56122987 DM |
12786 | "type" : "object" |
12787 | }, | |
7aacca6f | 12788 | "method" : "GET", |
56122987 | 12789 | "parameters" : { |
56122987 | 12790 | "properties" : { |
56122987 | 12791 | "vmid" : { |
7aacca6f | 12792 | "type" : "integer", |
56122987 DM |
12793 | "description" : "The (unique) ID of the VM.", |
12794 | "format" : "pve-vmid", | |
56122987 | 12795 | "minimum" : 1 |
7aacca6f DM |
12796 | }, |
12797 | "pos" : { | |
12798 | "type" : "integer", | |
12799 | "optional" : 1, | |
12800 | "description" : "Update rule at position <pos>.", | |
12801 | "minimum" : 0 | |
12802 | }, | |
12803 | "node" : { | |
12804 | "format" : "pve-node", | |
12805 | "type" : "string", | |
12806 | "description" : "The cluster node name." | |
56122987 | 12807 | } |
7aacca6f DM |
12808 | }, |
12809 | "additionalProperties" : 0 | |
56122987 | 12810 | }, |
7aacca6f | 12811 | "name" : "get_rule", |
56122987 DM |
12812 | "permissions" : { |
12813 | "check" : [ | |
12814 | "perm", | |
12815 | "/vms/{vmid}", | |
12816 | [ | |
7aacca6f | 12817 | "VM.Audit" |
56122987 DM |
12818 | ] |
12819 | ] | |
12820 | }, | |
7aacca6f DM |
12821 | "proxyto" : null, |
12822 | "description" : "Get single rule data." | |
12823 | }, | |
12824 | "PUT" : { | |
56122987 | 12825 | "parameters" : { |
56122987 | 12826 | "properties" : { |
7aacca6f | 12827 | "dest" : { |
56122987 | 12828 | "type" : "string", |
7aacca6f DM |
12829 | "optional" : 1, |
12830 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
12831 | "format" : "pve-fw-addr-spec" | |
56122987 | 12832 | }, |
7aacca6f DM |
12833 | "digest" : { |
12834 | "maxLength" : 40, | |
12835 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
56122987 | 12836 | "type" : "string", |
56122987 DM |
12837 | "optional" : 1 |
12838 | }, | |
7aacca6f DM |
12839 | "source" : { |
12840 | "format" : "pve-fw-addr-spec", | |
56122987 | 12841 | "type" : "string", |
7aacca6f DM |
12842 | "optional" : 1, |
12843 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." | |
56122987 | 12844 | }, |
7aacca6f DM |
12845 | "moveto" : { |
12846 | "minimum" : 0, | |
56122987 | 12847 | "type" : "integer", |
7aacca6f DM |
12848 | "optional" : 1, |
12849 | "description" : "Move rule to new position <moveto>. Other arguments are ignored." | |
12850 | }, | |
12851 | "node" : { | |
56122987 | 12852 | "type" : "string", |
7aacca6f DM |
12853 | "description" : "The cluster node name.", |
12854 | "format" : "pve-node" | |
56122987 | 12855 | }, |
7aacca6f | 12856 | "comment" : { |
56122987 | 12857 | "optional" : 1, |
56122987 DM |
12858 | "type" : "string" |
12859 | }, | |
7aacca6f | 12860 | "delete" : { |
56122987 | 12861 | "type" : "string", |
7aacca6f DM |
12862 | "optional" : 1, |
12863 | "description" : "A list of settings you want to delete.", | |
12864 | "format" : "pve-configid-list" | |
56122987 | 12865 | }, |
7aacca6f DM |
12866 | "dport" : { |
12867 | "format" : "pve-fw-dport-spec", | |
12868 | "type" : "string", | |
56122987 | 12869 | "optional" : 1, |
7aacca6f | 12870 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." |
56122987 DM |
12871 | }, |
12872 | "type" : { | |
7aacca6f DM |
12873 | "optional" : 1, |
12874 | "type" : "string", | |
56122987 DM |
12875 | "enum" : [ |
12876 | "in", | |
12877 | "out", | |
12878 | "group" | |
7aacca6f DM |
12879 | ] |
12880 | }, | |
12881 | "sport" : { | |
12882 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
56122987 | 12883 | "optional" : 1, |
7aacca6f DM |
12884 | "type" : "string", |
12885 | "format" : "pve-fw-sport-spec" | |
56122987 DM |
12886 | }, |
12887 | "iface" : { | |
7aacca6f | 12888 | "format" : "pve-iface", |
56122987 | 12889 | "maxLength" : 20, |
56122987 | 12890 | "minLength" : 2, |
7aacca6f DM |
12891 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", |
12892 | "optional" : 1, | |
56122987 DM |
12893 | "type" : "string" |
12894 | }, | |
7aacca6f | 12895 | "pos" : { |
56122987 | 12896 | "optional" : 1, |
7aacca6f DM |
12897 | "type" : "integer", |
12898 | "description" : "Update rule at position <pos>.", | |
12899 | "minimum" : 0 | |
56122987 | 12900 | }, |
7aacca6f | 12901 | "proto" : { |
56122987 | 12902 | "type" : "string", |
7aacca6f DM |
12903 | "optional" : 1, |
12904 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", | |
12905 | "format" : "pve-fw-protocol-spec" | |
56122987 | 12906 | }, |
7aacca6f DM |
12907 | "vmid" : { |
12908 | "format" : "pve-vmid", | |
12909 | "minimum" : 1, | |
12910 | "description" : "The (unique) ID of the VM.", | |
12911 | "type" : "integer" | |
56122987 DM |
12912 | }, |
12913 | "macro" : { | |
7aacca6f | 12914 | "optional" : 1, |
56122987 | 12915 | "type" : "string", |
7aacca6f | 12916 | "maxLength" : 128 |
56122987 DM |
12917 | }, |
12918 | "enable" : { | |
56122987 | 12919 | "minimum" : 0, |
56122987 | 12920 | "type" : "integer", |
7aacca6f | 12921 | "optional" : 1 |
56122987 | 12922 | }, |
7aacca6f | 12923 | "action" : { |
56122987 | 12924 | "type" : "string", |
56122987 | 12925 | "optional" : 1, |
7aacca6f DM |
12926 | "minLength" : 2, |
12927 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
12928 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
12929 | "maxLength" : 20 | |
56122987 | 12930 | } |
7aacca6f DM |
12931 | }, |
12932 | "additionalProperties" : 0 | |
56122987 | 12933 | }, |
7aacca6f DM |
12934 | "name" : "update_rule", |
12935 | "protected" : 1, | |
12936 | "method" : "PUT", | |
12937 | "permissions" : { | |
12938 | "check" : [ | |
12939 | "perm", | |
12940 | "/vms/{vmid}", | |
12941 | [ | |
12942 | "VM.Config.Network" | |
12943 | ] | |
12944 | ] | |
12945 | }, | |
12946 | "description" : "Modify rule data.", | |
12947 | "proxyto" : null, | |
12948 | "returns" : { | |
12949 | "type" : "null" | |
12950 | } | |
56122987 DM |
12951 | }, |
12952 | "DELETE" : { | |
7aacca6f | 12953 | "name" : "delete_rule", |
56122987 DM |
12954 | "parameters" : { |
12955 | "additionalProperties" : 0, | |
12956 | "properties" : { | |
7aacca6f DM |
12957 | "node" : { |
12958 | "description" : "The cluster node name.", | |
56122987 | 12959 | "type" : "string", |
7aacca6f | 12960 | "format" : "pve-node" |
56122987 DM |
12961 | }, |
12962 | "pos" : { | |
56122987 | 12963 | "minimum" : 0, |
7aacca6f DM |
12964 | "type" : "integer", |
12965 | "optional" : 1, | |
12966 | "description" : "Update rule at position <pos>." | |
56122987 | 12967 | }, |
7aacca6f DM |
12968 | "vmid" : { |
12969 | "minimum" : 1, | |
12970 | "format" : "pve-vmid", | |
12971 | "type" : "integer", | |
12972 | "description" : "The (unique) ID of the VM." | |
12973 | }, | |
12974 | "digest" : { | |
12975 | "maxLength" : 40, | |
56122987 | 12976 | "type" : "string", |
7aacca6f DM |
12977 | "optional" : 1, |
12978 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
56122987 DM |
12979 | } |
12980 | } | |
12981 | }, | |
56122987 | 12982 | "protected" : 1, |
56122987 | 12983 | "method" : "DELETE", |
56122987 DM |
12984 | "permissions" : { |
12985 | "check" : [ | |
12986 | "perm", | |
12987 | "/vms/{vmid}", | |
12988 | [ | |
7aacca6f | 12989 | "VM.Config.Network" |
56122987 DM |
12990 | ] |
12991 | ] | |
12992 | }, | |
12993 | "proxyto" : null, | |
7aacca6f | 12994 | "description" : "Delete rule.", |
56122987 | 12995 | "returns" : { |
7aacca6f DM |
12996 | "type" : "null" |
12997 | } | |
56122987 | 12998 | } |
7aacca6f | 12999 | } |
56122987 DM |
13000 | } |
13001 | ], | |
13002 | "info" : { | |
7aacca6f DM |
13003 | "GET" : { |
13004 | "parameters" : { | |
13005 | "properties" : { | |
13006 | "node" : { | |
13007 | "type" : "string", | |
13008 | "description" : "The cluster node name.", | |
13009 | "format" : "pve-node" | |
13010 | }, | |
13011 | "vmid" : { | |
13012 | "description" : "The (unique) ID of the VM.", | |
13013 | "type" : "integer", | |
13014 | "minimum" : 1, | |
13015 | "format" : "pve-vmid" | |
13016 | } | |
13017 | }, | |
13018 | "additionalProperties" : 0 | |
56122987 | 13019 | }, |
56122987 DM |
13020 | "permissions" : { |
13021 | "check" : [ | |
13022 | "perm", | |
13023 | "/vms/{vmid}", | |
13024 | [ | |
7aacca6f | 13025 | "VM.Audit" |
56122987 DM |
13026 | ] |
13027 | ] | |
13028 | }, | |
7aacca6f | 13029 | "name" : "get_rules", |
56122987 | 13030 | "proxyto" : null, |
7aacca6f DM |
13031 | "description" : "List rules.", |
13032 | "returns" : { | |
13033 | "type" : "array", | |
13034 | "items" : { | |
13035 | "properties" : { | |
13036 | "pos" : { | |
13037 | "type" : "integer" | |
13038 | } | |
13039 | }, | |
13040 | "type" : "object" | |
13041 | }, | |
13042 | "links" : [ | |
13043 | { | |
13044 | "rel" : "child", | |
13045 | "href" : "{pos}" | |
13046 | } | |
13047 | ] | |
13048 | }, | |
13049 | "method" : "GET" | |
13050 | }, | |
13051 | "POST" : { | |
13052 | "protected" : 1, | |
13053 | "name" : "create_rule", | |
56122987 DM |
13054 | "parameters" : { |
13055 | "properties" : { | |
7aacca6f DM |
13056 | "vmid" : { |
13057 | "format" : "pve-vmid", | |
13058 | "minimum" : 1, | |
13059 | "description" : "The (unique) ID of the VM.", | |
13060 | "type" : "integer" | |
56122987 | 13061 | }, |
7aacca6f DM |
13062 | "proto" : { |
13063 | "optional" : 1, | |
56122987 | 13064 | "type" : "string", |
7aacca6f DM |
13065 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", |
13066 | "format" : "pve-fw-protocol-spec" | |
56122987 DM |
13067 | }, |
13068 | "pos" : { | |
56122987 DM |
13069 | "minimum" : 0, |
13070 | "description" : "Update rule at position <pos>.", | |
7aacca6f DM |
13071 | "optional" : 1, |
13072 | "type" : "integer" | |
56122987 | 13073 | }, |
7aacca6f | 13074 | "macro" : { |
56122987 | 13075 | "type" : "string", |
7aacca6f DM |
13076 | "optional" : 1, |
13077 | "maxLength" : 128 | |
56122987 | 13078 | }, |
7aacca6f DM |
13079 | "action" : { |
13080 | "maxLength" : 20, | |
56122987 | 13081 | "type" : "string", |
7aacca6f DM |
13082 | "optional" : 0, |
13083 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13084 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
13085 | "minLength" : 2 | |
56122987 DM |
13086 | }, |
13087 | "type" : { | |
56122987 DM |
13088 | "enum" : [ |
13089 | "in", | |
13090 | "out", | |
13091 | "group" | |
13092 | ], | |
7aacca6f | 13093 | "optional" : 0, |
56122987 DM |
13094 | "type" : "string" |
13095 | }, | |
13096 | "enable" : { | |
13097 | "type" : "integer", | |
7aacca6f DM |
13098 | "optional" : 1, |
13099 | "minimum" : 0 | |
56122987 | 13100 | }, |
7aacca6f DM |
13101 | "dport" : { |
13102 | "format" : "pve-fw-dport-spec", | |
56122987 | 13103 | "optional" : 1, |
7aacca6f DM |
13104 | "type" : "string", |
13105 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." | |
56122987 | 13106 | }, |
7aacca6f DM |
13107 | "sport" : { |
13108 | "format" : "pve-fw-sport-spec", | |
56122987 | 13109 | "type" : "string", |
56122987 | 13110 | "optional" : 1, |
7aacca6f | 13111 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." |
56122987 | 13112 | }, |
7aacca6f | 13113 | "dest" : { |
56122987 | 13114 | "optional" : 1, |
7aacca6f DM |
13115 | "type" : "string", |
13116 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
13117 | "format" : "pve-fw-addr-spec" | |
56122987 | 13118 | }, |
7aacca6f DM |
13119 | "digest" : { |
13120 | "maxLength" : 40, | |
56122987 DM |
13121 | "optional" : 1, |
13122 | "type" : "string", | |
7aacca6f | 13123 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
56122987 DM |
13124 | }, |
13125 | "source" : { | |
56122987 | 13126 | "format" : "pve-fw-addr-spec", |
7aacca6f DM |
13127 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", |
13128 | "optional" : 1, | |
56122987 | 13129 | "type" : "string" |
56122987 DM |
13130 | }, |
13131 | "comment" : { | |
13132 | "optional" : 1, | |
13133 | "type" : "string" | |
13134 | }, | |
13135 | "node" : { | |
7aacca6f | 13136 | "description" : "The cluster node name.", |
56122987 | 13137 | "type" : "string", |
7aacca6f DM |
13138 | "format" : "pve-node" |
13139 | }, | |
13140 | "iface" : { | |
13141 | "maxLength" : 20, | |
13142 | "format" : "pve-iface", | |
13143 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", | |
13144 | "minLength" : 2, | |
13145 | "optional" : 1, | |
13146 | "type" : "string" | |
56122987 | 13147 | } |
7aacca6f DM |
13148 | }, |
13149 | "additionalProperties" : 0 | |
56122987 DM |
13150 | }, |
13151 | "method" : "POST", | |
7aacca6f DM |
13152 | "description" : "Create new rule.", |
13153 | "proxyto" : null, | |
56122987 DM |
13154 | "permissions" : { |
13155 | "check" : [ | |
13156 | "perm", | |
13157 | "/vms/{vmid}", | |
13158 | [ | |
13159 | "VM.Config.Network" | |
13160 | ] | |
13161 | ] | |
13162 | }, | |
56122987 | 13163 | "returns" : { |
7aacca6f DM |
13164 | "type" : "null" |
13165 | } | |
56122987 DM |
13166 | } |
13167 | }, | |
7aacca6f DM |
13168 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules", |
13169 | "leaf" : 0 | |
13170 | }, | |
13171 | { | |
56122987 DM |
13172 | "children" : [ |
13173 | { | |
56122987 | 13174 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}", |
7aacca6f DM |
13175 | "leaf" : 1, |
13176 | "text" : "{name}", | |
56122987 | 13177 | "info" : { |
7aacca6f DM |
13178 | "GET" : { |
13179 | "returns" : { | |
13180 | "type" : "object" | |
13181 | }, | |
13182 | "method" : "GET", | |
56122987 DM |
13183 | "permissions" : { |
13184 | "check" : [ | |
13185 | "perm", | |
13186 | "/vms/{vmid}", | |
13187 | [ | |
7aacca6f | 13188 | "VM.Audit" |
56122987 DM |
13189 | ] |
13190 | ] | |
13191 | }, | |
7aacca6f DM |
13192 | "parameters" : { |
13193 | "properties" : { | |
13194 | "vmid" : { | |
13195 | "description" : "The (unique) ID of the VM.", | |
13196 | "type" : "integer", | |
13197 | "format" : "pve-vmid", | |
13198 | "minimum" : 1 | |
13199 | }, | |
13200 | "node" : { | |
13201 | "format" : "pve-node", | |
13202 | "type" : "string", | |
13203 | "description" : "The cluster node name." | |
13204 | }, | |
13205 | "name" : { | |
13206 | "type" : "string", | |
13207 | "minLength" : 2, | |
13208 | "description" : "Alias name.", | |
13209 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13210 | "maxLength" : 64 | |
13211 | } | |
13212 | }, | |
13213 | "additionalProperties" : 0 | |
13214 | }, | |
13215 | "name" : "read_alias", | |
13216 | "description" : "Read alias." | |
13217 | }, | |
13218 | "PUT" : { | |
56122987 | 13219 | "protected" : 1, |
7aacca6f | 13220 | "description" : "Update IP or Network alias.", |
56122987 DM |
13221 | "parameters" : { |
13222 | "properties" : { | |
7aacca6f DM |
13223 | "comment" : { |
13224 | "type" : "string", | |
13225 | "optional" : 1 | |
13226 | }, | |
13227 | "rename" : { | |
13228 | "maxLength" : 64, | |
13229 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13230 | "description" : "Rename an existing alias.", | |
13231 | "minLength" : 2, | |
56122987 DM |
13232 | "optional" : 1, |
13233 | "type" : "string" | |
13234 | }, | |
7aacca6f DM |
13235 | "name" : { |
13236 | "maxLength" : 64, | |
56122987 | 13237 | "type" : "string", |
7aacca6f DM |
13238 | "minLength" : 2, |
13239 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13240 | "description" : "Alias name." | |
13241 | }, | |
13242 | "node" : { | |
56122987 | 13243 | "format" : "pve-node", |
7aacca6f | 13244 | "type" : "string", |
56122987 DM |
13245 | "description" : "The cluster node name." |
13246 | }, | |
7aacca6f DM |
13247 | "digest" : { |
13248 | "type" : "string", | |
13249 | "optional" : 1, | |
13250 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
13251 | "maxLength" : 40 | |
13252 | }, | |
13253 | "cidr" : { | |
13254 | "type" : "string", | |
13255 | "description" : "Network/IP specification in CIDR format.", | |
13256 | "format" : "IPorCIDR" | |
13257 | }, | |
56122987 | 13258 | "vmid" : { |
7aacca6f | 13259 | "minimum" : 1, |
56122987 DM |
13260 | "format" : "pve-vmid", |
13261 | "type" : "integer", | |
56122987 | 13262 | "description" : "The (unique) ID of the VM." |
56122987 DM |
13263 | } |
13264 | }, | |
13265 | "additionalProperties" : 0 | |
13266 | }, | |
7aacca6f | 13267 | "name" : "update_alias", |
56122987 DM |
13268 | "permissions" : { |
13269 | "check" : [ | |
13270 | "perm", | |
13271 | "/vms/{vmid}", | |
13272 | [ | |
7aacca6f | 13273 | "VM.Config.Network" |
56122987 DM |
13274 | ] |
13275 | ] | |
13276 | }, | |
13277 | "returns" : { | |
7aacca6f | 13278 | "type" : "null" |
56122987 | 13279 | }, |
7aacca6f | 13280 | "method" : "PUT" |
56122987 | 13281 | }, |
7aacca6f | 13282 | "DELETE" : { |
56122987 DM |
13283 | "returns" : { |
13284 | "type" : "null" | |
13285 | }, | |
7aacca6f DM |
13286 | "method" : "DELETE", |
13287 | "permissions" : { | |
13288 | "check" : [ | |
13289 | "perm", | |
13290 | "/vms/{vmid}", | |
13291 | [ | |
13292 | "VM.Config.Network" | |
13293 | ] | |
13294 | ] | |
13295 | }, | |
56122987 DM |
13296 | "parameters" : { |
13297 | "additionalProperties" : 0, | |
13298 | "properties" : { | |
56122987 | 13299 | "name" : { |
56122987 | 13300 | "maxLength" : 64, |
56122987 | 13301 | "type" : "string", |
7aacca6f DM |
13302 | "description" : "Alias name.", |
13303 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13304 | "minLength" : 2 | |
56122987 DM |
13305 | }, |
13306 | "node" : { | |
13307 | "description" : "The cluster node name.", | |
56122987 | 13308 | "type" : "string", |
7aacca6f | 13309 | "format" : "pve-node" |
56122987 | 13310 | }, |
7aacca6f DM |
13311 | "vmid" : { |
13312 | "type" : "integer", | |
13313 | "description" : "The (unique) ID of the VM.", | |
13314 | "minimum" : 1, | |
13315 | "format" : "pve-vmid" | |
13316 | }, | |
13317 | "digest" : { | |
13318 | "maxLength" : 40, | |
13319 | "optional" : 1, | |
56122987 | 13320 | "type" : "string", |
7aacca6f | 13321 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
56122987 DM |
13322 | } |
13323 | } | |
13324 | }, | |
7aacca6f | 13325 | "name" : "remove_alias", |
56122987 | 13326 | "protected" : 1, |
7aacca6f | 13327 | "description" : "Remove IP or Network alias." |
56122987 DM |
13328 | } |
13329 | } | |
13330 | } | |
13331 | ], | |
7aacca6f | 13332 | "text" : "aliases", |
56122987 | 13333 | "info" : { |
7aacca6f DM |
13334 | "GET" : { |
13335 | "method" : "GET", | |
13336 | "returns" : { | |
13337 | "items" : { | |
13338 | "type" : "object", | |
13339 | "properties" : { | |
13340 | "digest" : { | |
13341 | "maxLength" : 40, | |
13342 | "type" : "string", | |
13343 | "optional" : 0, | |
13344 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
13345 | }, | |
13346 | "cidr" : { | |
13347 | "type" : "string" | |
13348 | }, | |
13349 | "comment" : { | |
13350 | "type" : "string", | |
13351 | "optional" : 1 | |
13352 | }, | |
13353 | "name" : { | |
13354 | "type" : "string" | |
13355 | } | |
13356 | } | |
13357 | }, | |
13358 | "links" : [ | |
13359 | { | |
13360 | "href" : "{name}", | |
13361 | "rel" : "child" | |
13362 | } | |
13363 | ], | |
13364 | "type" : "array" | |
13365 | }, | |
13366 | "description" : "List aliases", | |
13367 | "permissions" : { | |
13368 | "check" : [ | |
13369 | "perm", | |
13370 | "/vms/{vmid}", | |
13371 | [ | |
13372 | "VM.Audit" | |
13373 | ] | |
13374 | ] | |
13375 | }, | |
56122987 | 13376 | "parameters" : { |
7aacca6f | 13377 | "additionalProperties" : 0, |
56122987 | 13378 | "properties" : { |
56122987 | 13379 | "node" : { |
56122987 | 13380 | "type" : "string", |
7aacca6f DM |
13381 | "description" : "The cluster node name.", |
13382 | "format" : "pve-node" | |
56122987 | 13383 | }, |
7aacca6f DM |
13384 | "vmid" : { |
13385 | "type" : "integer", | |
13386 | "description" : "The (unique) ID of the VM.", | |
13387 | "format" : "pve-vmid", | |
13388 | "minimum" : 1 | |
56122987 | 13389 | } |
7aacca6f | 13390 | } |
56122987 | 13391 | }, |
7aacca6f DM |
13392 | "name" : "get_aliases" |
13393 | }, | |
13394 | "POST" : { | |
56122987 DM |
13395 | "returns" : { |
13396 | "type" : "null" | |
13397 | }, | |
7aacca6f | 13398 | "method" : "POST", |
56122987 DM |
13399 | "permissions" : { |
13400 | "check" : [ | |
13401 | "perm", | |
13402 | "/vms/{vmid}", | |
13403 | [ | |
13404 | "VM.Config.Network" | |
13405 | ] | |
13406 | ] | |
13407 | }, | |
7aacca6f DM |
13408 | "parameters" : { |
13409 | "additionalProperties" : 0, | |
13410 | "properties" : { | |
13411 | "comment" : { | |
13412 | "optional" : 1, | |
13413 | "type" : "string" | |
13414 | }, | |
13415 | "name" : { | |
13416 | "type" : "string", | |
13417 | "description" : "Alias name.", | |
13418 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13419 | "minLength" : 2, | |
13420 | "maxLength" : 64 | |
13421 | }, | |
13422 | "node" : { | |
13423 | "description" : "The cluster node name.", | |
13424 | "type" : "string", | |
13425 | "format" : "pve-node" | |
13426 | }, | |
13427 | "vmid" : { | |
13428 | "description" : "The (unique) ID of the VM.", | |
13429 | "type" : "integer", | |
13430 | "format" : "pve-vmid", | |
13431 | "minimum" : 1 | |
13432 | }, | |
13433 | "cidr" : { | |
13434 | "type" : "string", | |
13435 | "description" : "Network/IP specification in CIDR format.", | |
13436 | "format" : "IPorCIDR" | |
13437 | } | |
13438 | } | |
13439 | }, | |
13440 | "name" : "create_alias", | |
13441 | "description" : "Create IP or Network Alias.", | |
56122987 | 13442 | "protected" : 1 |
7aacca6f DM |
13443 | } |
13444 | }, | |
13445 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases", | |
13446 | "leaf" : 0 | |
13447 | }, | |
13448 | { | |
13449 | "leaf" : 0, | |
13450 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset", | |
13451 | "info" : { | |
56122987 | 13452 | "GET" : { |
56122987 DM |
13453 | "permissions" : { |
13454 | "check" : [ | |
13455 | "perm", | |
13456 | "/vms/{vmid}", | |
13457 | [ | |
13458 | "VM.Audit" | |
13459 | ] | |
13460 | ] | |
13461 | }, | |
7aacca6f | 13462 | "name" : "ipset_index", |
56122987 DM |
13463 | "parameters" : { |
13464 | "additionalProperties" : 0, | |
13465 | "properties" : { | |
13466 | "node" : { | |
13467 | "format" : "pve-node", | |
13468 | "type" : "string", | |
13469 | "description" : "The cluster node name." | |
13470 | }, | |
13471 | "vmid" : { | |
56122987 | 13472 | "type" : "integer", |
7aacca6f DM |
13473 | "description" : "The (unique) ID of the VM.", |
13474 | "minimum" : 1, | |
13475 | "format" : "pve-vmid" | |
56122987 DM |
13476 | } |
13477 | } | |
13478 | }, | |
7aacca6f DM |
13479 | "description" : "List IPSets", |
13480 | "method" : "GET", | |
56122987 | 13481 | "returns" : { |
7aacca6f DM |
13482 | "type" : "array", |
13483 | "links" : [ | |
13484 | { | |
13485 | "href" : "{name}", | |
13486 | "rel" : "child" | |
13487 | } | |
13488 | ], | |
56122987 DM |
13489 | "items" : { |
13490 | "type" : "object", | |
13491 | "properties" : { | |
7aacca6f DM |
13492 | "comment" : { |
13493 | "type" : "string", | |
13494 | "optional" : 1 | |
13495 | }, | |
56122987 | 13496 | "name" : { |
56122987 | 13497 | "maxLength" : 64, |
7aacca6f | 13498 | "description" : "IP set name.", |
56122987 DM |
13499 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
13500 | "minLength" : 2, | |
13501 | "type" : "string" | |
13502 | }, | |
56122987 DM |
13503 | "digest" : { |
13504 | "type" : "string", | |
7aacca6f | 13505 | "optional" : 0, |
56122987 | 13506 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", |
7aacca6f | 13507 | "maxLength" : 40 |
56122987 DM |
13508 | } |
13509 | } | |
7aacca6f DM |
13510 | } |
13511 | } | |
13512 | }, | |
13513 | "POST" : { | |
13514 | "method" : "POST", | |
13515 | "returns" : { | |
13516 | "type" : "null" | |
13517 | }, | |
13518 | "protected" : 1, | |
13519 | "description" : "Create new IPSet", | |
13520 | "permissions" : { | |
13521 | "check" : [ | |
13522 | "perm", | |
13523 | "/vms/{vmid}", | |
13524 | [ | |
13525 | "VM.Config.Network" | |
13526 | ] | |
56122987 DM |
13527 | ] |
13528 | }, | |
7aacca6f DM |
13529 | "parameters" : { |
13530 | "additionalProperties" : 0, | |
13531 | "properties" : { | |
13532 | "vmid" : { | |
13533 | "description" : "The (unique) ID of the VM.", | |
13534 | "type" : "integer", | |
13535 | "format" : "pve-vmid", | |
13536 | "minimum" : 1 | |
13537 | }, | |
13538 | "digest" : { | |
13539 | "maxLength" : 40, | |
13540 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
13541 | "optional" : 1, | |
13542 | "type" : "string" | |
13543 | }, | |
13544 | "comment" : { | |
13545 | "optional" : 1, | |
13546 | "type" : "string" | |
13547 | }, | |
13548 | "rename" : { | |
13549 | "minLength" : 2, | |
13550 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13551 | "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", | |
13552 | "type" : "string", | |
13553 | "optional" : 1, | |
13554 | "maxLength" : 64 | |
13555 | }, | |
13556 | "node" : { | |
13557 | "format" : "pve-node", | |
13558 | "type" : "string", | |
13559 | "description" : "The cluster node name." | |
13560 | }, | |
13561 | "name" : { | |
13562 | "minLength" : 2, | |
13563 | "description" : "IP set name.", | |
13564 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13565 | "type" : "string", | |
13566 | "maxLength" : 64 | |
13567 | } | |
13568 | } | |
13569 | }, | |
13570 | "name" : "create_ipset" | |
56122987 DM |
13571 | } |
13572 | }, | |
7aacca6f | 13573 | "text" : "ipset", |
56122987 DM |
13574 | "children" : [ |
13575 | { | |
56122987 | 13576 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}", |
7aacca6f | 13577 | "leaf" : 0, |
56122987 DM |
13578 | "children" : [ |
13579 | { | |
13580 | "info" : { | |
13581 | "DELETE" : { | |
7aacca6f DM |
13582 | "returns" : { |
13583 | "type" : "null" | |
13584 | }, | |
13585 | "method" : "DELETE", | |
56122987 DM |
13586 | "permissions" : { |
13587 | "check" : [ | |
13588 | "perm", | |
13589 | "/vms/{vmid}", | |
13590 | [ | |
13591 | "VM.Config.Network" | |
13592 | ] | |
13593 | ] | |
13594 | }, | |
56122987 DM |
13595 | "parameters" : { |
13596 | "additionalProperties" : 0, | |
13597 | "properties" : { | |
7aacca6f DM |
13598 | "vmid" : { |
13599 | "description" : "The (unique) ID of the VM.", | |
13600 | "type" : "integer", | |
13601 | "minimum" : 1, | |
13602 | "format" : "pve-vmid" | |
56122987 DM |
13603 | }, |
13604 | "digest" : { | |
56122987 | 13605 | "maxLength" : 40, |
56122987 | 13606 | "type" : "string", |
7aacca6f DM |
13607 | "optional" : 1, |
13608 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
56122987 DM |
13609 | }, |
13610 | "cidr" : { | |
56122987 | 13611 | "type" : "string", |
7aacca6f | 13612 | "description" : "Network/IP specification in CIDR format.", |
56122987 DM |
13613 | "format" : "IPorCIDRorAlias" |
13614 | }, | |
56122987 DM |
13615 | "name" : { |
13616 | "maxLength" : 64, | |
7aacca6f | 13617 | "minLength" : 2, |
56122987 DM |
13618 | "description" : "IP set name.", |
13619 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
56122987 | 13620 | "type" : "string" |
7aacca6f DM |
13621 | }, |
13622 | "node" : { | |
13623 | "type" : "string", | |
13624 | "description" : "The cluster node name.", | |
13625 | "format" : "pve-node" | |
56122987 DM |
13626 | } |
13627 | } | |
13628 | }, | |
7aacca6f DM |
13629 | "name" : "remove_ip", |
13630 | "protected" : 1, | |
13631 | "description" : "Remove IP or Network from IPSet." | |
56122987 DM |
13632 | }, |
13633 | "PUT" : { | |
56122987 DM |
13634 | "returns" : { |
13635 | "type" : "null" | |
13636 | }, | |
7aacca6f | 13637 | "method" : "PUT", |
56122987 DM |
13638 | "parameters" : { |
13639 | "additionalProperties" : 0, | |
13640 | "properties" : { | |
7aacca6f DM |
13641 | "cidr" : { |
13642 | "format" : "IPorCIDRorAlias", | |
13643 | "description" : "Network/IP specification in CIDR format.", | |
56122987 DM |
13644 | "type" : "string" |
13645 | }, | |
7aacca6f DM |
13646 | "digest" : { |
13647 | "optional" : 1, | |
13648 | "type" : "string", | |
13649 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
13650 | "maxLength" : 40 | |
13651 | }, | |
56122987 | 13652 | "vmid" : { |
56122987 | 13653 | "type" : "integer", |
7aacca6f DM |
13654 | "description" : "The (unique) ID of the VM.", |
13655 | "minimum" : 1, | |
13656 | "format" : "pve-vmid" | |
56122987 | 13657 | }, |
7aacca6f DM |
13658 | "nomatch" : { |
13659 | "optional" : 1, | |
13660 | "type" : "boolean" | |
56122987 DM |
13661 | }, |
13662 | "node" : { | |
7aacca6f | 13663 | "type" : "string", |
56122987 | 13664 | "description" : "The cluster node name.", |
7aacca6f | 13665 | "format" : "pve-node" |
56122987 | 13666 | }, |
7aacca6f DM |
13667 | "name" : { |
13668 | "maxLength" : 64, | |
13669 | "minLength" : 2, | |
13670 | "description" : "IP set name.", | |
13671 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13672 | "type" : "string" | |
56122987 DM |
13673 | }, |
13674 | "comment" : { | |
13675 | "type" : "string", | |
13676 | "optional" : 1 | |
56122987 DM |
13677 | } |
13678 | } | |
13679 | }, | |
56122987 DM |
13680 | "permissions" : { |
13681 | "check" : [ | |
13682 | "perm", | |
13683 | "/vms/{vmid}", | |
13684 | [ | |
13685 | "VM.Config.Network" | |
13686 | ] | |
13687 | ] | |
7aacca6f DM |
13688 | }, |
13689 | "name" : "update_ip", | |
13690 | "description" : "Update IP or Network settings", | |
13691 | "protected" : 1 | |
13692 | }, | |
13693 | "GET" : { | |
13694 | "method" : "GET", | |
13695 | "returns" : { | |
13696 | "type" : "object" | |
13697 | }, | |
13698 | "name" : "read_ip", | |
13699 | "permissions" : { | |
13700 | "check" : [ | |
13701 | "perm", | |
13702 | "/vms/{vmid}", | |
13703 | [ | |
13704 | "VM.Audit" | |
13705 | ] | |
13706 | ] | |
13707 | }, | |
13708 | "parameters" : { | |
13709 | "properties" : { | |
13710 | "cidr" : { | |
13711 | "format" : "IPorCIDRorAlias", | |
13712 | "type" : "string", | |
13713 | "description" : "Network/IP specification in CIDR format." | |
13714 | }, | |
13715 | "vmid" : { | |
13716 | "minimum" : 1, | |
13717 | "format" : "pve-vmid", | |
13718 | "type" : "integer", | |
13719 | "description" : "The (unique) ID of the VM." | |
13720 | }, | |
13721 | "node" : { | |
13722 | "format" : "pve-node", | |
13723 | "description" : "The cluster node name.", | |
13724 | "type" : "string" | |
13725 | }, | |
13726 | "name" : { | |
13727 | "maxLength" : 64, | |
13728 | "type" : "string", | |
13729 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13730 | "description" : "IP set name.", | |
13731 | "minLength" : 2 | |
13732 | } | |
13733 | }, | |
13734 | "additionalProperties" : 0 | |
13735 | }, | |
13736 | "protected" : 1, | |
13737 | "description" : "Read IP or Network settings from IPSet." | |
56122987 DM |
13738 | } |
13739 | }, | |
7aacca6f | 13740 | "text" : "{cidr}", |
56122987 | 13741 | "leaf" : 1, |
7aacca6f | 13742 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}" |
56122987 DM |
13743 | } |
13744 | ], | |
7aacca6f | 13745 | "text" : "{name}", |
56122987 DM |
13746 | "info" : { |
13747 | "GET" : { | |
7aacca6f DM |
13748 | "description" : "List IPSet content", |
13749 | "parameters" : { | |
13750 | "additionalProperties" : 0, | |
13751 | "properties" : { | |
13752 | "name" : { | |
13753 | "description" : "IP set name.", | |
13754 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
13755 | "minLength" : 2, | |
13756 | "type" : "string", | |
13757 | "maxLength" : 64 | |
13758 | }, | |
13759 | "node" : { | |
13760 | "format" : "pve-node", | |
13761 | "description" : "The cluster node name.", | |
13762 | "type" : "string" | |
13763 | }, | |
13764 | "vmid" : { | |
13765 | "description" : "The (unique) ID of the VM.", | |
13766 | "type" : "integer", | |
13767 | "minimum" : 1, | |
13768 | "format" : "pve-vmid" | |
56122987 | 13769 | } |
7aacca6f DM |
13770 | } |
13771 | }, | |
13772 | "name" : "get_ipset", | |
13773 | "permissions" : { | |
13774 | "check" : [ | |
13775 | "perm", | |
13776 | "/vms/{vmid}", | |
13777 | [ | |
13778 | "VM.Audit" | |
13779 | ] | |
13780 | ] | |
13781 | }, | |
13782 | "returns" : { | |
13783 | "type" : "array", | |
56122987 | 13784 | "items" : { |
7aacca6f | 13785 | "type" : "object", |
56122987 DM |
13786 | "properties" : { |
13787 | "cidr" : { | |
13788 | "type" : "string" | |
13789 | }, | |
13790 | "digest" : { | |
56122987 | 13791 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", |
7aacca6f DM |
13792 | "optional" : 0, |
13793 | "type" : "string", | |
13794 | "maxLength" : 40 | |
56122987 DM |
13795 | }, |
13796 | "comment" : { | |
13797 | "optional" : 1, | |
13798 | "type" : "string" | |
7aacca6f DM |
13799 | }, |
13800 | "nomatch" : { | |
13801 | "type" : "boolean", | |
13802 | "optional" : 1 | |
56122987 | 13803 | } |
7aacca6f | 13804 | } |
56122987 | 13805 | }, |
7aacca6f DM |
13806 | "links" : [ |
13807 | { | |
13808 | "rel" : "child", | |
13809 | "href" : "{cidr}" | |
13810 | } | |
13811 | ] | |
13812 | }, | |
13813 | "method" : "GET" | |
13814 | }, | |
13815 | "DELETE" : { | |
13816 | "returns" : { | |
13817 | "type" : "null" | |
56122987 | 13818 | }, |
7aacca6f DM |
13819 | "method" : "DELETE", |
13820 | "name" : "delete_ipset", | |
56122987 | 13821 | "parameters" : { |
56122987 | 13822 | "properties" : { |
56122987 | 13823 | "vmid" : { |
56122987 DM |
13824 | "format" : "pve-vmid", |
13825 | "minimum" : 1, | |
7aacca6f DM |
13826 | "description" : "The (unique) ID of the VM.", |
13827 | "type" : "integer" | |
13828 | }, | |
13829 | "node" : { | |
13830 | "type" : "string", | |
13831 | "description" : "The cluster node name.", | |
13832 | "format" : "pve-node" | |
56122987 DM |
13833 | }, |
13834 | "name" : { | |
56122987 DM |
13835 | "minLength" : 2, |
13836 | "description" : "IP set name.", | |
7aacca6f DM |
13837 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
13838 | "type" : "string", | |
13839 | "maxLength" : 64 | |
56122987 | 13840 | } |
7aacca6f DM |
13841 | }, |
13842 | "additionalProperties" : 0 | |
56122987 DM |
13843 | }, |
13844 | "permissions" : { | |
13845 | "check" : [ | |
13846 | "perm", | |
13847 | "/vms/{vmid}", | |
13848 | [ | |
7aacca6f | 13849 | "VM.Config.Network" |
56122987 DM |
13850 | ] |
13851 | ] | |
13852 | }, | |
7aacca6f DM |
13853 | "protected" : 1, |
13854 | "description" : "Delete IPSet" | |
56122987 | 13855 | }, |
7aacca6f DM |
13856 | "POST" : { |
13857 | "description" : "Add IP or Network to IPSet.", | |
13858 | "protected" : 1, | |
13859 | "name" : "create_ip", | |
56122987 DM |
13860 | "permissions" : { |
13861 | "check" : [ | |
13862 | "perm", | |
13863 | "/vms/{vmid}", | |
13864 | [ | |
13865 | "VM.Config.Network" | |
13866 | ] | |
13867 | ] | |
13868 | }, | |
56122987 | 13869 | "parameters" : { |
56122987 | 13870 | "properties" : { |
7aacca6f DM |
13871 | "nomatch" : { |
13872 | "type" : "boolean", | |
13873 | "optional" : 1 | |
56122987 DM |
13874 | }, |
13875 | "name" : { | |
56122987 | 13876 | "maxLength" : 64, |
56122987 | 13877 | "description" : "IP set name.", |
56122987 | 13878 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", |
7aacca6f DM |
13879 | "minLength" : 2, |
13880 | "type" : "string" | |
56122987 | 13881 | }, |
7aacca6f | 13882 | "node" : { |
56122987 | 13883 | "type" : "string", |
7aacca6f DM |
13884 | "description" : "The cluster node name.", |
13885 | "format" : "pve-node" | |
56122987 DM |
13886 | }, |
13887 | "comment" : { | |
13888 | "optional" : 1, | |
13889 | "type" : "string" | |
13890 | }, | |
7aacca6f DM |
13891 | "cidr" : { |
13892 | "description" : "Network/IP specification in CIDR format.", | |
56122987 | 13893 | "type" : "string", |
7aacca6f DM |
13894 | "format" : "IPorCIDRorAlias" |
13895 | }, | |
13896 | "vmid" : { | |
13897 | "format" : "pve-vmid", | |
13898 | "minimum" : 1, | |
13899 | "description" : "The (unique) ID of the VM.", | |
13900 | "type" : "integer" | |
56122987 | 13901 | } |
7aacca6f DM |
13902 | }, |
13903 | "additionalProperties" : 0 | |
56122987 | 13904 | }, |
7aacca6f DM |
13905 | "returns" : { |
13906 | "type" : "null" | |
13907 | }, | |
13908 | "method" : "POST" | |
56122987 DM |
13909 | } |
13910 | } | |
13911 | } | |
13912 | ] | |
13913 | }, | |
13914 | { | |
56122987 DM |
13915 | "text" : "options", |
13916 | "info" : { | |
7aacca6f DM |
13917 | "GET" : { |
13918 | "method" : "GET", | |
56122987 | 13919 | "returns" : { |
7aacca6f | 13920 | "type" : "object", |
56122987 | 13921 | "properties" : { |
7aacca6f DM |
13922 | "log_level_in" : { |
13923 | "optional" : 1, | |
56122987 | 13924 | "type" : "string", |
7aacca6f DM |
13925 | "description" : "Log level for incoming traffic.", |
13926 | "enum" : [ | |
13927 | "emerg", | |
13928 | "alert", | |
13929 | "crit", | |
13930 | "err", | |
13931 | "warning", | |
13932 | "notice", | |
13933 | "info", | |
13934 | "debug", | |
13935 | "nolog" | |
13936 | ] | |
56122987 DM |
13937 | }, |
13938 | "policy_out" : { | |
56122987 DM |
13939 | "enum" : [ |
13940 | "ACCEPT", | |
13941 | "REJECT", | |
13942 | "DROP" | |
7aacca6f DM |
13943 | ], |
13944 | "description" : "Output policy.", | |
13945 | "optional" : 1, | |
13946 | "type" : "string" | |
56122987 | 13947 | }, |
7aacca6f DM |
13948 | "radv" : { |
13949 | "description" : "Allow sending Router Advertisement.", | |
13950 | "type" : "boolean", | |
13951 | "optional" : 1 | |
13952 | }, | |
13953 | "ipfilter" : { | |
56122987 | 13954 | "optional" : 1, |
7aacca6f DM |
13955 | "type" : "boolean", |
13956 | "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added." | |
56122987 DM |
13957 | }, |
13958 | "policy_in" : { | |
7aacca6f | 13959 | "description" : "Input policy.", |
56122987 DM |
13960 | "enum" : [ |
13961 | "ACCEPT", | |
13962 | "REJECT", | |
13963 | "DROP" | |
13964 | ], | |
7aacca6f DM |
13965 | "type" : "string", |
13966 | "optional" : 1 | |
56122987 | 13967 | }, |
7aacca6f DM |
13968 | "macfilter" : { |
13969 | "description" : "Enable/disable MAC address filter.", | |
56122987 | 13970 | "optional" : 1, |
56122987 DM |
13971 | "type" : "boolean" |
13972 | }, | |
13973 | "ndp" : { | |
7aacca6f | 13974 | "optional" : 1, |
56122987 | 13975 | "type" : "boolean", |
7aacca6f | 13976 | "description" : "Enable NDP." |
56122987 | 13977 | }, |
7aacca6f DM |
13978 | "dhcp" : { |
13979 | "description" : "Enable DHCP.", | |
56122987 DM |
13980 | "optional" : 1, |
13981 | "type" : "boolean" | |
13982 | }, | |
7aacca6f | 13983 | "log_level_out" : { |
56122987 DM |
13984 | "enum" : [ |
13985 | "emerg", | |
13986 | "alert", | |
13987 | "crit", | |
13988 | "err", | |
13989 | "warning", | |
13990 | "notice", | |
13991 | "info", | |
13992 | "debug", | |
13993 | "nolog" | |
13994 | ], | |
7aacca6f DM |
13995 | "description" : "Log level for outgoing traffic.", |
13996 | "optional" : 1, | |
56122987 DM |
13997 | "type" : "string" |
13998 | }, | |
13999 | "enable" : { | |
7aacca6f | 14000 | "description" : "Enable/disable firewall rules.", |
56122987 | 14001 | "optional" : 1, |
7aacca6f DM |
14002 | "type" : "boolean" |
14003 | } | |
14004 | } | |
14005 | }, | |
14006 | "permissions" : { | |
14007 | "check" : [ | |
14008 | "perm", | |
14009 | "/vms/{vmid}", | |
14010 | [ | |
14011 | "VM.Audit" | |
14012 | ] | |
14013 | ] | |
14014 | }, | |
14015 | "parameters" : { | |
14016 | "properties" : { | |
14017 | "vmid" : { | |
14018 | "type" : "integer", | |
14019 | "description" : "The (unique) ID of the VM.", | |
14020 | "format" : "pve-vmid", | |
14021 | "minimum" : 1 | |
56122987 | 14022 | }, |
7aacca6f DM |
14023 | "node" : { |
14024 | "type" : "string", | |
14025 | "description" : "The cluster node name.", | |
14026 | "format" : "pve-node" | |
14027 | } | |
14028 | }, | |
14029 | "additionalProperties" : 0 | |
14030 | }, | |
14031 | "name" : "get_options", | |
14032 | "description" : "Get VM firewall options.", | |
14033 | "proxyto" : "node" | |
14034 | }, | |
14035 | "PUT" : { | |
14036 | "protected" : 1, | |
14037 | "name" : "set_options", | |
14038 | "parameters" : { | |
14039 | "properties" : { | |
14040 | "enable" : { | |
14041 | "description" : "Enable/disable firewall rules.", | |
56122987 | 14042 | "optional" : 1, |
7aacca6f | 14043 | "type" : "boolean" |
56122987 DM |
14044 | }, |
14045 | "log_level_out" : { | |
7aacca6f | 14046 | "description" : "Log level for outgoing traffic.", |
56122987 DM |
14047 | "enum" : [ |
14048 | "emerg", | |
14049 | "alert", | |
14050 | "crit", | |
14051 | "err", | |
14052 | "warning", | |
14053 | "notice", | |
14054 | "info", | |
14055 | "debug", | |
14056 | "nolog" | |
14057 | ], | |
7aacca6f | 14058 | "type" : "string", |
56122987 DM |
14059 | "optional" : 1 |
14060 | }, | |
7aacca6f DM |
14061 | "vmid" : { |
14062 | "type" : "integer", | |
14063 | "description" : "The (unique) ID of the VM.", | |
14064 | "format" : "pve-vmid", | |
14065 | "minimum" : 1 | |
56122987 DM |
14066 | }, |
14067 | "delete" : { | |
14068 | "type" : "string", | |
56122987 | 14069 | "optional" : 1, |
7aacca6f DM |
14070 | "description" : "A list of settings you want to delete.", |
14071 | "format" : "pve-configid-list" | |
14072 | }, | |
56122987 | 14073 | "policy_out" : { |
56122987 DM |
14074 | "enum" : [ |
14075 | "ACCEPT", | |
14076 | "REJECT", | |
14077 | "DROP" | |
14078 | ], | |
7aacca6f | 14079 | "description" : "Output policy.", |
56122987 | 14080 | "type" : "string", |
56122987 DM |
14081 | "optional" : 1 |
14082 | }, | |
56122987 | 14083 | "log_level_in" : { |
56122987 DM |
14084 | "enum" : [ |
14085 | "emerg", | |
14086 | "alert", | |
14087 | "crit", | |
14088 | "err", | |
14089 | "warning", | |
14090 | "notice", | |
14091 | "info", | |
14092 | "debug", | |
14093 | "nolog" | |
14094 | ], | |
14095 | "description" : "Log level for incoming traffic.", | |
7aacca6f | 14096 | "type" : "string", |
56122987 DM |
14097 | "optional" : 1 |
14098 | }, | |
7aacca6f DM |
14099 | "ipfilter" : { |
14100 | "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.", | |
56122987 | 14101 | "optional" : 1, |
56122987 DM |
14102 | "type" : "boolean" |
14103 | }, | |
7aacca6f DM |
14104 | "node" : { |
14105 | "description" : "The cluster node name.", | |
14106 | "type" : "string", | |
14107 | "format" : "pve-node" | |
14108 | }, | |
14109 | "radv" : { | |
14110 | "description" : "Allow sending Router Advertisement.", | |
14111 | "type" : "boolean", | |
14112 | "optional" : 1 | |
14113 | }, | |
14114 | "macfilter" : { | |
14115 | "type" : "boolean", | |
14116 | "optional" : 1, | |
14117 | "description" : "Enable/disable MAC address filter." | |
14118 | }, | |
14119 | "policy_in" : { | |
56122987 | 14120 | "enum" : [ |
7aacca6f DM |
14121 | "ACCEPT", |
14122 | "REJECT", | |
14123 | "DROP" | |
56122987 | 14124 | ], |
7aacca6f DM |
14125 | "description" : "Input policy.", |
14126 | "type" : "string", | |
14127 | "optional" : 1 | |
14128 | }, | |
14129 | "ndp" : { | |
14130 | "description" : "Enable NDP.", | |
14131 | "type" : "boolean", | |
14132 | "optional" : 1 | |
14133 | }, | |
14134 | "digest" : { | |
14135 | "maxLength" : 40, | |
14136 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
56122987 | 14137 | "optional" : 1, |
56122987 | 14138 | "type" : "string" |
7aacca6f DM |
14139 | }, |
14140 | "dhcp" : { | |
14141 | "type" : "boolean", | |
14142 | "optional" : 1, | |
14143 | "description" : "Enable DHCP." | |
56122987 DM |
14144 | } |
14145 | }, | |
7aacca6f | 14146 | "additionalProperties" : 0 |
56122987 | 14147 | }, |
7aacca6f | 14148 | "method" : "PUT", |
56122987 | 14149 | "proxyto" : "node", |
7aacca6f DM |
14150 | "description" : "Set Firewall options.", |
14151 | "permissions" : { | |
14152 | "check" : [ | |
14153 | "perm", | |
14154 | "/vms/{vmid}", | |
14155 | [ | |
14156 | "VM.Config.Network" | |
14157 | ] | |
14158 | ] | |
14159 | }, | |
14160 | "returns" : { | |
14161 | "type" : "null" | |
56122987 DM |
14162 | } |
14163 | } | |
14164 | }, | |
7aacca6f DM |
14165 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/options", |
14166 | "leaf" : 1 | |
56122987 DM |
14167 | }, |
14168 | { | |
56122987 DM |
14169 | "info" : { |
14170 | "GET" : { | |
56122987 | 14171 | "method" : "GET", |
7aacca6f | 14172 | "name" : "log", |
56122987 DM |
14173 | "parameters" : { |
14174 | "additionalProperties" : 0, | |
14175 | "properties" : { | |
14176 | "node" : { | |
14177 | "description" : "The cluster node name.", | |
7aacca6f DM |
14178 | "type" : "string", |
14179 | "format" : "pve-node" | |
56122987 DM |
14180 | }, |
14181 | "limit" : { | |
7aacca6f | 14182 | "optional" : 1, |
56122987 | 14183 | "type" : "integer", |
7aacca6f | 14184 | "minimum" : 0 |
56122987 DM |
14185 | }, |
14186 | "vmid" : { | |
7aacca6f | 14187 | "format" : "pve-vmid", |
56122987 | 14188 | "minimum" : 1, |
7aacca6f DM |
14189 | "description" : "The (unique) ID of the VM.", |
14190 | "type" : "integer" | |
14191 | }, | |
14192 | "start" : { | |
14193 | "minimum" : 0, | |
14194 | "optional" : 1, | |
14195 | "type" : "integer" | |
56122987 DM |
14196 | } |
14197 | } | |
14198 | }, | |
14199 | "protected" : 1, | |
7aacca6f DM |
14200 | "returns" : { |
14201 | "items" : { | |
14202 | "properties" : { | |
14203 | "t" : { | |
14204 | "description" : "Line text", | |
14205 | "type" : "string" | |
14206 | }, | |
14207 | "n" : { | |
14208 | "description" : "Line number", | |
14209 | "type" : "integer" | |
14210 | } | |
14211 | }, | |
14212 | "type" : "object" | |
14213 | }, | |
14214 | "type" : "array" | |
14215 | }, | |
56122987 DM |
14216 | "permissions" : { |
14217 | "check" : [ | |
14218 | "perm", | |
14219 | "/vms/{vmid}", | |
14220 | [ | |
14221 | "VM.Console" | |
14222 | ] | |
14223 | ] | |
7aacca6f DM |
14224 | }, |
14225 | "proxyto" : "node", | |
14226 | "description" : "Read firewall log" | |
56122987 DM |
14227 | } |
14228 | }, | |
14229 | "text" : "log", | |
7aacca6f DM |
14230 | "leaf" : 1, |
14231 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/log" | |
56122987 DM |
14232 | }, |
14233 | { | |
14234 | "text" : "refs", | |
56122987 DM |
14235 | "info" : { |
14236 | "GET" : { | |
7aacca6f | 14237 | "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", |
56122987 DM |
14238 | "permissions" : { |
14239 | "check" : [ | |
14240 | "perm", | |
14241 | "/vms/{vmid}", | |
14242 | [ | |
14243 | "VM.Audit" | |
14244 | ] | |
14245 | ] | |
14246 | }, | |
56122987 | 14247 | "parameters" : { |
7aacca6f | 14248 | "additionalProperties" : 0, |
56122987 | 14249 | "properties" : { |
7aacca6f DM |
14250 | "vmid" : { |
14251 | "format" : "pve-vmid", | |
14252 | "minimum" : 1, | |
14253 | "description" : "The (unique) ID of the VM.", | |
14254 | "type" : "integer" | |
14255 | }, | |
56122987 DM |
14256 | "type" : { |
14257 | "type" : "string", | |
7aacca6f | 14258 | "optional" : 1, |
56122987 DM |
14259 | "enum" : [ |
14260 | "alias", | |
14261 | "ipset" | |
14262 | ], | |
7aacca6f | 14263 | "description" : "Only list references of specified type." |
56122987 DM |
14264 | }, |
14265 | "node" : { | |
7aacca6f | 14266 | "type" : "string", |
56122987 | 14267 | "description" : "The cluster node name.", |
7aacca6f | 14268 | "format" : "pve-node" |
56122987 | 14269 | } |
7aacca6f | 14270 | } |
56122987 | 14271 | }, |
7aacca6f DM |
14272 | "name" : "refs", |
14273 | "method" : "GET", | |
56122987 DM |
14274 | "returns" : { |
14275 | "type" : "array", | |
14276 | "items" : { | |
14277 | "type" : "object", | |
14278 | "properties" : { | |
56122987 DM |
14279 | "type" : { |
14280 | "type" : "string", | |
14281 | "enum" : [ | |
14282 | "alias", | |
14283 | "ipset" | |
14284 | ] | |
14285 | }, | |
7aacca6f DM |
14286 | "name" : { |
14287 | "type" : "string" | |
14288 | }, | |
56122987 DM |
14289 | "comment" : { |
14290 | "type" : "string", | |
14291 | "optional" : 1 | |
14292 | } | |
14293 | } | |
14294 | } | |
14295 | } | |
14296 | } | |
14297 | }, | |
7aacca6f DM |
14298 | "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs", |
14299 | "leaf" : 1 | |
56122987 DM |
14300 | } |
14301 | ], | |
7aacca6f | 14302 | "text" : "firewall", |
56122987 DM |
14303 | "info" : { |
14304 | "GET" : { | |
7aacca6f | 14305 | "description" : "Directory index.", |
56122987 DM |
14306 | "permissions" : { |
14307 | "user" : "all" | |
14308 | }, | |
56122987 DM |
14309 | "parameters" : { |
14310 | "properties" : { | |
14311 | "vmid" : { | |
56122987 | 14312 | "minimum" : 1, |
7aacca6f | 14313 | "format" : "pve-vmid", |
56122987 | 14314 | "type" : "integer", |
7aacca6f | 14315 | "description" : "The (unique) ID of the VM." |
56122987 DM |
14316 | }, |
14317 | "node" : { | |
56122987 | 14318 | "format" : "pve-node", |
7aacca6f DM |
14319 | "type" : "string", |
14320 | "description" : "The cluster node name." | |
56122987 DM |
14321 | } |
14322 | }, | |
14323 | "additionalProperties" : 0 | |
14324 | }, | |
7aacca6f DM |
14325 | "name" : "index", |
14326 | "method" : "GET", | |
56122987 | 14327 | "returns" : { |
7aacca6f DM |
14328 | "type" : "array", |
14329 | "items" : { | |
14330 | "type" : "object", | |
14331 | "properties" : {} | |
14332 | }, | |
56122987 DM |
14333 | "links" : [ |
14334 | { | |
7aacca6f DM |
14335 | "rel" : "child", |
14336 | "href" : "{name}" | |
56122987 | 14337 | } |
7aacca6f | 14338 | ] |
56122987 DM |
14339 | } |
14340 | } | |
14341 | }, | |
7aacca6f | 14342 | "path" : "/nodes/{node}/lxc/{vmid}/firewall", |
56122987 DM |
14343 | "leaf" : 0 |
14344 | }, | |
14345 | { | |
14346 | "text" : "rrd", | |
56122987 DM |
14347 | "info" : { |
14348 | "GET" : { | |
56122987 | 14349 | "description" : "Read VM RRD statistics (returns PNG)", |
7aacca6f DM |
14350 | "protected" : 1, |
14351 | "name" : "rrd", | |
56122987 | 14352 | "parameters" : { |
7aacca6f | 14353 | "additionalProperties" : 0, |
56122987 | 14354 | "properties" : { |
7aacca6f DM |
14355 | "node" : { |
14356 | "description" : "The cluster node name.", | |
14357 | "type" : "string", | |
14358 | "format" : "pve-node" | |
56122987 DM |
14359 | }, |
14360 | "timeframe" : { | |
7aacca6f | 14361 | "type" : "string", |
56122987 DM |
14362 | "description" : "Specify the time frame you are interested in.", |
14363 | "enum" : [ | |
14364 | "hour", | |
14365 | "day", | |
14366 | "week", | |
14367 | "month", | |
14368 | "year" | |
7aacca6f | 14369 | ] |
56122987 | 14370 | }, |
7aacca6f DM |
14371 | "ds" : { |
14372 | "description" : "The list of datasources you want to display.", | |
56122987 | 14373 | "type" : "string", |
7aacca6f | 14374 | "format" : "pve-configid-list" |
56122987 | 14375 | }, |
7aacca6f DM |
14376 | "cf" : { |
14377 | "optional" : 1, | |
56122987 | 14378 | "type" : "string", |
7aacca6f DM |
14379 | "enum" : [ |
14380 | "AVERAGE", | |
14381 | "MAX" | |
14382 | ], | |
14383 | "description" : "The RRD consolidation function" | |
14384 | }, | |
14385 | "vmid" : { | |
14386 | "format" : "pve-vmid", | |
14387 | "minimum" : 1, | |
14388 | "description" : "The (unique) ID of the VM.", | |
14389 | "type" : "integer" | |
56122987 | 14390 | } |
7aacca6f DM |
14391 | } |
14392 | }, | |
14393 | "permissions" : { | |
14394 | "check" : [ | |
14395 | "perm", | |
14396 | "/vms/{vmid}", | |
14397 | [ | |
14398 | "VM.Audit" | |
14399 | ] | |
14400 | ] | |
56122987 DM |
14401 | }, |
14402 | "method" : "GET", | |
7aacca6f DM |
14403 | "returns" : { |
14404 | "properties" : { | |
14405 | "filename" : { | |
14406 | "type" : "string" | |
14407 | } | |
14408 | }, | |
14409 | "type" : "object" | |
14410 | } | |
56122987 | 14411 | } |
7aacca6f DM |
14412 | }, |
14413 | "path" : "/nodes/{node}/lxc/{vmid}/rrd", | |
14414 | "leaf" : 1 | |
56122987 DM |
14415 | }, |
14416 | { | |
14417 | "text" : "rrddata", | |
56122987 DM |
14418 | "info" : { |
14419 | "GET" : { | |
14420 | "parameters" : { | |
7aacca6f | 14421 | "additionalProperties" : 0, |
56122987 | 14422 | "properties" : { |
7aacca6f DM |
14423 | "node" : { |
14424 | "format" : "pve-node", | |
14425 | "type" : "string", | |
14426 | "description" : "The cluster node name." | |
14427 | }, | |
56122987 | 14428 | "timeframe" : { |
7aacca6f | 14429 | "type" : "string", |
56122987 DM |
14430 | "description" : "Specify the time frame you are interested in.", |
14431 | "enum" : [ | |
14432 | "hour", | |
14433 | "day", | |
14434 | "week", | |
14435 | "month", | |
14436 | "year" | |
7aacca6f DM |
14437 | ] |
14438 | }, | |
14439 | "vmid" : { | |
14440 | "description" : "The (unique) ID of the VM.", | |
14441 | "type" : "integer", | |
14442 | "minimum" : 1, | |
14443 | "format" : "pve-vmid" | |
56122987 DM |
14444 | }, |
14445 | "cf" : { | |
14446 | "enum" : [ | |
14447 | "AVERAGE", | |
14448 | "MAX" | |
14449 | ], | |
56122987 | 14450 | "description" : "The RRD consolidation function", |
7aacca6f DM |
14451 | "type" : "string", |
14452 | "optional" : 1 | |
56122987 | 14453 | } |
56122987 DM |
14454 | } |
14455 | }, | |
56122987 DM |
14456 | "permissions" : { |
14457 | "check" : [ | |
14458 | "perm", | |
14459 | "/vms/{vmid}", | |
14460 | [ | |
14461 | "VM.Audit" | |
14462 | ] | |
14463 | ] | |
14464 | }, | |
7aacca6f | 14465 | "name" : "rrddata", |
56122987 | 14466 | "description" : "Read VM RRD statistics", |
7aacca6f DM |
14467 | "protected" : 1, |
14468 | "returns" : { | |
14469 | "type" : "array", | |
14470 | "items" : { | |
14471 | "properties" : {}, | |
14472 | "type" : "object" | |
14473 | } | |
14474 | }, | |
14475 | "method" : "GET" | |
56122987 DM |
14476 | } |
14477 | }, | |
7aacca6f DM |
14478 | "path" : "/nodes/{node}/lxc/{vmid}/rrddata", |
14479 | "leaf" : 1 | |
56122987 DM |
14480 | }, |
14481 | { | |
7aacca6f | 14482 | "text" : "vncproxy", |
56122987 DM |
14483 | "info" : { |
14484 | "POST" : { | |
7aacca6f | 14485 | "protected" : 1, |
56122987 | 14486 | "description" : "Creates a TCP VNC proxy connections.", |
7aacca6f DM |
14487 | "parameters" : { |
14488 | "properties" : { | |
14489 | "vmid" : { | |
14490 | "format" : "pve-vmid", | |
14491 | "minimum" : 1, | |
14492 | "description" : "The (unique) ID of the VM.", | |
14493 | "type" : "integer" | |
14494 | }, | |
14495 | "websocket" : { | |
14496 | "type" : "boolean", | |
14497 | "optional" : 1, | |
14498 | "description" : "use websocket instead of standard VNC." | |
14499 | }, | |
14500 | "node" : { | |
14501 | "type" : "string", | |
14502 | "description" : "The cluster node name.", | |
14503 | "format" : "pve-node" | |
14504 | } | |
14505 | }, | |
14506 | "additionalProperties" : 0 | |
14507 | }, | |
56122987 DM |
14508 | "permissions" : { |
14509 | "check" : [ | |
14510 | "perm", | |
14511 | "/vms/{vmid}", | |
14512 | [ | |
14513 | "VM.Console" | |
14514 | ] | |
14515 | ] | |
14516 | }, | |
56122987 DM |
14517 | "name" : "vncproxy", |
14518 | "method" : "POST", | |
56122987 | 14519 | "returns" : { |
7aacca6f | 14520 | "additionalProperties" : 0, |
56122987 | 14521 | "properties" : { |
7aacca6f | 14522 | "cert" : { |
56122987 DM |
14523 | "type" : "string" |
14524 | }, | |
7aacca6f | 14525 | "upid" : { |
56122987 DM |
14526 | "type" : "string" |
14527 | }, | |
14528 | "user" : { | |
14529 | "type" : "string" | |
14530 | }, | |
7aacca6f | 14531 | "ticket" : { |
56122987 DM |
14532 | "type" : "string" |
14533 | }, | |
14534 | "port" : { | |
14535 | "type" : "integer" | |
14536 | } | |
7aacca6f | 14537 | } |
56122987 DM |
14538 | } |
14539 | } | |
14540 | }, | |
14541 | "path" : "/nodes/{node}/lxc/{vmid}/vncproxy", | |
7aacca6f | 14542 | "leaf" : 1 |
56122987 DM |
14543 | }, |
14544 | { | |
7aacca6f | 14545 | "text" : "vncwebsocket", |
56122987 DM |
14546 | "info" : { |
14547 | "GET" : { | |
56122987 | 14548 | "parameters" : { |
56122987 | 14549 | "properties" : { |
7aacca6f DM |
14550 | "vncticket" : { |
14551 | "type" : "string", | |
14552 | "description" : "Ticket from previous call to vncproxy.", | |
14553 | "maxLength" : 512 | |
56122987 DM |
14554 | }, |
14555 | "port" : { | |
7aacca6f | 14556 | "minimum" : 5900, |
56122987 DM |
14557 | "maximum" : 5999, |
14558 | "type" : "integer", | |
56122987 DM |
14559 | "description" : "Port number returned by previous vncproxy call." |
14560 | }, | |
14561 | "node" : { | |
7aacca6f | 14562 | "format" : "pve-node", |
56122987 | 14563 | "description" : "The cluster node name.", |
56122987 | 14564 | "type" : "string" |
7aacca6f DM |
14565 | }, |
14566 | "vmid" : { | |
14567 | "description" : "The (unique) ID of the VM.", | |
14568 | "type" : "integer", | |
14569 | "format" : "pve-vmid", | |
14570 | "minimum" : 1 | |
56122987 | 14571 | } |
7aacca6f DM |
14572 | }, |
14573 | "additionalProperties" : 0 | |
14574 | }, | |
14575 | "name" : "vncwebsocket", | |
14576 | "permissions" : { | |
14577 | "check" : [ | |
14578 | "perm", | |
14579 | "/vms/{vmid}", | |
14580 | [ | |
14581 | "VM.Console" | |
14582 | ] | |
14583 | ], | |
14584 | "description" : "You also need to pass a valid ticket (vncticket)." | |
56122987 | 14585 | }, |
7aacca6f | 14586 | "description" : "Opens a weksocket for VNC traffic.", |
56122987 DM |
14587 | "returns" : { |
14588 | "type" : "object", | |
14589 | "properties" : { | |
14590 | "port" : { | |
14591 | "type" : "string" | |
14592 | } | |
14593 | } | |
14594 | }, | |
7aacca6f | 14595 | "method" : "GET" |
56122987 DM |
14596 | } |
14597 | }, | |
7aacca6f | 14598 | "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket", |
56122987 DM |
14599 | "leaf" : 1 |
14600 | }, | |
14601 | { | |
14602 | "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy", | |
7aacca6f DM |
14603 | "leaf" : 1, |
14604 | "text" : "spiceproxy", | |
56122987 DM |
14605 | "info" : { |
14606 | "POST" : { | |
7aacca6f | 14607 | "protected" : 1, |
56122987 DM |
14608 | "parameters" : { |
14609 | "additionalProperties" : 0, | |
14610 | "properties" : { | |
14611 | "vmid" : { | |
56122987 DM |
14612 | "format" : "pve-vmid", |
14613 | "minimum" : 1, | |
7aacca6f | 14614 | "type" : "integer", |
56122987 DM |
14615 | "description" : "The (unique) ID of the VM." |
14616 | }, | |
14617 | "proxy" : { | |
56122987 DM |
14618 | "optional" : 1, |
14619 | "type" : "string", | |
7aacca6f | 14620 | "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", |
56122987 DM |
14621 | "format" : "address" |
14622 | }, | |
14623 | "node" : { | |
14624 | "format" : "pve-node", | |
7aacca6f DM |
14625 | "description" : "The cluster node name.", |
14626 | "type" : "string" | |
56122987 DM |
14627 | } |
14628 | } | |
14629 | }, | |
7aacca6f DM |
14630 | "name" : "spiceproxy", |
14631 | "method" : "POST", | |
14632 | "description" : "Returns a SPICE configuration to connect to the CT.", | |
14633 | "proxyto" : "node", | |
56122987 DM |
14634 | "permissions" : { |
14635 | "check" : [ | |
14636 | "perm", | |
14637 | "/vms/{vmid}", | |
14638 | [ | |
14639 | "VM.Console" | |
14640 | ] | |
14641 | ] | |
14642 | }, | |
14643 | "returns" : { | |
7aacca6f DM |
14644 | "description" : "Returned values can be directly passed to the 'remote-viewer' application.", |
14645 | "additionalProperties" : 1, | |
56122987 DM |
14646 | "properties" : { |
14647 | "type" : { | |
14648 | "type" : "string" | |
14649 | }, | |
7aacca6f | 14650 | "host" : { |
56122987 DM |
14651 | "type" : "string" |
14652 | }, | |
14653 | "proxy" : { | |
14654 | "type" : "string" | |
14655 | }, | |
56122987 DM |
14656 | "tls-port" : { |
14657 | "type" : "integer" | |
7aacca6f DM |
14658 | }, |
14659 | "password" : { | |
14660 | "type" : "string" | |
56122987 | 14661 | } |
7aacca6f DM |
14662 | } |
14663 | } | |
56122987 | 14664 | } |
7aacca6f | 14665 | } |
56122987 DM |
14666 | }, |
14667 | { | |
56122987 | 14668 | "leaf" : 1, |
7aacca6f | 14669 | "path" : "/nodes/{node}/lxc/{vmid}/migrate", |
56122987 DM |
14670 | "info" : { |
14671 | "POST" : { | |
7aacca6f | 14672 | "method" : "POST", |
56122987 DM |
14673 | "parameters" : { |
14674 | "properties" : { | |
7aacca6f DM |
14675 | "target" : { |
14676 | "format" : "pve-node", | |
14677 | "description" : "Target node.", | |
14678 | "type" : "string" | |
14679 | }, | |
56122987 | 14680 | "vmid" : { |
56122987 | 14681 | "minimum" : 1, |
7aacca6f DM |
14682 | "format" : "pve-vmid", |
14683 | "description" : "The (unique) ID of the VM.", | |
14684 | "type" : "integer" | |
56122987 DM |
14685 | }, |
14686 | "online" : { | |
56122987 | 14687 | "description" : "Use online/live migration.", |
7aacca6f DM |
14688 | "type" : "boolean", |
14689 | "optional" : 1 | |
56122987 DM |
14690 | }, |
14691 | "node" : { | |
14692 | "format" : "pve-node", | |
14693 | "type" : "string", | |
14694 | "description" : "The cluster node name." | |
14695 | }, | |
14696 | "force" : { | |
56122987 | 14697 | "optional" : 1, |
7aacca6f | 14698 | "type" : "boolean", |
56122987 | 14699 | "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node." |
56122987 DM |
14700 | } |
14701 | }, | |
14702 | "additionalProperties" : 0 | |
14703 | }, | |
7aacca6f DM |
14704 | "name" : "migrate_vm", |
14705 | "protected" : 1, | |
14706 | "returns" : { | |
14707 | "type" : "string", | |
14708 | "description" : "the task ID." | |
14709 | }, | |
56122987 DM |
14710 | "permissions" : { |
14711 | "check" : [ | |
14712 | "perm", | |
14713 | "/vms/{vmid}", | |
14714 | [ | |
14715 | "VM.Migrate" | |
14716 | ] | |
14717 | ] | |
14718 | }, | |
7aacca6f | 14719 | "proxyto" : "node", |
56122987 DM |
14720 | "description" : "Migrate the container to another node. Creates a new migration task." |
14721 | } | |
14722 | }, | |
7aacca6f | 14723 | "text" : "migrate" |
56122987 DM |
14724 | }, |
14725 | { | |
56122987 DM |
14726 | "info" : { |
14727 | "GET" : { | |
56122987 | 14728 | "name" : "vm_feature", |
56122987 | 14729 | "parameters" : { |
7aacca6f | 14730 | "additionalProperties" : 0, |
56122987 | 14731 | "properties" : { |
7aacca6f DM |
14732 | "node" : { |
14733 | "format" : "pve-node", | |
14734 | "type" : "string", | |
14735 | "description" : "The cluster node name." | |
14736 | }, | |
56122987 | 14737 | "snapname" : { |
56122987 | 14738 | "type" : "string", |
7aacca6f DM |
14739 | "optional" : 1, |
14740 | "description" : "The name of the snapshot.", | |
14741 | "format" : "pve-configid", | |
14742 | "maxLength" : 40 | |
56122987 DM |
14743 | }, |
14744 | "feature" : { | |
56122987 DM |
14745 | "enum" : [ |
14746 | "snapshot" | |
14747 | ], | |
7aacca6f | 14748 | "description" : "Feature to check.", |
56122987 DM |
14749 | "type" : "string" |
14750 | }, | |
14751 | "vmid" : { | |
7aacca6f | 14752 | "description" : "The (unique) ID of the VM.", |
56122987 | 14753 | "type" : "integer", |
7aacca6f DM |
14754 | "minimum" : 1, |
14755 | "format" : "pve-vmid" | |
56122987 | 14756 | } |
7aacca6f | 14757 | } |
56122987 | 14758 | }, |
7aacca6f DM |
14759 | "protected" : 1, |
14760 | "method" : "GET", | |
56122987 DM |
14761 | "permissions" : { |
14762 | "check" : [ | |
14763 | "perm", | |
14764 | "/vms/{vmid}", | |
14765 | [ | |
14766 | "VM.Audit" | |
14767 | ] | |
14768 | ] | |
14769 | }, | |
7aacca6f DM |
14770 | "proxyto" : "node", |
14771 | "description" : "Check if feature for virtual machine is available.", | |
14772 | "returns" : { | |
14773 | "properties" : { | |
14774 | "hasFeature" : { | |
14775 | "type" : "boolean" | |
14776 | } | |
14777 | }, | |
14778 | "type" : "object" | |
14779 | } | |
56122987 DM |
14780 | } |
14781 | }, | |
7aacca6f DM |
14782 | "text" : "feature", |
14783 | "leaf" : 1, | |
56122987 DM |
14784 | "path" : "/nodes/{node}/lxc/{vmid}/feature" |
14785 | }, | |
14786 | { | |
7aacca6f | 14787 | "text" : "template", |
56122987 DM |
14788 | "info" : { |
14789 | "POST" : { | |
56122987 | 14790 | "name" : "template", |
56122987 DM |
14791 | "parameters" : { |
14792 | "additionalProperties" : 0, | |
14793 | "properties" : { | |
56122987 | 14794 | "vmid" : { |
7aacca6f | 14795 | "minimum" : 1, |
56122987 DM |
14796 | "format" : "pve-vmid", |
14797 | "type" : "integer", | |
7aacca6f DM |
14798 | "description" : "The (unique) ID of the VM." |
14799 | }, | |
14800 | "node" : { | |
14801 | "format" : "pve-node", | |
14802 | "description" : "The cluster node name.", | |
14803 | "type" : "string" | |
56122987 DM |
14804 | }, |
14805 | "experimental" : { | |
56122987 | 14806 | "default" : 0, |
7aacca6f | 14807 | "type" : "boolean", |
56122987 DM |
14808 | "description" : "The template feature is experimental, set this flag if you know what you are doing." |
14809 | } | |
14810 | } | |
14811 | }, | |
14812 | "protected" : 1, | |
7aacca6f | 14813 | "method" : "POST", |
56122987 DM |
14814 | "permissions" : { |
14815 | "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}", | |
14816 | "check" : [ | |
14817 | "perm", | |
14818 | "/vms/{vmid}", | |
14819 | [ | |
14820 | "VM.Allocate" | |
14821 | ] | |
14822 | ] | |
7aacca6f DM |
14823 | }, |
14824 | "description" : "Create a Template.", | |
14825 | "proxyto" : "node", | |
14826 | "returns" : { | |
14827 | "type" : "null" | |
56122987 DM |
14828 | } |
14829 | } | |
14830 | }, | |
7aacca6f DM |
14831 | "path" : "/nodes/{node}/lxc/{vmid}/template", |
14832 | "leaf" : 1 | |
56122987 DM |
14833 | }, |
14834 | { | |
7aacca6f | 14835 | "path" : "/nodes/{node}/lxc/{vmid}/clone", |
56122987 DM |
14836 | "leaf" : 1, |
14837 | "text" : "clone", | |
56122987 DM |
14838 | "info" : { |
14839 | "POST" : { | |
56122987 | 14840 | "name" : "clone_vm", |
7aacca6f DM |
14841 | "parameters" : { |
14842 | "additionalProperties" : 0, | |
14843 | "properties" : { | |
14844 | "full" : { | |
14845 | "optional" : 1, | |
14846 | "type" : "boolean", | |
14847 | "default" : 0, | |
14848 | "description" : "Create a full copy of all disk. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default." | |
14849 | }, | |
14850 | "experimental" : { | |
14851 | "type" : "boolean", | |
14852 | "default" : 0, | |
14853 | "description" : "The clone feature is experimental, set this flag if you know what you are doing." | |
14854 | }, | |
14855 | "description" : { | |
14856 | "description" : "Description for the new CT.", | |
14857 | "optional" : 1, | |
14858 | "type" : "string" | |
14859 | }, | |
14860 | "hostname" : { | |
14861 | "format" : "dns-name", | |
14862 | "type" : "string", | |
14863 | "optional" : 1, | |
14864 | "description" : "Set a hostname for the new CT." | |
14865 | }, | |
14866 | "vmid" : { | |
14867 | "minimum" : 1, | |
14868 | "format" : "pve-vmid", | |
14869 | "description" : "The (unique) ID of the VM.", | |
14870 | "type" : "integer" | |
14871 | }, | |
14872 | "node" : { | |
14873 | "description" : "The cluster node name.", | |
14874 | "type" : "string", | |
14875 | "format" : "pve-node" | |
14876 | }, | |
14877 | "snapname" : { | |
14878 | "format" : "pve-configid", | |
14879 | "maxLength" : 40, | |
14880 | "type" : "string", | |
14881 | "optional" : 1, | |
14882 | "description" : "The name of the snapshot." | |
14883 | }, | |
14884 | "pool" : { | |
14885 | "optional" : 1, | |
14886 | "type" : "string", | |
14887 | "description" : "Add the new CT to the specified pool.", | |
14888 | "format" : "pve-poolid" | |
14889 | }, | |
14890 | "newid" : { | |
14891 | "minimum" : 1, | |
14892 | "format" : "pve-vmid", | |
14893 | "type" : "integer", | |
14894 | "description" : "VMID for the clone." | |
14895 | }, | |
14896 | "storage" : { | |
14897 | "format" : "pve-storage-id", | |
14898 | "optional" : 1, | |
14899 | "type" : "string", | |
14900 | "requires" : "full", | |
14901 | "description" : "Target storage for full clone." | |
14902 | } | |
14903 | } | |
56122987 | 14904 | }, |
7aacca6f DM |
14905 | "protected" : 1, |
14906 | "method" : "POST", | |
56122987 | 14907 | "permissions" : { |
56122987 DM |
14908 | "check" : [ |
14909 | "and", | |
14910 | [ | |
14911 | "perm", | |
14912 | "/vms/{vmid}", | |
14913 | [ | |
14914 | "VM.Clone" | |
14915 | ] | |
14916 | ], | |
14917 | [ | |
14918 | "or", | |
14919 | [ | |
14920 | "perm", | |
14921 | "/vms/{newid}", | |
14922 | [ | |
14923 | "VM.Allocate" | |
14924 | ] | |
14925 | ], | |
14926 | [ | |
14927 | "perm", | |
14928 | "/pool/{pool}", | |
14929 | [ | |
14930 | "VM.Allocate" | |
14931 | ], | |
14932 | "require_param", | |
14933 | "pool" | |
14934 | ] | |
14935 | ] | |
7aacca6f DM |
14936 | ], |
14937 | "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage." | |
56122987 | 14938 | }, |
56122987 | 14939 | "proxyto" : "node", |
7aacca6f DM |
14940 | "description" : "Create a container clone/copy", |
14941 | "returns" : { | |
14942 | "type" : "string" | |
56122987 DM |
14943 | } |
14944 | } | |
14945 | } | |
14946 | }, | |
14947 | { | |
14948 | "text" : "resize", | |
56122987 DM |
14949 | "info" : { |
14950 | "PUT" : { | |
56122987 DM |
14951 | "parameters" : { |
14952 | "properties" : { | |
7aacca6f DM |
14953 | "node" : { |
14954 | "format" : "pve-node", | |
14955 | "type" : "string", | |
14956 | "description" : "The cluster node name." | |
56122987 DM |
14957 | }, |
14958 | "size" : { | |
56122987 | 14959 | "type" : "string", |
7aacca6f DM |
14960 | "description" : "The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.", |
14961 | "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?" | |
56122987 | 14962 | }, |
7aacca6f DM |
14963 | "vmid" : { |
14964 | "format" : "pve-vmid", | |
14965 | "minimum" : 1, | |
14966 | "description" : "The (unique) ID of the VM.", | |
14967 | "type" : "integer" | |
56122987 DM |
14968 | }, |
14969 | "disk" : { | |
7aacca6f | 14970 | "description" : "The disk you want to resize.", |
56122987 DM |
14971 | "enum" : [ |
14972 | "rootfs", | |
14973 | "mp0", | |
14974 | "mp1", | |
14975 | "mp2", | |
14976 | "mp3", | |
14977 | "mp4", | |
14978 | "mp5", | |
14979 | "mp6", | |
14980 | "mp7", | |
14981 | "mp8", | |
14982 | "mp9" | |
14983 | ], | |
7aacca6f DM |
14984 | "type" : "string" |
14985 | }, | |
14986 | "digest" : { | |
14987 | "optional" : 1, | |
14988 | "type" : "string", | |
14989 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
14990 | "maxLength" : 40 | |
56122987 DM |
14991 | } |
14992 | }, | |
14993 | "additionalProperties" : 0 | |
14994 | }, | |
7aacca6f DM |
14995 | "name" : "resize_vm", |
14996 | "protected" : 1, | |
14997 | "method" : "PUT", | |
14998 | "permissions" : { | |
14999 | "check" : [ | |
15000 | "perm", | |
15001 | "/vms/{vmid}", | |
15002 | [ | |
15003 | "VM.Config.Disk" | |
15004 | ], | |
15005 | "any", | |
15006 | 1 | |
15007 | ] | |
15008 | }, | |
15009 | "description" : "Resize a container mountpoint.", | |
15010 | "proxyto" : "node", | |
15011 | "returns" : { | |
15012 | "description" : "the task ID.", | |
15013 | "type" : "string" | |
15014 | } | |
56122987 DM |
15015 | } |
15016 | }, | |
7aacca6f DM |
15017 | "path" : "/nodes/{node}/lxc/{vmid}/resize", |
15018 | "leaf" : 1 | |
56122987 DM |
15019 | } |
15020 | ], | |
7aacca6f | 15021 | "text" : "{vmid}", |
56122987 DM |
15022 | "info" : { |
15023 | "DELETE" : { | |
7aacca6f DM |
15024 | "description" : "Destroy the container (also delete all uses files).", |
15025 | "proxyto" : "node", | |
15026 | "permissions" : { | |
15027 | "check" : [ | |
15028 | "perm", | |
15029 | "/vms/{vmid}", | |
15030 | [ | |
15031 | "VM.Allocate" | |
15032 | ] | |
15033 | ] | |
15034 | }, | |
56122987 DM |
15035 | "returns" : { |
15036 | "type" : "string" | |
15037 | }, | |
7aacca6f DM |
15038 | "protected" : 1, |
15039 | "name" : "destroy_vm", | |
56122987 DM |
15040 | "parameters" : { |
15041 | "properties" : { | |
15042 | "vmid" : { | |
56122987 | 15043 | "format" : "pve-vmid", |
7aacca6f | 15044 | "minimum" : 1, |
56122987 DM |
15045 | "type" : "integer", |
15046 | "description" : "The (unique) ID of the VM." | |
15047 | }, | |
15048 | "node" : { | |
7aacca6f | 15049 | "format" : "pve-node", |
56122987 | 15050 | "type" : "string", |
7aacca6f | 15051 | "description" : "The cluster node name." |
56122987 DM |
15052 | } |
15053 | }, | |
15054 | "additionalProperties" : 0 | |
15055 | }, | |
7aacca6f | 15056 | "method" : "DELETE" |
56122987 DM |
15057 | }, |
15058 | "GET" : { | |
15059 | "returns" : { | |
15060 | "type" : "array", | |
7aacca6f DM |
15061 | "links" : [ |
15062 | { | |
15063 | "rel" : "child", | |
15064 | "href" : "{subdir}" | |
15065 | } | |
15066 | ], | |
56122987 | 15067 | "items" : { |
56122987 DM |
15068 | "properties" : { |
15069 | "subdir" : { | |
15070 | "type" : "string" | |
15071 | } | |
7aacca6f DM |
15072 | }, |
15073 | "type" : "object" | |
15074 | } | |
56122987 | 15075 | }, |
7aacca6f | 15076 | "method" : "GET", |
56122987 | 15077 | "proxyto" : "node", |
7aacca6f DM |
15078 | "description" : "Directory index", |
15079 | "name" : "vmdiridx", | |
56122987 | 15080 | "parameters" : { |
7aacca6f | 15081 | "additionalProperties" : 0, |
56122987 DM |
15082 | "properties" : { |
15083 | "node" : { | |
56122987 | 15084 | "type" : "string", |
7aacca6f | 15085 | "description" : "The cluster node name.", |
56122987 DM |
15086 | "format" : "pve-node" |
15087 | }, | |
15088 | "vmid" : { | |
15089 | "description" : "The (unique) ID of the VM.", | |
15090 | "type" : "integer", | |
15091 | "format" : "pve-vmid", | |
15092 | "minimum" : 1 | |
15093 | } | |
7aacca6f | 15094 | } |
56122987 | 15095 | }, |
56122987 DM |
15096 | "permissions" : { |
15097 | "user" : "all" | |
15098 | } | |
15099 | } | |
7aacca6f | 15100 | } |
56122987 DM |
15101 | } |
15102 | ], | |
56122987 | 15103 | "info" : { |
56122987 | 15104 | "POST" : { |
7aacca6f DM |
15105 | "method" : "POST", |
15106 | "name" : "create_vm", | |
56122987 | 15107 | "parameters" : { |
7aacca6f | 15108 | "additionalProperties" : 0, |
56122987 | 15109 | "properties" : { |
7aacca6f DM |
15110 | "storage" : { |
15111 | "description" : "Default Storage.", | |
15112 | "default" : "local", | |
56122987 DM |
15113 | "type" : "string", |
15114 | "optional" : 1, | |
7aacca6f | 15115 | "format" : "pve-storage-id" |
56122987 | 15116 | }, |
7aacca6f DM |
15117 | "onboot" : { |
15118 | "type" : "boolean", | |
15119 | "optional" : 1, | |
15120 | "default" : 0, | |
15121 | "description" : "Specifies whether a VM will be started during system bootup." | |
15122 | }, | |
15123 | "startup" : { | |
15124 | "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", | |
15125 | "type" : "string", | |
15126 | "optional" : 1, | |
15127 | "format" : "pve-startup-order", | |
15128 | "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " | |
15129 | }, | |
15130 | "console" : { | |
15131 | "description" : "Attach a console device (/dev/console) to the container.", | |
15132 | "default" : 1, | |
56122987 | 15133 | "optional" : 1, |
7aacca6f | 15134 | "type" : "boolean" |
56122987 DM |
15135 | }, |
15136 | "pool" : { | |
15137 | "optional" : 1, | |
7aacca6f | 15138 | "type" : "string", |
56122987 | 15139 | "description" : "Add the VM to the specified pool.", |
7aacca6f | 15140 | "format" : "pve-poolid" |
56122987 | 15141 | }, |
7aacca6f DM |
15142 | "cmode" : { |
15143 | "enum" : [ | |
15144 | "shell", | |
15145 | "console", | |
15146 | "tty" | |
15147 | ], | |
15148 | "description" : "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).", | |
15149 | "type" : "string", | |
56122987 | 15150 | "optional" : 1, |
7aacca6f DM |
15151 | "default" : "tty" |
15152 | }, | |
15153 | "description" : { | |
15154 | "type" : "string", | |
15155 | "optional" : 1, | |
15156 | "description" : "Container description. Only used on the configuration web interface." | |
15157 | }, | |
15158 | "lock" : { | |
15159 | "optional" : 1, | |
15160 | "type" : "string", | |
15161 | "enum" : [ | |
15162 | "migrate", | |
15163 | "backup", | |
15164 | "snapshot", | |
15165 | "rollback" | |
15166 | ], | |
15167 | "description" : "Lock/unlock the VM." | |
15168 | }, | |
15169 | "rootfs" : { | |
15170 | "type" : "string", | |
15171 | "optional" : 1, | |
15172 | "description" : "Use volume as container root.", | |
56122987 | 15173 | "format" : { |
7aacca6f | 15174 | "ro" : { |
56122987 | 15175 | "type" : "boolean", |
7aacca6f DM |
15176 | "optional" : 1, |
15177 | "description" : "Read-only mountpoint (not supported with bind mounts)", | |
15178 | "format_description" : "ro" | |
56122987 | 15179 | }, |
7aacca6f DM |
15180 | "acl" : { |
15181 | "description" : "Explicitly enable or disable ACL support.", | |
15182 | "optional" : 1, | |
15183 | "type" : "boolean", | |
15184 | "format_description" : "acl" | |
56122987 DM |
15185 | }, |
15186 | "backup" : { | |
56122987 | 15187 | "description" : "Whether to include the mountpoint in backups.", |
7aacca6f DM |
15188 | "type" : "boolean", |
15189 | "optional" : 1, | |
15190 | "format_description" : "[1|0]" | |
15191 | }, | |
15192 | "size" : { | |
15193 | "format" : "disk-size", | |
15194 | "format_description" : "DiskSize", | |
15195 | "description" : "Volume size (read only value).", | |
15196 | "optional" : 1, | |
15197 | "type" : "string" | |
56122987 DM |
15198 | }, |
15199 | "volume" : { | |
7aacca6f | 15200 | "default_key" : 1, |
56122987 | 15201 | "format" : "pve-lxc-mp-string", |
56122987 | 15202 | "format_description" : "volume", |
56122987 | 15203 | "type" : "string", |
7aacca6f | 15204 | "description" : "Volume, device or directory to mount into the container." |
56122987 | 15205 | }, |
7aacca6f DM |
15206 | "quota" : { |
15207 | "format_description" : "[0|1]", | |
56122987 | 15208 | "optional" : 1, |
56122987 | 15209 | "type" : "boolean", |
7aacca6f | 15210 | "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)" |
56122987 | 15211 | } |
7aacca6f | 15212 | } |
56122987 DM |
15213 | }, |
15214 | "vmid" : { | |
56122987 DM |
15215 | "format" : "pve-vmid", |
15216 | "minimum" : 1, | |
7aacca6f DM |
15217 | "description" : "The (unique) ID of the VM.", |
15218 | "type" : "integer" | |
56122987 | 15219 | }, |
7aacca6f DM |
15220 | "cpuunits" : { |
15221 | "minimum" : 0, | |
15222 | "maximum" : 500000, | |
15223 | "default" : 1024, | |
15224 | "type" : "integer", | |
56122987 | 15225 | "optional" : 1, |
7aacca6f | 15226 | "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0." |
56122987 DM |
15227 | }, |
15228 | "tty" : { | |
15229 | "minimum" : 0, | |
56122987 | 15230 | "description" : "Specify the number of tty available to the container", |
7aacca6f DM |
15231 | "default" : 2, |
15232 | "maximum" : 6, | |
56122987 | 15233 | "optional" : 1, |
7aacca6f | 15234 | "type" : "integer" |
56122987 | 15235 | }, |
7aacca6f DM |
15236 | "arch" : { |
15237 | "default" : "amd64", | |
56122987 | 15238 | "type" : "string", |
56122987 | 15239 | "optional" : 1, |
7aacca6f DM |
15240 | "description" : "OS architecture type.", |
15241 | "enum" : [ | |
15242 | "amd64", | |
15243 | "i386" | |
15244 | ] | |
56122987 | 15245 | }, |
7aacca6f DM |
15246 | "ostemplate" : { |
15247 | "maxLength" : 255, | |
15248 | "description" : "The OS template or backup file.", | |
15249 | "type" : "string" | |
56122987 DM |
15250 | }, |
15251 | "force" : { | |
7aacca6f | 15252 | "type" : "boolean", |
56122987 | 15253 | "optional" : 1, |
7aacca6f | 15254 | "description" : "Allow to overwrite existing container." |
56122987 | 15255 | }, |
7aacca6f DM |
15256 | "node" : { |
15257 | "format" : "pve-node", | |
15258 | "type" : "string", | |
15259 | "description" : "The cluster node name." | |
56122987 DM |
15260 | }, |
15261 | "cpulimit" : { | |
56122987 | 15262 | "minimum" : 0, |
7aacca6f | 15263 | "type" : "number", |
56122987 | 15264 | "optional" : 1, |
7aacca6f DM |
15265 | "default" : 0, |
15266 | "maximum" : 128, | |
56122987 DM |
15267 | "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit." |
15268 | }, | |
7aacca6f DM |
15269 | "mp[n]" : { |
15270 | "format" : { | |
15271 | "backup" : { | |
15272 | "optional" : 1, | |
15273 | "type" : "boolean", | |
15274 | "description" : "Whether to include the mountpoint in backups.", | |
15275 | "format_description" : "[1|0]" | |
15276 | }, | |
15277 | "size" : { | |
15278 | "format_description" : "DiskSize", | |
15279 | "format" : "disk-size", | |
15280 | "type" : "string", | |
15281 | "optional" : 1, | |
15282 | "description" : "Volume size (read only value)." | |
15283 | }, | |
15284 | "acl" : { | |
15285 | "description" : "Explicitly enable or disable ACL support.", | |
15286 | "type" : "boolean", | |
15287 | "optional" : 1, | |
15288 | "format_description" : "acl" | |
15289 | }, | |
15290 | "ro" : { | |
15291 | "format_description" : "ro", | |
15292 | "description" : "Read-only mountpoint (not supported with bind mounts)", | |
15293 | "type" : "boolean", | |
15294 | "optional" : 1 | |
15295 | }, | |
15296 | "volume" : { | |
15297 | "format_description" : "volume", | |
15298 | "format" : "pve-lxc-mp-string", | |
15299 | "default_key" : 1, | |
15300 | "description" : "Volume, device or directory to mount into the container.", | |
15301 | "type" : "string" | |
15302 | }, | |
15303 | "quota" : { | |
15304 | "optional" : 1, | |
15305 | "type" : "boolean", | |
15306 | "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", | |
15307 | "format_description" : "[0|1]" | |
15308 | }, | |
15309 | "mp" : { | |
15310 | "type" : "string", | |
15311 | "description" : "Path to the mountpoint as seen from inside the container.", | |
15312 | "format_description" : "Path", | |
15313 | "format" : "pve-lxc-mp-string" | |
15314 | } | |
15315 | }, | |
15316 | "description" : "Use volume as container mount point (experimental feature).", | |
56122987 | 15317 | "type" : "string", |
56122987 DM |
15318 | "optional" : 1 |
15319 | }, | |
7aacca6f | 15320 | "unprivileged" : { |
56122987 | 15321 | "type" : "boolean", |
56122987 | 15322 | "optional" : 1, |
56122987 | 15323 | "default" : 0, |
7aacca6f | 15324 | "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)" |
56122987 DM |
15325 | }, |
15326 | "unused[n]" : { | |
7aacca6f | 15327 | "description" : "Reference to unused volumes.", |
56122987 DM |
15328 | "type" : "string", |
15329 | "optional" : 1, | |
7aacca6f | 15330 | "format" : "pve-volume-id" |
56122987 | 15331 | }, |
7aacca6f DM |
15332 | "swap" : { |
15333 | "description" : "Amount of SWAP for the VM in MB.", | |
15334 | "default" : 512, | |
56122987 | 15335 | "optional" : 1, |
7aacca6f DM |
15336 | "type" : "integer", |
15337 | "minimum" : 0 | |
56122987 DM |
15338 | }, |
15339 | "ostype" : { | |
7aacca6f DM |
15340 | "type" : "string", |
15341 | "optional" : 1, | |
15342 | "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", | |
56122987 DM |
15343 | "enum" : [ |
15344 | "debian", | |
15345 | "ubuntu", | |
15346 | "centos", | |
15347 | "fedora", | |
15348 | "opensuse", | |
15349 | "archlinux", | |
15350 | "alpine", | |
15351 | "unmanaged" | |
7aacca6f | 15352 | ] |
56122987 | 15353 | }, |
7aacca6f DM |
15354 | "memory" : { |
15355 | "description" : "Amount of RAM for the VM in MB.", | |
15356 | "type" : "integer", | |
56122987 | 15357 | "optional" : 1, |
7aacca6f DM |
15358 | "default" : 512, |
15359 | "minimum" : 16 | |
56122987 DM |
15360 | }, |
15361 | "ssh-public-keys" : { | |
7aacca6f | 15362 | "description" : "Setup public SSH keys (one key per line, OpenSSH format).", |
56122987 | 15363 | "optional" : 1, |
7aacca6f | 15364 | "type" : "string" |
56122987 | 15365 | }, |
7aacca6f DM |
15366 | "protection" : { |
15367 | "type" : "boolean", | |
15368 | "optional" : 1, | |
15369 | "default" : 0, | |
15370 | "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation." | |
15371 | }, | |
15372 | "ignore-unpack-errors" : { | |
15373 | "type" : "boolean", | |
56122987 | 15374 | "optional" : 1, |
7aacca6f | 15375 | "description" : "Ignore errors when extracting the template." |
56122987 | 15376 | }, |
7aacca6f DM |
15377 | "template" : { |
15378 | "description" : "Enable/disable Template.", | |
56122987 | 15379 | "optional" : 1, |
56122987 DM |
15380 | "type" : "boolean", |
15381 | "default" : 0 | |
15382 | }, | |
7aacca6f | 15383 | "restore" : { |
56122987 | 15384 | "optional" : 1, |
7aacca6f DM |
15385 | "type" : "boolean", |
15386 | "description" : "Mark this as restore task." | |
15387 | }, | |
15388 | "hostname" : { | |
15389 | "format" : "dns-name", | |
15390 | "maxLength" : 255, | |
15391 | "description" : "Set a host name for the container.", | |
15392 | "optional" : 1, | |
15393 | "type" : "string" | |
15394 | }, | |
15395 | "password" : { | |
15396 | "optional" : 1, | |
15397 | "type" : "string", | |
15398 | "description" : "Sets root password inside container.", | |
15399 | "minLength" : 5 | |
15400 | }, | |
15401 | "searchdomain" : { | |
15402 | "format" : "dns-name-list", | |
15403 | "optional" : 1, | |
15404 | "type" : "string", | |
15405 | "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver." | |
15406 | }, | |
15407 | "nameserver" : { | |
15408 | "format" : "address-list", | |
15409 | "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", | |
56122987 | 15410 | "type" : "string", |
7aacca6f DM |
15411 | "optional" : 1 |
15412 | }, | |
15413 | "net[n]" : { | |
56122987 | 15414 | "format" : { |
7aacca6f DM |
15415 | "gw6" : { |
15416 | "format" : "ipv6", | |
15417 | "format_description" : "GatewayIPv6", | |
15418 | "description" : "Default gateway for IPv6 traffic.", | |
15419 | "type" : "string", | |
15420 | "optional" : 1 | |
56122987 | 15421 | }, |
7aacca6f DM |
15422 | "tag" : { |
15423 | "description" : "VLAN tag for this interface.", | |
15424 | "type" : "integer", | |
56122987 | 15425 | "optional" : 1, |
7aacca6f DM |
15426 | "maximum" : "4094", |
15427 | "format_description" : "VlanNo", | |
15428 | "minimum" : "2" | |
56122987 | 15429 | }, |
7aacca6f | 15430 | "firewall" : { |
56122987 | 15431 | "format_description" : "[1|0]", |
7aacca6f | 15432 | "description" : "Controls whether this interface's firewall rules should be used.", |
56122987 DM |
15433 | "optional" : 1, |
15434 | "type" : "boolean" | |
15435 | }, | |
7aacca6f DM |
15436 | "type" : { |
15437 | "type" : "string", | |
56122987 | 15438 | "optional" : 1, |
7aacca6f DM |
15439 | "description" : "Network interface type.", |
15440 | "enum" : [ | |
15441 | "veth" | |
15442 | ] | |
15443 | }, | |
15444 | "trunks" : { | |
15445 | "format_description" : "vlanid[;vlanid...]", | |
56122987 | 15446 | "type" : "string", |
7aacca6f DM |
15447 | "optional" : 1, |
15448 | "pattern" : "(?^:\\d+(?:;\\d+)*)", | |
15449 | "description" : "VLAN ids to pass through the interface" | |
56122987 | 15450 | }, |
7aacca6f DM |
15451 | "ip" : { |
15452 | "format" : "pve-ipv4-config", | |
15453 | "format_description" : "IPv4Format/CIDR", | |
15454 | "description" : "IPv4 address in CIDR format.", | |
15455 | "type" : "string", | |
15456 | "optional" : 1 | |
15457 | }, | |
15458 | "rate" : { | |
15459 | "description" : "Apply rate limiting to the interface", | |
15460 | "optional" : 1, | |
15461 | "type" : "number", | |
15462 | "format_description" : "mbps" | |
15463 | }, | |
15464 | "ip6" : { | |
15465 | "type" : "string", | |
15466 | "optional" : 1, | |
15467 | "description" : "IPv6 address in CIDR format.", | |
15468 | "format" : "pve-ipv6-config", | |
15469 | "format_description" : "IPv6Format/CIDR" | |
15470 | }, | |
15471 | "gw" : { | |
15472 | "format" : "ipv4", | |
15473 | "format_description" : "GatewayIPv4", | |
15474 | "description" : "Default gateway for IPv4 traffic.", | |
15475 | "optional" : 1, | |
15476 | "type" : "string" | |
15477 | }, | |
15478 | "bridge" : { | |
15479 | "format_description" : "vmbr<Number>", | |
15480 | "optional" : 1, | |
15481 | "type" : "string", | |
15482 | "description" : "Bridge to attach the network device to.", | |
15483 | "pattern" : "[-_.\\w\\d]+" | |
15484 | }, | |
15485 | "name" : { | |
15486 | "type" : "string", | |
15487 | "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", | |
15488 | "pattern" : "[-_.\\w\\d]+", | |
15489 | "format_description" : "String" | |
15490 | }, | |
15491 | "mtu" : { | |
15492 | "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", | |
15493 | "type" : "integer", | |
15494 | "optional" : 1, | |
15495 | "format_description" : "Number", | |
15496 | "minimum" : 64 | |
15497 | }, | |
15498 | "hwaddr" : { | |
15499 | "format_description" : "MAC", | |
15500 | "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", | |
15501 | "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", | |
15502 | "type" : "string", | |
56122987 DM |
15503 | "optional" : 1 |
15504 | } | |
7aacca6f DM |
15505 | }, |
15506 | "description" : "Specifies network interfaces for the container.", | |
15507 | "optional" : 1, | |
15508 | "type" : "string" | |
56122987 | 15509 | } |
7aacca6f | 15510 | } |
56122987 | 15511 | }, |
7aacca6f | 15512 | "protected" : 1, |
56122987 DM |
15513 | "returns" : { |
15514 | "type" : "string" | |
7aacca6f DM |
15515 | }, |
15516 | "permissions" : { | |
15517 | "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore, it is enough if the user has 'VM.Backup' permission and the VM already exists. You also need 'Datastore.AllocateSpace' permissions on the storage.", | |
15518 | "user" : "all" | |
15519 | }, | |
15520 | "proxyto" : "node", | |
15521 | "description" : "Create or restore a container." | |
15522 | }, | |
15523 | "GET" : { | |
15524 | "name" : "vmlist", | |
15525 | "parameters" : { | |
15526 | "additionalProperties" : 0, | |
15527 | "properties" : { | |
15528 | "node" : { | |
15529 | "type" : "string", | |
15530 | "description" : "The cluster node name.", | |
15531 | "format" : "pve-node" | |
15532 | } | |
15533 | } | |
15534 | }, | |
15535 | "protected" : 1, | |
15536 | "method" : "GET", | |
15537 | "permissions" : { | |
15538 | "description" : "Only list CTs where you have VM.Audit permissons on /vms/<vmid>.", | |
15539 | "user" : "all" | |
15540 | }, | |
15541 | "proxyto" : "node", | |
15542 | "description" : "LXC container index (per node).", | |
15543 | "returns" : { | |
15544 | "items" : { | |
15545 | "type" : "object", | |
15546 | "properties" : {} | |
15547 | }, | |
15548 | "links" : [ | |
15549 | { | |
15550 | "rel" : "child", | |
15551 | "href" : "{vmid}" | |
15552 | } | |
15553 | ], | |
15554 | "type" : "array" | |
56122987 DM |
15555 | } |
15556 | } | |
7aacca6f | 15557 | } |
56122987 DM |
15558 | }, |
15559 | { | |
7aacca6f DM |
15560 | "info" : { |
15561 | "GET" : { | |
15562 | "description" : "Directory index.", | |
15563 | "parameters" : { | |
15564 | "properties" : { | |
15565 | "node" : { | |
15566 | "format" : "pve-node", | |
15567 | "type" : "string", | |
15568 | "description" : "The cluster node name." | |
15569 | } | |
15570 | }, | |
15571 | "additionalProperties" : 0 | |
15572 | }, | |
15573 | "permissions" : { | |
15574 | "check" : [ | |
15575 | "perm", | |
15576 | "/", | |
15577 | [ | |
15578 | "Sys.Audit", | |
15579 | "Datastore.Audit" | |
15580 | ], | |
15581 | "any", | |
15582 | 1 | |
15583 | ] | |
15584 | }, | |
15585 | "name" : "index", | |
15586 | "method" : "GET", | |
15587 | "returns" : { | |
15588 | "type" : "array", | |
15589 | "items" : { | |
15590 | "properties" : {}, | |
15591 | "type" : "object" | |
15592 | }, | |
15593 | "links" : [ | |
15594 | { | |
15595 | "href" : "{name}", | |
15596 | "rel" : "child" | |
15597 | } | |
15598 | ] | |
15599 | } | |
15600 | } | |
15601 | }, | |
56122987 DM |
15602 | "children" : [ |
15603 | { | |
7aacca6f DM |
15604 | "info" : { |
15605 | "POST" : { | |
15606 | "name" : "createosd", | |
15607 | "parameters" : { | |
15608 | "additionalProperties" : 0, | |
15609 | "properties" : { | |
15610 | "node" : { | |
15611 | "format" : "pve-node", | |
15612 | "description" : "The cluster node name.", | |
15613 | "type" : "string" | |
15614 | }, | |
15615 | "fstype" : { | |
15616 | "enum" : [ | |
15617 | "xfs", | |
15618 | "ext4", | |
15619 | "btrfs" | |
15620 | ], | |
15621 | "description" : "File system type.", | |
15622 | "type" : "string", | |
15623 | "optional" : 1, | |
15624 | "default" : "xfs" | |
15625 | }, | |
15626 | "journal_dev" : { | |
15627 | "type" : "string", | |
15628 | "optional" : 1, | |
15629 | "description" : "Block device name for journal." | |
15630 | }, | |
15631 | "dev" : { | |
15632 | "description" : "Block device name.", | |
15633 | "type" : "string" | |
15634 | } | |
15635 | } | |
15636 | }, | |
15637 | "proxyto" : "node", | |
15638 | "description" : "Create OSD", | |
15639 | "protected" : 1, | |
15640 | "method" : "POST", | |
15641 | "returns" : { | |
15642 | "type" : "string" | |
15643 | } | |
15644 | }, | |
15645 | "GET" : { | |
15646 | "permissions" : { | |
15647 | "check" : [ | |
15648 | "perm", | |
15649 | "/", | |
15650 | [ | |
15651 | "Sys.Audit", | |
15652 | "Datastore.Audit" | |
15653 | ], | |
15654 | "any", | |
15655 | 1 | |
15656 | ] | |
15657 | }, | |
15658 | "proxyto" : "node", | |
15659 | "description" : "Get Ceph osd list/tree.", | |
15660 | "returns" : { | |
15661 | "type" : "object" | |
15662 | }, | |
15663 | "name" : "index", | |
15664 | "parameters" : { | |
15665 | "properties" : { | |
15666 | "node" : { | |
15667 | "format" : "pve-node", | |
15668 | "description" : "The cluster node name.", | |
15669 | "type" : "string" | |
15670 | } | |
15671 | }, | |
15672 | "additionalProperties" : 0 | |
15673 | }, | |
15674 | "protected" : 1, | |
15675 | "method" : "GET" | |
15676 | } | |
15677 | }, | |
56122987 DM |
15678 | "children" : [ |
15679 | { | |
56122987 | 15680 | "leaf" : 0, |
7aacca6f DM |
15681 | "path" : "/nodes/{node}/ceph/osd/{osdid}", |
15682 | "info" : { | |
15683 | "DELETE" : { | |
15684 | "name" : "destroyosd", | |
15685 | "parameters" : { | |
15686 | "additionalProperties" : 0, | |
15687 | "properties" : { | |
15688 | "osdid" : { | |
15689 | "type" : "integer", | |
15690 | "description" : "OSD ID" | |
56122987 | 15691 | }, |
7aacca6f DM |
15692 | "cleanup" : { |
15693 | "description" : "If set, we remove partition table entries.", | |
15694 | "optional" : 1, | |
15695 | "type" : "boolean", | |
15696 | "default" : 0 | |
56122987 | 15697 | }, |
7aacca6f DM |
15698 | "node" : { |
15699 | "format" : "pve-node", | |
15700 | "type" : "string", | |
15701 | "description" : "The cluster node name." | |
15702 | } | |
15703 | } | |
15704 | }, | |
15705 | "protected" : 1, | |
15706 | "description" : "Destroy OSD", | |
15707 | "proxyto" : "node", | |
15708 | "method" : "DELETE", | |
15709 | "returns" : { | |
15710 | "type" : "string" | |
15711 | } | |
15712 | } | |
15713 | }, | |
15714 | "children" : [ | |
15715 | { | |
15716 | "text" : "in", | |
15717 | "info" : { | |
15718 | "POST" : { | |
56122987 DM |
15719 | "permissions" : { |
15720 | "check" : [ | |
15721 | "perm", | |
15722 | "/", | |
15723 | [ | |
15724 | "Sys.Modify" | |
15725 | ] | |
15726 | ] | |
7aacca6f DM |
15727 | }, |
15728 | "description" : "ceph osd in", | |
15729 | "proxyto" : "node", | |
15730 | "returns" : { | |
15731 | "type" : "null" | |
15732 | }, | |
15733 | "name" : "in", | |
15734 | "parameters" : { | |
15735 | "properties" : { | |
15736 | "osdid" : { | |
15737 | "type" : "integer", | |
15738 | "description" : "OSD ID" | |
15739 | }, | |
15740 | "node" : { | |
15741 | "format" : "pve-node", | |
15742 | "description" : "The cluster node name.", | |
15743 | "type" : "string" | |
15744 | } | |
15745 | }, | |
15746 | "additionalProperties" : 0 | |
15747 | }, | |
15748 | "protected" : 1, | |
15749 | "method" : "POST" | |
56122987 DM |
15750 | } |
15751 | }, | |
7aacca6f DM |
15752 | "path" : "/nodes/{node}/ceph/osd/{osdid}/in", |
15753 | "leaf" : 1 | |
56122987 DM |
15754 | }, |
15755 | { | |
56122987 | 15756 | "leaf" : 1, |
7aacca6f | 15757 | "path" : "/nodes/{node}/ceph/osd/{osdid}/out", |
56122987 DM |
15758 | "info" : { |
15759 | "POST" : { | |
56122987 DM |
15760 | "permissions" : { |
15761 | "check" : [ | |
15762 | "perm", | |
15763 | "/", | |
15764 | [ | |
15765 | "Sys.Modify" | |
15766 | ] | |
15767 | ] | |
15768 | }, | |
56122987 | 15769 | "proxyto" : "node", |
7aacca6f DM |
15770 | "description" : "ceph osd out", |
15771 | "returns" : { | |
15772 | "type" : "null" | |
15773 | }, | |
56122987 DM |
15774 | "parameters" : { |
15775 | "properties" : { | |
56122987 DM |
15776 | "node" : { |
15777 | "format" : "pve-node", | |
15778 | "type" : "string", | |
15779 | "description" : "The cluster node name." | |
7aacca6f DM |
15780 | }, |
15781 | "osdid" : { | |
15782 | "type" : "integer", | |
15783 | "description" : "OSD ID" | |
56122987 DM |
15784 | } |
15785 | }, | |
15786 | "additionalProperties" : 0 | |
56122987 | 15787 | }, |
7aacca6f DM |
15788 | "name" : "out", |
15789 | "protected" : 1, | |
15790 | "method" : "POST" | |
56122987 DM |
15791 | } |
15792 | }, | |
7aacca6f | 15793 | "text" : "out" |
56122987 | 15794 | } |
7aacca6f DM |
15795 | ], |
15796 | "text" : "{osdid}" | |
56122987 DM |
15797 | } |
15798 | ], | |
7aacca6f DM |
15799 | "text" : "osd", |
15800 | "leaf" : 0, | |
15801 | "path" : "/nodes/{node}/ceph/osd" | |
15802 | }, | |
15803 | { | |
15804 | "path" : "/nodes/{node}/ceph/disks", | |
15805 | "leaf" : 1, | |
15806 | "text" : "disks", | |
56122987 DM |
15807 | "info" : { |
15808 | "GET" : { | |
56122987 | 15809 | "proxyto" : "node", |
7aacca6f | 15810 | "description" : "List local disks.", |
56122987 DM |
15811 | "permissions" : { |
15812 | "check" : [ | |
15813 | "perm", | |
15814 | "/", | |
15815 | [ | |
15816 | "Sys.Audit", | |
15817 | "Datastore.Audit" | |
15818 | ], | |
15819 | "any", | |
15820 | 1 | |
15821 | ] | |
7aacca6f | 15822 | }, |
56122987 | 15823 | "returns" : { |
7aacca6f DM |
15824 | "type" : "array", |
15825 | "items" : { | |
15826 | "properties" : { | |
15827 | "vendor" : { | |
15828 | "type" : "string", | |
15829 | "optional" : 1 | |
15830 | }, | |
15831 | "osdid" : { | |
15832 | "type" : "integer" | |
15833 | }, | |
15834 | "serial" : { | |
15835 | "type" : "string", | |
15836 | "optional" : 1 | |
15837 | }, | |
15838 | "model" : { | |
15839 | "type" : "string", | |
15840 | "optional" : 1 | |
15841 | }, | |
15842 | "used" : { | |
15843 | "optional" : 1, | |
15844 | "type" : "string" | |
15845 | }, | |
15846 | "size" : { | |
15847 | "type" : "integer" | |
15848 | }, | |
15849 | "dev" : { | |
15850 | "type" : "string" | |
15851 | }, | |
15852 | "gpt" : { | |
15853 | "type" : "boolean" | |
15854 | } | |
15855 | }, | |
15856 | "type" : "object" | |
15857 | } | |
56122987 | 15858 | }, |
7aacca6f DM |
15859 | "protected" : 1, |
15860 | "name" : "disks", | |
56122987 DM |
15861 | "parameters" : { |
15862 | "additionalProperties" : 0, | |
15863 | "properties" : { | |
56122987 | 15864 | "node" : { |
56122987 | 15865 | "type" : "string", |
7aacca6f DM |
15866 | "description" : "The cluster node name.", |
15867 | "format" : "pve-node" | |
56122987 | 15868 | }, |
7aacca6f | 15869 | "type" : { |
56122987 | 15870 | "optional" : 1, |
7aacca6f DM |
15871 | "type" : "string", |
15872 | "description" : "Only list specific types of disks.", | |
15873 | "enum" : [ | |
15874 | "unused", | |
15875 | "journal_disks" | |
15876 | ] | |
56122987 DM |
15877 | } |
15878 | } | |
15879 | }, | |
7aacca6f | 15880 | "method" : "GET" |
56122987 DM |
15881 | } |
15882 | } | |
15883 | }, | |
15884 | { | |
7aacca6f DM |
15885 | "path" : "/nodes/{node}/ceph/config", |
15886 | "leaf" : 1, | |
15887 | "text" : "config", | |
56122987 DM |
15888 | "info" : { |
15889 | "GET" : { | |
7aacca6f DM |
15890 | "method" : "GET", |
15891 | "returns" : { | |
15892 | "type" : "string" | |
15893 | }, | |
15894 | "description" : "Get Ceph configuration.", | |
56122987 | 15895 | "parameters" : { |
7aacca6f | 15896 | "additionalProperties" : 0, |
56122987 | 15897 | "properties" : { |
56122987 | 15898 | "node" : { |
56122987 | 15899 | "format" : "pve-node", |
7aacca6f | 15900 | "description" : "The cluster node name.", |
56122987 DM |
15901 | "type" : "string" |
15902 | } | |
7aacca6f | 15903 | } |
56122987 | 15904 | }, |
7aacca6f | 15905 | "name" : "config", |
56122987 DM |
15906 | "permissions" : { |
15907 | "check" : [ | |
15908 | "perm", | |
15909 | "/", | |
15910 | [ | |
15911 | "Sys.Audit", | |
15912 | "Datastore.Audit" | |
15913 | ], | |
15914 | "any", | |
15915 | 1 | |
15916 | ] | |
7aacca6f DM |
15917 | } |
15918 | } | |
15919 | } | |
15920 | }, | |
15921 | { | |
15922 | "path" : "/nodes/{node}/ceph/mon", | |
15923 | "leaf" : 0, | |
15924 | "text" : "mon", | |
15925 | "children" : [ | |
15926 | { | |
15927 | "path" : "/nodes/{node}/ceph/mon/{monid}", | |
15928 | "leaf" : 1, | |
15929 | "text" : "{monid}", | |
15930 | "info" : { | |
15931 | "DELETE" : { | |
15932 | "proxyto" : "node", | |
15933 | "description" : "Destroy Ceph monitor.", | |
15934 | "permissions" : { | |
15935 | "check" : [ | |
15936 | "perm", | |
15937 | "/", | |
15938 | [ | |
15939 | "Sys.Modify" | |
15940 | ] | |
15941 | ] | |
15942 | }, | |
15943 | "returns" : { | |
15944 | "type" : "string" | |
15945 | }, | |
15946 | "protected" : 1, | |
15947 | "parameters" : { | |
15948 | "additionalProperties" : 0, | |
15949 | "properties" : { | |
15950 | "node" : { | |
15951 | "type" : "string", | |
15952 | "description" : "The cluster node name.", | |
15953 | "format" : "pve-node" | |
15954 | }, | |
15955 | "monid" : { | |
15956 | "description" : "Monitor ID", | |
15957 | "type" : "integer" | |
15958 | } | |
15959 | } | |
15960 | }, | |
15961 | "name" : "destroymon", | |
15962 | "method" : "DELETE" | |
15963 | } | |
15964 | } | |
15965 | } | |
15966 | ], | |
15967 | "info" : { | |
15968 | "GET" : { | |
15969 | "method" : "GET", | |
15970 | "parameters" : { | |
15971 | "additionalProperties" : 0, | |
15972 | "properties" : { | |
15973 | "node" : { | |
15974 | "type" : "string", | |
15975 | "description" : "The cluster node name.", | |
15976 | "format" : "pve-node" | |
15977 | } | |
15978 | } | |
15979 | }, | |
15980 | "name" : "listmon", | |
15981 | "protected" : 1, | |
15982 | "returns" : { | |
15983 | "items" : { | |
15984 | "properties" : { | |
15985 | "name" : { | |
15986 | "type" : "string" | |
56122987 | 15987 | }, |
7aacca6f | 15988 | "addr" : { |
56122987 DM |
15989 | "type" : "string" |
15990 | } | |
7aacca6f DM |
15991 | }, |
15992 | "type" : "object" | |
56122987 | 15993 | }, |
7aacca6f DM |
15994 | "links" : [ |
15995 | { | |
15996 | "href" : "{name}", | |
15997 | "rel" : "child" | |
15998 | } | |
15999 | ], | |
56122987 DM |
16000 | "type" : "array" |
16001 | }, | |
56122987 DM |
16002 | "permissions" : { |
16003 | "check" : [ | |
16004 | "perm", | |
16005 | "/", | |
16006 | [ | |
16007 | "Sys.Audit", | |
16008 | "Datastore.Audit" | |
16009 | ], | |
16010 | "any", | |
16011 | 1 | |
16012 | ] | |
16013 | }, | |
7aacca6f DM |
16014 | "description" : "Get Ceph monitor list.", |
16015 | "proxyto" : "node" | |
16016 | }, | |
16017 | "POST" : { | |
16018 | "permissions" : { | |
16019 | "check" : [ | |
16020 | "perm", | |
16021 | "/", | |
16022 | [ | |
16023 | "Sys.Modify" | |
16024 | ] | |
16025 | ] | |
16026 | }, | |
16027 | "description" : "Create Ceph Monitor", | |
16028 | "proxyto" : "node", | |
56122987 DM |
16029 | "returns" : { |
16030 | "type" : "string" | |
16031 | }, | |
16032 | "parameters" : { | |
16033 | "properties" : { | |
16034 | "node" : { | |
56122987 | 16035 | "format" : "pve-node", |
7aacca6f DM |
16036 | "type" : "string", |
16037 | "description" : "The cluster node name." | |
56122987 DM |
16038 | } |
16039 | }, | |
16040 | "additionalProperties" : 0 | |
16041 | }, | |
7aacca6f DM |
16042 | "name" : "createmon", |
16043 | "protected" : 1, | |
16044 | "method" : "POST" | |
56122987 | 16045 | } |
7aacca6f | 16046 | } |
56122987 DM |
16047 | }, |
16048 | { | |
16049 | "info" : { | |
16050 | "POST" : { | |
7aacca6f DM |
16051 | "returns" : { |
16052 | "type" : "null" | |
16053 | }, | |
16054 | "proxyto" : "node", | |
16055 | "description" : "Create initial ceph default configuration and setup symlinks.", | |
56122987 DM |
16056 | "permissions" : { |
16057 | "check" : [ | |
16058 | "perm", | |
16059 | "/", | |
16060 | [ | |
16061 | "Sys.Modify" | |
16062 | ] | |
16063 | ] | |
16064 | }, | |
7aacca6f DM |
16065 | "method" : "POST", |
16066 | "protected" : 1, | |
16067 | "name" : "init", | |
56122987 DM |
16068 | "parameters" : { |
16069 | "properties" : { | |
7aacca6f DM |
16070 | "pg_bits" : { |
16071 | "description" : "Placement group bits, used to specify the default number of placement groups.\n\nNOTE: 'osd pool default pg num' does not work for default pools.", | |
16072 | "default" : 6, | |
16073 | "maximum" : 14, | |
16074 | "optional" : 1, | |
16075 | "type" : "integer", | |
16076 | "minimum" : 6 | |
16077 | }, | |
16078 | "size" : { | |
16079 | "minimum" : 1, | |
16080 | "maximum" : 3, | |
16081 | "default" : 2, | |
16082 | "type" : "integer", | |
16083 | "optional" : 1, | |
16084 | "description" : "Number of replicas per object" | |
16085 | }, | |
56122987 DM |
16086 | "node" : { |
16087 | "description" : "The cluster node name.", | |
7aacca6f DM |
16088 | "type" : "string", |
16089 | "format" : "pve-node" | |
16090 | }, | |
16091 | "network" : { | |
16092 | "optional" : 1, | |
16093 | "type" : "string", | |
16094 | "description" : "Use specific network for all ceph related traffic", | |
16095 | "format" : "CIDR", | |
16096 | "maxLength" : 128 | |
16097 | } | |
16098 | }, | |
16099 | "additionalProperties" : 0 | |
16100 | } | |
16101 | } | |
16102 | }, | |
16103 | "text" : "init", | |
16104 | "leaf" : 1, | |
16105 | "path" : "/nodes/{node}/ceph/init" | |
16106 | }, | |
16107 | { | |
16108 | "path" : "/nodes/{node}/ceph/stop", | |
16109 | "leaf" : 1, | |
16110 | "text" : "stop", | |
16111 | "info" : { | |
16112 | "POST" : { | |
16113 | "method" : "POST", | |
16114 | "name" : "stop", | |
16115 | "parameters" : { | |
16116 | "properties" : { | |
16117 | "node" : { | |
56122987 | 16118 | "format" : "pve-node", |
7aacca6f | 16119 | "description" : "The cluster node name.", |
56122987 | 16120 | "type" : "string" |
7aacca6f DM |
16121 | }, |
16122 | "service" : { | |
16123 | "type" : "string", | |
16124 | "optional" : 1, | |
16125 | "description" : "Ceph service name.", | |
16126 | "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}" | |
56122987 DM |
16127 | } |
16128 | }, | |
16129 | "additionalProperties" : 0 | |
16130 | }, | |
7aacca6f | 16131 | "protected" : 1, |
56122987 DM |
16132 | "returns" : { |
16133 | "type" : "string" | |
7aacca6f DM |
16134 | }, |
16135 | "permissions" : { | |
16136 | "check" : [ | |
16137 | "perm", | |
16138 | "/", | |
16139 | [ | |
16140 | "Sys.Modify" | |
16141 | ] | |
16142 | ] | |
16143 | }, | |
16144 | "description" : "Stop ceph services.", | |
16145 | "proxyto" : "node" | |
16146 | } | |
16147 | } | |
16148 | }, | |
16149 | { | |
16150 | "path" : "/nodes/{node}/ceph/start", | |
16151 | "leaf" : 1, | |
16152 | "text" : "start", | |
16153 | "info" : { | |
16154 | "POST" : { | |
16155 | "permissions" : { | |
16156 | "check" : [ | |
16157 | "perm", | |
16158 | "/", | |
16159 | [ | |
16160 | "Sys.Modify" | |
16161 | ] | |
16162 | ] | |
16163 | }, | |
56122987 | 16164 | "proxyto" : "node", |
7aacca6f DM |
16165 | "description" : "Start ceph services.", |
16166 | "returns" : { | |
16167 | "type" : "string" | |
16168 | }, | |
16169 | "name" : "start", | |
56122987 DM |
16170 | "parameters" : { |
16171 | "additionalProperties" : 0, | |
16172 | "properties" : { | |
16173 | "node" : { | |
16174 | "format" : "pve-node", | |
7aacca6f DM |
16175 | "description" : "The cluster node name.", |
16176 | "type" : "string" | |
16177 | }, | |
16178 | "service" : { | |
16179 | "description" : "Ceph service name.", | |
16180 | "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}", | |
56122987 | 16181 | "type" : "string", |
7aacca6f DM |
16182 | "optional" : 1 |
16183 | } | |
16184 | } | |
16185 | }, | |
16186 | "protected" : 1, | |
16187 | "method" : "POST" | |
16188 | } | |
16189 | } | |
16190 | }, | |
16191 | { | |
16192 | "text" : "status", | |
16193 | "info" : { | |
16194 | "GET" : { | |
16195 | "protected" : 1, | |
16196 | "parameters" : { | |
16197 | "additionalProperties" : 0, | |
16198 | "properties" : { | |
16199 | "node" : { | |
16200 | "format" : "pve-node", | |
16201 | "description" : "The cluster node name.", | |
16202 | "type" : "string" | |
56122987 DM |
16203 | } |
16204 | } | |
16205 | }, | |
7aacca6f DM |
16206 | "name" : "status", |
16207 | "method" : "GET", | |
16208 | "description" : "Get ceph status.", | |
16209 | "proxyto" : "node", | |
56122987 DM |
16210 | "permissions" : { |
16211 | "check" : [ | |
16212 | "perm", | |
16213 | "/", | |
16214 | [ | |
16215 | "Sys.Audit", | |
16216 | "Datastore.Audit" | |
16217 | ], | |
16218 | "any", | |
16219 | 1 | |
16220 | ] | |
16221 | }, | |
56122987 | 16222 | "returns" : { |
7aacca6f DM |
16223 | "type" : "object" |
16224 | } | |
16225 | } | |
16226 | }, | |
16227 | "path" : "/nodes/{node}/ceph/status", | |
16228 | "leaf" : 1 | |
16229 | }, | |
16230 | { | |
16231 | "info" : { | |
16232 | "GET" : { | |
16233 | "protected" : 1, | |
16234 | "parameters" : { | |
16235 | "additionalProperties" : 0, | |
16236 | "properties" : { | |
16237 | "node" : { | |
16238 | "type" : "string", | |
16239 | "description" : "The cluster node name.", | |
16240 | "format" : "pve-node" | |
16241 | } | |
16242 | } | |
16243 | }, | |
16244 | "name" : "lspools", | |
16245 | "method" : "GET", | |
16246 | "proxyto" : "node", | |
16247 | "description" : "List all pools.", | |
16248 | "permissions" : { | |
16249 | "check" : [ | |
16250 | "perm", | |
16251 | "/", | |
16252 | [ | |
16253 | "Sys.Audit", | |
16254 | "Datastore.Audit" | |
16255 | ], | |
16256 | "any", | |
16257 | 1 | |
16258 | ] | |
16259 | }, | |
16260 | "returns" : { | |
16261 | "links" : [ | |
16262 | { | |
16263 | "rel" : "child", | |
16264 | "href" : "{pool_name}" | |
56122987 DM |
16265 | } |
16266 | ], | |
56122987 DM |
16267 | "items" : { |
16268 | "type" : "object", | |
16269 | "properties" : { | |
7aacca6f | 16270 | "pool_name" : { |
56122987 DM |
16271 | "type" : "string" |
16272 | }, | |
7aacca6f DM |
16273 | "pool" : { |
16274 | "type" : "integer" | |
16275 | }, | |
16276 | "size" : { | |
16277 | "type" : "integer" | |
56122987 DM |
16278 | } |
16279 | } | |
7aacca6f DM |
16280 | }, |
16281 | "type" : "array" | |
16282 | } | |
16283 | }, | |
16284 | "POST" : { | |
16285 | "returns" : { | |
16286 | "type" : "null" | |
56122987 | 16287 | }, |
7aacca6f DM |
16288 | "proxyto" : "node", |
16289 | "description" : "Create POOL", | |
16290 | "permissions" : { | |
16291 | "check" : [ | |
16292 | "perm", | |
16293 | "/", | |
16294 | [ | |
16295 | "Sys.Modify" | |
16296 | ] | |
16297 | ] | |
16298 | }, | |
16299 | "method" : "POST", | |
16300 | "protected" : 1, | |
16301 | "name" : "createpool", | |
16302 | "parameters" : { | |
16303 | "additionalProperties" : 0, | |
16304 | "properties" : { | |
16305 | "size" : { | |
16306 | "maximum" : 3, | |
16307 | "default" : 2, | |
16308 | "optional" : 1, | |
16309 | "type" : "integer", | |
16310 | "description" : "Number of replicas per object", | |
16311 | "minimum" : 1 | |
16312 | }, | |
16313 | "node" : { | |
16314 | "format" : "pve-node", | |
16315 | "type" : "string", | |
16316 | "description" : "The cluster node name." | |
16317 | }, | |
16318 | "name" : { | |
16319 | "description" : "The name of the pool. It must be unique.", | |
16320 | "type" : "string" | |
16321 | }, | |
16322 | "crush_ruleset" : { | |
16323 | "minimum" : 0, | |
16324 | "optional" : 1, | |
16325 | "type" : "integer", | |
16326 | "default" : 0, | |
16327 | "maximum" : 32768, | |
16328 | "description" : "The ruleset to use for mapping object placement in the cluster." | |
16329 | }, | |
16330 | "pg_num" : { | |
16331 | "optional" : 1, | |
16332 | "type" : "integer", | |
16333 | "maximum" : 32768, | |
16334 | "default" : 64, | |
16335 | "description" : "Number of placement groups.", | |
16336 | "minimum" : 8 | |
16337 | }, | |
16338 | "min_size" : { | |
16339 | "optional" : 1, | |
16340 | "type" : "integer", | |
16341 | "maximum" : 3, | |
16342 | "default" : 1, | |
16343 | "description" : "Minimum number of replicas per object", | |
16344 | "minimum" : 1 | |
16345 | } | |
16346 | } | |
16347 | } | |
56122987 DM |
16348 | } |
16349 | }, | |
16350 | "children" : [ | |
16351 | { | |
7aacca6f DM |
16352 | "path" : "/nodes/{node}/ceph/pools/{name}", |
16353 | "leaf" : 1, | |
16354 | "text" : "{name}", | |
56122987 DM |
16355 | "info" : { |
16356 | "DELETE" : { | |
7aacca6f | 16357 | "method" : "DELETE", |
56122987 | 16358 | "protected" : 1, |
56122987 | 16359 | "parameters" : { |
56122987 DM |
16360 | "properties" : { |
16361 | "node" : { | |
16362 | "format" : "pve-node", | |
7aacca6f DM |
16363 | "description" : "The cluster node name.", |
16364 | "type" : "string" | |
56122987 | 16365 | }, |
7aacca6f DM |
16366 | "name" : { |
16367 | "type" : "string", | |
16368 | "description" : "The name of the pool. It must be unique." | |
56122987 | 16369 | } |
7aacca6f DM |
16370 | }, |
16371 | "additionalProperties" : 0 | |
56122987 | 16372 | }, |
7aacca6f | 16373 | "name" : "destroypool", |
56122987 | 16374 | "returns" : { |
7aacca6f DM |
16375 | "type" : "null" |
16376 | }, | |
16377 | "proxyto" : "node", | |
16378 | "description" : "Destroy pool", | |
16379 | "permissions" : { | |
16380 | "check" : [ | |
16381 | "perm", | |
16382 | "/", | |
16383 | [ | |
16384 | "Sys.Modify" | |
16385 | ] | |
16386 | ] | |
56122987 DM |
16387 | } |
16388 | } | |
7aacca6f | 16389 | } |
56122987 DM |
16390 | } |
16391 | ], | |
7aacca6f | 16392 | "text" : "pools", |
56122987 | 16393 | "leaf" : 0, |
7aacca6f | 16394 | "path" : "/nodes/{node}/ceph/pools" |
56122987 DM |
16395 | }, |
16396 | { | |
56122987 | 16397 | "leaf" : 1, |
7aacca6f | 16398 | "path" : "/nodes/{node}/ceph/crush", |
56122987 | 16399 | "info" : { |
7aacca6f DM |
16400 | "GET" : { |
16401 | "permissions" : { | |
16402 | "check" : [ | |
16403 | "perm", | |
16404 | "/", | |
16405 | [ | |
16406 | "Sys.Audit", | |
16407 | "Datastore.Audit" | |
16408 | ], | |
16409 | "any", | |
16410 | 1 | |
16411 | ] | |
16412 | }, | |
16413 | "description" : "Get OSD crush map", | |
16414 | "proxyto" : "node", | |
56122987 | 16415 | "returns" : { |
7aacca6f | 16416 | "type" : "string" |
56122987 | 16417 | }, |
56122987 DM |
16418 | "parameters" : { |
16419 | "properties" : { | |
16420 | "node" : { | |
56122987 | 16421 | "format" : "pve-node", |
7aacca6f | 16422 | "description" : "The cluster node name.", |
56122987 DM |
16423 | "type" : "string" |
16424 | } | |
16425 | }, | |
16426 | "additionalProperties" : 0 | |
16427 | }, | |
7aacca6f | 16428 | "name" : "crush", |
56122987 | 16429 | "protected" : 1, |
7aacca6f | 16430 | "method" : "GET" |
56122987 DM |
16431 | } |
16432 | }, | |
7aacca6f | 16433 | "text" : "crush" |
56122987 DM |
16434 | }, |
16435 | { | |
56122987 | 16436 | "info" : { |
7aacca6f | 16437 | "GET" : { |
56122987 | 16438 | "returns" : { |
7aacca6f DM |
16439 | "type" : "array", |
16440 | "items" : { | |
16441 | "properties" : { | |
16442 | "t" : { | |
16443 | "type" : "string", | |
16444 | "description" : "Line text" | |
16445 | }, | |
16446 | "n" : { | |
16447 | "type" : "integer", | |
16448 | "description" : "Line number" | |
16449 | } | |
16450 | }, | |
16451 | "type" : "object" | |
16452 | } | |
56122987 | 16453 | }, |
7aacca6f DM |
16454 | "description" : "Read ceph log", |
16455 | "proxyto" : "node", | |
56122987 DM |
16456 | "permissions" : { |
16457 | "check" : [ | |
16458 | "perm", | |
7aacca6f | 16459 | "/nodes/{node}", |
56122987 | 16460 | [ |
7aacca6f | 16461 | "Sys.Syslog" |
56122987 DM |
16462 | ] |
16463 | ] | |
16464 | }, | |
7aacca6f DM |
16465 | "method" : "GET", |
16466 | "protected" : 1, | |
16467 | "name" : "log", | |
16468 | "parameters" : { | |
16469 | "properties" : { | |
16470 | "start" : { | |
16471 | "minimum" : 0, | |
16472 | "type" : "integer", | |
16473 | "optional" : 1 | |
16474 | }, | |
56122987 DM |
16475 | "node" : { |
16476 | "description" : "The cluster node name.", | |
16477 | "type" : "string", | |
16478 | "format" : "pve-node" | |
16479 | }, | |
7aacca6f DM |
16480 | "limit" : { |
16481 | "type" : "integer", | |
56122987 | 16482 | "optional" : 1, |
7aacca6f | 16483 | "minimum" : 0 |
56122987 DM |
16484 | } |
16485 | }, | |
16486 | "additionalProperties" : 0 | |
7aacca6f | 16487 | } |
56122987 DM |
16488 | } |
16489 | }, | |
7aacca6f | 16490 | "text" : "log", |
56122987 | 16491 | "leaf" : 1, |
7aacca6f DM |
16492 | "path" : "/nodes/{node}/ceph/log" |
16493 | } | |
16494 | ], | |
16495 | "text" : "ceph", | |
16496 | "leaf" : 0, | |
16497 | "path" : "/nodes/{node}/ceph" | |
16498 | }, | |
16499 | { | |
16500 | "text" : "vzdump", | |
16501 | "info" : { | |
16502 | "POST" : { | |
16503 | "permissions" : { | |
16504 | "user" : "all", | |
16505 | "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage." | |
16506 | }, | |
16507 | "description" : "Create backup.", | |
16508 | "proxyto" : "node", | |
16509 | "returns" : { | |
16510 | "type" : "string" | |
16511 | }, | |
16512 | "name" : "vzdump", | |
16513 | "parameters" : { | |
16514 | "properties" : { | |
16515 | "exclude" : { | |
16516 | "format" : "pve-vmid-list", | |
16517 | "description" : "Exclude specified guest systems (assumes --all)", | |
16518 | "type" : "string", | |
16519 | "optional" : 1 | |
56122987 | 16520 | }, |
7aacca6f DM |
16521 | "node" : { |
16522 | "format" : "pve-node", | |
16523 | "type" : "string", | |
16524 | "optional" : 1, | |
16525 | "description" : "Only run if executed on this node." | |
56122987 | 16526 | }, |
7aacca6f DM |
16527 | "size" : { |
16528 | "description" : "Unused, will be removed in a future release.", | |
16529 | "type" : "integer", | |
16530 | "optional" : 1, | |
16531 | "default" : 1024, | |
16532 | "minimum" : 500 | |
56122987 | 16533 | }, |
7aacca6f DM |
16534 | "pigz" : { |
16535 | "type" : "integer", | |
16536 | "optional" : 1, | |
16537 | "default" : 0, | |
16538 | "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." | |
56122987 | 16539 | }, |
7aacca6f DM |
16540 | "storage" : { |
16541 | "format" : "pve-storage-id", | |
16542 | "description" : "Store resulting file to this storage.", | |
16543 | "type" : "string", | |
16544 | "optional" : 1 | |
56122987 | 16545 | }, |
7aacca6f DM |
16546 | "stdexcludes" : { |
16547 | "default" : 1, | |
16548 | "type" : "boolean", | |
16549 | "optional" : 1, | |
16550 | "description" : "Exclude temporary files and logs." | |
56122987 | 16551 | }, |
7aacca6f DM |
16552 | "exclude-path" : { |
16553 | "format" : "string-alist", | |
16554 | "type" : "string", | |
16555 | "optional" : 1, | |
16556 | "description" : "Exclude certain files/directories (shell globs)." | |
56122987 | 16557 | }, |
7aacca6f DM |
16558 | "quiet" : { |
16559 | "description" : "Be quiet.", | |
16560 | "optional" : 1, | |
16561 | "type" : "boolean", | |
16562 | "default" : 0 | |
16563 | }, | |
16564 | "stopwait" : { | |
16565 | "optional" : 1, | |
16566 | "type" : "integer", | |
16567 | "default" : 10, | |
16568 | "description" : "Maximal time to wait until a guest system is stopped (minutes).", | |
16569 | "minimum" : 0 | |
16570 | }, | |
16571 | "remove" : { | |
16572 | "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", | |
16573 | "type" : "boolean", | |
16574 | "optional" : 1, | |
16575 | "default" : 1 | |
16576 | }, | |
16577 | "stdout" : { | |
16578 | "description" : "Write tar to stdout, not to a file.", | |
16579 | "type" : "boolean", | |
16580 | "optional" : 1 | |
16581 | }, | |
16582 | "all" : { | |
16583 | "default" : 0, | |
16584 | "type" : "boolean", | |
16585 | "optional" : 1, | |
16586 | "description" : "Backup all known guest systems on this host." | |
16587 | }, | |
16588 | "mailnotification" : { | |
16589 | "description" : "Specify when to send an email", | |
16590 | "enum" : [ | |
16591 | "always", | |
16592 | "failure" | |
16593 | ], | |
16594 | "default" : "always", | |
16595 | "type" : "string", | |
16596 | "optional" : 1 | |
16597 | }, | |
16598 | "lockwait" : { | |
16599 | "minimum" : 0, | |
16600 | "type" : "integer", | |
16601 | "optional" : 1, | |
16602 | "default" : 180, | |
16603 | "description" : "Maximal time to wait for the global lock (minutes)." | |
16604 | }, | |
16605 | "script" : { | |
16606 | "type" : "string", | |
16607 | "optional" : 1, | |
16608 | "description" : "Use specified hook script." | |
16609 | }, | |
16610 | "dumpdir" : { | |
16611 | "type" : "string", | |
16612 | "optional" : 1, | |
16613 | "description" : "Store resulting files to specified directory." | |
16614 | }, | |
16615 | "mailto" : { | |
16616 | "optional" : 1, | |
16617 | "type" : "string", | |
16618 | "description" : "Comma-separated list of email addresses that should receive email notifications.", | |
16619 | "format" : "string-list" | |
16620 | }, | |
16621 | "compress" : { | |
16622 | "default" : "0", | |
16623 | "type" : "string", | |
16624 | "optional" : 1, | |
16625 | "description" : "Compress dump file.", | |
16626 | "enum" : [ | |
16627 | "0", | |
16628 | "1", | |
16629 | "gzip", | |
16630 | "lzo" | |
56122987 DM |
16631 | ] |
16632 | }, | |
7aacca6f DM |
16633 | "tmpdir" : { |
16634 | "optional" : 1, | |
16635 | "type" : "string", | |
16636 | "description" : "Store temporary files to specified directory." | |
56122987 | 16637 | }, |
7aacca6f DM |
16638 | "mode" : { |
16639 | "description" : "Backup mode.", | |
16640 | "enum" : [ | |
16641 | "snapshot", | |
16642 | "suspend", | |
16643 | "stop" | |
16644 | ], | |
16645 | "default" : "snapshot", | |
16646 | "type" : "string", | |
16647 | "optional" : 1 | |
16648 | }, | |
16649 | "maxfiles" : { | |
16650 | "default" : 1, | |
16651 | "optional" : 1, | |
16652 | "type" : "integer", | |
16653 | "description" : "Maximal number of backup files per guest system.", | |
16654 | "minimum" : 1 | |
16655 | }, | |
16656 | "stop" : { | |
16657 | "type" : "boolean", | |
16658 | "optional" : 1, | |
16659 | "default" : 0, | |
16660 | "description" : "Stop runnig backup jobs on this host." | |
16661 | }, | |
16662 | "ionice" : { | |
16663 | "minimum" : 0, | |
16664 | "optional" : 1, | |
16665 | "type" : "integer", | |
16666 | "default" : 7, | |
16667 | "maximum" : 8, | |
16668 | "description" : "Set CFQ ionice priority." | |
16669 | }, | |
16670 | "bwlimit" : { | |
16671 | "optional" : 1, | |
16672 | "type" : "integer", | |
16673 | "default" : 0, | |
16674 | "description" : "Limit I/O bandwidth (KBytes per second).", | |
16675 | "minimum" : 0 | |
16676 | }, | |
16677 | "vmid" : { | |
16678 | "format" : "pve-vmid-list", | |
16679 | "description" : "The ID of the guest system you want to backup.", | |
16680 | "optional" : 1, | |
16681 | "type" : "string" | |
16682 | } | |
16683 | }, | |
16684 | "additionalProperties" : 0 | |
16685 | }, | |
16686 | "protected" : 1, | |
16687 | "method" : "POST" | |
16688 | } | |
16689 | }, | |
16690 | "path" : "/nodes/{node}/vzdump", | |
16691 | "leaf" : 1 | |
16692 | }, | |
16693 | { | |
16694 | "info" : { | |
16695 | "GET" : { | |
16696 | "parameters" : { | |
16697 | "additionalProperties" : 0, | |
16698 | "properties" : { | |
16699 | "node" : { | |
16700 | "type" : "string", | |
16701 | "description" : "The cluster node name.", | |
16702 | "format" : "pve-node" | |
16703 | } | |
16704 | } | |
16705 | }, | |
16706 | "name" : "index", | |
16707 | "protected" : 1, | |
16708 | "method" : "GET", | |
16709 | "permissions" : { | |
16710 | "check" : [ | |
16711 | "perm", | |
16712 | "/nodes/{node}", | |
16713 | [ | |
16714 | "Sys.Audit" | |
16715 | ] | |
16716 | ] | |
16717 | }, | |
16718 | "proxyto" : "node", | |
16719 | "description" : "Service list.", | |
16720 | "returns" : { | |
16721 | "links" : [ | |
16722 | { | |
16723 | "rel" : "child", | |
16724 | "href" : "{service}" | |
16725 | } | |
16726 | ], | |
16727 | "items" : { | |
16728 | "type" : "object", | |
16729 | "properties" : {} | |
16730 | }, | |
16731 | "type" : "array" | |
16732 | } | |
16733 | } | |
16734 | }, | |
16735 | "text" : "services", | |
16736 | "children" : [ | |
16737 | { | |
16738 | "leaf" : 0, | |
16739 | "path" : "/nodes/{node}/services/{service}", | |
16740 | "info" : { | |
16741 | "GET" : { | |
16742 | "method" : "GET", | |
56122987 DM |
16743 | "returns" : { |
16744 | "links" : [ | |
16745 | { | |
16746 | "rel" : "child", | |
7aacca6f | 16747 | "href" : "{subdir}" |
56122987 DM |
16748 | } |
16749 | ], | |
56122987 DM |
16750 | "items" : { |
16751 | "properties" : { | |
7aacca6f | 16752 | "subdir" : { |
56122987 | 16753 | "type" : "string" |
56122987 DM |
16754 | } |
16755 | }, | |
16756 | "type" : "object" | |
7aacca6f DM |
16757 | }, |
16758 | "type" : "array" | |
56122987 | 16759 | }, |
7aacca6f DM |
16760 | "description" : "Directory index", |
16761 | "name" : "srvcmdidx", | |
56122987 | 16762 | "parameters" : { |
56122987 | 16763 | "properties" : { |
7aacca6f DM |
16764 | "service" : { |
16765 | "enum" : [ | |
16766 | "pveproxy", | |
16767 | "pvedaemon", | |
16768 | "spiceproxy", | |
16769 | "pvestatd", | |
16770 | "pve-cluster", | |
16771 | "corosync", | |
16772 | "pve-firewall", | |
16773 | "pvefw-logger", | |
16774 | "pve-ha-crm", | |
16775 | "pve-ha-lrm", | |
16776 | "sshd", | |
16777 | "syslog", | |
16778 | "cron", | |
16779 | "postfix", | |
16780 | "ksmtuned", | |
16781 | "systemd-timesyncd" | |
16782 | ], | |
16783 | "description" : "Service ID", | |
16784 | "type" : "string" | |
16785 | }, | |
56122987 | 16786 | "node" : { |
7aacca6f | 16787 | "description" : "The cluster node name.", |
56122987 | 16788 | "type" : "string", |
7aacca6f | 16789 | "format" : "pve-node" |
56122987 | 16790 | } |
7aacca6f DM |
16791 | }, |
16792 | "additionalProperties" : 0 | |
56122987 DM |
16793 | }, |
16794 | "permissions" : { | |
16795 | "check" : [ | |
16796 | "perm", | |
7aacca6f | 16797 | "/nodes/{node}", |
56122987 | 16798 | [ |
7aacca6f DM |
16799 | "Sys.Audit" |
16800 | ] | |
56122987 | 16801 | ] |
7aacca6f | 16802 | } |
56122987 | 16803 | } |
7aacca6f DM |
16804 | }, |
16805 | "children" : [ | |
16806 | { | |
16807 | "leaf" : 1, | |
16808 | "path" : "/nodes/{node}/services/{service}/state", | |
16809 | "info" : { | |
16810 | "GET" : { | |
16811 | "returns" : { | |
16812 | "properties" : {}, | |
16813 | "type" : "object" | |
16814 | }, | |
16815 | "permissions" : { | |
16816 | "check" : [ | |
16817 | "perm", | |
16818 | "/nodes/{node}", | |
16819 | [ | |
16820 | "Sys.Audit" | |
16821 | ] | |
16822 | ] | |
16823 | }, | |
16824 | "proxyto" : "node", | |
16825 | "description" : "Read service properties", | |
16826 | "method" : "GET", | |
16827 | "name" : "service_state", | |
16828 | "parameters" : { | |
16829 | "properties" : { | |
16830 | "node" : { | |
16831 | "type" : "string", | |
16832 | "description" : "The cluster node name.", | |
16833 | "format" : "pve-node" | |
16834 | }, | |
16835 | "service" : { | |
16836 | "enum" : [ | |
16837 | "pveproxy", | |
16838 | "pvedaemon", | |
16839 | "spiceproxy", | |
16840 | "pvestatd", | |
16841 | "pve-cluster", | |
16842 | "corosync", | |
16843 | "pve-firewall", | |
16844 | "pvefw-logger", | |
16845 | "pve-ha-crm", | |
16846 | "pve-ha-lrm", | |
16847 | "sshd", | |
16848 | "syslog", | |
16849 | "cron", | |
16850 | "postfix", | |
16851 | "ksmtuned", | |
16852 | "systemd-timesyncd" | |
16853 | ], | |
16854 | "description" : "Service ID", | |
16855 | "type" : "string" | |
16856 | } | |
56122987 | 16857 | }, |
7aacca6f | 16858 | "additionalProperties" : 0 |
56122987 | 16859 | }, |
7aacca6f DM |
16860 | "protected" : 1 |
16861 | } | |
56122987 | 16862 | }, |
7aacca6f DM |
16863 | "text" : "state" |
16864 | }, | |
16865 | { | |
16866 | "text" : "start", | |
16867 | "info" : { | |
16868 | "POST" : { | |
16869 | "returns" : { | |
56122987 DM |
16870 | "type" : "string" |
16871 | }, | |
7aacca6f DM |
16872 | "permissions" : { |
16873 | "check" : [ | |
16874 | "perm", | |
16875 | "/nodes/{node}", | |
16876 | [ | |
16877 | "Sys.Modify" | |
16878 | ] | |
16879 | ] | |
56122987 | 16880 | }, |
7aacca6f DM |
16881 | "description" : "Start service.", |
16882 | "proxyto" : "node", | |
16883 | "method" : "POST", | |
16884 | "name" : "service_start", | |
16885 | "parameters" : { | |
16886 | "properties" : { | |
16887 | "service" : { | |
16888 | "type" : "string", | |
16889 | "enum" : [ | |
16890 | "pveproxy", | |
16891 | "pvedaemon", | |
16892 | "spiceproxy", | |
16893 | "pvestatd", | |
16894 | "pve-cluster", | |
16895 | "corosync", | |
16896 | "pve-firewall", | |
16897 | "pvefw-logger", | |
16898 | "pve-ha-crm", | |
16899 | "pve-ha-lrm", | |
16900 | "sshd", | |
16901 | "syslog", | |
16902 | "cron", | |
16903 | "postfix", | |
16904 | "ksmtuned", | |
16905 | "systemd-timesyncd" | |
16906 | ], | |
16907 | "description" : "Service ID" | |
16908 | }, | |
16909 | "node" : { | |
16910 | "format" : "pve-node", | |
16911 | "description" : "The cluster node name.", | |
16912 | "type" : "string" | |
16913 | } | |
16914 | }, | |
16915 | "additionalProperties" : 0 | |
16916 | }, | |
16917 | "protected" : 1 | |
16918 | } | |
56122987 | 16919 | }, |
7aacca6f DM |
16920 | "path" : "/nodes/{node}/services/{service}/start", |
16921 | "leaf" : 1 | |
56122987 | 16922 | }, |
56122987 | 16923 | { |
7aacca6f | 16924 | "text" : "stop", |
56122987 | 16925 | "info" : { |
7aacca6f | 16926 | "POST" : { |
56122987 | 16927 | "returns" : { |
7aacca6f | 16928 | "type" : "string" |
56122987 | 16929 | }, |
7aacca6f | 16930 | "description" : "Stop service.", |
56122987 | 16931 | "proxyto" : "node", |
56122987 DM |
16932 | "permissions" : { |
16933 | "check" : [ | |
16934 | "perm", | |
16935 | "/nodes/{node}", | |
16936 | [ | |
7aacca6f | 16937 | "Sys.Modify" |
56122987 DM |
16938 | ] |
16939 | ] | |
7aacca6f DM |
16940 | }, |
16941 | "method" : "POST", | |
16942 | "protected" : 1, | |
16943 | "name" : "service_stop", | |
56122987 | 16944 | "parameters" : { |
7aacca6f | 16945 | "additionalProperties" : 0, |
56122987 DM |
16946 | "properties" : { |
16947 | "node" : { | |
16948 | "format" : "pve-node", | |
16949 | "type" : "string", | |
16950 | "description" : "The cluster node name." | |
16951 | }, | |
16952 | "service" : { | |
16953 | "enum" : [ | |
16954 | "pveproxy", | |
16955 | "pvedaemon", | |
16956 | "spiceproxy", | |
16957 | "pvestatd", | |
16958 | "pve-cluster", | |
16959 | "corosync", | |
16960 | "pve-firewall", | |
16961 | "pvefw-logger", | |
16962 | "pve-ha-crm", | |
16963 | "pve-ha-lrm", | |
16964 | "sshd", | |
16965 | "syslog", | |
16966 | "cron", | |
16967 | "postfix", | |
16968 | "ksmtuned", | |
16969 | "systemd-timesyncd" | |
16970 | ], | |
16971 | "description" : "Service ID", | |
16972 | "type" : "string" | |
16973 | } | |
7aacca6f DM |
16974 | } |
16975 | } | |
56122987 DM |
16976 | } |
16977 | }, | |
7aacca6f | 16978 | "path" : "/nodes/{node}/services/{service}/stop", |
56122987 DM |
16979 | "leaf" : 1 |
16980 | }, | |
16981 | { | |
7aacca6f | 16982 | "path" : "/nodes/{node}/services/{service}/restart", |
56122987 | 16983 | "leaf" : 1, |
7aacca6f | 16984 | "text" : "restart", |
56122987 DM |
16985 | "info" : { |
16986 | "POST" : { | |
7aacca6f DM |
16987 | "proxyto" : "node", |
16988 | "description" : "Restart service.", | |
56122987 DM |
16989 | "permissions" : { |
16990 | "check" : [ | |
16991 | "perm", | |
16992 | "/nodes/{node}", | |
16993 | [ | |
16994 | "Sys.Modify" | |
16995 | ] | |
16996 | ] | |
16997 | }, | |
7aacca6f DM |
16998 | "returns" : { |
16999 | "type" : "string" | |
17000 | }, | |
56122987 | 17001 | "protected" : 1, |
56122987 DM |
17002 | "parameters" : { |
17003 | "additionalProperties" : 0, | |
17004 | "properties" : { | |
7aacca6f DM |
17005 | "node" : { |
17006 | "description" : "The cluster node name.", | |
56122987 | 17007 | "type" : "string", |
7aacca6f DM |
17008 | "format" : "pve-node" |
17009 | }, | |
17010 | "service" : { | |
56122987 DM |
17011 | "enum" : [ |
17012 | "pveproxy", | |
17013 | "pvedaemon", | |
17014 | "spiceproxy", | |
17015 | "pvestatd", | |
17016 | "pve-cluster", | |
17017 | "corosync", | |
17018 | "pve-firewall", | |
17019 | "pvefw-logger", | |
17020 | "pve-ha-crm", | |
17021 | "pve-ha-lrm", | |
17022 | "sshd", | |
17023 | "syslog", | |
17024 | "cron", | |
17025 | "postfix", | |
17026 | "ksmtuned", | |
17027 | "systemd-timesyncd" | |
7aacca6f DM |
17028 | ], |
17029 | "description" : "Service ID", | |
17030 | "type" : "string" | |
56122987 DM |
17031 | } |
17032 | } | |
17033 | }, | |
7aacca6f | 17034 | "name" : "service_restart", |
56122987 DM |
17035 | "method" : "POST" |
17036 | } | |
17037 | } | |
17038 | }, | |
17039 | { | |
7aacca6f DM |
17040 | "path" : "/nodes/{node}/services/{service}/reload", |
17041 | "leaf" : 1, | |
17042 | "text" : "reload", | |
56122987 DM |
17043 | "info" : { |
17044 | "POST" : { | |
7aacca6f | 17045 | "name" : "service_reload", |
56122987 DM |
17046 | "parameters" : { |
17047 | "additionalProperties" : 0, | |
17048 | "properties" : { | |
56122987 DM |
17049 | "service" : { |
17050 | "type" : "string", | |
17051 | "description" : "Service ID", | |
17052 | "enum" : [ | |
17053 | "pveproxy", | |
17054 | "pvedaemon", | |
17055 | "spiceproxy", | |
17056 | "pvestatd", | |
17057 | "pve-cluster", | |
17058 | "corosync", | |
17059 | "pve-firewall", | |
17060 | "pvefw-logger", | |
17061 | "pve-ha-crm", | |
17062 | "pve-ha-lrm", | |
17063 | "sshd", | |
17064 | "syslog", | |
17065 | "cron", | |
17066 | "postfix", | |
17067 | "ksmtuned", | |
17068 | "systemd-timesyncd" | |
17069 | ] | |
7aacca6f DM |
17070 | }, |
17071 | "node" : { | |
17072 | "type" : "string", | |
17073 | "description" : "The cluster node name.", | |
17074 | "format" : "pve-node" | |
56122987 DM |
17075 | } |
17076 | } | |
17077 | }, | |
7aacca6f DM |
17078 | "protected" : 1, |
17079 | "method" : "POST", | |
56122987 DM |
17080 | "permissions" : { |
17081 | "check" : [ | |
17082 | "perm", | |
17083 | "/nodes/{node}", | |
17084 | [ | |
17085 | "Sys.Modify" | |
17086 | ] | |
17087 | ] | |
17088 | }, | |
56122987 DM |
17089 | "description" : "Reload service.", |
17090 | "proxyto" : "node", | |
7aacca6f DM |
17091 | "returns" : { |
17092 | "type" : "string" | |
56122987 DM |
17093 | } |
17094 | } | |
17095 | } | |
17096 | } | |
17097 | ], | |
7aacca6f DM |
17098 | "text" : "{service}" |
17099 | } | |
17100 | ], | |
17101 | "leaf" : 0, | |
17102 | "path" : "/nodes/{node}/services" | |
17103 | }, | |
17104 | { | |
17105 | "text" : "subscription", | |
17106 | "info" : { | |
17107 | "GET" : { | |
17108 | "permissions" : { | |
17109 | "user" : "all" | |
17110 | }, | |
17111 | "parameters" : { | |
17112 | "properties" : { | |
17113 | "node" : { | |
17114 | "description" : "The cluster node name.", | |
17115 | "type" : "string", | |
17116 | "format" : "pve-node" | |
17117 | } | |
17118 | }, | |
17119 | "additionalProperties" : 0 | |
17120 | }, | |
17121 | "name" : "get", | |
17122 | "description" : "Read subscription info.", | |
17123 | "proxyto" : "node", | |
17124 | "returns" : { | |
17125 | "type" : "object" | |
17126 | }, | |
17127 | "method" : "GET" | |
17128 | }, | |
17129 | "PUT" : { | |
17130 | "returns" : { | |
17131 | "type" : "null" | |
17132 | }, | |
17133 | "method" : "PUT", | |
17134 | "parameters" : { | |
17135 | "additionalProperties" : 0, | |
17136 | "properties" : { | |
17137 | "node" : { | |
17138 | "format" : "pve-node", | |
17139 | "description" : "The cluster node name.", | |
17140 | "type" : "string" | |
17141 | }, | |
17142 | "key" : { | |
17143 | "description" : "Proxmox VE subscription key", | |
17144 | "type" : "string" | |
17145 | } | |
17146 | } | |
17147 | }, | |
17148 | "name" : "set", | |
17149 | "protected" : 1, | |
17150 | "description" : "Set subscription key.", | |
17151 | "proxyto" : "node" | |
17152 | }, | |
17153 | "POST" : { | |
17154 | "proxyto" : "node", | |
17155 | "protected" : 1, | |
17156 | "description" : "Update subscription info.", | |
17157 | "parameters" : { | |
17158 | "additionalProperties" : 0, | |
17159 | "properties" : { | |
17160 | "force" : { | |
17161 | "description" : "Always connect to server, even if we have up to date info inside local cache.", | |
17162 | "default" : 0, | |
17163 | "type" : "boolean", | |
17164 | "optional" : 1 | |
17165 | }, | |
17166 | "node" : { | |
17167 | "type" : "string", | |
17168 | "description" : "The cluster node name.", | |
17169 | "format" : "pve-node" | |
17170 | } | |
17171 | } | |
17172 | }, | |
17173 | "name" : "update", | |
17174 | "returns" : { | |
17175 | "type" : "null" | |
17176 | }, | |
17177 | "method" : "POST" | |
17178 | } | |
17179 | }, | |
17180 | "path" : "/nodes/{node}/subscription", | |
17181 | "leaf" : 1 | |
17182 | }, | |
17183 | { | |
17184 | "path" : "/nodes/{node}/network", | |
17185 | "leaf" : 0, | |
17186 | "children" : [ | |
17187 | { | |
56122987 | 17188 | "info" : { |
7aacca6f DM |
17189 | "DELETE" : { |
17190 | "returns" : { | |
17191 | "type" : "null" | |
17192 | }, | |
17193 | "permissions" : { | |
17194 | "check" : [ | |
17195 | "perm", | |
17196 | "/nodes/{node}", | |
17197 | [ | |
17198 | "Sys.Modify" | |
17199 | ] | |
17200 | ] | |
17201 | }, | |
17202 | "proxyto" : "node", | |
17203 | "description" : "Delete network device configuration", | |
17204 | "method" : "DELETE", | |
56122987 | 17205 | "parameters" : { |
56122987 | 17206 | "properties" : { |
56122987 DM |
17207 | "node" : { |
17208 | "format" : "pve-node", | |
17209 | "type" : "string", | |
17210 | "description" : "The cluster node name." | |
7aacca6f DM |
17211 | }, |
17212 | "iface" : { | |
17213 | "maxLength" : 20, | |
17214 | "format" : "pve-iface", | |
17215 | "description" : "Network interface name.", | |
17216 | "minLength" : 2, | |
17217 | "type" : "string" | |
56122987 | 17218 | } |
7aacca6f DM |
17219 | }, |
17220 | "additionalProperties" : 0 | |
17221 | }, | |
17222 | "name" : "delete_network", | |
17223 | "protected" : 1 | |
17224 | }, | |
17225 | "PUT" : { | |
17226 | "returns" : { | |
17227 | "type" : "null" | |
17228 | }, | |
17229 | "permissions" : { | |
17230 | "check" : [ | |
17231 | "perm", | |
17232 | "/nodes/{node}", | |
17233 | [ | |
17234 | "Sys.Modify" | |
17235 | ] | |
17236 | ] | |
17237 | }, | |
17238 | "proxyto" : "node", | |
17239 | "description" : "Update network device configuration", | |
17240 | "method" : "PUT", | |
17241 | "name" : "update_network", | |
17242 | "parameters" : { | |
17243 | "additionalProperties" : 0, | |
17244 | "properties" : { | |
17245 | "slaves" : { | |
17246 | "optional" : 1, | |
17247 | "type" : "string", | |
17248 | "description" : "Specify the interfaces used by the bonding device.", | |
17249 | "format" : "pve-iface-list" | |
17250 | }, | |
17251 | "netmask" : { | |
17252 | "format" : "ipv4mask", | |
17253 | "optional" : 1, | |
17254 | "type" : "string", | |
17255 | "description" : "Network mask.", | |
17256 | "requires" : "address" | |
17257 | }, | |
17258 | "address" : { | |
17259 | "format" : "ipv4", | |
17260 | "requires" : "netmask", | |
17261 | "description" : "IP address.", | |
17262 | "type" : "string", | |
17263 | "optional" : 1 | |
17264 | }, | |
17265 | "bridge_ports" : { | |
17266 | "format" : "pve-iface-list", | |
17267 | "description" : "Specify the iterfaces you want to add to your bridge.", | |
17268 | "type" : "string", | |
17269 | "optional" : 1 | |
17270 | }, | |
17271 | "autostart" : { | |
17272 | "optional" : 1, | |
17273 | "type" : "boolean", | |
17274 | "description" : "Automatically start interface on boot." | |
17275 | }, | |
17276 | "type" : { | |
17277 | "type" : "string", | |
17278 | "description" : "Network interface type", | |
17279 | "enum" : [ | |
17280 | "bridge", | |
17281 | "bond", | |
17282 | "eth", | |
17283 | "alias", | |
17284 | "vlan", | |
17285 | "OVSBridge", | |
17286 | "OVSBond", | |
17287 | "OVSPort", | |
17288 | "OVSIntPort", | |
17289 | "unknown" | |
17290 | ] | |
17291 | }, | |
17292 | "gateway6" : { | |
17293 | "type" : "string", | |
17294 | "optional" : 1, | |
17295 | "description" : "Default ipv6 gateway address.", | |
17296 | "format" : "ipv6" | |
17297 | }, | |
17298 | "gateway" : { | |
17299 | "format" : "ipv4", | |
17300 | "optional" : 1, | |
17301 | "type" : "string", | |
17302 | "description" : "Default gateway address." | |
17303 | }, | |
17304 | "ovs_bridge" : { | |
17305 | "type" : "string", | |
17306 | "optional" : 1, | |
17307 | "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", | |
17308 | "format" : "pve-iface" | |
17309 | }, | |
17310 | "delete" : { | |
17311 | "type" : "string", | |
17312 | "optional" : 1, | |
17313 | "description" : "A list of settings you want to delete.", | |
17314 | "format" : "pve-configid-list" | |
17315 | }, | |
17316 | "comments" : { | |
17317 | "description" : "Comments", | |
17318 | "type" : "string", | |
17319 | "optional" : 1 | |
17320 | }, | |
17321 | "ovs_tag" : { | |
17322 | "optional" : 1, | |
17323 | "type" : "integer", | |
17324 | "maximum" : 4094, | |
17325 | "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", | |
17326 | "minimum" : 1 | |
17327 | }, | |
17328 | "ovs_options" : { | |
17329 | "description" : "OVS interface options.", | |
17330 | "optional" : 1, | |
17331 | "type" : "string", | |
17332 | "maxLength" : 1024 | |
17333 | }, | |
17334 | "node" : { | |
17335 | "type" : "string", | |
17336 | "description" : "The cluster node name.", | |
17337 | "format" : "pve-node" | |
17338 | }, | |
17339 | "comments6" : { | |
17340 | "type" : "string", | |
17341 | "optional" : 1, | |
17342 | "description" : "Comments" | |
17343 | }, | |
17344 | "bridge_vlan_aware" : { | |
17345 | "optional" : 1, | |
17346 | "type" : "boolean", | |
17347 | "description" : "Enable bridge vlan support." | |
17348 | }, | |
17349 | "address6" : { | |
17350 | "format" : "ipv6", | |
17351 | "optional" : 1, | |
17352 | "type" : "string", | |
17353 | "description" : "IP address.", | |
17354 | "requires" : "netmask6" | |
17355 | }, | |
17356 | "bond_xmit_hash_policy" : { | |
17357 | "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.", | |
17358 | "enum" : [ | |
17359 | "layer2", | |
17360 | "layer2+3", | |
17361 | "layer3+4" | |
17362 | ], | |
17363 | "optional" : 1, | |
17364 | "type" : "string" | |
17365 | }, | |
17366 | "ovs_bonds" : { | |
17367 | "format" : "pve-iface-list", | |
17368 | "description" : "Specify the interfaces used by the bonding device.", | |
17369 | "optional" : 1, | |
17370 | "type" : "string" | |
17371 | }, | |
17372 | "bond_mode" : { | |
17373 | "optional" : 1, | |
17374 | "type" : "string", | |
17375 | "description" : "Bonding mode.", | |
17376 | "enum" : [ | |
17377 | "balance-rr", | |
17378 | "active-backup", | |
17379 | "balance-xor", | |
17380 | "broadcast", | |
17381 | "802.3ad", | |
17382 | "balance-tlb", | |
17383 | "balance-alb", | |
17384 | "balance-slb", | |
17385 | "lacp-balance-slb", | |
17386 | "lacp-balance-tcp" | |
17387 | ] | |
17388 | }, | |
17389 | "iface" : { | |
17390 | "format" : "pve-iface", | |
17391 | "maxLength" : 20, | |
17392 | "minLength" : 2, | |
17393 | "description" : "Network interface name.", | |
17394 | "type" : "string" | |
17395 | }, | |
17396 | "ovs_ports" : { | |
17397 | "format" : "pve-iface-list", | |
17398 | "optional" : 1, | |
17399 | "type" : "string", | |
17400 | "description" : "Specify the iterfaces you want to add to your bridge." | |
17401 | }, | |
17402 | "netmask6" : { | |
17403 | "maximum" : 128, | |
17404 | "type" : "integer", | |
17405 | "optional" : 1, | |
17406 | "requires" : "address6", | |
17407 | "description" : "Network mask.", | |
17408 | "minimum" : 0 | |
17409 | } | |
17410 | } | |
17411 | }, | |
17412 | "protected" : 1 | |
17413 | }, | |
17414 | "GET" : { | |
17415 | "description" : "Read network device configuration", | |
17416 | "proxyto" : "node", | |
17417 | "parameters" : { | |
17418 | "additionalProperties" : 0, | |
17419 | "properties" : { | |
17420 | "node" : { | |
17421 | "format" : "pve-node", | |
17422 | "type" : "string", | |
17423 | "description" : "The cluster node name." | |
17424 | }, | |
17425 | "iface" : { | |
17426 | "type" : "string", | |
17427 | "description" : "Network interface name.", | |
17428 | "minLength" : 2, | |
17429 | "maxLength" : 20, | |
17430 | "format" : "pve-iface" | |
17431 | } | |
17432 | } | |
17433 | }, | |
17434 | "name" : "network_config", | |
17435 | "permissions" : { | |
17436 | "check" : [ | |
17437 | "perm", | |
17438 | "/nodes/{node}", | |
17439 | [ | |
17440 | "Sys.Audit" | |
17441 | ] | |
17442 | ] | |
17443 | }, | |
17444 | "returns" : { | |
17445 | "properties" : { | |
17446 | "method" : { | |
17447 | "type" : "string" | |
17448 | }, | |
17449 | "type" : { | |
17450 | "type" : "string" | |
17451 | } | |
17452 | }, | |
17453 | "type" : "object" | |
17454 | }, | |
17455 | "method" : "GET" | |
17456 | } | |
17457 | }, | |
17458 | "text" : "{iface}", | |
17459 | "leaf" : 1, | |
17460 | "path" : "/nodes/{node}/network/{iface}" | |
17461 | } | |
17462 | ], | |
17463 | "text" : "network", | |
17464 | "info" : { | |
17465 | "GET" : { | |
17466 | "returns" : { | |
17467 | "items" : { | |
17468 | "properties" : {}, | |
17469 | "type" : "object" | |
17470 | }, | |
17471 | "links" : [ | |
17472 | { | |
17473 | "rel" : "child", | |
17474 | "href" : "{iface}" | |
17475 | } | |
17476 | ], | |
17477 | "type" : "array" | |
17478 | }, | |
17479 | "method" : "GET", | |
17480 | "proxyto" : "node", | |
17481 | "description" : "List available networks", | |
17482 | "permissions" : { | |
17483 | "user" : "all" | |
17484 | }, | |
17485 | "name" : "index", | |
17486 | "parameters" : { | |
17487 | "additionalProperties" : 0, | |
17488 | "properties" : { | |
17489 | "type" : { | |
17490 | "optional" : 1, | |
17491 | "type" : "string", | |
17492 | "description" : "Only list specific interface types.", | |
17493 | "enum" : [ | |
17494 | "bridge", | |
17495 | "bond", | |
17496 | "eth", | |
17497 | "alias", | |
17498 | "vlan", | |
17499 | "OVSBridge", | |
17500 | "OVSBond", | |
17501 | "OVSPort", | |
17502 | "OVSIntPort", | |
17503 | "any_bridge" | |
17504 | ] | |
17505 | }, | |
17506 | "node" : { | |
17507 | "format" : "pve-node", | |
17508 | "description" : "The cluster node name.", | |
17509 | "type" : "string" | |
17510 | } | |
17511 | } | |
17512 | } | |
17513 | }, | |
17514 | "DELETE" : { | |
17515 | "proxyto" : "node", | |
17516 | "description" : "Revert network configuration changes.", | |
17517 | "permissions" : { | |
17518 | "check" : [ | |
17519 | "perm", | |
17520 | "/nodes/{node}", | |
17521 | [ | |
17522 | "Sys.Modify" | |
17523 | ] | |
17524 | ] | |
17525 | }, | |
17526 | "returns" : { | |
17527 | "type" : "null" | |
17528 | }, | |
17529 | "protected" : 1, | |
17530 | "parameters" : { | |
17531 | "additionalProperties" : 0, | |
17532 | "properties" : { | |
17533 | "node" : { | |
17534 | "description" : "The cluster node name.", | |
17535 | "type" : "string", | |
17536 | "format" : "pve-node" | |
17537 | } | |
17538 | } | |
17539 | }, | |
17540 | "name" : "revert_network_changes", | |
17541 | "method" : "DELETE" | |
17542 | }, | |
17543 | "POST" : { | |
17544 | "protected" : 1, | |
17545 | "name" : "create_network", | |
17546 | "parameters" : { | |
17547 | "properties" : { | |
17548 | "ovs_bridge" : { | |
17549 | "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", | |
17550 | "type" : "string", | |
17551 | "optional" : 1, | |
17552 | "format" : "pve-iface" | |
17553 | }, | |
17554 | "gateway" : { | |
17555 | "type" : "string", | |
17556 | "optional" : 1, | |
17557 | "description" : "Default gateway address.", | |
17558 | "format" : "ipv4" | |
17559 | }, | |
17560 | "gateway6" : { | |
17561 | "format" : "ipv6", | |
17562 | "description" : "Default ipv6 gateway address.", | |
17563 | "type" : "string", | |
17564 | "optional" : 1 | |
17565 | }, | |
17566 | "node" : { | |
17567 | "format" : "pve-node", | |
17568 | "type" : "string", | |
17569 | "description" : "The cluster node name." | |
17570 | }, | |
17571 | "ovs_options" : { | |
17572 | "maxLength" : 1024, | |
17573 | "description" : "OVS interface options.", | |
17574 | "type" : "string", | |
17575 | "optional" : 1 | |
17576 | }, | |
17577 | "comments" : { | |
17578 | "optional" : 1, | |
17579 | "type" : "string", | |
17580 | "description" : "Comments" | |
17581 | }, | |
17582 | "ovs_tag" : { | |
17583 | "optional" : 1, | |
17584 | "type" : "integer", | |
17585 | "maximum" : 4094, | |
17586 | "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", | |
17587 | "minimum" : 1 | |
17588 | }, | |
17589 | "netmask" : { | |
17590 | "optional" : 1, | |
17591 | "type" : "string", | |
17592 | "requires" : "address", | |
17593 | "description" : "Network mask.", | |
17594 | "format" : "ipv4mask" | |
17595 | }, | |
17596 | "slaves" : { | |
17597 | "type" : "string", | |
17598 | "optional" : 1, | |
17599 | "description" : "Specify the interfaces used by the bonding device.", | |
17600 | "format" : "pve-iface-list" | |
17601 | }, | |
17602 | "type" : { | |
17603 | "enum" : [ | |
17604 | "bridge", | |
17605 | "bond", | |
17606 | "eth", | |
17607 | "alias", | |
17608 | "vlan", | |
17609 | "OVSBridge", | |
17610 | "OVSBond", | |
17611 | "OVSPort", | |
17612 | "OVSIntPort", | |
17613 | "unknown" | |
17614 | ], | |
17615 | "description" : "Network interface type", | |
17616 | "type" : "string" | |
17617 | }, | |
17618 | "autostart" : { | |
17619 | "description" : "Automatically start interface on boot.", | |
17620 | "type" : "boolean", | |
17621 | "optional" : 1 | |
17622 | }, | |
17623 | "bridge_ports" : { | |
17624 | "format" : "pve-iface-list", | |
17625 | "type" : "string", | |
17626 | "optional" : 1, | |
17627 | "description" : "Specify the iterfaces you want to add to your bridge." | |
17628 | }, | |
17629 | "address" : { | |
17630 | "requires" : "netmask", | |
17631 | "description" : "IP address.", | |
17632 | "type" : "string", | |
17633 | "optional" : 1, | |
17634 | "format" : "ipv4" | |
17635 | }, | |
17636 | "bond_mode" : { | |
17637 | "description" : "Bonding mode.", | |
17638 | "enum" : [ | |
17639 | "balance-rr", | |
17640 | "active-backup", | |
17641 | "balance-xor", | |
17642 | "broadcast", | |
17643 | "802.3ad", | |
17644 | "balance-tlb", | |
17645 | "balance-alb", | |
17646 | "balance-slb", | |
17647 | "lacp-balance-slb", | |
17648 | "lacp-balance-tcp" | |
17649 | ], | |
17650 | "optional" : 1, | |
17651 | "type" : "string" | |
17652 | }, | |
17653 | "ovs_bonds" : { | |
17654 | "format" : "pve-iface-list", | |
17655 | "type" : "string", | |
17656 | "optional" : 1, | |
17657 | "description" : "Specify the interfaces used by the bonding device." | |
17658 | }, | |
17659 | "netmask6" : { | |
17660 | "minimum" : 0, | |
17661 | "optional" : 1, | |
17662 | "type" : "integer", | |
17663 | "maximum" : 128, | |
17664 | "description" : "Network mask.", | |
17665 | "requires" : "address6" | |
17666 | }, | |
17667 | "ovs_ports" : { | |
17668 | "optional" : 1, | |
17669 | "type" : "string", | |
17670 | "description" : "Specify the iterfaces you want to add to your bridge.", | |
17671 | "format" : "pve-iface-list" | |
56122987 | 17672 | }, |
7aacca6f DM |
17673 | "iface" : { |
17674 | "format" : "pve-iface", | |
17675 | "maxLength" : 20, | |
17676 | "type" : "string", | |
17677 | "description" : "Network interface name.", | |
17678 | "minLength" : 2 | |
56122987 | 17679 | }, |
7aacca6f DM |
17680 | "comments6" : { |
17681 | "optional" : 1, | |
17682 | "type" : "string", | |
17683 | "description" : "Comments" | |
17684 | }, | |
17685 | "bridge_vlan_aware" : { | |
17686 | "description" : "Enable bridge vlan support.", | |
17687 | "optional" : 1, | |
17688 | "type" : "boolean" | |
17689 | }, | |
17690 | "address6" : { | |
17691 | "format" : "ipv6", | |
17692 | "description" : "IP address.", | |
17693 | "requires" : "netmask6", | |
17694 | "optional" : 1, | |
17695 | "type" : "string" | |
17696 | }, | |
17697 | "bond_xmit_hash_policy" : { | |
17698 | "type" : "string", | |
17699 | "optional" : 1, | |
17700 | "enum" : [ | |
17701 | "layer2", | |
17702 | "layer2+3", | |
17703 | "layer3+4" | |
17704 | ], | |
17705 | "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes." | |
56122987 | 17706 | } |
7aacca6f DM |
17707 | }, |
17708 | "additionalProperties" : 0 | |
56122987 | 17709 | }, |
7aacca6f DM |
17710 | "method" : "POST", |
17711 | "proxyto" : "node", | |
17712 | "description" : "Create network device configuration", | |
56122987 DM |
17713 | "permissions" : { |
17714 | "check" : [ | |
17715 | "perm", | |
17716 | "/nodes/{node}", | |
17717 | [ | |
7aacca6f | 17718 | "Sys.Modify" |
56122987 DM |
17719 | ] |
17720 | ] | |
17721 | }, | |
56122987 DM |
17722 | "returns" : { |
17723 | "type" : "null" | |
7aacca6f | 17724 | } |
56122987 | 17725 | } |
7aacca6f | 17726 | } |
56122987 DM |
17727 | }, |
17728 | { | |
7aacca6f | 17729 | "path" : "/nodes/{node}/tasks", |
56122987 | 17730 | "leaf" : 0, |
7aacca6f | 17731 | "text" : "tasks", |
56122987 DM |
17732 | "children" : [ |
17733 | { | |
7aacca6f DM |
17734 | "leaf" : 0, |
17735 | "path" : "/nodes/{node}/tasks/{upid}", | |
56122987 | 17736 | "info" : { |
7aacca6f | 17737 | "DELETE" : { |
56122987 DM |
17738 | "returns" : { |
17739 | "type" : "null" | |
17740 | }, | |
7aacca6f DM |
17741 | "permissions" : { |
17742 | "user" : "all", | |
17743 | "description" : "The user needs 'Sys.Modify' permissions on '/nodes/<node>' if the task does not belong to him." | |
17744 | }, | |
17745 | "description" : "Stop a task.", | |
17746 | "proxyto" : "node", | |
17747 | "method" : "DELETE", | |
17748 | "name" : "stop_task", | |
17749 | "parameters" : { | |
17750 | "additionalProperties" : 0, | |
17751 | "properties" : { | |
56122987 | 17752 | "node" : { |
56122987 | 17753 | "type" : "string", |
7aacca6f DM |
17754 | "description" : "The cluster node name.", |
17755 | "format" : "pve-node" | |
56122987 | 17756 | }, |
7aacca6f | 17757 | "upid" : { |
56122987 | 17758 | "type" : "string" |
56122987 DM |
17759 | } |
17760 | } | |
17761 | }, | |
7aacca6f | 17762 | "protected" : 1 |
56122987 DM |
17763 | }, |
17764 | "GET" : { | |
56122987 | 17765 | "method" : "GET", |
56122987 | 17766 | "returns" : { |
7aacca6f DM |
17767 | "links" : [ |
17768 | { | |
17769 | "href" : "{name}", | |
17770 | "rel" : "child" | |
56122987 | 17771 | } |
7aacca6f DM |
17772 | ], |
17773 | "items" : { | |
17774 | "type" : "object", | |
17775 | "properties" : {} | |
17776 | }, | |
17777 | "type" : "array" | |
56122987 | 17778 | }, |
7aacca6f | 17779 | "description" : "", |
56122987 | 17780 | "parameters" : { |
7aacca6f | 17781 | "additionalProperties" : 0, |
56122987 DM |
17782 | "properties" : { |
17783 | "node" : { | |
7aacca6f | 17784 | "format" : "pve-node", |
56122987 | 17785 | "description" : "The cluster node name.", |
7aacca6f | 17786 | "type" : "string" |
56122987 | 17787 | }, |
7aacca6f DM |
17788 | "upid" : { |
17789 | "type" : "string" | |
56122987 | 17790 | } |
7aacca6f | 17791 | } |
56122987 | 17792 | }, |
7aacca6f | 17793 | "name" : "upid_index", |
56122987 | 17794 | "permissions" : { |
7aacca6f DM |
17795 | "user" : "all" |
17796 | } | |
17797 | } | |
17798 | }, | |
17799 | "children" : [ | |
17800 | { | |
17801 | "info" : { | |
17802 | "GET" : { | |
17803 | "method" : "GET", | |
17804 | "name" : "read_task_log", | |
17805 | "parameters" : { | |
17806 | "properties" : { | |
17807 | "start" : { | |
17808 | "optional" : 1, | |
17809 | "type" : "integer", | |
17810 | "minimum" : 0 | |
17811 | }, | |
17812 | "upid" : { | |
17813 | "type" : "string" | |
17814 | }, | |
17815 | "node" : { | |
17816 | "description" : "The cluster node name.", | |
17817 | "type" : "string", | |
17818 | "format" : "pve-node" | |
17819 | }, | |
17820 | "limit" : { | |
17821 | "type" : "integer", | |
17822 | "optional" : 1, | |
17823 | "minimum" : 0 | |
17824 | } | |
17825 | }, | |
17826 | "additionalProperties" : 0 | |
17827 | }, | |
17828 | "protected" : 1, | |
17829 | "returns" : { | |
17830 | "type" : "array", | |
17831 | "items" : { | |
17832 | "type" : "object", | |
17833 | "properties" : { | |
17834 | "n" : { | |
17835 | "type" : "integer", | |
17836 | "description" : "Line number" | |
17837 | }, | |
17838 | "t" : { | |
17839 | "type" : "string", | |
17840 | "description" : "Line text" | |
17841 | } | |
17842 | } | |
17843 | } | |
17844 | }, | |
17845 | "permissions" : { | |
17846 | "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.", | |
17847 | "user" : "all" | |
17848 | }, | |
17849 | "proxyto" : "node", | |
17850 | "description" : "Read task log." | |
17851 | } | |
56122987 | 17852 | }, |
7aacca6f DM |
17853 | "text" : "log", |
17854 | "leaf" : 1, | |
17855 | "path" : "/nodes/{node}/tasks/{upid}/log" | |
17856 | }, | |
17857 | { | |
17858 | "path" : "/nodes/{node}/tasks/{upid}/status", | |
17859 | "leaf" : 1, | |
17860 | "text" : "status", | |
17861 | "info" : { | |
17862 | "GET" : { | |
17863 | "name" : "read_task_status", | |
17864 | "parameters" : { | |
17865 | "additionalProperties" : 0, | |
17866 | "properties" : { | |
17867 | "node" : { | |
17868 | "format" : "pve-node", | |
17869 | "description" : "The cluster node name.", | |
17870 | "type" : "string" | |
17871 | }, | |
17872 | "upid" : { | |
17873 | "type" : "string" | |
17874 | } | |
17875 | } | |
17876 | }, | |
17877 | "protected" : 1, | |
17878 | "method" : "GET", | |
17879 | "permissions" : { | |
17880 | "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.", | |
17881 | "user" : "all" | |
56122987 | 17882 | }, |
7aacca6f DM |
17883 | "proxyto" : "node", |
17884 | "description" : "Read task status.", | |
17885 | "returns" : { | |
17886 | "properties" : { | |
17887 | "pid" : { | |
17888 | "type" : "integer" | |
17889 | }, | |
17890 | "status" : { | |
17891 | "type" : "string", | |
17892 | "enum" : [ | |
17893 | "running", | |
17894 | "stopped" | |
17895 | ] | |
17896 | } | |
17897 | }, | |
17898 | "type" : "object" | |
56122987 | 17899 | } |
7aacca6f | 17900 | } |
56122987 DM |
17901 | } |
17902 | } | |
7aacca6f DM |
17903 | ], |
17904 | "text" : "{upid}" | |
56122987 DM |
17905 | } |
17906 | ], | |
17907 | "info" : { | |
56122987 | 17908 | "GET" : { |
56122987 DM |
17909 | "returns" : { |
17910 | "type" : "array", | |
17911 | "items" : { | |
17912 | "type" : "object", | |
7aacca6f DM |
17913 | "properties" : { |
17914 | "upid" : { | |
17915 | "type" : "string" | |
17916 | } | |
17917 | } | |
56122987 DM |
17918 | }, |
17919 | "links" : [ | |
17920 | { | |
7aacca6f DM |
17921 | "rel" : "child", |
17922 | "href" : "{upid}" | |
56122987 DM |
17923 | } |
17924 | ] | |
17925 | }, | |
7aacca6f | 17926 | "method" : "GET", |
56122987 | 17927 | "proxyto" : "node", |
7aacca6f DM |
17928 | "description" : "Read task list for one node (finished tasks).", |
17929 | "permissions" : { | |
17930 | "user" : "all", | |
17931 | "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/<node> (the <node> the task runs on)." | |
56122987 | 17932 | }, |
56122987 | 17933 | "parameters" : { |
7aacca6f | 17934 | "additionalProperties" : 0, |
56122987 | 17935 | "properties" : { |
7aacca6f DM |
17936 | "vmid" : { |
17937 | "description" : "Only list tasks for this VM.", | |
56122987 | 17938 | "type" : "integer", |
56122987 | 17939 | "optional" : 1, |
7aacca6f DM |
17940 | "format" : "pve-vmid", |
17941 | "minimum" : 1 | |
56122987 | 17942 | }, |
7aacca6f | 17943 | "start" : { |
56122987 | 17944 | "minimum" : 0, |
56122987 | 17945 | "optional" : 1, |
7aacca6f | 17946 | "type" : "integer" |
56122987 | 17947 | }, |
7aacca6f | 17948 | "errors" : { |
56122987 DM |
17949 | "optional" : 1, |
17950 | "type" : "boolean" | |
17951 | }, | |
56122987 DM |
17952 | "node" : { |
17953 | "description" : "The cluster node name.", | |
17954 | "type" : "string", | |
17955 | "format" : "pve-node" | |
17956 | }, | |
7aacca6f DM |
17957 | "limit" : { |
17958 | "minimum" : 0, | |
17959 | "type" : "integer", | |
56122987 DM |
17960 | "optional" : 1 |
17961 | }, | |
7aacca6f | 17962 | "userfilter" : { |
56122987 | 17963 | "type" : "string", |
7aacca6f | 17964 | "optional" : 1 |
56122987 | 17965 | } |
7aacca6f | 17966 | } |
56122987 | 17967 | }, |
7aacca6f | 17968 | "name" : "node_tasks" |
56122987 DM |
17969 | } |
17970 | } | |
17971 | }, | |
17972 | { | |
17973 | "leaf" : 0, | |
7aacca6f | 17974 | "path" : "/nodes/{node}/scan", |
56122987 DM |
17975 | "info" : { |
17976 | "GET" : { | |
56122987 DM |
17977 | "parameters" : { |
17978 | "additionalProperties" : 0, | |
17979 | "properties" : { | |
56122987 DM |
17980 | "node" : { |
17981 | "description" : "The cluster node name.", | |
17982 | "type" : "string", | |
17983 | "format" : "pve-node" | |
56122987 DM |
17984 | } |
17985 | } | |
17986 | }, | |
7aacca6f DM |
17987 | "permissions" : { |
17988 | "user" : "all" | |
17989 | }, | |
17990 | "name" : "index", | |
17991 | "description" : "Index of available scan methods", | |
17992 | "method" : "GET", | |
56122987 | 17993 | "returns" : { |
7aacca6f | 17994 | "type" : "array", |
56122987 DM |
17995 | "items" : { |
17996 | "properties" : { | |
7aacca6f | 17997 | "method" : { |
56122987 DM |
17998 | "type" : "string" |
17999 | } | |
18000 | }, | |
18001 | "type" : "object" | |
18002 | }, | |
56122987 DM |
18003 | "links" : [ |
18004 | { | |
7aacca6f DM |
18005 | "rel" : "child", |
18006 | "href" : "{method}" | |
56122987 DM |
18007 | } |
18008 | ] | |
18009 | } | |
18010 | } | |
18011 | }, | |
56122987 DM |
18012 | "children" : [ |
18013 | { | |
56122987 DM |
18014 | "info" : { |
18015 | "GET" : { | |
7aacca6f DM |
18016 | "proxyto" : "node", |
18017 | "description" : "Scan zfs pool list on local node.", | |
56122987 | 18018 | "permissions" : { |
7aacca6f DM |
18019 | "check" : [ |
18020 | "perm", | |
18021 | "/storage", | |
18022 | [ | |
18023 | "Datastore.Allocate" | |
18024 | ] | |
18025 | ] | |
56122987 DM |
18026 | }, |
18027 | "returns" : { | |
18028 | "type" : "array", | |
18029 | "items" : { | |
7aacca6f DM |
18030 | "properties" : { |
18031 | "pool" : { | |
18032 | "type" : "string" | |
18033 | } | |
18034 | }, | |
18035 | "type" : "object" | |
18036 | } | |
18037 | }, | |
18038 | "protected" : 1, | |
56122987 | 18039 | "parameters" : { |
56122987 | 18040 | "properties" : { |
56122987 DM |
18041 | "node" : { |
18042 | "description" : "The cluster node name.", | |
7aacca6f DM |
18043 | "type" : "string", |
18044 | "format" : "pve-node" | |
56122987 | 18045 | } |
7aacca6f DM |
18046 | }, |
18047 | "additionalProperties" : 0 | |
56122987 | 18048 | }, |
7aacca6f DM |
18049 | "name" : "zfsscan", |
18050 | "method" : "GET" | |
56122987 DM |
18051 | } |
18052 | }, | |
56122987 DM |
18053 | "text" : "zfs", |
18054 | "leaf" : 1, | |
7aacca6f DM |
18055 | "path" : "/nodes/{node}/scan/zfs" |
18056 | }, | |
18057 | { | |
18058 | "leaf" : 1, | |
18059 | "path" : "/nodes/{node}/scan/nfs", | |
56122987 DM |
18060 | "info" : { |
18061 | "GET" : { | |
7aacca6f DM |
18062 | "description" : "Scan remote NFS server.", |
18063 | "proxyto" : "node", | |
18064 | "permissions" : { | |
18065 | "check" : [ | |
18066 | "perm", | |
18067 | "/storage", | |
18068 | [ | |
18069 | "Datastore.Allocate" | |
18070 | ] | |
18071 | ] | |
18072 | }, | |
56122987 DM |
18073 | "returns" : { |
18074 | "type" : "array", | |
18075 | "items" : { | |
7aacca6f | 18076 | "type" : "object", |
56122987 | 18077 | "properties" : { |
7aacca6f DM |
18078 | "path" : { |
18079 | "type" : "string" | |
18080 | }, | |
18081 | "options" : { | |
56122987 DM |
18082 | "type" : "string" |
18083 | } | |
7aacca6f | 18084 | } |
56122987 DM |
18085 | } |
18086 | }, | |
7aacca6f DM |
18087 | "protected" : 1, |
18088 | "name" : "nfsscan", | |
56122987 DM |
18089 | "parameters" : { |
18090 | "properties" : { | |
18091 | "node" : { | |
56122987 | 18092 | "format" : "pve-node", |
7aacca6f DM |
18093 | "description" : "The cluster node name.", |
18094 | "type" : "string" | |
18095 | }, | |
18096 | "server" : { | |
18097 | "format" : "pve-storage-server", | |
18098 | "type" : "string" | |
56122987 DM |
18099 | } |
18100 | }, | |
18101 | "additionalProperties" : 0 | |
18102 | }, | |
7aacca6f | 18103 | "method" : "GET" |
56122987 | 18104 | } |
7aacca6f DM |
18105 | }, |
18106 | "text" : "nfs" | |
56122987 DM |
18107 | }, |
18108 | { | |
7aacca6f DM |
18109 | "leaf" : 1, |
18110 | "path" : "/nodes/{node}/scan/glusterfs", | |
56122987 DM |
18111 | "info" : { |
18112 | "GET" : { | |
56122987 DM |
18113 | "returns" : { |
18114 | "items" : { | |
56122987 | 18115 | "properties" : { |
7aacca6f | 18116 | "volname" : { |
56122987 DM |
18117 | "type" : "string" |
18118 | } | |
7aacca6f DM |
18119 | }, |
18120 | "type" : "object" | |
56122987 DM |
18121 | }, |
18122 | "type" : "array" | |
18123 | }, | |
56122987 DM |
18124 | "permissions" : { |
18125 | "check" : [ | |
18126 | "perm", | |
18127 | "/storage", | |
18128 | [ | |
18129 | "Datastore.Allocate" | |
18130 | ] | |
18131 | ] | |
18132 | }, | |
7aacca6f | 18133 | "description" : "Scan remote GlusterFS server.", |
56122987 | 18134 | "proxyto" : "node", |
7aacca6f DM |
18135 | "method" : "GET", |
18136 | "name" : "glusterfsscan", | |
56122987 DM |
18137 | "parameters" : { |
18138 | "properties" : { | |
56122987 DM |
18139 | "node" : { |
18140 | "format" : "pve-node", | |
18141 | "type" : "string", | |
18142 | "description" : "The cluster node name." | |
7aacca6f DM |
18143 | }, |
18144 | "server" : { | |
18145 | "format" : "pve-storage-server", | |
18146 | "type" : "string" | |
56122987 DM |
18147 | } |
18148 | }, | |
18149 | "additionalProperties" : 0 | |
7aacca6f DM |
18150 | }, |
18151 | "protected" : 1 | |
56122987 DM |
18152 | } |
18153 | }, | |
7aacca6f | 18154 | "text" : "glusterfs" |
56122987 DM |
18155 | }, |
18156 | { | |
7aacca6f | 18157 | "text" : "iscsi", |
56122987 DM |
18158 | "info" : { |
18159 | "GET" : { | |
18160 | "proxyto" : "node", | |
7aacca6f | 18161 | "description" : "Scan remote iSCSI server.", |
56122987 DM |
18162 | "permissions" : { |
18163 | "check" : [ | |
18164 | "perm", | |
18165 | "/storage", | |
18166 | [ | |
18167 | "Datastore.Allocate" | |
18168 | ] | |
18169 | ] | |
18170 | }, | |
56122987 DM |
18171 | "returns" : { |
18172 | "type" : "array", | |
18173 | "items" : { | |
18174 | "properties" : { | |
18175 | "target" : { | |
18176 | "type" : "string" | |
18177 | }, | |
18178 | "portal" : { | |
18179 | "type" : "string" | |
18180 | } | |
18181 | }, | |
18182 | "type" : "object" | |
18183 | } | |
18184 | }, | |
7aacca6f | 18185 | "protected" : 1, |
56122987 DM |
18186 | "parameters" : { |
18187 | "properties" : { | |
18188 | "portal" : { | |
18189 | "type" : "string", | |
18190 | "format" : "pve-storage-portal-dns" | |
18191 | }, | |
18192 | "node" : { | |
7aacca6f | 18193 | "type" : "string", |
56122987 | 18194 | "description" : "The cluster node name.", |
7aacca6f | 18195 | "format" : "pve-node" |
56122987 DM |
18196 | } |
18197 | }, | |
18198 | "additionalProperties" : 0 | |
18199 | }, | |
7aacca6f DM |
18200 | "name" : "iscsiscan", |
18201 | "method" : "GET" | |
56122987 DM |
18202 | } |
18203 | }, | |
7aacca6f | 18204 | "path" : "/nodes/{node}/scan/iscsi", |
56122987 DM |
18205 | "leaf" : 1 |
18206 | }, | |
18207 | { | |
56122987 DM |
18208 | "info" : { |
18209 | "GET" : { | |
18210 | "returns" : { | |
7aacca6f | 18211 | "type" : "array", |
56122987 DM |
18212 | "items" : { |
18213 | "type" : "object", | |
18214 | "properties" : { | |
18215 | "vg" : { | |
18216 | "type" : "string" | |
18217 | } | |
18218 | } | |
7aacca6f | 18219 | } |
56122987 DM |
18220 | }, |
18221 | "proxyto" : "node", | |
7aacca6f | 18222 | "description" : "List local LVM volume groups.", |
56122987 DM |
18223 | "permissions" : { |
18224 | "check" : [ | |
18225 | "perm", | |
18226 | "/storage", | |
18227 | [ | |
18228 | "Datastore.Allocate" | |
18229 | ] | |
18230 | ] | |
18231 | }, | |
7aacca6f DM |
18232 | "method" : "GET", |
18233 | "protected" : 1, | |
18234 | "name" : "lvmscan", | |
18235 | "parameters" : { | |
18236 | "additionalProperties" : 0, | |
18237 | "properties" : { | |
18238 | "node" : { | |
18239 | "format" : "pve-node", | |
18240 | "description" : "The cluster node name.", | |
18241 | "type" : "string" | |
18242 | } | |
18243 | } | |
18244 | } | |
56122987 DM |
18245 | } |
18246 | }, | |
7aacca6f | 18247 | "text" : "lvm", |
56122987 | 18248 | "leaf" : 1, |
7aacca6f | 18249 | "path" : "/nodes/{node}/scan/lvm" |
56122987 DM |
18250 | }, |
18251 | { | |
56122987 DM |
18252 | "info" : { |
18253 | "GET" : { | |
56122987 DM |
18254 | "parameters" : { |
18255 | "properties" : { | |
18256 | "node" : { | |
56122987 | 18257 | "format" : "pve-node", |
7aacca6f DM |
18258 | "type" : "string", |
18259 | "description" : "The cluster node name." | |
56122987 DM |
18260 | }, |
18261 | "vg" : { | |
56122987 | 18262 | "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+", |
7aacca6f | 18263 | "type" : "string", |
56122987 DM |
18264 | "maxLength" : 100 |
18265 | } | |
18266 | }, | |
18267 | "additionalProperties" : 0 | |
18268 | }, | |
7aacca6f DM |
18269 | "name" : "lvmthinscan", |
18270 | "protected" : 1, | |
18271 | "method" : "GET", | |
18272 | "permissions" : { | |
18273 | "check" : [ | |
18274 | "perm", | |
18275 | "/storage", | |
18276 | [ | |
18277 | "Datastore.Allocate" | |
18278 | ] | |
18279 | ] | |
18280 | }, | |
56122987 | 18281 | "description" : "List local LVM Thin Pools.", |
7aacca6f | 18282 | "proxyto" : "node", |
56122987 DM |
18283 | "returns" : { |
18284 | "type" : "array", | |
18285 | "items" : { | |
18286 | "properties" : { | |
18287 | "lv" : { | |
18288 | "type" : "string" | |
18289 | } | |
18290 | }, | |
18291 | "type" : "object" | |
18292 | } | |
7aacca6f | 18293 | } |
56122987 DM |
18294 | } |
18295 | }, | |
7aacca6f DM |
18296 | "text" : "lvmthin", |
18297 | "leaf" : 1, | |
56122987 DM |
18298 | "path" : "/nodes/{node}/scan/lvmthin" |
18299 | }, | |
18300 | { | |
56122987 | 18301 | "path" : "/nodes/{node}/scan/usb", |
7aacca6f DM |
18302 | "leaf" : 1, |
18303 | "text" : "usb", | |
56122987 DM |
18304 | "info" : { |
18305 | "GET" : { | |
7aacca6f DM |
18306 | "permissions" : { |
18307 | "check" : [ | |
18308 | "perm", | |
18309 | "/", | |
18310 | [ | |
18311 | "Sys.Modify" | |
18312 | ] | |
18313 | ] | |
18314 | }, | |
18315 | "proxyto" : "node", | |
56122987 DM |
18316 | "description" : "List local USB devices.", |
18317 | "returns" : { | |
18318 | "items" : { | |
18319 | "properties" : { | |
7aacca6f | 18320 | "speed" : { |
56122987 DM |
18321 | "type" : "string" |
18322 | }, | |
7aacca6f | 18323 | "serial" : { |
56122987 DM |
18324 | "optional" : 1, |
18325 | "type" : "string" | |
18326 | }, | |
18327 | "product" : { | |
7aacca6f DM |
18328 | "type" : "string", |
18329 | "optional" : 1 | |
56122987 | 18330 | }, |
7aacca6f | 18331 | "devnum" : { |
56122987 DM |
18332 | "type" : "integer" |
18333 | }, | |
7aacca6f DM |
18334 | "vendid" : { |
18335 | "type" : "string" | |
18336 | }, | |
18337 | "busnum" : { | |
56122987 DM |
18338 | "type" : "integer" |
18339 | }, | |
7aacca6f | 18340 | "class" : { |
56122987 DM |
18341 | "type" : "integer" |
18342 | }, | |
7aacca6f DM |
18343 | "usbpath" : { |
18344 | "optional" : 1, | |
56122987 DM |
18345 | "type" : "string" |
18346 | }, | |
7aacca6f DM |
18347 | "prodid" : { |
18348 | "type" : "string" | |
56122987 | 18349 | }, |
7aacca6f | 18350 | "level" : { |
56122987 DM |
18351 | "type" : "integer" |
18352 | }, | |
7aacca6f | 18353 | "manufacturer" : { |
56122987 DM |
18354 | "optional" : 1, |
18355 | "type" : "string" | |
18356 | }, | |
7aacca6f DM |
18357 | "port" : { |
18358 | "type" : "integer" | |
56122987 DM |
18359 | } |
18360 | }, | |
18361 | "type" : "object" | |
7aacca6f DM |
18362 | }, |
18363 | "type" : "array" | |
56122987 | 18364 | }, |
7aacca6f | 18365 | "name" : "usbscan", |
56122987 DM |
18366 | "parameters" : { |
18367 | "additionalProperties" : 0, | |
18368 | "properties" : { | |
18369 | "node" : { | |
56122987 | 18370 | "format" : "pve-node", |
7aacca6f | 18371 | "type" : "string", |
56122987 DM |
18372 | "description" : "The cluster node name." |
18373 | } | |
18374 | } | |
18375 | }, | |
7aacca6f DM |
18376 | "protected" : 1, |
18377 | "method" : "GET" | |
56122987 DM |
18378 | } |
18379 | } | |
18380 | } | |
18381 | ], | |
7aacca6f | 18382 | "text" : "scan" |
56122987 DM |
18383 | }, |
18384 | { | |
7aacca6f | 18385 | "path" : "/nodes/{node}/storage", |
56122987 | 18386 | "leaf" : 0, |
7aacca6f | 18387 | "text" : "storage", |
56122987 DM |
18388 | "children" : [ |
18389 | { | |
7aacca6f DM |
18390 | "leaf" : 0, |
18391 | "path" : "/nodes/{node}/storage/{storage}", | |
56122987 DM |
18392 | "info" : { |
18393 | "GET" : { | |
7aacca6f DM |
18394 | "returns" : { |
18395 | "links" : [ | |
18396 | { | |
18397 | "href" : "{subdir}", | |
18398 | "rel" : "child" | |
18399 | } | |
18400 | ], | |
18401 | "items" : { | |
18402 | "type" : "object", | |
18403 | "properties" : { | |
18404 | "subdir" : { | |
18405 | "type" : "string" | |
18406 | } | |
18407 | } | |
18408 | }, | |
18409 | "type" : "array" | |
18410 | }, | |
18411 | "method" : "GET", | |
18412 | "parameters" : { | |
18413 | "additionalProperties" : 0, | |
18414 | "properties" : { | |
18415 | "node" : { | |
18416 | "description" : "The cluster node name.", | |
18417 | "type" : "string", | |
18418 | "format" : "pve-node" | |
18419 | }, | |
18420 | "storage" : { | |
18421 | "description" : "The storage identifier.", | |
18422 | "type" : "string", | |
18423 | "format" : "pve-storage-id" | |
18424 | } | |
18425 | } | |
18426 | }, | |
56122987 DM |
18427 | "permissions" : { |
18428 | "check" : [ | |
18429 | "perm", | |
18430 | "/storage/{storage}", | |
18431 | [ | |
18432 | "Datastore.Audit", | |
18433 | "Datastore.AllocateSpace" | |
18434 | ], | |
18435 | "any", | |
18436 | 1 | |
18437 | ] | |
18438 | }, | |
56122987 | 18439 | "name" : "diridx", |
7aacca6f | 18440 | "description" : "" |
56122987 DM |
18441 | } |
18442 | }, | |
7aacca6f | 18443 | "text" : "{storage}", |
56122987 DM |
18444 | "children" : [ |
18445 | { | |
56122987 DM |
18446 | "info" : { |
18447 | "GET" : { | |
56122987 | 18448 | "method" : "GET", |
56122987 | 18449 | "parameters" : { |
7aacca6f | 18450 | "additionalProperties" : 0, |
56122987 | 18451 | "properties" : { |
56122987 DM |
18452 | "storage" : { |
18453 | "description" : "The storage identifier.", | |
18454 | "type" : "string", | |
18455 | "format" : "pve-storage-id" | |
18456 | }, | |
7aacca6f DM |
18457 | "vmid" : { |
18458 | "format" : "pve-vmid", | |
18459 | "minimum" : 1, | |
18460 | "description" : "Only list images for this VM", | |
18461 | "optional" : 1, | |
18462 | "type" : "integer" | |
18463 | }, | |
56122987 | 18464 | "node" : { |
56122987 | 18465 | "format" : "pve-node", |
7aacca6f | 18466 | "type" : "string", |
56122987 DM |
18467 | "description" : "The cluster node name." |
18468 | }, | |
18469 | "content" : { | |
18470 | "description" : "Only list content of this type.", | |
18471 | "optional" : 1, | |
18472 | "type" : "string", | |
18473 | "format" : "pve-storage-content" | |
18474 | } | |
7aacca6f DM |
18475 | } |
18476 | }, | |
18477 | "name" : "index", | |
18478 | "protected" : 1, | |
18479 | "returns" : { | |
18480 | "type" : "array", | |
18481 | "items" : { | |
18482 | "properties" : { | |
18483 | "volid" : { | |
18484 | "type" : "string" | |
18485 | } | |
18486 | }, | |
18487 | "type" : "object" | |
56122987 | 18488 | }, |
7aacca6f DM |
18489 | "links" : [ |
18490 | { | |
18491 | "href" : "{volid}", | |
18492 | "rel" : "child" | |
18493 | } | |
18494 | ] | |
56122987 | 18495 | }, |
56122987 DM |
18496 | "permissions" : { |
18497 | "check" : [ | |
18498 | "perm", | |
18499 | "/storage/{storage}", | |
18500 | [ | |
18501 | "Datastore.Audit", | |
18502 | "Datastore.AllocateSpace" | |
18503 | ], | |
18504 | "any", | |
18505 | 1 | |
18506 | ] | |
18507 | }, | |
7aacca6f DM |
18508 | "proxyto" : "node", |
18509 | "description" : "List storage content." | |
56122987 DM |
18510 | }, |
18511 | "POST" : { | |
7aacca6f DM |
18512 | "returns" : { |
18513 | "description" : "Volume identifier", | |
18514 | "type" : "string" | |
18515 | }, | |
18516 | "description" : "Allocate disk images.", | |
18517 | "proxyto" : "node", | |
56122987 DM |
18518 | "permissions" : { |
18519 | "check" : [ | |
18520 | "perm", | |
18521 | "/storage/{storage}", | |
18522 | [ | |
18523 | "Datastore.AllocateSpace" | |
18524 | ] | |
18525 | ] | |
18526 | }, | |
7aacca6f | 18527 | "method" : "POST", |
56122987 DM |
18528 | "protected" : 1, |
18529 | "parameters" : { | |
18530 | "additionalProperties" : 0, | |
18531 | "properties" : { | |
56122987 | 18532 | "format" : { |
56122987 DM |
18533 | "requires" : "size", |
18534 | "enum" : [ | |
18535 | "raw", | |
18536 | "qcow2", | |
18537 | "subvol" | |
18538 | ], | |
7aacca6f | 18539 | "type" : "string", |
56122987 DM |
18540 | "optional" : 1 |
18541 | }, | |
18542 | "vmid" : { | |
56122987 | 18543 | "format" : "pve-vmid", |
7aacca6f DM |
18544 | "minimum" : 1, |
18545 | "description" : "Specify owner VM", | |
56122987 DM |
18546 | "type" : "integer" |
18547 | }, | |
7aacca6f DM |
18548 | "storage" : { |
18549 | "format" : "pve-storage-id", | |
18550 | "description" : "The storage identifier.", | |
18551 | "type" : "string" | |
18552 | }, | |
56122987 | 18553 | "size" : { |
7aacca6f | 18554 | "pattern" : "\\d+[MG]?", |
56122987 | 18555 | "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)", |
7aacca6f | 18556 | "type" : "string" |
56122987 DM |
18557 | }, |
18558 | "filename" : { | |
7aacca6f DM |
18559 | "type" : "string", |
18560 | "description" : "The name of the file to create." | |
56122987 DM |
18561 | }, |
18562 | "node" : { | |
56122987 | 18563 | "type" : "string", |
7aacca6f | 18564 | "description" : "The cluster node name.", |
56122987 DM |
18565 | "format" : "pve-node" |
18566 | } | |
18567 | } | |
18568 | }, | |
7aacca6f | 18569 | "name" : "create" |
56122987 DM |
18570 | } |
18571 | }, | |
7aacca6f DM |
18572 | "children" : [ |
18573 | { | |
18574 | "info" : { | |
18575 | "GET" : { | |
18576 | "returns" : { | |
18577 | "type" : "object" | |
18578 | }, | |
18579 | "proxyto" : "node", | |
18580 | "description" : "Get volume attributes", | |
18581 | "permissions" : { | |
18582 | "description" : "You need read access for the volume.", | |
18583 | "user" : "all" | |
18584 | }, | |
18585 | "method" : "GET", | |
18586 | "protected" : 1, | |
18587 | "parameters" : { | |
18588 | "additionalProperties" : 0, | |
18589 | "properties" : { | |
18590 | "storage" : { | |
18591 | "type" : "string", | |
18592 | "optional" : 1, | |
18593 | "description" : "The storage identifier.", | |
18594 | "format" : "pve-storage-id" | |
18595 | }, | |
18596 | "node" : { | |
18597 | "description" : "The cluster node name.", | |
18598 | "type" : "string", | |
18599 | "format" : "pve-node" | |
18600 | }, | |
18601 | "volume" : { | |
18602 | "description" : "Volume identifier", | |
18603 | "type" : "string" | |
18604 | } | |
18605 | } | |
18606 | }, | |
18607 | "name" : "info" | |
18608 | }, | |
18609 | "DELETE" : { | |
18610 | "parameters" : { | |
18611 | "additionalProperties" : 0, | |
18612 | "properties" : { | |
18613 | "volume" : { | |
18614 | "type" : "string", | |
18615 | "description" : "Volume identifier" | |
18616 | }, | |
18617 | "node" : { | |
18618 | "description" : "The cluster node name.", | |
18619 | "type" : "string", | |
18620 | "format" : "pve-node" | |
18621 | }, | |
18622 | "storage" : { | |
18623 | "format" : "pve-storage-id", | |
18624 | "description" : "The storage identifier.", | |
18625 | "optional" : 1, | |
18626 | "type" : "string" | |
18627 | } | |
18628 | } | |
18629 | }, | |
18630 | "name" : "delete", | |
18631 | "protected" : 1, | |
18632 | "method" : "DELETE", | |
18633 | "permissions" : { | |
18634 | "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).", | |
18635 | "user" : "all" | |
18636 | }, | |
18637 | "proxyto" : "node", | |
18638 | "description" : "Delete volume", | |
18639 | "returns" : { | |
18640 | "type" : "null" | |
18641 | } | |
18642 | }, | |
18643 | "POST" : { | |
18644 | "parameters" : { | |
18645 | "additionalProperties" : 0, | |
18646 | "properties" : { | |
18647 | "target" : { | |
18648 | "type" : "string", | |
18649 | "description" : "Target volume identifier" | |
18650 | }, | |
18651 | "target_node" : { | |
18652 | "type" : "string", | |
18653 | "optional" : 1, | |
18654 | "description" : "Target node. Default is local node.", | |
18655 | "format" : "pve-node" | |
18656 | }, | |
18657 | "storage" : { | |
18658 | "format" : "pve-storage-id", | |
18659 | "description" : "The storage identifier.", | |
18660 | "type" : "string", | |
18661 | "optional" : 1 | |
18662 | }, | |
18663 | "volume" : { | |
18664 | "type" : "string", | |
18665 | "description" : "Source volume identifier" | |
18666 | }, | |
18667 | "node" : { | |
18668 | "description" : "The cluster node name.", | |
18669 | "type" : "string", | |
18670 | "format" : "pve-node" | |
18671 | } | |
18672 | } | |
18673 | }, | |
18674 | "name" : "copy", | |
18675 | "description" : "Copy a volume. This is experimental code - do not use.", | |
18676 | "protected" : 1, | |
18677 | "proxyto" : "node", | |
18678 | "returns" : { | |
18679 | "type" : "string" | |
18680 | }, | |
18681 | "method" : "POST" | |
18682 | } | |
18683 | }, | |
18684 | "text" : "{volume}", | |
18685 | "leaf" : 1, | |
18686 | "path" : "/nodes/{node}/storage/{storage}/content/{volume}" | |
18687 | } | |
18688 | ], | |
56122987 | 18689 | "text" : "content", |
7aacca6f DM |
18690 | "leaf" : 0, |
18691 | "path" : "/nodes/{node}/storage/{storage}/content" | |
56122987 DM |
18692 | }, |
18693 | { | |
56122987 | 18694 | "leaf" : 1, |
7aacca6f | 18695 | "path" : "/nodes/{node}/storage/{storage}/status", |
56122987 DM |
18696 | "info" : { |
18697 | "GET" : { | |
7aacca6f DM |
18698 | "permissions" : { |
18699 | "check" : [ | |
18700 | "perm", | |
18701 | "/storage/{storage}", | |
18702 | [ | |
18703 | "Datastore.Audit", | |
18704 | "Datastore.AllocateSpace" | |
18705 | ], | |
18706 | "any", | |
18707 | 1 | |
18708 | ] | |
18709 | }, | |
18710 | "description" : "Read storage status.", | |
18711 | "proxyto" : "node", | |
56122987 DM |
18712 | "returns" : { |
18713 | "properties" : {}, | |
18714 | "type" : "object" | |
18715 | }, | |
56122987 DM |
18716 | "parameters" : { |
18717 | "properties" : { | |
18718 | "storage" : { | |
18719 | "description" : "The storage identifier.", | |
18720 | "type" : "string", | |
18721 | "format" : "pve-storage-id" | |
18722 | }, | |
18723 | "node" : { | |
18724 | "description" : "The cluster node name.", | |
7aacca6f DM |
18725 | "type" : "string", |
18726 | "format" : "pve-node" | |
56122987 DM |
18727 | } |
18728 | }, | |
18729 | "additionalProperties" : 0 | |
18730 | }, | |
7aacca6f | 18731 | "name" : "read_status", |
56122987 | 18732 | "protected" : 1, |
7aacca6f | 18733 | "method" : "GET" |
56122987 DM |
18734 | } |
18735 | }, | |
7aacca6f | 18736 | "text" : "status" |
56122987 DM |
18737 | }, |
18738 | { | |
56122987 DM |
18739 | "info" : { |
18740 | "GET" : { | |
7aacca6f | 18741 | "protected" : 1, |
56122987 | 18742 | "parameters" : { |
56122987 | 18743 | "properties" : { |
7aacca6f DM |
18744 | "ds" : { |
18745 | "type" : "string", | |
18746 | "description" : "The list of datasources you want to display.", | |
18747 | "format" : "pve-configid-list" | |
56122987 | 18748 | }, |
7aacca6f DM |
18749 | "node" : { |
18750 | "description" : "The cluster node name.", | |
56122987 | 18751 | "type" : "string", |
7aacca6f | 18752 | "format" : "pve-node" |
56122987 DM |
18753 | }, |
18754 | "timeframe" : { | |
7aacca6f | 18755 | "type" : "string", |
56122987 DM |
18756 | "enum" : [ |
18757 | "hour", | |
18758 | "day", | |
18759 | "week", | |
18760 | "month", | |
18761 | "year" | |
18762 | ], | |
7aacca6f | 18763 | "description" : "Specify the time frame you are interested in." |
56122987 | 18764 | }, |
7aacca6f | 18765 | "storage" : { |
56122987 | 18766 | "type" : "string", |
7aacca6f DM |
18767 | "description" : "The storage identifier.", |
18768 | "format" : "pve-storage-id" | |
56122987 | 18769 | }, |
7aacca6f | 18770 | "cf" : { |
56122987 | 18771 | "type" : "string", |
7aacca6f DM |
18772 | "optional" : 1, |
18773 | "enum" : [ | |
18774 | "AVERAGE", | |
18775 | "MAX" | |
18776 | ], | |
18777 | "description" : "The RRD consolidation function" | |
56122987 | 18778 | } |
7aacca6f DM |
18779 | }, |
18780 | "additionalProperties" : 0 | |
56122987 | 18781 | }, |
7aacca6f DM |
18782 | "name" : "rrd", |
18783 | "method" : "GET", | |
18784 | "proxyto" : "node", | |
18785 | "description" : "Read storage RRD statistics (returns PNG).", | |
56122987 DM |
18786 | "permissions" : { |
18787 | "check" : [ | |
18788 | "perm", | |
18789 | "/storage/{storage}", | |
18790 | [ | |
18791 | "Datastore.Audit", | |
18792 | "Datastore.AllocateSpace" | |
18793 | ], | |
18794 | "any", | |
18795 | 1 | |
18796 | ] | |
18797 | }, | |
7aacca6f DM |
18798 | "returns" : { |
18799 | "properties" : { | |
18800 | "filename" : { | |
18801 | "type" : "string" | |
18802 | } | |
18803 | }, | |
18804 | "type" : "object" | |
18805 | } | |
56122987 DM |
18806 | } |
18807 | }, | |
7aacca6f | 18808 | "text" : "rrd", |
56122987 | 18809 | "leaf" : 1, |
7aacca6f | 18810 | "path" : "/nodes/{node}/storage/{storage}/rrd" |
56122987 DM |
18811 | }, |
18812 | { | |
56122987 DM |
18813 | "info" : { |
18814 | "GET" : { | |
56122987 | 18815 | "protected" : 1, |
56122987 | 18816 | "parameters" : { |
56122987 | 18817 | "properties" : { |
7aacca6f DM |
18818 | "node" : { |
18819 | "format" : "pve-node", | |
18820 | "description" : "The cluster node name.", | |
18821 | "type" : "string" | |
18822 | }, | |
56122987 | 18823 | "timeframe" : { |
7aacca6f DM |
18824 | "type" : "string", |
18825 | "description" : "Specify the time frame you are interested in.", | |
56122987 DM |
18826 | "enum" : [ |
18827 | "hour", | |
18828 | "day", | |
18829 | "week", | |
18830 | "month", | |
18831 | "year" | |
7aacca6f | 18832 | ] |
56122987 DM |
18833 | }, |
18834 | "storage" : { | |
18835 | "format" : "pve-storage-id", | |
18836 | "type" : "string", | |
18837 | "description" : "The storage identifier." | |
18838 | }, | |
18839 | "cf" : { | |
18840 | "type" : "string", | |
7aacca6f | 18841 | "optional" : 1, |
56122987 DM |
18842 | "enum" : [ |
18843 | "AVERAGE", | |
18844 | "MAX" | |
18845 | ], | |
56122987 | 18846 | "description" : "The RRD consolidation function" |
56122987 | 18847 | } |
7aacca6f DM |
18848 | }, |
18849 | "additionalProperties" : 0 | |
18850 | }, | |
18851 | "name" : "rrddata", | |
18852 | "method" : "GET", | |
18853 | "proxyto" : "node", | |
18854 | "description" : "Read storage RRD statistics.", | |
18855 | "permissions" : { | |
18856 | "check" : [ | |
18857 | "perm", | |
18858 | "/storage/{storage}", | |
18859 | [ | |
18860 | "Datastore.Audit", | |
18861 | "Datastore.AllocateSpace" | |
18862 | ], | |
18863 | "any", | |
18864 | 1 | |
18865 | ] | |
18866 | }, | |
18867 | "returns" : { | |
18868 | "items" : { | |
18869 | "type" : "object", | |
18870 | "properties" : {} | |
18871 | }, | |
18872 | "type" : "array" | |
56122987 DM |
18873 | } |
18874 | } | |
7aacca6f DM |
18875 | }, |
18876 | "text" : "rrddata", | |
18877 | "leaf" : 1, | |
18878 | "path" : "/nodes/{node}/storage/{storage}/rrddata" | |
56122987 DM |
18879 | }, |
18880 | { | |
56122987 | 18881 | "path" : "/nodes/{node}/storage/{storage}/upload", |
7aacca6f DM |
18882 | "leaf" : 1, |
18883 | "text" : "upload", | |
56122987 DM |
18884 | "info" : { |
18885 | "POST" : { | |
56122987 DM |
18886 | "returns" : { |
18887 | "type" : "string" | |
18888 | }, | |
7aacca6f DM |
18889 | "method" : "POST", |
18890 | "description" : "Upload templates and ISO images.", | |
18891 | "protected" : 1, | |
56122987 | 18892 | "parameters" : { |
7aacca6f | 18893 | "additionalProperties" : 0, |
56122987 DM |
18894 | "properties" : { |
18895 | "storage" : { | |
56122987 | 18896 | "format" : "pve-storage-id", |
7aacca6f | 18897 | "description" : "The storage identifier.", |
56122987 DM |
18898 | "type" : "string" |
18899 | }, | |
18900 | "tmpfilename" : { | |
18901 | "optional" : 1, | |
7aacca6f DM |
18902 | "type" : "string", |
18903 | "description" : "The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trustet port on localhost." | |
56122987 DM |
18904 | }, |
18905 | "content" : { | |
7aacca6f | 18906 | "description" : "Content type.", |
56122987 | 18907 | "type" : "string", |
7aacca6f | 18908 | "format" : "pve-storage-content" |
56122987 DM |
18909 | }, |
18910 | "filename" : { | |
7aacca6f DM |
18911 | "type" : "string", |
18912 | "description" : "The name of the file to create." | |
56122987 DM |
18913 | }, |
18914 | "node" : { | |
18915 | "description" : "The cluster node name.", | |
7aacca6f DM |
18916 | "type" : "string", |
18917 | "format" : "pve-node" | |
56122987 | 18918 | } |
7aacca6f | 18919 | } |
56122987 | 18920 | }, |
7aacca6f | 18921 | "name" : "upload", |
56122987 DM |
18922 | "permissions" : { |
18923 | "check" : [ | |
18924 | "perm", | |
18925 | "/storage/{storage}", | |
18926 | [ | |
18927 | "Datastore.AllocateTemplate" | |
18928 | ] | |
18929 | ] | |
18930 | } | |
18931 | } | |
18932 | } | |
18933 | } | |
7aacca6f | 18934 | ] |
56122987 DM |
18935 | } |
18936 | ], | |
56122987 DM |
18937 | "info" : { |
18938 | "GET" : { | |
7aacca6f DM |
18939 | "permissions" : { |
18940 | "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'", | |
18941 | "user" : "all" | |
18942 | }, | |
18943 | "proxyto" : "node", | |
56122987 DM |
18944 | "description" : "Get status for all datastores.", |
18945 | "returns" : { | |
7aacca6f | 18946 | "type" : "array", |
56122987 DM |
18947 | "items" : { |
18948 | "type" : "object", | |
18949 | "properties" : { | |
18950 | "storage" : { | |
18951 | "type" : "string" | |
18952 | } | |
18953 | } | |
18954 | }, | |
56122987 DM |
18955 | "links" : [ |
18956 | { | |
7aacca6f DM |
18957 | "href" : "{storage}", |
18958 | "rel" : "child" | |
56122987 DM |
18959 | } |
18960 | ] | |
18961 | }, | |
56122987 | 18962 | "parameters" : { |
56122987 | 18963 | "properties" : { |
7aacca6f | 18964 | "target" : { |
56122987 | 18965 | "format" : "pve-node", |
7aacca6f | 18966 | "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.", |
56122987 | 18967 | "type" : "string", |
56122987 DM |
18968 | "optional" : 1 |
18969 | }, | |
7aacca6f DM |
18970 | "storage" : { |
18971 | "format" : "pve-storage-id", | |
18972 | "type" : "string", | |
56122987 | 18973 | "optional" : 1, |
7aacca6f | 18974 | "description" : "Only list status for specified storage" |
56122987 DM |
18975 | }, |
18976 | "enabled" : { | |
56122987 | 18977 | "description" : "Only list stores which are enabled (not disabled in config).", |
7aacca6f DM |
18978 | "type" : "boolean", |
18979 | "optional" : 1, | |
18980 | "default" : 0 | |
56122987 | 18981 | }, |
7aacca6f DM |
18982 | "content" : { |
18983 | "format" : "pve-storage-content-list", | |
56122987 DM |
18984 | "type" : "string", |
18985 | "optional" : 1, | |
7aacca6f DM |
18986 | "description" : "Only list stores which support this content type." |
18987 | }, | |
18988 | "node" : { | |
18989 | "format" : "pve-node", | |
18990 | "description" : "The cluster node name.", | |
18991 | "type" : "string" | |
56122987 | 18992 | } |
7aacca6f DM |
18993 | }, |
18994 | "additionalProperties" : 0 | |
56122987 | 18995 | }, |
7aacca6f DM |
18996 | "name" : "index", |
18997 | "protected" : 1, | |
18998 | "method" : "GET" | |
56122987 DM |
18999 | } |
19000 | } | |
19001 | }, | |
19002 | { | |
19003 | "text" : "apt", | |
56122987 DM |
19004 | "children" : [ |
19005 | { | |
19006 | "info" : { | |
19007 | "POST" : { | |
7aacca6f DM |
19008 | "returns" : { |
19009 | "type" : "string" | |
19010 | }, | |
19011 | "permissions" : { | |
19012 | "check" : [ | |
19013 | "perm", | |
19014 | "/nodes/{node}", | |
19015 | [ | |
19016 | "Sys.Modify" | |
19017 | ] | |
19018 | ] | |
19019 | }, | |
19020 | "description" : "This is used to resynchronize the package index files from their sources (apt-get update).", | |
56122987 | 19021 | "proxyto" : "node", |
7aacca6f DM |
19022 | "method" : "POST", |
19023 | "name" : "update_database", | |
56122987 DM |
19024 | "parameters" : { |
19025 | "additionalProperties" : 0, | |
19026 | "properties" : { | |
19027 | "notify" : { | |
56122987 DM |
19028 | "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').", |
19029 | "default" : 0, | |
7aacca6f DM |
19030 | "type" : "boolean", |
19031 | "optional" : 1 | |
56122987 DM |
19032 | }, |
19033 | "quiet" : { | |
56122987 DM |
19034 | "default" : 0, |
19035 | "optional" : 1, | |
7aacca6f | 19036 | "type" : "boolean", |
56122987 | 19037 | "description" : "Only produces output suitable for logging, omitting progress indicators." |
7aacca6f DM |
19038 | }, |
19039 | "node" : { | |
19040 | "format" : "pve-node", | |
19041 | "description" : "The cluster node name.", | |
19042 | "type" : "string" | |
56122987 DM |
19043 | } |
19044 | } | |
19045 | }, | |
7aacca6f | 19046 | "protected" : 1 |
56122987 DM |
19047 | }, |
19048 | "GET" : { | |
7aacca6f DM |
19049 | "method" : "GET", |
19050 | "name" : "list_updates", | |
56122987 DM |
19051 | "parameters" : { |
19052 | "properties" : { | |
19053 | "node" : { | |
56122987 | 19054 | "type" : "string", |
7aacca6f | 19055 | "description" : "The cluster node name.", |
56122987 DM |
19056 | "format" : "pve-node" |
19057 | } | |
19058 | }, | |
19059 | "additionalProperties" : 0 | |
19060 | }, | |
7aacca6f DM |
19061 | "protected" : 1, |
19062 | "returns" : { | |
19063 | "type" : "array", | |
19064 | "items" : { | |
19065 | "type" : "object", | |
19066 | "properties" : {} | |
19067 | } | |
19068 | }, | |
19069 | "permissions" : { | |
19070 | "check" : [ | |
19071 | "perm", | |
19072 | "/nodes/{node}", | |
19073 | [ | |
19074 | "Sys.Modify" | |
19075 | ] | |
19076 | ] | |
19077 | }, | |
56122987 | 19078 | "description" : "List available updates.", |
7aacca6f | 19079 | "proxyto" : "node" |
56122987 DM |
19080 | } |
19081 | }, | |
56122987 | 19082 | "text" : "update", |
7aacca6f DM |
19083 | "leaf" : 1, |
19084 | "path" : "/nodes/{node}/apt/update" | |
56122987 DM |
19085 | }, |
19086 | { | |
19087 | "leaf" : 1, | |
7aacca6f | 19088 | "path" : "/nodes/{node}/apt/changelog", |
56122987 DM |
19089 | "info" : { |
19090 | "GET" : { | |
19091 | "method" : "GET", | |
56122987 DM |
19092 | "returns" : { |
19093 | "type" : "string" | |
19094 | }, | |
7aacca6f DM |
19095 | "permissions" : { |
19096 | "check" : [ | |
19097 | "perm", | |
19098 | "/nodes/{node}", | |
19099 | [ | |
19100 | "Sys.Modify" | |
19101 | ] | |
19102 | ] | |
19103 | }, | |
19104 | "name" : "changelog", | |
56122987 DM |
19105 | "parameters" : { |
19106 | "properties" : { | |
7aacca6f DM |
19107 | "node" : { |
19108 | "format" : "pve-node", | |
19109 | "type" : "string", | |
19110 | "description" : "The cluster node name." | |
19111 | }, | |
56122987 DM |
19112 | "name" : { |
19113 | "description" : "Package name.", | |
19114 | "type" : "string" | |
19115 | }, | |
19116 | "version" : { | |
7aacca6f | 19117 | "description" : "Package version.", |
56122987 | 19118 | "type" : "string", |
7aacca6f | 19119 | "optional" : 1 |
56122987 DM |
19120 | } |
19121 | }, | |
19122 | "additionalProperties" : 0 | |
19123 | }, | |
7aacca6f DM |
19124 | "description" : "Get package changelogs.", |
19125 | "proxyto" : "node" | |
56122987 DM |
19126 | } |
19127 | }, | |
7aacca6f | 19128 | "text" : "changelog" |
56122987 DM |
19129 | }, |
19130 | { | |
19131 | "text" : "versions", | |
56122987 DM |
19132 | "info" : { |
19133 | "GET" : { | |
7aacca6f DM |
19134 | "name" : "versions", |
19135 | "parameters" : { | |
19136 | "properties" : { | |
19137 | "node" : { | |
19138 | "format" : "pve-node", | |
19139 | "type" : "string", | |
19140 | "description" : "The cluster node name." | |
19141 | } | |
19142 | }, | |
19143 | "additionalProperties" : 0 | |
19144 | }, | |
56122987 DM |
19145 | "permissions" : { |
19146 | "check" : [ | |
19147 | "perm", | |
19148 | "/nodes/{node}", | |
19149 | [ | |
19150 | "Sys.Audit" | |
19151 | ] | |
19152 | ] | |
19153 | }, | |
7aacca6f | 19154 | "proxyto" : "node", |
56122987 DM |
19155 | "description" : "Get package information for important Proxmox packages.", |
19156 | "method" : "GET", | |
56122987 | 19157 | "returns" : { |
7aacca6f | 19158 | "type" : "array", |
56122987 | 19159 | "items" : { |
7aacca6f DM |
19160 | "properties" : {}, |
19161 | "type" : "object" | |
56122987 DM |
19162 | } |
19163 | } | |
19164 | } | |
19165 | }, | |
7aacca6f DM |
19166 | "path" : "/nodes/{node}/apt/versions", |
19167 | "leaf" : 1 | |
56122987 DM |
19168 | } |
19169 | ], | |
56122987 DM |
19170 | "info" : { |
19171 | "GET" : { | |
56122987 | 19172 | "returns" : { |
7aacca6f | 19173 | "type" : "array", |
56122987 | 19174 | "items" : { |
7aacca6f | 19175 | "type" : "object", |
56122987 DM |
19176 | "properties" : { |
19177 | "id" : { | |
19178 | "type" : "string" | |
19179 | } | |
7aacca6f | 19180 | } |
56122987 | 19181 | }, |
56122987 DM |
19182 | "links" : [ |
19183 | { | |
7aacca6f DM |
19184 | "href" : "{id}", |
19185 | "rel" : "child" | |
56122987 DM |
19186 | } |
19187 | ] | |
7aacca6f DM |
19188 | }, |
19189 | "method" : "GET", | |
19190 | "parameters" : { | |
19191 | "additionalProperties" : 0, | |
19192 | "properties" : { | |
19193 | "node" : { | |
19194 | "format" : "pve-node", | |
19195 | "type" : "string", | |
19196 | "description" : "The cluster node name." | |
19197 | } | |
19198 | } | |
19199 | }, | |
19200 | "name" : "index", | |
19201 | "permissions" : { | |
19202 | "user" : "all" | |
19203 | }, | |
19204 | "description" : "Directory index for apt (Advanced Package Tool)." | |
56122987 | 19205 | } |
7aacca6f DM |
19206 | }, |
19207 | "path" : "/nodes/{node}/apt", | |
19208 | "leaf" : 0 | |
56122987 DM |
19209 | }, |
19210 | { | |
56122987 DM |
19211 | "children" : [ |
19212 | { | |
7aacca6f | 19213 | "text" : "rules", |
56122987 DM |
19214 | "children" : [ |
19215 | { | |
56122987 | 19216 | "text" : "{pos}", |
56122987 DM |
19217 | "info" : { |
19218 | "DELETE" : { | |
7aacca6f | 19219 | "method" : "DELETE", |
56122987 | 19220 | "protected" : 1, |
56122987 DM |
19221 | "parameters" : { |
19222 | "additionalProperties" : 0, | |
19223 | "properties" : { | |
7aacca6f DM |
19224 | "node" : { |
19225 | "description" : "The cluster node name.", | |
19226 | "type" : "string", | |
19227 | "format" : "pve-node" | |
56122987 DM |
19228 | }, |
19229 | "digest" : { | |
7aacca6f | 19230 | "maxLength" : 40, |
56122987 DM |
19231 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", |
19232 | "optional" : 1, | |
56122987 DM |
19233 | "type" : "string" |
19234 | }, | |
7aacca6f DM |
19235 | "pos" : { |
19236 | "type" : "integer", | |
19237 | "optional" : 1, | |
19238 | "description" : "Update rule at position <pos>.", | |
19239 | "minimum" : 0 | |
56122987 DM |
19240 | } |
19241 | } | |
19242 | }, | |
56122987 | 19243 | "name" : "delete_rule", |
56122987 DM |
19244 | "returns" : { |
19245 | "type" : "null" | |
56122987 DM |
19246 | }, |
19247 | "proxyto" : "node", | |
7aacca6f | 19248 | "description" : "Delete rule.", |
56122987 DM |
19249 | "permissions" : { |
19250 | "check" : [ | |
19251 | "perm", | |
19252 | "/nodes/{node}", | |
19253 | [ | |
7aacca6f | 19254 | "Sys.Modify" |
56122987 DM |
19255 | ] |
19256 | ] | |
7aacca6f | 19257 | } |
56122987 DM |
19258 | }, |
19259 | "PUT" : { | |
56122987 | 19260 | "name" : "update_rule", |
56122987 | 19261 | "parameters" : { |
56122987 | 19262 | "properties" : { |
7aacca6f | 19263 | "dest" : { |
56122987 | 19264 | "type" : "string", |
56122987 | 19265 | "optional" : 1, |
7aacca6f DM |
19266 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", |
19267 | "format" : "pve-fw-addr-spec" | |
56122987 | 19268 | }, |
7aacca6f DM |
19269 | "digest" : { |
19270 | "maxLength" : 40, | |
56122987 | 19271 | "optional" : 1, |
56122987 | 19272 | "type" : "string", |
7aacca6f | 19273 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." |
56122987 | 19274 | }, |
7aacca6f DM |
19275 | "source" : { |
19276 | "format" : "pve-fw-addr-spec", | |
56122987 | 19277 | "optional" : 1, |
7aacca6f DM |
19278 | "type" : "string", |
19279 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." | |
56122987 | 19280 | }, |
7aacca6f | 19281 | "comment" : { |
56122987 | 19282 | "optional" : 1, |
56122987 DM |
19283 | "type" : "string" |
19284 | }, | |
19285 | "node" : { | |
19286 | "format" : "pve-node", | |
19287 | "type" : "string", | |
19288 | "description" : "The cluster node name." | |
19289 | }, | |
7aacca6f DM |
19290 | "moveto" : { |
19291 | "minimum" : 0, | |
19292 | "description" : "Move rule to new position <moveto>. Other arguments are ignored.", | |
56122987 | 19293 | "optional" : 1, |
7aacca6f | 19294 | "type" : "integer" |
56122987 | 19295 | }, |
7aacca6f DM |
19296 | "delete" : { |
19297 | "type" : "string", | |
56122987 | 19298 | "optional" : 1, |
7aacca6f DM |
19299 | "description" : "A list of settings you want to delete.", |
19300 | "format" : "pve-configid-list" | |
56122987 DM |
19301 | }, |
19302 | "type" : { | |
56122987 | 19303 | "optional" : 1, |
7aacca6f | 19304 | "type" : "string", |
56122987 DM |
19305 | "enum" : [ |
19306 | "in", | |
19307 | "out", | |
19308 | "group" | |
19309 | ] | |
19310 | }, | |
7aacca6f DM |
19311 | "dport" : { |
19312 | "format" : "pve-fw-dport-spec", | |
19313 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
19314 | "type" : "string", | |
19315 | "optional" : 1 | |
19316 | }, | |
19317 | "sport" : { | |
56122987 | 19318 | "optional" : 1, |
7aacca6f DM |
19319 | "type" : "string", |
19320 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
19321 | "format" : "pve-fw-sport-spec" | |
56122987 | 19322 | }, |
7aacca6f | 19323 | "iface" : { |
56122987 | 19324 | "maxLength" : 20, |
7aacca6f DM |
19325 | "format" : "pve-iface", |
19326 | "type" : "string", | |
56122987 | 19327 | "optional" : 1, |
56122987 | 19328 | "minLength" : 2, |
7aacca6f | 19329 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings." |
56122987 | 19330 | }, |
7aacca6f DM |
19331 | "proto" : { |
19332 | "format" : "pve-fw-protocol-spec", | |
56122987 | 19333 | "type" : "string", |
7aacca6f DM |
19334 | "optional" : 1, |
19335 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." | |
56122987 DM |
19336 | }, |
19337 | "pos" : { | |
7aacca6f DM |
19338 | "minimum" : 0, |
19339 | "type" : "integer", | |
19340 | "optional" : 1, | |
19341 | "description" : "Update rule at position <pos>." | |
19342 | }, | |
19343 | "macro" : { | |
19344 | "maxLength" : 128, | |
19345 | "optional" : 1, | |
19346 | "type" : "string" | |
19347 | }, | |
19348 | "action" : { | |
19349 | "minLength" : 2, | |
19350 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
19351 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
19352 | "type" : "string", | |
56122987 | 19353 | "optional" : 1, |
7aacca6f DM |
19354 | "maxLength" : 20 |
19355 | }, | |
19356 | "enable" : { | |
56122987 | 19357 | "minimum" : 0, |
7aacca6f DM |
19358 | "type" : "integer", |
19359 | "optional" : 1 | |
56122987 | 19360 | } |
7aacca6f DM |
19361 | }, |
19362 | "additionalProperties" : 0 | |
56122987 DM |
19363 | }, |
19364 | "protected" : 1, | |
7aacca6f | 19365 | "method" : "PUT", |
56122987 DM |
19366 | "permissions" : { |
19367 | "check" : [ | |
19368 | "perm", | |
19369 | "/nodes/{node}", | |
19370 | [ | |
19371 | "Sys.Modify" | |
19372 | ] | |
19373 | ] | |
7aacca6f DM |
19374 | }, |
19375 | "proxyto" : "node", | |
19376 | "description" : "Modify rule data.", | |
19377 | "returns" : { | |
19378 | "type" : "null" | |
56122987 | 19379 | } |
7aacca6f DM |
19380 | }, |
19381 | "GET" : { | |
19382 | "method" : "GET", | |
19383 | "returns" : { | |
19384 | "type" : "object", | |
19385 | "properties" : { | |
19386 | "pos" : { | |
19387 | "type" : "integer" | |
19388 | } | |
19389 | } | |
19390 | }, | |
19391 | "parameters" : { | |
19392 | "properties" : { | |
19393 | "node" : { | |
19394 | "description" : "The cluster node name.", | |
19395 | "type" : "string", | |
19396 | "format" : "pve-node" | |
19397 | }, | |
19398 | "pos" : { | |
19399 | "minimum" : 0, | |
19400 | "description" : "Update rule at position <pos>.", | |
19401 | "type" : "integer", | |
19402 | "optional" : 1 | |
19403 | } | |
19404 | }, | |
19405 | "additionalProperties" : 0 | |
19406 | }, | |
19407 | "permissions" : { | |
19408 | "check" : [ | |
19409 | "perm", | |
19410 | "/nodes/{node}", | |
19411 | [ | |
19412 | "Sys.Audit" | |
19413 | ] | |
19414 | ] | |
19415 | }, | |
19416 | "name" : "get_rule", | |
19417 | "proxyto" : "node", | |
19418 | "description" : "Get single rule data." | |
56122987 | 19419 | } |
7aacca6f DM |
19420 | }, |
19421 | "path" : "/nodes/{node}/firewall/rules/{pos}", | |
19422 | "leaf" : 1 | |
56122987 DM |
19423 | } |
19424 | ], | |
56122987 DM |
19425 | "info" : { |
19426 | "GET" : { | |
56122987 | 19427 | "returns" : { |
56122987 | 19428 | "items" : { |
7aacca6f | 19429 | "type" : "object", |
56122987 DM |
19430 | "properties" : { |
19431 | "pos" : { | |
19432 | "type" : "integer" | |
19433 | } | |
56122987 DM |
19434 | } |
19435 | }, | |
7aacca6f DM |
19436 | "links" : [ |
19437 | { | |
19438 | "href" : "{pos}", | |
19439 | "rel" : "child" | |
19440 | } | |
19441 | ], | |
19442 | "type" : "array" | |
56122987 | 19443 | }, |
7aacca6f | 19444 | "method" : "GET", |
56122987 | 19445 | "description" : "List rules.", |
7aacca6f | 19446 | "proxyto" : "node", |
56122987 DM |
19447 | "permissions" : { |
19448 | "check" : [ | |
19449 | "perm", | |
19450 | "/nodes/{node}", | |
19451 | [ | |
19452 | "Sys.Audit" | |
19453 | ] | |
19454 | ] | |
7aacca6f DM |
19455 | }, |
19456 | "parameters" : { | |
19457 | "additionalProperties" : 0, | |
19458 | "properties" : { | |
19459 | "node" : { | |
19460 | "description" : "The cluster node name.", | |
19461 | "type" : "string", | |
19462 | "format" : "pve-node" | |
19463 | } | |
19464 | } | |
19465 | }, | |
19466 | "name" : "get_rules" | |
56122987 DM |
19467 | }, |
19468 | "POST" : { | |
7aacca6f DM |
19469 | "method" : "POST", |
19470 | "name" : "create_rule", | |
56122987 DM |
19471 | "parameters" : { |
19472 | "properties" : { | |
7aacca6f DM |
19473 | "dport" : { |
19474 | "format" : "pve-fw-dport-spec", | |
56122987 | 19475 | "type" : "string", |
56122987 | 19476 | "optional" : 1, |
7aacca6f | 19477 | "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." |
56122987 | 19478 | }, |
7aacca6f DM |
19479 | "enable" : { |
19480 | "minimum" : 0, | |
56122987 | 19481 | "optional" : 1, |
7aacca6f DM |
19482 | "type" : "integer" |
19483 | }, | |
19484 | "type" : { | |
19485 | "enum" : [ | |
19486 | "in", | |
19487 | "out", | |
19488 | "group" | |
19489 | ], | |
19490 | "optional" : 0, | |
56122987 DM |
19491 | "type" : "string" |
19492 | }, | |
7aacca6f DM |
19493 | "action" : { |
19494 | "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", | |
19495 | "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", | |
19496 | "minLength" : 2, | |
19497 | "optional" : 0, | |
56122987 | 19498 | "type" : "string", |
7aacca6f | 19499 | "maxLength" : 20 |
56122987 | 19500 | }, |
7aacca6f | 19501 | "pos" : { |
56122987 | 19502 | "minimum" : 0, |
7aacca6f | 19503 | "description" : "Update rule at position <pos>.", |
56122987 DM |
19504 | "type" : "integer", |
19505 | "optional" : 1 | |
19506 | }, | |
7aacca6f DM |
19507 | "proto" : { |
19508 | "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", | |
56122987 | 19509 | "optional" : 1, |
7aacca6f DM |
19510 | "type" : "string", |
19511 | "format" : "pve-fw-protocol-spec" | |
56122987 | 19512 | }, |
7aacca6f | 19513 | "macro" : { |
56122987 | 19514 | "type" : "string", |
7aacca6f DM |
19515 | "optional" : 1, |
19516 | "maxLength" : 128 | |
56122987 DM |
19517 | }, |
19518 | "node" : { | |
56122987 | 19519 | "type" : "string", |
7aacca6f DM |
19520 | "description" : "The cluster node name.", |
19521 | "format" : "pve-node" | |
56122987 | 19522 | }, |
7aacca6f DM |
19523 | "comment" : { |
19524 | "optional" : 1, | |
19525 | "type" : "string" | |
56122987 | 19526 | }, |
7aacca6f DM |
19527 | "iface" : { |
19528 | "format" : "pve-iface", | |
56122987 | 19529 | "maxLength" : 20, |
7aacca6f DM |
19530 | "minLength" : 2, |
19531 | "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", | |
19532 | "optional" : 1, | |
56122987 DM |
19533 | "type" : "string" |
19534 | }, | |
7aacca6f DM |
19535 | "sport" : { |
19536 | "format" : "pve-fw-sport-spec", | |
19537 | "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", | |
19538 | "optional" : 1, | |
19539 | "type" : "string" | |
56122987 DM |
19540 | }, |
19541 | "dest" : { | |
7aacca6f | 19542 | "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", |
56122987 DM |
19543 | "type" : "string", |
19544 | "optional" : 1, | |
7aacca6f | 19545 | "format" : "pve-fw-addr-spec" |
56122987 | 19546 | }, |
7aacca6f DM |
19547 | "source" : { |
19548 | "format" : "pve-fw-addr-spec", | |
19549 | "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", | |
19550 | "type" : "string", | |
19551 | "optional" : 1 | |
19552 | }, | |
19553 | "digest" : { | |
19554 | "maxLength" : 40, | |
19555 | "optional" : 1, | |
19556 | "type" : "string", | |
19557 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
56122987 DM |
19558 | } |
19559 | }, | |
19560 | "additionalProperties" : 0 | |
19561 | }, | |
7aacca6f DM |
19562 | "protected" : 1, |
19563 | "returns" : { | |
19564 | "type" : "null" | |
19565 | }, | |
56122987 DM |
19566 | "permissions" : { |
19567 | "check" : [ | |
19568 | "perm", | |
19569 | "/nodes/{node}", | |
19570 | [ | |
19571 | "Sys.Modify" | |
19572 | ] | |
19573 | ] | |
19574 | }, | |
7aacca6f DM |
19575 | "description" : "Create new rule.", |
19576 | "proxyto" : "node" | |
56122987 DM |
19577 | } |
19578 | }, | |
7aacca6f | 19579 | "path" : "/nodes/{node}/firewall/rules", |
56122987 DM |
19580 | "leaf" : 0 |
19581 | }, | |
19582 | { | |
7aacca6f | 19583 | "leaf" : 1, |
56122987 DM |
19584 | "path" : "/nodes/{node}/firewall/options", |
19585 | "info" : { | |
19586 | "PUT" : { | |
19587 | "protected" : 1, | |
7aacca6f | 19588 | "name" : "set_options", |
56122987 | 19589 | "parameters" : { |
7aacca6f | 19590 | "additionalProperties" : 0, |
56122987 DM |
19591 | "properties" : { |
19592 | "digest" : { | |
7aacca6f DM |
19593 | "type" : "string", |
19594 | "optional" : 1, | |
56122987 | 19595 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", |
7aacca6f DM |
19596 | "maxLength" : 40 |
19597 | }, | |
19598 | "nf_conntrack_max" : { | |
19599 | "minimum" : 32768, | |
19600 | "type" : "integer", | |
56122987 | 19601 | "optional" : 1, |
7aacca6f | 19602 | "description" : "Maximum number of tracked connections." |
56122987 | 19603 | }, |
7aacca6f | 19604 | "ndp" : { |
56122987 | 19605 | "optional" : 1, |
7aacca6f DM |
19606 | "type" : "boolean", |
19607 | "description" : "Enable NDP." | |
56122987 | 19608 | }, |
7aacca6f DM |
19609 | "nf_conntrack_tcp_timeout_established" : { |
19610 | "minimum" : 7875, | |
19611 | "optional" : 1, | |
19612 | "type" : "integer", | |
19613 | "description" : "Conntrack established timeout." | |
19614 | }, | |
19615 | "nosmurfs" : { | |
19616 | "description" : "Enable SMURFS filter.", | |
19617 | "type" : "boolean", | |
19618 | "optional" : 1 | |
19619 | }, | |
19620 | "tcp_flags_log_level" : { | |
19621 | "optional" : 1, | |
56122987 DM |
19622 | "type" : "string", |
19623 | "enum" : [ | |
19624 | "emerg", | |
19625 | "alert", | |
19626 | "crit", | |
19627 | "err", | |
19628 | "warning", | |
19629 | "notice", | |
19630 | "info", | |
19631 | "debug", | |
19632 | "nolog" | |
19633 | ], | |
7aacca6f | 19634 | "description" : "Log level for illegal tcp flags filter." |
56122987 | 19635 | }, |
7aacca6f | 19636 | "log_level_in" : { |
56122987 | 19637 | "optional" : 1, |
56122987 | 19638 | "type" : "string", |
56122987 DM |
19639 | "enum" : [ |
19640 | "emerg", | |
19641 | "alert", | |
19642 | "crit", | |
19643 | "err", | |
19644 | "warning", | |
19645 | "notice", | |
19646 | "info", | |
19647 | "debug", | |
19648 | "nolog" | |
19649 | ], | |
7aacca6f | 19650 | "description" : "Log level for incoming traffic." |
56122987 | 19651 | }, |
7aacca6f | 19652 | "smurf_log_level" : { |
56122987 DM |
19653 | "enum" : [ |
19654 | "emerg", | |
19655 | "alert", | |
19656 | "crit", | |
19657 | "err", | |
19658 | "warning", | |
19659 | "notice", | |
19660 | "info", | |
19661 | "debug", | |
19662 | "nolog" | |
7aacca6f DM |
19663 | ], |
19664 | "description" : "Log level for SMURFS filter.", | |
19665 | "optional" : 1, | |
19666 | "type" : "string" | |
56122987 | 19667 | }, |
7aacca6f DM |
19668 | "delete" : { |
19669 | "description" : "A list of settings you want to delete.", | |
19670 | "type" : "string", | |
56122987 | 19671 | "optional" : 1, |
7aacca6f | 19672 | "format" : "pve-configid-list" |
56122987 | 19673 | }, |
7aacca6f DM |
19674 | "node" : { |
19675 | "format" : "pve-node", | |
56122987 | 19676 | "type" : "string", |
7aacca6f DM |
19677 | "description" : "The cluster node name." |
19678 | }, | |
19679 | "tcpflags" : { | |
19680 | "optional" : 1, | |
19681 | "type" : "boolean", | |
19682 | "description" : "Filter illegal combinations of TCP flags." | |
19683 | }, | |
19684 | "log_level_out" : { | |
56122987 DM |
19685 | "enum" : [ |
19686 | "emerg", | |
19687 | "alert", | |
19688 | "crit", | |
19689 | "err", | |
19690 | "warning", | |
19691 | "notice", | |
19692 | "info", | |
19693 | "debug", | |
19694 | "nolog" | |
19695 | ], | |
7aacca6f DM |
19696 | "description" : "Log level for outgoing traffic.", |
19697 | "type" : "string", | |
19698 | "optional" : 1 | |
19699 | }, | |
19700 | "enable" : { | |
19701 | "type" : "boolean", | |
56122987 | 19702 | "optional" : 1, |
7aacca6f | 19703 | "description" : "Enable host firewall rules." |
56122987 | 19704 | } |
7aacca6f | 19705 | } |
56122987 | 19706 | }, |
7aacca6f DM |
19707 | "method" : "PUT", |
19708 | "proxyto" : "node", | |
56122987 | 19709 | "description" : "Set Firewall options.", |
7aacca6f DM |
19710 | "permissions" : { |
19711 | "check" : [ | |
19712 | "perm", | |
19713 | "/nodes/{node}", | |
19714 | [ | |
19715 | "Sys.Modify" | |
19716 | ] | |
19717 | ] | |
19718 | }, | |
56122987 DM |
19719 | "returns" : { |
19720 | "type" : "null" | |
7aacca6f | 19721 | } |
56122987 DM |
19722 | }, |
19723 | "GET" : { | |
7aacca6f DM |
19724 | "proxyto" : "node", |
19725 | "description" : "Get host firewall options.", | |
56122987 DM |
19726 | "permissions" : { |
19727 | "check" : [ | |
19728 | "perm", | |
19729 | "/nodes/{node}", | |
19730 | [ | |
19731 | "Sys.Audit" | |
19732 | ] | |
19733 | ] | |
19734 | }, | |
7aacca6f DM |
19735 | "parameters" : { |
19736 | "properties" : { | |
19737 | "node" : { | |
19738 | "description" : "The cluster node name.", | |
19739 | "type" : "string", | |
19740 | "format" : "pve-node" | |
19741 | } | |
19742 | }, | |
19743 | "additionalProperties" : 0 | |
19744 | }, | |
56122987 DM |
19745 | "name" : "get_options", |
19746 | "returns" : { | |
7aacca6f | 19747 | "type" : "object", |
56122987 DM |
19748 | "properties" : { |
19749 | "nf_conntrack_tcp_timeout_established" : { | |
56122987 DM |
19750 | "description" : "Conntrack established timeout.", |
19751 | "type" : "integer", | |
7aacca6f | 19752 | "optional" : 1, |
56122987 DM |
19753 | "minimum" : 7875 |
19754 | }, | |
7aacca6f DM |
19755 | "nosmurfs" : { |
19756 | "description" : "Enable SMURFS filter.", | |
56122987 | 19757 | "type" : "boolean", |
56122987 DM |
19758 | "optional" : 1 |
19759 | }, | |
7aacca6f DM |
19760 | "tcp_flags_log_level" : { |
19761 | "type" : "string", | |
19762 | "optional" : 1, | |
19763 | "description" : "Log level for illegal tcp flags filter.", | |
56122987 DM |
19764 | "enum" : [ |
19765 | "emerg", | |
19766 | "alert", | |
19767 | "crit", | |
19768 | "err", | |
19769 | "warning", | |
19770 | "notice", | |
19771 | "info", | |
19772 | "debug", | |
19773 | "nolog" | |
7aacca6f DM |
19774 | ] |
19775 | }, | |
19776 | "nf_conntrack_max" : { | |
19777 | "description" : "Maximum number of tracked connections.", | |
19778 | "type" : "integer", | |
56122987 | 19779 | "optional" : 1, |
7aacca6f | 19780 | "minimum" : 32768 |
56122987 | 19781 | }, |
7aacca6f DM |
19782 | "ndp" : { |
19783 | "type" : "boolean", | |
19784 | "optional" : 1, | |
19785 | "description" : "Enable NDP." | |
19786 | }, | |
19787 | "smurf_log_level" : { | |
56122987 DM |
19788 | "enum" : [ |
19789 | "emerg", | |
19790 | "alert", | |
19791 | "crit", | |
19792 | "err", | |
19793 | "warning", | |
19794 | "notice", | |
19795 | "info", | |
19796 | "debug", | |
19797 | "nolog" | |
19798 | ], | |
7aacca6f | 19799 | "description" : "Log level for SMURFS filter.", |
56122987 | 19800 | "optional" : 1, |
7aacca6f | 19801 | "type" : "string" |
56122987 DM |
19802 | }, |
19803 | "log_level_in" : { | |
7aacca6f DM |
19804 | "optional" : 1, |
19805 | "type" : "string", | |
19806 | "description" : "Log level for incoming traffic.", | |
56122987 DM |
19807 | "enum" : [ |
19808 | "emerg", | |
19809 | "alert", | |
19810 | "crit", | |
19811 | "err", | |
19812 | "warning", | |
19813 | "notice", | |
19814 | "info", | |
19815 | "debug", | |
19816 | "nolog" | |
7aacca6f | 19817 | ] |
56122987 DM |
19818 | }, |
19819 | "tcpflags" : { | |
56122987 | 19820 | "description" : "Filter illegal combinations of TCP flags.", |
56122987 | 19821 | "type" : "boolean", |
7aacca6f | 19822 | "optional" : 1 |
56122987 DM |
19823 | }, |
19824 | "log_level_out" : { | |
7aacca6f | 19825 | "description" : "Log level for outgoing traffic.", |
56122987 DM |
19826 | "enum" : [ |
19827 | "emerg", | |
19828 | "alert", | |
19829 | "crit", | |
19830 | "err", | |
19831 | "warning", | |
19832 | "notice", | |
19833 | "info", | |
19834 | "debug", | |
19835 | "nolog" | |
19836 | ], | |
7aacca6f DM |
19837 | "type" : "string", |
19838 | "optional" : 1 | |
19839 | }, | |
19840 | "enable" : { | |
19841 | "description" : "Enable host firewall rules.", | |
56122987 | 19842 | "optional" : 1, |
7aacca6f | 19843 | "type" : "boolean" |
56122987 | 19844 | } |
7aacca6f | 19845 | } |
56122987 | 19846 | }, |
7aacca6f DM |
19847 | "method" : "GET" |
19848 | } | |
19849 | }, | |
19850 | "text" : "options" | |
19851 | }, | |
19852 | { | |
19853 | "leaf" : 1, | |
19854 | "path" : "/nodes/{node}/firewall/log", | |
19855 | "info" : { | |
19856 | "GET" : { | |
19857 | "protected" : 1, | |
19858 | "name" : "log", | |
56122987 DM |
19859 | "parameters" : { |
19860 | "properties" : { | |
7aacca6f DM |
19861 | "start" : { |
19862 | "type" : "integer", | |
19863 | "optional" : 1, | |
19864 | "minimum" : 0 | |
19865 | }, | |
19866 | "limit" : { | |
19867 | "type" : "integer", | |
19868 | "optional" : 1, | |
19869 | "minimum" : 0 | |
19870 | }, | |
56122987 | 19871 | "node" : { |
56122987 | 19872 | "format" : "pve-node", |
7aacca6f DM |
19873 | "description" : "The cluster node name.", |
19874 | "type" : "string" | |
56122987 DM |
19875 | } |
19876 | }, | |
19877 | "additionalProperties" : 0 | |
7aacca6f DM |
19878 | }, |
19879 | "method" : "GET", | |
19880 | "description" : "Read firewall log", | |
19881 | "proxyto" : "node", | |
56122987 DM |
19882 | "permissions" : { |
19883 | "check" : [ | |
19884 | "perm", | |
19885 | "/nodes/{node}", | |
19886 | [ | |
19887 | "Sys.Syslog" | |
19888 | ] | |
19889 | ] | |
19890 | }, | |
56122987 DM |
19891 | "returns" : { |
19892 | "items" : { | |
19893 | "type" : "object", | |
19894 | "properties" : { | |
56122987 DM |
19895 | "n" : { |
19896 | "type" : "integer", | |
19897 | "description" : "Line number" | |
7aacca6f DM |
19898 | }, |
19899 | "t" : { | |
19900 | "type" : "string", | |
19901 | "description" : "Line text" | |
56122987 DM |
19902 | } |
19903 | } | |
19904 | }, | |
19905 | "type" : "array" | |
7aacca6f | 19906 | } |
56122987 DM |
19907 | } |
19908 | }, | |
7aacca6f | 19909 | "text" : "log" |
56122987 DM |
19910 | } |
19911 | ], | |
7aacca6f | 19912 | "text" : "firewall", |
56122987 DM |
19913 | "info" : { |
19914 | "GET" : { | |
19915 | "parameters" : { | |
56122987 DM |
19916 | "properties" : { |
19917 | "node" : { | |
19918 | "description" : "The cluster node name.", | |
7aacca6f DM |
19919 | "type" : "string", |
19920 | "format" : "pve-node" | |
56122987 | 19921 | } |
7aacca6f DM |
19922 | }, |
19923 | "additionalProperties" : 0 | |
56122987 | 19924 | }, |
7aacca6f DM |
19925 | "permissions" : { |
19926 | "user" : "all" | |
19927 | }, | |
19928 | "name" : "index", | |
19929 | "description" : "Directory index.", | |
56122987 | 19930 | "returns" : { |
7aacca6f | 19931 | "type" : "array", |
56122987 DM |
19932 | "items" : { |
19933 | "properties" : {}, | |
19934 | "type" : "object" | |
19935 | }, | |
56122987 DM |
19936 | "links" : [ |
19937 | { | |
7aacca6f DM |
19938 | "rel" : "child", |
19939 | "href" : "{name}" | |
56122987 DM |
19940 | } |
19941 | ] | |
19942 | }, | |
7aacca6f | 19943 | "method" : "GET" |
56122987 | 19944 | } |
7aacca6f DM |
19945 | }, |
19946 | "path" : "/nodes/{node}/firewall", | |
19947 | "leaf" : 0 | |
56122987 DM |
19948 | }, |
19949 | { | |
56122987 DM |
19950 | "info" : { |
19951 | "GET" : { | |
56122987 | 19952 | "parameters" : { |
56122987 DM |
19953 | "properties" : { |
19954 | "node" : { | |
19955 | "format" : "pve-node", | |
56122987 | 19956 | "description" : "The cluster node name.", |
7aacca6f | 19957 | "type" : "string" |
56122987 DM |
19958 | } |
19959 | }, | |
19960 | "additionalProperties" : 0 | |
19961 | }, | |
7aacca6f | 19962 | "name" : "version", |
56122987 | 19963 | "permissions" : { |
7aacca6f | 19964 | "user" : "all" |
56122987 | 19965 | }, |
56122987 | 19966 | "proxyto" : "node", |
7aacca6f | 19967 | "description" : "API version details", |
56122987 | 19968 | "method" : "GET", |
56122987 | 19969 | "returns" : { |
7aacca6f | 19970 | "type" : "object", |
56122987 | 19971 | "properties" : { |
7aacca6f | 19972 | "repoid" : { |
56122987 DM |
19973 | "type" : "string" |
19974 | }, | |
7aacca6f DM |
19975 | "release" : { |
19976 | "type" : "string" | |
19977 | }, | |
19978 | "version" : { | |
19979 | "type" : "string" | |
19980 | } | |
19981 | } | |
19982 | } | |
56122987 DM |
19983 | } |
19984 | }, | |
7aacca6f | 19985 | "text" : "version", |
56122987 | 19986 | "leaf" : 1, |
7aacca6f | 19987 | "path" : "/nodes/{node}/version" |
56122987 DM |
19988 | }, |
19989 | { | |
56122987 DM |
19990 | "info" : { |
19991 | "GET" : { | |
19992 | "method" : "GET", | |
56122987 | 19993 | "returns" : { |
7aacca6f DM |
19994 | "properties" : {}, |
19995 | "type" : "object" | |
56122987 | 19996 | }, |
7aacca6f DM |
19997 | "description" : "Read node status", |
19998 | "proxyto" : "node", | |
19999 | "name" : "status", | |
56122987 DM |
20000 | "parameters" : { |
20001 | "properties" : { | |
20002 | "node" : { | |
56122987 | 20003 | "type" : "string", |
7aacca6f DM |
20004 | "description" : "The cluster node name.", |
20005 | "format" : "pve-node" | |
56122987 DM |
20006 | } |
20007 | }, | |
20008 | "additionalProperties" : 0 | |
20009 | }, | |
56122987 DM |
20010 | "permissions" : { |
20011 | "check" : [ | |
20012 | "perm", | |
20013 | "/nodes/{node}", | |
20014 | [ | |
20015 | "Sys.Audit" | |
20016 | ] | |
20017 | ] | |
7aacca6f DM |
20018 | } |
20019 | }, | |
20020 | "POST" : { | |
20021 | "name" : "node_cmd", | |
56122987 DM |
20022 | "parameters" : { |
20023 | "properties" : { | |
20024 | "node" : { | |
20025 | "type" : "string", | |
7aacca6f DM |
20026 | "description" : "The cluster node name.", |
20027 | "format" : "pve-node" | |
56122987 | 20028 | }, |
7aacca6f DM |
20029 | "command" : { |
20030 | "description" : "Specify the command.", | |
56122987 | 20031 | "enum" : [ |
7aacca6f DM |
20032 | "reboot", |
20033 | "shutdown" | |
56122987 DM |
20034 | ], |
20035 | "type" : "string" | |
56122987 DM |
20036 | } |
20037 | }, | |
20038 | "additionalProperties" : 0 | |
7aacca6f DM |
20039 | }, |
20040 | "protected" : 1, | |
20041 | "method" : "POST", | |
20042 | "permissions" : { | |
20043 | "check" : [ | |
20044 | "perm", | |
20045 | "/nodes/{node}", | |
20046 | [ | |
20047 | "Sys.PowerMgmt" | |
20048 | ] | |
20049 | ] | |
20050 | }, | |
20051 | "proxyto" : "node", | |
20052 | "description" : "Reboot or shutdown a node.", | |
20053 | "returns" : { | |
20054 | "type" : "null" | |
56122987 DM |
20055 | } |
20056 | } | |
20057 | }, | |
7aacca6f DM |
20058 | "text" : "status", |
20059 | "leaf" : 1, | |
20060 | "path" : "/nodes/{node}/status" | |
56122987 DM |
20061 | }, |
20062 | { | |
56122987 | 20063 | "leaf" : 1, |
7aacca6f | 20064 | "path" : "/nodes/{node}/netstat", |
56122987 DM |
20065 | "info" : { |
20066 | "GET" : { | |
56122987 DM |
20067 | "returns" : { |
20068 | "type" : "array", | |
20069 | "items" : { | |
7aacca6f DM |
20070 | "properties" : {}, |
20071 | "type" : "object" | |
56122987 DM |
20072 | } |
20073 | }, | |
7aacca6f | 20074 | "method" : "GET", |
56122987 DM |
20075 | "permissions" : { |
20076 | "check" : [ | |
20077 | "perm", | |
20078 | "/nodes/{node}", | |
20079 | [ | |
7aacca6f | 20080 | "Sys.Audit" |
56122987 DM |
20081 | ] |
20082 | ] | |
20083 | }, | |
56122987 DM |
20084 | "parameters" : { |
20085 | "properties" : { | |
56122987 | 20086 | "node" : { |
7aacca6f | 20087 | "description" : "The cluster node name.", |
56122987 | 20088 | "type" : "string", |
7aacca6f | 20089 | "format" : "pve-node" |
56122987 DM |
20090 | } |
20091 | }, | |
20092 | "additionalProperties" : 0 | |
20093 | }, | |
7aacca6f DM |
20094 | "name" : "netstat", |
20095 | "proxyto" : "node", | |
20096 | "description" : "Read tap/vm network device interface counters" | |
20097 | } | |
20098 | }, | |
20099 | "text" : "netstat" | |
20100 | }, | |
20101 | { | |
20102 | "info" : { | |
20103 | "POST" : { | |
20104 | "returns" : { | |
20105 | "properties" : {}, | |
20106 | "type" : "array" | |
20107 | }, | |
20108 | "proxyto" : "node", | |
20109 | "description" : "Execute multiple commands in order.", | |
56122987 DM |
20110 | "permissions" : { |
20111 | "check" : [ | |
20112 | "perm", | |
20113 | "/nodes/{node}", | |
20114 | [ | |
7aacca6f | 20115 | "Sys.Audit" |
56122987 | 20116 | ] |
7aacca6f | 20117 | ] |
56122987 | 20118 | }, |
7aacca6f DM |
20119 | "method" : "POST", |
20120 | "protected" : 1, | |
20121 | "name" : "execute", | |
56122987 DM |
20122 | "parameters" : { |
20123 | "additionalProperties" : 0, | |
20124 | "properties" : { | |
7aacca6f DM |
20125 | "commands" : { |
20126 | "description" : "JSON encoded array of commands.", | |
56122987 DM |
20127 | "type" : "string" |
20128 | }, | |
20129 | "node" : { | |
20130 | "format" : "pve-node", | |
20131 | "type" : "string", | |
20132 | "description" : "The cluster node name." | |
20133 | } | |
20134 | } | |
56122987 DM |
20135 | } |
20136 | } | |
20137 | }, | |
7aacca6f | 20138 | "text" : "execute", |
56122987 | 20139 | "leaf" : 1, |
7aacca6f | 20140 | "path" : "/nodes/{node}/execute" |
56122987 DM |
20141 | }, |
20142 | { | |
7aacca6f | 20143 | "text" : "rrd", |
56122987 | 20144 | "info" : { |
7aacca6f DM |
20145 | "GET" : { |
20146 | "name" : "rrd", | |
56122987 | 20147 | "parameters" : { |
7aacca6f | 20148 | "additionalProperties" : 0, |
56122987 | 20149 | "properties" : { |
7aacca6f DM |
20150 | "ds" : { |
20151 | "type" : "string", | |
20152 | "description" : "The list of datasources you want to display.", | |
20153 | "format" : "pve-configid-list" | |
20154 | }, | |
20155 | "timeframe" : { | |
20156 | "description" : "Specify the time frame you are interested in.", | |
20157 | "enum" : [ | |
20158 | "hour", | |
20159 | "day", | |
20160 | "week", | |
20161 | "month", | |
20162 | "year" | |
20163 | ], | |
20164 | "type" : "string" | |
56122987 DM |
20165 | }, |
20166 | "node" : { | |
20167 | "description" : "The cluster node name.", | |
7aacca6f DM |
20168 | "type" : "string", |
20169 | "format" : "pve-node" | |
56122987 | 20170 | }, |
7aacca6f | 20171 | "cf" : { |
56122987 | 20172 | "type" : "string", |
7aacca6f DM |
20173 | "optional" : 1, |
20174 | "enum" : [ | |
20175 | "AVERAGE", | |
20176 | "MAX" | |
20177 | ], | |
20178 | "description" : "The RRD consolidation function" | |
56122987 | 20179 | } |
7aacca6f | 20180 | } |
56122987 | 20181 | }, |
56122987 | 20182 | "permissions" : { |
56122987 DM |
20183 | "check" : [ |
20184 | "perm", | |
20185 | "/nodes/{node}", | |
20186 | [ | |
7aacca6f | 20187 | "Sys.Audit" |
56122987 DM |
20188 | ] |
20189 | ] | |
20190 | }, | |
7aacca6f DM |
20191 | "protected" : 1, |
20192 | "description" : "Read node RRD statistics (returns PNG)", | |
56122987 | 20193 | "returns" : { |
7aacca6f | 20194 | "type" : "object", |
56122987 | 20195 | "properties" : { |
7aacca6f | 20196 | "filename" : { |
56122987 DM |
20197 | "type" : "string" |
20198 | } | |
20199 | } | |
20200 | }, | |
7aacca6f | 20201 | "method" : "GET" |
56122987 DM |
20202 | } |
20203 | }, | |
7aacca6f | 20204 | "path" : "/nodes/{node}/rrd", |
56122987 DM |
20205 | "leaf" : 1 |
20206 | }, | |
20207 | { | |
7aacca6f DM |
20208 | "leaf" : 1, |
20209 | "path" : "/nodes/{node}/rrddata", | |
56122987 | 20210 | "info" : { |
7aacca6f DM |
20211 | "GET" : { |
20212 | "name" : "rrddata", | |
56122987 DM |
20213 | "permissions" : { |
20214 | "check" : [ | |
20215 | "perm", | |
20216 | "/nodes/{node}", | |
20217 | [ | |
7aacca6f | 20218 | "Sys.Audit" |
56122987 DM |
20219 | ] |
20220 | ] | |
20221 | }, | |
56122987 DM |
20222 | "parameters" : { |
20223 | "properties" : { | |
7aacca6f | 20224 | "cf" : { |
56122987 | 20225 | "optional" : 1, |
7aacca6f DM |
20226 | "type" : "string", |
20227 | "description" : "The RRD consolidation function", | |
20228 | "enum" : [ | |
20229 | "AVERAGE", | |
20230 | "MAX" | |
20231 | ] | |
56122987 DM |
20232 | }, |
20233 | "node" : { | |
56122987 | 20234 | "format" : "pve-node", |
56122987 | 20235 | "type" : "string", |
7aacca6f | 20236 | "description" : "The cluster node name." |
56122987 | 20237 | }, |
7aacca6f | 20238 | "timeframe" : { |
56122987 | 20239 | "type" : "string", |
7aacca6f DM |
20240 | "description" : "Specify the time frame you are interested in.", |
20241 | "enum" : [ | |
20242 | "hour", | |
20243 | "day", | |
20244 | "week", | |
20245 | "month", | |
20246 | "year" | |
20247 | ] | |
56122987 DM |
20248 | } |
20249 | }, | |
7aacca6f | 20250 | "additionalProperties" : 0 |
56122987 | 20251 | }, |
7aacca6f DM |
20252 | "protected" : 1, |
20253 | "description" : "Read node RRD statistics", | |
20254 | "returns" : { | |
20255 | "type" : "array", | |
20256 | "items" : { | |
20257 | "type" : "object", | |
20258 | "properties" : {} | |
56122987 DM |
20259 | } |
20260 | }, | |
7aacca6f | 20261 | "method" : "GET" |
56122987 DM |
20262 | } |
20263 | }, | |
7aacca6f | 20264 | "text" : "rrddata" |
56122987 DM |
20265 | }, |
20266 | { | |
56122987 | 20267 | "leaf" : 1, |
7aacca6f | 20268 | "path" : "/nodes/{node}/syslog", |
56122987 DM |
20269 | "info" : { |
20270 | "GET" : { | |
7aacca6f | 20271 | "description" : "Read system log", |
56122987 | 20272 | "proxyto" : "node", |
56122987 DM |
20273 | "permissions" : { |
20274 | "check" : [ | |
20275 | "perm", | |
20276 | "/nodes/{node}", | |
20277 | [ | |
7aacca6f | 20278 | "Sys.Syslog" |
56122987 DM |
20279 | ] |
20280 | ] | |
7aacca6f | 20281 | }, |
56122987 | 20282 | "returns" : { |
7aacca6f DM |
20283 | "items" : { |
20284 | "properties" : { | |
20285 | "t" : { | |
20286 | "type" : "string", | |
20287 | "description" : "Line text" | |
20288 | }, | |
20289 | "n" : { | |
20290 | "description" : "Line number", | |
20291 | "type" : "integer" | |
20292 | } | |
20293 | }, | |
20294 | "type" : "object" | |
20295 | }, | |
20296 | "type" : "array" | |
56122987 | 20297 | }, |
7aacca6f | 20298 | "protected" : 1, |
56122987 DM |
20299 | "parameters" : { |
20300 | "properties" : { | |
7aacca6f DM |
20301 | "since" : { |
20302 | "optional" : 1, | |
20303 | "type" : "string", | |
20304 | "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", | |
20305 | "description" : "Display all log since this date-time string." | |
20306 | }, | |
56122987 | 20307 | "node" : { |
56122987 | 20308 | "type" : "string", |
7aacca6f | 20309 | "description" : "The cluster node name.", |
56122987 DM |
20310 | "format" : "pve-node" |
20311 | }, | |
7aacca6f DM |
20312 | "limit" : { |
20313 | "minimum" : 0, | |
20314 | "optional" : 1, | |
20315 | "type" : "integer" | |
20316 | }, | |
20317 | "until" : { | |
20318 | "description" : "Display all log until this date-time string.", | |
20319 | "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", | |
20320 | "optional" : 1, | |
56122987 | 20321 | "type" : "string" |
7aacca6f DM |
20322 | }, |
20323 | "start" : { | |
20324 | "minimum" : 0, | |
20325 | "type" : "integer", | |
20326 | "optional" : 1 | |
56122987 DM |
20327 | } |
20328 | }, | |
20329 | "additionalProperties" : 0 | |
20330 | }, | |
7aacca6f DM |
20331 | "name" : "syslog", |
20332 | "method" : "GET" | |
56122987 DM |
20333 | } |
20334 | }, | |
7aacca6f | 20335 | "text" : "syslog" |
56122987 DM |
20336 | }, |
20337 | { | |
56122987 DM |
20338 | "info" : { |
20339 | "POST" : { | |
7aacca6f | 20340 | "returns" : { |
56122987 | 20341 | "properties" : { |
7aacca6f DM |
20342 | "user" : { |
20343 | "type" : "string" | |
56122987 | 20344 | }, |
7aacca6f DM |
20345 | "port" : { |
20346 | "type" : "integer" | |
56122987 | 20347 | }, |
7aacca6f DM |
20348 | "ticket" : { |
20349 | "type" : "string" | |
20350 | }, | |
20351 | "upid" : { | |
20352 | "type" : "string" | |
20353 | }, | |
20354 | "cert" : { | |
20355 | "type" : "string" | |
56122987 DM |
20356 | } |
20357 | }, | |
20358 | "additionalProperties" : 0 | |
20359 | }, | |
7aacca6f | 20360 | "method" : "POST", |
56122987 | 20361 | "permissions" : { |
7aacca6f | 20362 | "description" : "Restricted to users on realm 'pam'", |
56122987 DM |
20363 | "check" : [ |
20364 | "perm", | |
7aacca6f | 20365 | "/nodes/{node}", |
56122987 | 20366 | [ |
7aacca6f | 20367 | "Sys.Console" |
56122987 DM |
20368 | ] |
20369 | ] | |
20370 | }, | |
56122987 DM |
20371 | "parameters" : { |
20372 | "properties" : { | |
7aacca6f DM |
20373 | "upgrade" : { |
20374 | "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", | |
20375 | "default" : 0, | |
20376 | "type" : "boolean", | |
20377 | "optional" : 1 | |
20378 | }, | |
56122987 DM |
20379 | "node" : { |
20380 | "type" : "string", | |
7aacca6f DM |
20381 | "description" : "The cluster node name.", |
20382 | "format" : "pve-node" | |
20383 | }, | |
20384 | "websocket" : { | |
20385 | "optional" : 1, | |
20386 | "type" : "boolean", | |
20387 | "description" : "use websocket instead of standard vnc." | |
56122987 DM |
20388 | } |
20389 | }, | |
20390 | "additionalProperties" : 0 | |
20391 | }, | |
7aacca6f DM |
20392 | "name" : "vncshell", |
20393 | "protected" : 1, | |
20394 | "description" : "Creates a VNC Shell proxy." | |
56122987 DM |
20395 | } |
20396 | }, | |
7aacca6f DM |
20397 | "text" : "vncshell", |
20398 | "leaf" : 1, | |
20399 | "path" : "/nodes/{node}/vncshell" | |
56122987 DM |
20400 | }, |
20401 | { | |
7aacca6f | 20402 | "text" : "vncwebsocket", |
56122987 DM |
20403 | "info" : { |
20404 | "GET" : { | |
7aacca6f DM |
20405 | "method" : "GET", |
20406 | "returns" : { | |
20407 | "properties" : { | |
20408 | "port" : { | |
20409 | "type" : "string" | |
20410 | } | |
20411 | }, | |
20412 | "type" : "object" | |
20413 | }, | |
20414 | "description" : "Opens a weksocket for VNC traffic.", | |
56122987 | 20415 | "parameters" : { |
56122987 | 20416 | "properties" : { |
7aacca6f DM |
20417 | "vncticket" : { |
20418 | "maxLength" : 512, | |
20419 | "description" : "Ticket from previous call to vncproxy.", | |
20420 | "type" : "string" | |
20421 | }, | |
56122987 | 20422 | "node" : { |
7aacca6f | 20423 | "format" : "pve-node", |
56122987 | 20424 | "description" : "The cluster node name.", |
7aacca6f DM |
20425 | "type" : "string" |
20426 | }, | |
20427 | "port" : { | |
20428 | "minimum" : 5900, | |
20429 | "description" : "Port number returned by previous vncproxy call.", | |
20430 | "maximum" : 5999, | |
20431 | "type" : "integer" | |
56122987 | 20432 | } |
7aacca6f DM |
20433 | }, |
20434 | "additionalProperties" : 0 | |
56122987 | 20435 | }, |
7aacca6f | 20436 | "name" : "vncwebsocket", |
56122987 | 20437 | "permissions" : { |
7aacca6f | 20438 | "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket).", |
56122987 DM |
20439 | "check" : [ |
20440 | "perm", | |
20441 | "/nodes/{node}", | |
20442 | [ | |
7aacca6f | 20443 | "Sys.Console" |
56122987 DM |
20444 | ] |
20445 | ] | |
7aacca6f | 20446 | } |
56122987 DM |
20447 | } |
20448 | }, | |
7aacca6f | 20449 | "path" : "/nodes/{node}/vncwebsocket", |
56122987 DM |
20450 | "leaf" : 1 |
20451 | }, | |
20452 | { | |
20453 | "info" : { | |
20454 | "POST" : { | |
7aacca6f DM |
20455 | "method" : "POST", |
20456 | "protected" : 1, | |
56122987 | 20457 | "parameters" : { |
7aacca6f | 20458 | "additionalProperties" : 0, |
56122987 | 20459 | "properties" : { |
7aacca6f DM |
20460 | "upgrade" : { |
20461 | "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", | |
20462 | "default" : 0, | |
20463 | "type" : "boolean", | |
20464 | "optional" : 1 | |
20465 | }, | |
20466 | "proxy" : { | |
20467 | "format" : "address", | |
20468 | "optional" : 1, | |
56122987 | 20469 | "type" : "string", |
7aacca6f DM |
20470 | "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI)." |
20471 | }, | |
20472 | "node" : { | |
56122987 | 20473 | "format" : "pve-node", |
7aacca6f | 20474 | "type" : "string", |
56122987 | 20475 | "description" : "The cluster node name." |
7aacca6f DM |
20476 | } |
20477 | } | |
20478 | }, | |
20479 | "name" : "spiceshell", | |
20480 | "returns" : { | |
20481 | "description" : "Returned values can be directly passed to the 'remote-viewer' application.", | |
20482 | "additionalProperties" : 1, | |
20483 | "properties" : { | |
20484 | "proxy" : { | |
20485 | "type" : "string" | |
56122987 | 20486 | }, |
7aacca6f DM |
20487 | "tls-port" : { |
20488 | "type" : "integer" | |
20489 | }, | |
20490 | "password" : { | |
20491 | "type" : "string" | |
20492 | }, | |
20493 | "type" : { | |
20494 | "type" : "string" | |
20495 | }, | |
20496 | "host" : { | |
20497 | "type" : "string" | |
56122987 | 20498 | } |
7aacca6f | 20499 | } |
56122987 DM |
20500 | }, |
20501 | "proxyto" : "node", | |
7aacca6f | 20502 | "description" : "Creates a SPICE shell.", |
56122987 DM |
20503 | "permissions" : { |
20504 | "check" : [ | |
20505 | "perm", | |
7aacca6f | 20506 | "/nodes/{node}", |
56122987 | 20507 | [ |
7aacca6f | 20508 | "Sys.Console" |
56122987 | 20509 | ] |
7aacca6f DM |
20510 | ], |
20511 | "description" : "Restricted to users on realm 'pam'" | |
20512 | } | |
56122987 DM |
20513 | } |
20514 | }, | |
7aacca6f | 20515 | "text" : "spiceshell", |
56122987 | 20516 | "leaf" : 1, |
7aacca6f | 20517 | "path" : "/nodes/{node}/spiceshell" |
56122987 DM |
20518 | }, |
20519 | { | |
7aacca6f | 20520 | "path" : "/nodes/{node}/dns", |
56122987 | 20521 | "leaf" : 1, |
7aacca6f | 20522 | "text" : "dns", |
56122987 | 20523 | "info" : { |
7aacca6f DM |
20524 | "GET" : { |
20525 | "method" : "GET", | |
20526 | "returns" : { | |
20527 | "type" : "object", | |
20528 | "additionalProperties" : 0, | |
20529 | "properties" : { | |
20530 | "search" : { | |
20531 | "description" : "Search domain for host-name lookup.", | |
20532 | "type" : "string", | |
20533 | "optional" : 1 | |
20534 | }, | |
20535 | "dns3" : { | |
20536 | "optional" : 1, | |
20537 | "type" : "string", | |
20538 | "description" : "Third name server IP address." | |
20539 | }, | |
20540 | "dns2" : { | |
20541 | "description" : "Second name server IP address.", | |
20542 | "type" : "string", | |
20543 | "optional" : 1 | |
20544 | }, | |
20545 | "dns1" : { | |
20546 | "type" : "string", | |
20547 | "optional" : 1, | |
20548 | "description" : "First name server IP address." | |
20549 | } | |
20550 | } | |
20551 | }, | |
20552 | "name" : "dns", | |
20553 | "permissions" : { | |
20554 | "check" : [ | |
20555 | "perm", | |
20556 | "/nodes/{node}", | |
20557 | [ | |
20558 | "Sys.Audit" | |
20559 | ] | |
20560 | ] | |
20561 | }, | |
56122987 DM |
20562 | "parameters" : { |
20563 | "additionalProperties" : 0, | |
20564 | "properties" : { | |
20565 | "node" : { | |
7aacca6f DM |
20566 | "format" : "pve-node", |
20567 | "type" : "string", | |
20568 | "description" : "The cluster node name." | |
20569 | } | |
20570 | } | |
20571 | }, | |
20572 | "description" : "Read DNS settings.", | |
20573 | "proxyto" : "node" | |
20574 | }, | |
20575 | "PUT" : { | |
20576 | "name" : "update_dns", | |
20577 | "parameters" : { | |
20578 | "additionalProperties" : 0, | |
20579 | "properties" : { | |
20580 | "search" : { | |
20581 | "description" : "Search domain for host-name lookup.", | |
20582 | "type" : "string" | |
20583 | }, | |
20584 | "dns3" : { | |
20585 | "description" : "Third name server IP address.", | |
20586 | "type" : "string", | |
20587 | "optional" : 1, | |
20588 | "format" : "ip" | |
20589 | }, | |
20590 | "dns2" : { | |
56122987 | 20591 | "type" : "string", |
7aacca6f DM |
20592 | "optional" : 1, |
20593 | "description" : "Second name server IP address.", | |
20594 | "format" : "ip" | |
20595 | }, | |
20596 | "node" : { | |
56122987 | 20597 | "format" : "pve-node", |
7aacca6f | 20598 | "type" : "string", |
56122987 | 20599 | "description" : "The cluster node name." |
7aacca6f DM |
20600 | }, |
20601 | "dns1" : { | |
20602 | "description" : "First name server IP address.", | |
20603 | "optional" : 1, | |
20604 | "type" : "string", | |
20605 | "format" : "ip" | |
56122987 DM |
20606 | } |
20607 | } | |
20608 | }, | |
7aacca6f DM |
20609 | "protected" : 1, |
20610 | "method" : "PUT", | |
56122987 DM |
20611 | "permissions" : { |
20612 | "check" : [ | |
20613 | "perm", | |
7aacca6f | 20614 | "/nodes/{node}", |
56122987 | 20615 | [ |
7aacca6f | 20616 | "Sys.Modify" |
56122987 DM |
20617 | ] |
20618 | ] | |
20619 | }, | |
7aacca6f DM |
20620 | "description" : "Write DNS settings.", |
20621 | "proxyto" : "node", | |
56122987 | 20622 | "returns" : { |
7aacca6f DM |
20623 | "type" : "null" |
20624 | } | |
56122987 | 20625 | } |
7aacca6f | 20626 | } |
56122987 DM |
20627 | }, |
20628 | { | |
20629 | "info" : { | |
7aacca6f DM |
20630 | "GET" : { |
20631 | "method" : "GET", | |
20632 | "returns" : { | |
20633 | "properties" : { | |
20634 | "localtime" : { | |
20635 | "minimum" : 1297163644, | |
20636 | "type" : "integer", | |
20637 | "description" : "Seconds since 1970-01-01 00:00:00 (local time)" | |
20638 | }, | |
20639 | "time" : { | |
20640 | "minimum" : 1297163644, | |
20641 | "type" : "integer", | |
20642 | "description" : "Seconds since 1970-01-01 00:00:00 UTC." | |
20643 | }, | |
20644 | "timezone" : { | |
20645 | "type" : "string", | |
20646 | "description" : "Time zone" | |
20647 | } | |
20648 | }, | |
20649 | "type" : "object", | |
20650 | "additionalProperties" : 0 | |
20651 | }, | |
56122987 | 20652 | "proxyto" : "node", |
7aacca6f | 20653 | "description" : "Read server time and time zone settings.", |
56122987 | 20654 | "parameters" : { |
56122987 DM |
20655 | "properties" : { |
20656 | "node" : { | |
20657 | "format" : "pve-node", | |
20658 | "type" : "string", | |
20659 | "description" : "The cluster node name." | |
56122987 | 20660 | } |
7aacca6f DM |
20661 | }, |
20662 | "additionalProperties" : 0 | |
56122987 | 20663 | }, |
7aacca6f | 20664 | "name" : "time", |
56122987 DM |
20665 | "permissions" : { |
20666 | "check" : [ | |
20667 | "perm", | |
7aacca6f | 20668 | "/nodes/{node}", |
56122987 | 20669 | [ |
7aacca6f | 20670 | "Sys.Audit" |
56122987 DM |
20671 | ] |
20672 | ] | |
7aacca6f DM |
20673 | } |
20674 | }, | |
20675 | "PUT" : { | |
20676 | "returns" : { | |
20677 | "type" : "null" | |
56122987 | 20678 | }, |
7aacca6f DM |
20679 | "description" : "Set time zone.", |
20680 | "proxyto" : "node", | |
20681 | "permissions" : { | |
20682 | "check" : [ | |
20683 | "perm", | |
20684 | "/nodes/{node}", | |
20685 | [ | |
20686 | "Sys.Modify" | |
20687 | ] | |
20688 | ] | |
56122987 | 20689 | }, |
7aacca6f DM |
20690 | "method" : "PUT", |
20691 | "protected" : 1, | |
20692 | "parameters" : { | |
20693 | "properties" : { | |
20694 | "timezone" : { | |
20695 | "type" : "string", | |
20696 | "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names." | |
20697 | }, | |
20698 | "node" : { | |
20699 | "description" : "The cluster node name.", | |
20700 | "type" : "string", | |
20701 | "format" : "pve-node" | |
20702 | } | |
20703 | }, | |
20704 | "additionalProperties" : 0 | |
56122987 | 20705 | }, |
7aacca6f DM |
20706 | "name" : "set_timezone" |
20707 | } | |
20708 | }, | |
20709 | "text" : "time", | |
20710 | "leaf" : 1, | |
20711 | "path" : "/nodes/{node}/time" | |
20712 | }, | |
20713 | { | |
20714 | "info" : { | |
20715 | "POST" : { | |
20716 | "protected" : 1, | |
20717 | "name" : "apl_download", | |
20718 | "parameters" : { | |
20719 | "additionalProperties" : 0, | |
20720 | "properties" : { | |
20721 | "storage" : { | |
20722 | "description" : "Only list status for specified storage", | |
20723 | "type" : "string", | |
20724 | "format" : "pve-storage-id" | |
20725 | }, | |
20726 | "node" : { | |
20727 | "format" : "pve-node", | |
20728 | "type" : "string", | |
20729 | "description" : "The cluster node name." | |
20730 | }, | |
20731 | "template" : { | |
20732 | "type" : "string", | |
20733 | "description" : "The template wich will downloaded", | |
20734 | "maxLength" : 255 | |
20735 | } | |
20736 | } | |
56122987 | 20737 | }, |
7aacca6f DM |
20738 | "method" : "POST", |
20739 | "proxyto" : "node", | |
20740 | "description" : "Download appliance templates.", | |
20741 | "permissions" : { | |
20742 | "check" : [ | |
20743 | "perm", | |
20744 | "/storage/{storage}", | |
20745 | [ | |
20746 | "Datastore.AllocateTemplate" | |
20747 | ] | |
20748 | ] | |
56122987 | 20749 | }, |
7aacca6f | 20750 | "returns" : { |
56122987 | 20751 | "type" : "string" |
7aacca6f DM |
20752 | } |
20753 | }, | |
20754 | "GET" : { | |
20755 | "returns" : { | |
20756 | "items" : { | |
20757 | "type" : "object", | |
20758 | "properties" : {} | |
20759 | }, | |
20760 | "type" : "array" | |
56122987 | 20761 | }, |
7aacca6f DM |
20762 | "method" : "GET", |
20763 | "description" : "Get list of appliances.", | |
20764 | "proxyto" : "node", | |
20765 | "parameters" : { | |
20766 | "additionalProperties" : 0, | |
20767 | "properties" : { | |
20768 | "node" : { | |
20769 | "format" : "pve-node", | |
20770 | "description" : "The cluster node name.", | |
20771 | "type" : "string" | |
20772 | } | |
20773 | } | |
56122987 | 20774 | }, |
7aacca6f DM |
20775 | "name" : "aplinfo", |
20776 | "permissions" : { | |
20777 | "user" : "all" | |
20778 | } | |
20779 | } | |
20780 | }, | |
20781 | "text" : "aplinfo", | |
20782 | "leaf" : 1, | |
20783 | "path" : "/nodes/{node}/aplinfo" | |
20784 | }, | |
20785 | { | |
20786 | "info" : { | |
20787 | "GET" : { | |
20788 | "parameters" : { | |
20789 | "properties" : { | |
20790 | "node" : { | |
20791 | "format" : "pve-node", | |
20792 | "description" : "The cluster node name.", | |
20793 | "type" : "string" | |
20794 | } | |
20795 | }, | |
20796 | "additionalProperties" : 0 | |
56122987 | 20797 | }, |
7aacca6f DM |
20798 | "name" : "report", |
20799 | "protected" : 1, | |
20800 | "method" : "GET", | |
20801 | "permissions" : { | |
20802 | "check" : [ | |
20803 | "perm", | |
20804 | "/nodes/{node}", | |
20805 | [ | |
20806 | "Sys.Audit" | |
20807 | ] | |
20808 | ] | |
56122987 | 20809 | }, |
7aacca6f DM |
20810 | "description" : "Gather various systems information about a node", |
20811 | "proxyto" : "node", | |
20812 | "returns" : { | |
56122987 | 20813 | "type" : "string" |
7aacca6f DM |
20814 | } |
20815 | } | |
20816 | }, | |
20817 | "text" : "report", | |
20818 | "leaf" : 1, | |
20819 | "path" : "/nodes/{node}/report" | |
20820 | }, | |
20821 | { | |
20822 | "text" : "startall", | |
20823 | "info" : { | |
20824 | "POST" : { | |
20825 | "method" : "POST", | |
20826 | "protected" : 1, | |
20827 | "parameters" : { | |
20828 | "properties" : { | |
20829 | "force" : { | |
20830 | "optional" : 1, | |
20831 | "type" : "boolean", | |
20832 | "description" : "force if onboot=0." | |
20833 | }, | |
20834 | "node" : { | |
20835 | "type" : "string", | |
20836 | "description" : "The cluster node name.", | |
20837 | "format" : "pve-node" | |
20838 | } | |
20839 | }, | |
20840 | "additionalProperties" : 0 | |
56122987 | 20841 | }, |
7aacca6f DM |
20842 | "name" : "startall", |
20843 | "returns" : { | |
56122987 DM |
20844 | "type" : "string" |
20845 | }, | |
7aacca6f DM |
20846 | "proxyto" : "node", |
20847 | "description" : "Start all VMs and containers (when onboot=1).", | |
20848 | "permissions" : { | |
20849 | "check" : [ | |
20850 | "perm", | |
20851 | "/", | |
20852 | [ | |
20853 | "VM.PowerMgmt" | |
20854 | ] | |
20855 | ] | |
20856 | } | |
20857 | } | |
20858 | }, | |
20859 | "path" : "/nodes/{node}/startall", | |
20860 | "leaf" : 1 | |
20861 | }, | |
20862 | { | |
20863 | "text" : "stopall", | |
20864 | "info" : { | |
20865 | "POST" : { | |
20866 | "description" : "Stop all VMs and Containers.", | |
20867 | "proxyto" : "node", | |
20868 | "permissions" : { | |
20869 | "check" : [ | |
20870 | "perm", | |
20871 | "/", | |
20872 | [ | |
20873 | "VM.PowerMgmt" | |
20874 | ] | |
20875 | ] | |
56122987 | 20876 | }, |
7aacca6f | 20877 | "returns" : { |
56122987 DM |
20878 | "type" : "string" |
20879 | }, | |
7aacca6f DM |
20880 | "protected" : 1, |
20881 | "parameters" : { | |
20882 | "properties" : { | |
20883 | "node" : { | |
20884 | "format" : "pve-node", | |
20885 | "type" : "string", | |
20886 | "description" : "The cluster node name." | |
20887 | } | |
20888 | }, | |
20889 | "additionalProperties" : 0 | |
56122987 | 20890 | }, |
7aacca6f DM |
20891 | "name" : "stopall", |
20892 | "method" : "POST" | |
20893 | } | |
20894 | }, | |
20895 | "path" : "/nodes/{node}/stopall", | |
20896 | "leaf" : 1 | |
20897 | }, | |
20898 | { | |
20899 | "info" : { | |
20900 | "POST" : { | |
20901 | "returns" : { | |
56122987 DM |
20902 | "type" : "string" |
20903 | }, | |
7aacca6f DM |
20904 | "permissions" : { |
20905 | "check" : [ | |
20906 | "perm", | |
20907 | "/", | |
20908 | [ | |
20909 | "VM.Migrate" | |
20910 | ] | |
20911 | ] | |
56122987 | 20912 | }, |
7aacca6f DM |
20913 | "proxyto" : "node", |
20914 | "description" : "Migrate all VMs and Containers.", | |
20915 | "method" : "POST", | |
20916 | "parameters" : { | |
20917 | "properties" : { | |
20918 | "maxworkers" : { | |
20919 | "optional" : 1, | |
20920 | "type" : "integer", | |
20921 | "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!", | |
20922 | "minimum" : 1 | |
20923 | }, | |
20924 | "node" : { | |
20925 | "description" : "The cluster node name.", | |
20926 | "type" : "string", | |
20927 | "format" : "pve-node" | |
20928 | }, | |
20929 | "target" : { | |
20930 | "description" : "Target node.", | |
20931 | "type" : "string", | |
20932 | "format" : "pve-node" | |
20933 | } | |
20934 | }, | |
20935 | "additionalProperties" : 0 | |
20936 | }, | |
20937 | "name" : "migrateall", | |
20938 | "protected" : 1 | |
56122987 DM |
20939 | } |
20940 | }, | |
7aacca6f DM |
20941 | "text" : "migrateall", |
20942 | "leaf" : 1, | |
20943 | "path" : "/nodes/{node}/migrateall" | |
56122987 | 20944 | } |
7aacca6f DM |
20945 | ], |
20946 | "text" : "{node}", | |
20947 | "leaf" : 0, | |
20948 | "path" : "/nodes/{node}" | |
56122987 DM |
20949 | } |
20950 | ], | |
20951 | "info" : { | |
20952 | "GET" : { | |
7aacca6f DM |
20953 | "permissions" : { |
20954 | "user" : "all" | |
20955 | }, | |
56122987 | 20956 | "parameters" : { |
56122987 DM |
20957 | "additionalProperties" : 0 |
20958 | }, | |
7aacca6f DM |
20959 | "name" : "index", |
20960 | "description" : "Cluster node index.", | |
20961 | "method" : "GET", | |
56122987 DM |
20962 | "returns" : { |
20963 | "links" : [ | |
20964 | { | |
7aacca6f | 20965 | "href" : "{node}", |
56122987 DM |
20966 | "rel" : "child" |
20967 | } | |
20968 | ], | |
20969 | "items" : { | |
7aacca6f DM |
20970 | "properties" : {}, |
20971 | "type" : "object" | |
56122987 DM |
20972 | }, |
20973 | "type" : "array" | |
56122987 | 20974 | } |
7aacca6f DM |
20975 | } |
20976 | } | |
20977 | }, | |
20978 | { | |
20979 | "info" : { | |
56122987 | 20980 | "POST" : { |
7aacca6f DM |
20981 | "returns" : { |
20982 | "type" : "null" | |
56122987 | 20983 | }, |
7aacca6f | 20984 | "method" : "POST", |
56122987 DM |
20985 | "description" : "Create a new storage.", |
20986 | "protected" : 1, | |
20987 | "name" : "create", | |
56122987 | 20988 | "parameters" : { |
7aacca6f | 20989 | "additionalProperties" : 0, |
56122987 DM |
20990 | "type" : "object", |
20991 | "properties" : { | |
7aacca6f DM |
20992 | "volume" : { |
20993 | "description" : "Glusterfs Volume.", | |
56122987 | 20994 | "type" : "string", |
56122987 DM |
20995 | "optional" : 1 |
20996 | }, | |
7aacca6f DM |
20997 | "sparse" : { |
20998 | "description" : "use sparse volumes", | |
20999 | "type" : "boolean", | |
21000 | "optional" : 1 | |
56122987 | 21001 | }, |
7aacca6f DM |
21002 | "type" : { |
21003 | "description" : "Storage type.", | |
56122987 | 21004 | "enum" : [ |
7aacca6f DM |
21005 | "zfspool", |
21006 | "lvm", | |
21007 | "iscsi", | |
21008 | "rbd", | |
21009 | "dir", | |
21010 | "iscsidirect", | |
21011 | "nfs", | |
21012 | "glusterfs", | |
21013 | "zfs", | |
21014 | "lvmthin", | |
21015 | "sheepdog", | |
21016 | "drbd" | |
56122987 DM |
21017 | ], |
21018 | "type" : "string" | |
21019 | }, | |
7aacca6f DM |
21020 | "iscsiprovider" : { |
21021 | "description" : "iscsi provider", | |
21022 | "type" : "string", | |
21023 | "optional" : 1 | |
21024 | }, | |
21025 | "saferemove" : { | |
21026 | "optional" : 1, | |
21027 | "type" : "boolean", | |
21028 | "description" : "Zero-out data when removing LVs." | |
21029 | }, | |
21030 | "storage" : { | |
21031 | "type" : "string", | |
21032 | "description" : "The storage identifier.", | |
21033 | "format" : "pve-storage-id" | |
21034 | }, | |
56122987 DM |
21035 | "redundancy" : { |
21036 | "minimum" : 1, | |
7aacca6f | 21037 | "optional" : 1, |
56122987 DM |
21038 | "type" : "integer", |
21039 | "maximum" : 16, | |
21040 | "default" : 2, | |
56122987 DM |
21041 | "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster." |
21042 | }, | |
7aacca6f | 21043 | "pool" : { |
56122987 | 21044 | "type" : "string", |
7aacca6f DM |
21045 | "optional" : 1, |
21046 | "description" : "Pool." | |
56122987 | 21047 | }, |
7aacca6f DM |
21048 | "path" : { |
21049 | "description" : "File system path.", | |
56122987 | 21050 | "optional" : 1, |
7aacca6f DM |
21051 | "type" : "string", |
21052 | "format" : "pve-storage-path" | |
56122987 | 21053 | }, |
7aacca6f DM |
21054 | "server" : { |
21055 | "optional" : 1, | |
56122987 | 21056 | "type" : "string", |
7aacca6f DM |
21057 | "description" : "Server IP or DNS name.", |
21058 | "format" : "pve-storage-server" | |
56122987 | 21059 | }, |
7aacca6f | 21060 | "comstar_tg" : { |
56122987 | 21061 | "optional" : 1, |
7aacca6f DM |
21062 | "type" : "string", |
21063 | "description" : "target group for comstar views" | |
56122987 DM |
21064 | }, |
21065 | "saferemove_throughput" : { | |
7aacca6f | 21066 | "type" : "string", |
56122987 | 21067 | "optional" : 1, |
7aacca6f | 21068 | "description" : "Wipe throughput (cstream -t parameter value)." |
56122987 | 21069 | }, |
7aacca6f DM |
21070 | "maxfiles" : { |
21071 | "type" : "integer", | |
21072 | "optional" : 1, | |
21073 | "description" : "Maximal number of backup files per VM. Use '0' for unlimted.", | |
21074 | "minimum" : 0 | |
21075 | }, | |
21076 | "options" : { | |
21077 | "type" : "string", | |
21078 | "optional" : 1, | |
21079 | "description" : "NFS mount options (see 'man nfs')", | |
21080 | "format" : "pve-storage-options" | |
21081 | }, | |
21082 | "comstar_hg" : { | |
21083 | "optional" : 1, | |
21084 | "type" : "string", | |
21085 | "description" : "host group for comstar views" | |
21086 | }, | |
21087 | "username" : { | |
21088 | "description" : "RBD Id.", | |
56122987 | 21089 | "type" : "string", |
56122987 DM |
21090 | "optional" : 1 |
21091 | }, | |
7aacca6f | 21092 | "authsupported" : { |
56122987 | 21093 | "optional" : 1, |
7aacca6f DM |
21094 | "type" : "string", |
21095 | "description" : "Authsupported." | |
21096 | }, | |
21097 | "server2" : { | |
21098 | "description" : "Backup volfile server IP or DNS name.", | |
21099 | "requires" : "server", | |
21100 | "type" : "string", | |
21101 | "optional" : 1, | |
21102 | "format" : "pve-storage-server" | |
21103 | }, | |
21104 | "content" : { | |
56122987 | 21105 | "format" : "pve-storage-content-list", |
7aacca6f DM |
21106 | "optional" : 1, |
21107 | "type" : "string", | |
21108 | "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n" | |
21109 | }, | |
21110 | "base" : { | |
21111 | "description" : "Base volume. This volume is automatically activated.", | |
21112 | "type" : "string", | |
21113 | "optional" : 1, | |
21114 | "format" : "pve-volume-id" | |
21115 | }, | |
21116 | "monhost" : { | |
21117 | "description" : "Monitors daemon ips.", | |
21118 | "optional" : 1, | |
56122987 DM |
21119 | "type" : "string" |
21120 | }, | |
7aacca6f DM |
21121 | "format" : { |
21122 | "optional" : 1, | |
56122987 | 21123 | "type" : "string", |
7aacca6f DM |
21124 | "description" : "Default image format.", |
21125 | "format" : "pve-storage-format" | |
21126 | }, | |
21127 | "nowritecache" : { | |
21128 | "type" : "boolean", | |
56122987 | 21129 | "optional" : 1, |
7aacca6f DM |
21130 | "description" : "disable write caching on the target" |
21131 | }, | |
21132 | "target" : { | |
21133 | "description" : "iSCSI target.", | |
21134 | "type" : "string", | |
21135 | "optional" : 1 | |
56122987 | 21136 | }, |
7aacca6f DM |
21137 | "thinpool" : { |
21138 | "type" : "string", | |
56122987 | 21139 | "optional" : 1, |
7aacca6f DM |
21140 | "description" : "LVM thin pool LV name.", |
21141 | "format" : "pve-storage-vgname" | |
56122987 DM |
21142 | }, |
21143 | "krbd" : { | |
21144 | "type" : "boolean", | |
21145 | "optional" : 1, | |
21146 | "description" : "Access rbd through krbd kernel module." | |
21147 | }, | |
7aacca6f DM |
21148 | "shared" : { |
21149 | "description" : "Mark storage as shared.", | |
56122987 | 21150 | "optional" : 1, |
7aacca6f | 21151 | "type" : "boolean" |
56122987 | 21152 | }, |
7aacca6f | 21153 | "transport" : { |
56122987 | 21154 | "enum" : [ |
7aacca6f DM |
21155 | "tcp", |
21156 | "rdma", | |
21157 | "unix" | |
56122987 | 21158 | ], |
7aacca6f DM |
21159 | "description" : "Gluster transport: tcp or rdma", |
21160 | "optional" : 1, | |
56122987 DM |
21161 | "type" : "string" |
21162 | }, | |
21163 | "vgname" : { | |
21164 | "description" : "Volume group name.", | |
21165 | "optional" : 1, | |
21166 | "type" : "string", | |
21167 | "format" : "pve-storage-vgname" | |
21168 | }, | |
7aacca6f | 21169 | "blocksize" : { |
56122987 | 21170 | "optional" : 1, |
56122987 | 21171 | "type" : "string", |
7aacca6f | 21172 | "description" : "block size" |
56122987 DM |
21173 | }, |
21174 | "export" : { | |
56122987 DM |
21175 | "optional" : 1, |
21176 | "type" : "string", | |
7aacca6f | 21177 | "description" : "NFS export path.", |
56122987 DM |
21178 | "format" : "pve-storage-path" |
21179 | }, | |
7aacca6f DM |
21180 | "portal" : { |
21181 | "type" : "string", | |
56122987 | 21182 | "optional" : 1, |
7aacca6f DM |
21183 | "description" : "iSCSI portal (IP or DNS name with optional port).", |
21184 | "format" : "pve-storage-portal-dns" | |
56122987 | 21185 | }, |
7aacca6f DM |
21186 | "nodes" : { |
21187 | "format" : "pve-node-list", | |
21188 | "description" : "List of cluster node names.", | |
56122987 | 21189 | "type" : "string", |
56122987 DM |
21190 | "optional" : 1 |
21191 | }, | |
7aacca6f DM |
21192 | "disable" : { |
21193 | "type" : "boolean", | |
56122987 | 21194 | "optional" : 1, |
7aacca6f DM |
21195 | "description" : "Flag to disable the storage." |
21196 | } | |
21197 | } | |
21198 | }, | |
21199 | "permissions" : { | |
21200 | "check" : [ | |
21201 | "perm", | |
21202 | "/storage", | |
21203 | [ | |
21204 | "Datastore.Allocate" | |
21205 | ] | |
21206 | ] | |
21207 | } | |
21208 | }, | |
21209 | "GET" : { | |
21210 | "returns" : { | |
21211 | "type" : "array", | |
21212 | "items" : { | |
21213 | "type" : "object", | |
21214 | "properties" : { | |
21215 | "storage" : { | |
21216 | "type" : "string" | |
21217 | } | |
21218 | } | |
21219 | }, | |
21220 | "links" : [ | |
21221 | { | |
21222 | "rel" : "child", | |
21223 | "href" : "{storage}" | |
21224 | } | |
21225 | ] | |
21226 | }, | |
21227 | "method" : "GET", | |
21228 | "parameters" : { | |
21229 | "properties" : { | |
21230 | "type" : { | |
56122987 DM |
21231 | "type" : "string", |
21232 | "optional" : 1, | |
7aacca6f DM |
21233 | "description" : "Only list storage of specific type", |
21234 | "enum" : [ | |
21235 | "zfspool", | |
21236 | "lvm", | |
21237 | "iscsi", | |
21238 | "rbd", | |
21239 | "dir", | |
21240 | "iscsidirect", | |
21241 | "nfs", | |
21242 | "glusterfs", | |
21243 | "zfs", | |
21244 | "lvmthin", | |
21245 | "sheepdog", | |
21246 | "drbd" | |
21247 | ] | |
21248 | } | |
21249 | }, | |
21250 | "additionalProperties" : 0 | |
21251 | }, | |
21252 | "permissions" : { | |
21253 | "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'", | |
21254 | "user" : "all" | |
21255 | }, | |
21256 | "name" : "index", | |
21257 | "description" : "Storage index." | |
21258 | } | |
21259 | }, | |
21260 | "text" : "storage", | |
21261 | "children" : [ | |
21262 | { | |
21263 | "leaf" : 1, | |
21264 | "path" : "/storage/{storage}", | |
21265 | "info" : { | |
21266 | "GET" : { | |
21267 | "name" : "read", | |
21268 | "permissions" : { | |
21269 | "check" : [ | |
21270 | "perm", | |
21271 | "/storage/{storage}", | |
21272 | [ | |
21273 | "Datastore.Allocate" | |
21274 | ] | |
21275 | ] | |
56122987 | 21276 | }, |
7aacca6f DM |
21277 | "parameters" : { |
21278 | "additionalProperties" : 0, | |
21279 | "properties" : { | |
21280 | "storage" : { | |
21281 | "format" : "pve-storage-id", | |
21282 | "description" : "The storage identifier.", | |
21283 | "type" : "string" | |
21284 | } | |
21285 | } | |
56122987 | 21286 | }, |
7aacca6f DM |
21287 | "description" : "Read storage configuration.", |
21288 | "returns" : {}, | |
21289 | "method" : "GET" | |
21290 | }, | |
21291 | "DELETE" : { | |
21292 | "returns" : { | |
21293 | "type" : "null" | |
56122987 | 21294 | }, |
7aacca6f DM |
21295 | "method" : "DELETE", |
21296 | "permissions" : { | |
21297 | "check" : [ | |
21298 | "perm", | |
21299 | "/storage", | |
21300 | [ | |
21301 | "Datastore.Allocate" | |
21302 | ] | |
21303 | ] | |
56122987 | 21304 | }, |
7aacca6f DM |
21305 | "parameters" : { |
21306 | "additionalProperties" : 0, | |
21307 | "properties" : { | |
21308 | "storage" : { | |
21309 | "format" : "pve-storage-id", | |
21310 | "type" : "string", | |
21311 | "description" : "The storage identifier." | |
21312 | } | |
21313 | } | |
21314 | }, | |
21315 | "name" : "delete", | |
21316 | "protected" : 1, | |
21317 | "description" : "Delete storage configuration." | |
21318 | }, | |
21319 | "PUT" : { | |
21320 | "method" : "PUT", | |
21321 | "returns" : { | |
21322 | "type" : "null" | |
21323 | }, | |
21324 | "parameters" : { | |
21325 | "additionalProperties" : 0, | |
21326 | "type" : "object", | |
21327 | "properties" : { | |
21328 | "delete" : { | |
21329 | "maxLength" : 4096, | |
21330 | "format" : "pve-configid-list", | |
21331 | "optional" : 1, | |
21332 | "type" : "string", | |
21333 | "description" : "A list of settings you want to delete." | |
21334 | }, | |
21335 | "transport" : { | |
21336 | "type" : "string", | |
21337 | "optional" : 1, | |
21338 | "enum" : [ | |
21339 | "tcp", | |
21340 | "rdma", | |
21341 | "unix" | |
21342 | ], | |
21343 | "description" : "Gluster transport: tcp or rdma" | |
21344 | }, | |
21345 | "shared" : { | |
21346 | "description" : "Mark storage as shared.", | |
21347 | "type" : "boolean", | |
21348 | "optional" : 1 | |
21349 | }, | |
21350 | "krbd" : { | |
21351 | "optional" : 1, | |
21352 | "type" : "boolean", | |
21353 | "description" : "Access rbd through krbd kernel module." | |
21354 | }, | |
21355 | "pool" : { | |
21356 | "description" : "Pool.", | |
21357 | "type" : "string", | |
21358 | "optional" : 1 | |
21359 | }, | |
21360 | "redundancy" : { | |
21361 | "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster.", | |
21362 | "type" : "integer", | |
21363 | "optional" : 1, | |
21364 | "maximum" : 16, | |
21365 | "default" : 2, | |
21366 | "minimum" : 1 | |
21367 | }, | |
21368 | "server" : { | |
21369 | "description" : "Server IP or DNS name.", | |
21370 | "type" : "string", | |
21371 | "optional" : 1, | |
21372 | "format" : "pve-storage-server" | |
21373 | }, | |
21374 | "saferemove" : { | |
21375 | "type" : "boolean", | |
21376 | "optional" : 1, | |
21377 | "description" : "Zero-out data when removing LVs." | |
21378 | }, | |
21379 | "digest" : { | |
21380 | "maxLength" : 40, | |
21381 | "type" : "string", | |
21382 | "optional" : 1, | |
21383 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." | |
21384 | }, | |
21385 | "storage" : { | |
21386 | "format" : "pve-storage-id", | |
21387 | "description" : "The storage identifier.", | |
21388 | "type" : "string" | |
21389 | }, | |
21390 | "sparse" : { | |
21391 | "description" : "use sparse volumes", | |
21392 | "type" : "boolean", | |
21393 | "optional" : 1 | |
21394 | }, | |
21395 | "nowritecache" : { | |
21396 | "description" : "disable write caching on the target", | |
21397 | "type" : "boolean", | |
21398 | "optional" : 1 | |
21399 | }, | |
21400 | "format" : { | |
21401 | "description" : "Default image format.", | |
21402 | "optional" : 1, | |
21403 | "type" : "string", | |
21404 | "format" : "pve-storage-format" | |
21405 | }, | |
21406 | "content" : { | |
21407 | "format" : "pve-storage-content-list", | |
21408 | "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", | |
21409 | "type" : "string", | |
21410 | "optional" : 1 | |
21411 | }, | |
21412 | "server2" : { | |
21413 | "format" : "pve-storage-server", | |
21414 | "type" : "string", | |
21415 | "optional" : 1, | |
21416 | "description" : "Backup volfile server IP or DNS name.", | |
21417 | "requires" : "server" | |
21418 | }, | |
21419 | "disable" : { | |
21420 | "description" : "Flag to disable the storage.", | |
21421 | "type" : "boolean", | |
21422 | "optional" : 1 | |
21423 | }, | |
21424 | "nodes" : { | |
21425 | "format" : "pve-node-list", | |
21426 | "optional" : 1, | |
21427 | "type" : "string", | |
21428 | "description" : "List of cluster node names." | |
21429 | }, | |
21430 | "comstar_hg" : { | |
21431 | "type" : "string", | |
21432 | "optional" : 1, | |
21433 | "description" : "host group for comstar views" | |
21434 | }, | |
21435 | "options" : { | |
21436 | "format" : "pve-storage-options", | |
21437 | "description" : "NFS mount options (see 'man nfs')", | |
21438 | "type" : "string", | |
21439 | "optional" : 1 | |
21440 | }, | |
21441 | "saferemove_throughput" : { | |
21442 | "optional" : 1, | |
21443 | "type" : "string", | |
21444 | "description" : "Wipe throughput (cstream -t parameter value)." | |
21445 | }, | |
21446 | "maxfiles" : { | |
21447 | "minimum" : 0, | |
21448 | "type" : "integer", | |
21449 | "optional" : 1, | |
21450 | "description" : "Maximal number of backup files per VM. Use '0' for unlimted." | |
21451 | }, | |
21452 | "blocksize" : { | |
21453 | "optional" : 1, | |
21454 | "type" : "string", | |
21455 | "description" : "block size" | |
21456 | }, | |
21457 | "username" : { | |
21458 | "description" : "RBD Id.", | |
21459 | "type" : "string", | |
21460 | "optional" : 1 | |
21461 | }, | |
21462 | "comstar_tg" : { | |
21463 | "description" : "target group for comstar views", | |
21464 | "type" : "string", | |
21465 | "optional" : 1 | |
21466 | } | |
21467 | } | |
56122987 | 21468 | }, |
7aacca6f DM |
21469 | "permissions" : { |
21470 | "check" : [ | |
21471 | "perm", | |
21472 | "/storage", | |
21473 | [ | |
21474 | "Datastore.Allocate" | |
21475 | ] | |
21476 | ] | |
56122987 | 21477 | }, |
7aacca6f DM |
21478 | "name" : "update", |
21479 | "description" : "Update storage configuration.", | |
21480 | "protected" : 1 | |
21481 | } | |
56122987 | 21482 | }, |
7aacca6f | 21483 | "text" : "{storage}" |
56122987 | 21484 | } |
7aacca6f DM |
21485 | ], |
21486 | "leaf" : 0, | |
21487 | "path" : "/storage" | |
56122987 DM |
21488 | }, |
21489 | { | |
56122987 | 21490 | "leaf" : 0, |
7aacca6f | 21491 | "path" : "/access", |
56122987 DM |
21492 | "info" : { |
21493 | "GET" : { | |
7aacca6f | 21494 | "method" : "GET", |
56122987 DM |
21495 | "returns" : { |
21496 | "type" : "array", | |
7aacca6f DM |
21497 | "links" : [ |
21498 | { | |
21499 | "href" : "{subdir}", | |
21500 | "rel" : "child" | |
21501 | } | |
21502 | ], | |
56122987 | 21503 | "items" : { |
56122987 DM |
21504 | "properties" : { |
21505 | "subdir" : { | |
21506 | "type" : "string" | |
21507 | } | |
7aacca6f DM |
21508 | }, |
21509 | "type" : "object" | |
21510 | } | |
56122987 | 21511 | }, |
56122987 | 21512 | "name" : "index", |
56122987 DM |
21513 | "permissions" : { |
21514 | "user" : "all" | |
7aacca6f DM |
21515 | }, |
21516 | "parameters" : { | |
21517 | "additionalProperties" : 0 | |
21518 | }, | |
21519 | "description" : "Directory index." | |
56122987 DM |
21520 | } |
21521 | }, | |
7aacca6f | 21522 | "text" : "access", |
56122987 DM |
21523 | "children" : [ |
21524 | { | |
56122987 DM |
21525 | "info" : { |
21526 | "POST" : { | |
56122987 | 21527 | "method" : "POST", |
7aacca6f DM |
21528 | "returns" : { |
21529 | "type" : "null" | |
21530 | }, | |
21531 | "protected" : 1, | |
21532 | "description" : "Create new user.", | |
21533 | "name" : "create_user", | |
21534 | "permissions" : { | |
21535 | "check" : [ | |
21536 | "and", | |
21537 | [ | |
21538 | "userid-param", | |
21539 | "Realm.AllocateUser" | |
21540 | ], | |
21541 | [ | |
21542 | "userid-group", | |
21543 | [ | |
21544 | "User.Modify" | |
21545 | ], | |
21546 | "groups_param", | |
21547 | 1 | |
21548 | ] | |
21549 | ], | |
21550 | "description" : "You need 'Realm.AllocateUser' on '/access/realm/<realm>' on the realm of user <userid>, and 'User.Modify' permissions to '/access/groups/<group>' for any group specified (or 'User.Modify' on '/access/groups' if you pass no groups." | |
21551 | }, | |
56122987 | 21552 | "parameters" : { |
56122987 | 21553 | "properties" : { |
7aacca6f DM |
21554 | "enable" : { |
21555 | "type" : "boolean", | |
56122987 | 21556 | "optional" : 1, |
7aacca6f DM |
21557 | "default" : 1, |
21558 | "description" : "Enable the account (default). You can set this to '0' to disable the accout" | |
56122987 DM |
21559 | }, |
21560 | "lastname" : { | |
21561 | "type" : "string", | |
21562 | "optional" : 1 | |
21563 | }, | |
7aacca6f | 21564 | "keys" : { |
56122987 | 21565 | "optional" : 1, |
7aacca6f DM |
21566 | "type" : "string", |
21567 | "description" : "Keys for two factor auth (yubico)." | |
56122987 | 21568 | }, |
7aacca6f | 21569 | "firstname" : { |
56122987 DM |
21570 | "optional" : 1, |
21571 | "type" : "string" | |
21572 | }, | |
7aacca6f | 21573 | "groups" : { |
56122987 DM |
21574 | "optional" : 1, |
21575 | "type" : "string", | |
7aacca6f | 21576 | "format" : "pve-groupid-list" |
56122987 DM |
21577 | }, |
21578 | "password" : { | |
56122987 | 21579 | "optional" : 1, |
7aacca6f | 21580 | "type" : "string", |
56122987 | 21581 | "description" : "Initial password.", |
7aacca6f DM |
21582 | "minLength" : 5, |
21583 | "maxLength" : 64 | |
21584 | }, | |
21585 | "email" : { | |
21586 | "format" : "email-opt", | |
21587 | "optional" : 1, | |
56122987 DM |
21588 | "type" : "string" |
21589 | }, | |
7aacca6f DM |
21590 | "comment" : { |
21591 | "type" : "string", | |
56122987 DM |
21592 | "optional" : 1 |
21593 | }, | |
7aacca6f DM |
21594 | "userid" : { |
21595 | "type" : "string", | |
21596 | "description" : "User ID", | |
21597 | "format" : "pve-userid", | |
21598 | "maxLength" : 64 | |
21599 | }, | |
56122987 DM |
21600 | "expire" : { |
21601 | "minimum" : 0, | |
7aacca6f | 21602 | "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", |
56122987 | 21603 | "type" : "integer", |
56122987 DM |
21604 | "optional" : 1 |
21605 | } | |
7aacca6f DM |
21606 | }, |
21607 | "additionalProperties" : 0 | |
21608 | } | |
56122987 DM |
21609 | }, |
21610 | "GET" : { | |
21611 | "returns" : { | |
56122987 DM |
21612 | "items" : { |
21613 | "type" : "object", | |
21614 | "properties" : { | |
21615 | "userid" : { | |
21616 | "type" : "string" | |
21617 | } | |
21618 | } | |
21619 | }, | |
7aacca6f DM |
21620 | "links" : [ |
21621 | { | |
21622 | "href" : "{userid}", | |
21623 | "rel" : "child" | |
21624 | } | |
21625 | ], | |
56122987 DM |
21626 | "type" : "array" |
21627 | }, | |
7aacca6f DM |
21628 | "method" : "GET", |
21629 | "name" : "index", | |
56122987 DM |
21630 | "parameters" : { |
21631 | "additionalProperties" : 0, | |
21632 | "properties" : { | |
21633 | "enabled" : { | |
7aacca6f | 21634 | "description" : "Optional filter for enable property.", |
56122987 | 21635 | "type" : "boolean", |
7aacca6f | 21636 | "optional" : 1 |
56122987 DM |
21637 | } |
21638 | } | |
21639 | }, | |
56122987 | 21640 | "permissions" : { |
7aacca6f DM |
21641 | "description" : "The returned list is restricted to users where you have 'User.Modify' or 'Sys.Audit' permissions on '/access/groups' or on a group the user belongs too. But it always includes the current (authenticated) user.", |
21642 | "user" : "all" | |
21643 | }, | |
21644 | "description" : "User index." | |
56122987 DM |
21645 | } |
21646 | }, | |
7aacca6f | 21647 | "text" : "users", |
56122987 DM |
21648 | "children" : [ |
21649 | { | |
56122987 | 21650 | "leaf" : 1, |
7aacca6f | 21651 | "path" : "/access/users/{userid}", |
56122987 DM |
21652 | "info" : { |
21653 | "PUT" : { | |
7aacca6f DM |
21654 | "protected" : 1, |
21655 | "description" : "Update user configuration.", | |
21656 | "name" : "update_user", | |
56122987 | 21657 | "parameters" : { |
7aacca6f | 21658 | "additionalProperties" : 0, |
56122987 DM |
21659 | "properties" : { |
21660 | "expire" : { | |
56122987 | 21661 | "minimum" : 0, |
7aacca6f DM |
21662 | "type" : "integer", |
21663 | "optional" : 1, | |
21664 | "description" : "Account expiration date (seconds since epoch). '0' means no expiration date." | |
56122987 | 21665 | }, |
7aacca6f | 21666 | "comment" : { |
56122987 | 21667 | "type" : "string", |
56122987 DM |
21668 | "optional" : 1 |
21669 | }, | |
7aacca6f DM |
21670 | "email" : { |
21671 | "format" : "email-opt", | |
21672 | "optional" : 1, | |
21673 | "type" : "string" | |
56122987 DM |
21674 | }, |
21675 | "userid" : { | |
56122987 | 21676 | "description" : "User ID", |
7aacca6f | 21677 | "type" : "string", |
56122987 | 21678 | "format" : "pve-userid", |
7aacca6f DM |
21679 | "maxLength" : 64 |
21680 | }, | |
21681 | "keys" : { | |
21682 | "description" : "Keys for two factor auth (yubico).", | |
21683 | "optional" : 1, | |
56122987 DM |
21684 | "type" : "string" |
21685 | }, | |
7aacca6f DM |
21686 | "groups" : { |
21687 | "format" : "pve-groupid-list", | |
56122987 DM |
21688 | "type" : "string", |
21689 | "optional" : 1 | |
21690 | }, | |
21691 | "firstname" : { | |
56122987 DM |
21692 | "optional" : 1, |
21693 | "type" : "string" | |
21694 | }, | |
7aacca6f DM |
21695 | "enable" : { |
21696 | "type" : "boolean", | |
56122987 | 21697 | "optional" : 1, |
7aacca6f | 21698 | "description" : "Enable/disable the account." |
56122987 | 21699 | }, |
7aacca6f DM |
21700 | "append" : { |
21701 | "optional" : 1, | |
21702 | "type" : "boolean", | |
21703 | "requires" : "groups" | |
21704 | }, | |
21705 | "lastname" : { | |
56122987 | 21706 | "optional" : 1, |
56122987 DM |
21707 | "type" : "string" |
21708 | } | |
7aacca6f | 21709 | } |
56122987 | 21710 | }, |
56122987 DM |
21711 | "permissions" : { |
21712 | "check" : [ | |
21713 | "userid-group", | |
21714 | [ | |
21715 | "User.Modify" | |
21716 | ], | |
21717 | "groups_param", | |
21718 | 1 | |
21719 | ] | |
7aacca6f | 21720 | }, |
56122987 DM |
21721 | "returns" : { |
21722 | "type" : "null" | |
21723 | }, | |
7aacca6f DM |
21724 | "method" : "PUT" |
21725 | }, | |
21726 | "DELETE" : { | |
21727 | "protected" : 1, | |
21728 | "description" : "Delete user.", | |
56122987 DM |
21729 | "parameters" : { |
21730 | "additionalProperties" : 0, | |
21731 | "properties" : { | |
21732 | "userid" : { | |
7aacca6f | 21733 | "maxLength" : 64, |
56122987 DM |
21734 | "format" : "pve-userid", |
21735 | "type" : "string", | |
56122987 DM |
21736 | "description" : "User ID" |
21737 | } | |
21738 | } | |
21739 | }, | |
56122987 DM |
21740 | "permissions" : { |
21741 | "check" : [ | |
21742 | "and", | |
21743 | [ | |
21744 | "userid-param", | |
21745 | "Realm.AllocateUser" | |
21746 | ], | |
21747 | [ | |
21748 | "userid-group", | |
21749 | [ | |
21750 | "User.Modify" | |
21751 | ] | |
21752 | ] | |
21753 | ] | |
21754 | }, | |
7aacca6f DM |
21755 | "name" : "delete_user", |
21756 | "method" : "DELETE", | |
21757 | "returns" : { | |
21758 | "type" : "null" | |
21759 | } | |
56122987 DM |
21760 | }, |
21761 | "GET" : { | |
7aacca6f | 21762 | "method" : "GET", |
56122987 | 21763 | "returns" : { |
7aacca6f | 21764 | "additionalProperties" : 0, |
56122987 | 21765 | "properties" : { |
7aacca6f DM |
21766 | "keys" : { |
21767 | "type" : "string", | |
21768 | "optional" : 1 | |
56122987 DM |
21769 | }, |
21770 | "firstname" : { | |
56122987 DM |
21771 | "type" : "string", |
21772 | "optional" : 1 | |
21773 | }, | |
7aacca6f DM |
21774 | "groups" : { |
21775 | "type" : "array" | |
21776 | }, | |
21777 | "enable" : { | |
21778 | "type" : "boolean" | |
21779 | }, | |
56122987 DM |
21780 | "lastname" : { |
21781 | "optional" : 1, | |
21782 | "type" : "string" | |
21783 | }, | |
56122987 DM |
21784 | "expire" : { |
21785 | "type" : "integer", | |
21786 | "optional" : 1 | |
21787 | }, | |
7aacca6f DM |
21788 | "email" : { |
21789 | "type" : "string", | |
21790 | "optional" : 1 | |
21791 | }, | |
21792 | "comment" : { | |
21793 | "type" : "string", | |
21794 | "optional" : 1 | |
56122987 | 21795 | } |
7aacca6f | 21796 | } |
56122987 DM |
21797 | }, |
21798 | "parameters" : { | |
21799 | "properties" : { | |
21800 | "userid" : { | |
56122987 | 21801 | "description" : "User ID", |
7aacca6f | 21802 | "type" : "string", |
56122987 | 21803 | "format" : "pve-userid", |
7aacca6f | 21804 | "maxLength" : 64 |
56122987 DM |
21805 | } |
21806 | }, | |
21807 | "additionalProperties" : 0 | |
21808 | }, | |
56122987 DM |
21809 | "name" : "read_user", |
21810 | "permissions" : { | |
21811 | "check" : [ | |
21812 | "userid-group", | |
21813 | [ | |
21814 | "User.Modify", | |
21815 | "Sys.Audit" | |
21816 | ] | |
21817 | ] | |
21818 | }, | |
21819 | "description" : "Get user configuration." | |
21820 | } | |
21821 | }, | |
7aacca6f | 21822 | "text" : "{userid}" |
56122987 | 21823 | } |
7aacca6f DM |
21824 | ], |
21825 | "leaf" : 0, | |
21826 | "path" : "/access/users" | |
56122987 DM |
21827 | }, |
21828 | { | |
21829 | "info" : { | |
7aacca6f DM |
21830 | "GET" : { |
21831 | "name" : "index", | |
21832 | "permissions" : { | |
21833 | "user" : "all", | |
21834 | "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/<group>." | |
21835 | }, | |
56122987 | 21836 | "parameters" : { |
56122987 DM |
21837 | "additionalProperties" : 0 |
21838 | }, | |
7aacca6f DM |
21839 | "description" : "Group index.", |
21840 | "method" : "GET", | |
21841 | "returns" : { | |
21842 | "links" : [ | |
21843 | { | |
21844 | "href" : "{groupid}", | |
21845 | "rel" : "child" | |
21846 | } | |
21847 | ], | |
21848 | "items" : { | |
21849 | "properties" : { | |
21850 | "groupid" : { | |
21851 | "type" : "string" | |
21852 | } | |
21853 | }, | |
21854 | "type" : "object" | |
21855 | }, | |
21856 | "type" : "array" | |
21857 | } | |
21858 | }, | |
21859 | "POST" : { | |
56122987 DM |
21860 | "returns" : { |
21861 | "type" : "null" | |
21862 | }, | |
7aacca6f DM |
21863 | "method" : "POST", |
21864 | "name" : "create_group", | |
56122987 DM |
21865 | "permissions" : { |
21866 | "check" : [ | |
21867 | "perm", | |
21868 | "/access/groups", | |
21869 | [ | |
21870 | "Group.Allocate" | |
21871 | ] | |
21872 | ] | |
21873 | }, | |
56122987 | 21874 | "parameters" : { |
7aacca6f DM |
21875 | "additionalProperties" : 0, |
21876 | "properties" : { | |
21877 | "groupid" : { | |
21878 | "format" : "pve-groupid", | |
21879 | "type" : "string" | |
21880 | }, | |
21881 | "comment" : { | |
21882 | "optional" : 1, | |
21883 | "type" : "string" | |
56122987 | 21884 | } |
7aacca6f | 21885 | } |
56122987 | 21886 | }, |
7aacca6f DM |
21887 | "description" : "Create new group.", |
21888 | "protected" : 1 | |
56122987 DM |
21889 | } |
21890 | }, | |
21891 | "children" : [ | |
21892 | { | |
56122987 DM |
21893 | "info" : { |
21894 | "DELETE" : { | |
7aacca6f DM |
21895 | "permissions" : { |
21896 | "check" : [ | |
21897 | "perm", | |
21898 | "/access/groups", | |
21899 | [ | |
21900 | "Group.Allocate" | |
21901 | ] | |
21902 | ] | |
21903 | }, | |
21904 | "name" : "delete_group", | |
21905 | "parameters" : { | |
21906 | "properties" : { | |
21907 | "groupid" : { | |
21908 | "type" : "string", | |
21909 | "format" : "pve-groupid" | |
21910 | } | |
21911 | }, | |
21912 | "additionalProperties" : 0 | |
21913 | }, | |
21914 | "protected" : 1, | |
21915 | "description" : "Delete group.", | |
21916 | "returns" : { | |
21917 | "type" : "null" | |
21918 | }, | |
21919 | "method" : "DELETE" | |
21920 | }, | |
21921 | "PUT" : { | |
21922 | "method" : "PUT", | |
56122987 DM |
21923 | "returns" : { |
21924 | "type" : "null" | |
21925 | }, | |
7aacca6f DM |
21926 | "description" : "Update group data.", |
21927 | "protected" : 1, | |
21928 | "permissions" : { | |
21929 | "check" : [ | |
21930 | "perm", | |
21931 | "/access/groups", | |
21932 | [ | |
21933 | "Group.Allocate" | |
21934 | ] | |
21935 | ] | |
21936 | }, | |
21937 | "name" : "update_group", | |
21938 | "parameters" : { | |
21939 | "additionalProperties" : 0, | |
21940 | "properties" : { | |
21941 | "groupid" : { | |
21942 | "type" : "string", | |
21943 | "format" : "pve-groupid" | |
21944 | }, | |
21945 | "comment" : { | |
21946 | "type" : "string", | |
21947 | "optional" : 1 | |
21948 | } | |
21949 | } | |
21950 | } | |
21951 | }, | |
21952 | "GET" : { | |
21953 | "returns" : { | |
21954 | "properties" : { | |
21955 | "comment" : { | |
21956 | "type" : "string", | |
21957 | "optional" : 1 | |
21958 | }, | |
21959 | "members" : { | |
21960 | "items" : { | |
21961 | "type" : "string" | |
21962 | }, | |
21963 | "type" : "array" | |
21964 | } | |
21965 | }, | |
21966 | "type" : "object", | |
21967 | "additionalProperties" : 0 | |
21968 | }, | |
21969 | "method" : "GET", | |
21970 | "name" : "read_group", | |
56122987 DM |
21971 | "parameters" : { |
21972 | "properties" : { | |
21973 | "groupid" : { | |
21974 | "format" : "pve-groupid", | |
21975 | "type" : "string" | |
21976 | } | |
21977 | }, | |
21978 | "additionalProperties" : 0 | |
21979 | }, | |
56122987 DM |
21980 | "permissions" : { |
21981 | "check" : [ | |
21982 | "perm", | |
21983 | "/access/groups", | |
21984 | [ | |
7aacca6f | 21985 | "Sys.Audit", |
56122987 | 21986 | "Group.Allocate" |
7aacca6f DM |
21987 | ], |
21988 | "any", | |
21989 | 1 | |
56122987 DM |
21990 | ] |
21991 | }, | |
7aacca6f DM |
21992 | "description" : "Get group configuration." |
21993 | } | |
21994 | }, | |
21995 | "text" : "{groupid}", | |
21996 | "leaf" : 1, | |
21997 | "path" : "/access/groups/{groupid}" | |
21998 | } | |
21999 | ], | |
22000 | "text" : "groups", | |
22001 | "leaf" : 0, | |
22002 | "path" : "/access/groups" | |
22003 | }, | |
22004 | { | |
22005 | "children" : [ | |
22006 | { | |
22007 | "text" : "{roleid}", | |
22008 | "info" : { | |
56122987 | 22009 | "GET" : { |
7aacca6f DM |
22010 | "returns" : {}, |
22011 | "method" : "GET", | |
22012 | "name" : "read_role", | |
22013 | "parameters" : { | |
56122987 | 22014 | "properties" : { |
7aacca6f DM |
22015 | "roleid" : { |
22016 | "format" : "pve-roleid", | |
22017 | "type" : "string" | |
56122987 DM |
22018 | } |
22019 | }, | |
7aacca6f DM |
22020 | "additionalProperties" : 0 |
22021 | }, | |
22022 | "permissions" : { | |
22023 | "user" : "all" | |
22024 | }, | |
22025 | "description" : "Get role configuration." | |
22026 | }, | |
22027 | "DELETE" : { | |
22028 | "method" : "DELETE", | |
22029 | "returns" : { | |
22030 | "type" : "null" | |
56122987 | 22031 | }, |
7aacca6f DM |
22032 | "description" : "Delete role.", |
22033 | "protected" : 1, | |
22034 | "name" : "delete_role", | |
56122987 DM |
22035 | "parameters" : { |
22036 | "additionalProperties" : 0, | |
22037 | "properties" : { | |
7aacca6f DM |
22038 | "roleid" : { |
22039 | "format" : "pve-roleid", | |
22040 | "type" : "string" | |
56122987 DM |
22041 | } |
22042 | } | |
22043 | }, | |
56122987 DM |
22044 | "permissions" : { |
22045 | "check" : [ | |
22046 | "perm", | |
7aacca6f | 22047 | "/access", |
56122987 | 22048 | [ |
7aacca6f DM |
22049 | "Sys.Modify" |
22050 | ] | |
56122987 DM |
22051 | ] |
22052 | } | |
22053 | }, | |
22054 | "PUT" : { | |
7aacca6f DM |
22055 | "permissions" : { |
22056 | "check" : [ | |
22057 | "perm", | |
22058 | "/access", | |
22059 | [ | |
22060 | "Sys.Modify" | |
22061 | ] | |
22062 | ] | |
56122987 DM |
22063 | }, |
22064 | "parameters" : { | |
22065 | "additionalProperties" : 0, | |
22066 | "properties" : { | |
7aacca6f DM |
22067 | "append" : { |
22068 | "requires" : "privs", | |
22069 | "type" : "boolean", | |
56122987 DM |
22070 | "optional" : 1 |
22071 | }, | |
7aacca6f DM |
22072 | "roleid" : { |
22073 | "format" : "pve-roleid", | |
22074 | "type" : "string" | |
22075 | }, | |
22076 | "privs" : { | |
22077 | "format" : "pve-priv-list", | |
56122987 DM |
22078 | "type" : "string" |
22079 | } | |
22080 | } | |
22081 | }, | |
7aacca6f DM |
22082 | "name" : "update_role", |
22083 | "description" : "Create new role.", | |
56122987 | 22084 | "protected" : 1, |
7aacca6f DM |
22085 | "method" : "PUT", |
22086 | "returns" : { | |
22087 | "type" : "null" | |
56122987 DM |
22088 | } |
22089 | } | |
22090 | }, | |
7aacca6f DM |
22091 | "path" : "/access/roles/{roleid}", |
22092 | "leaf" : 1 | |
56122987 DM |
22093 | } |
22094 | ], | |
7aacca6f | 22095 | "text" : "roles", |
56122987 | 22096 | "info" : { |
7aacca6f DM |
22097 | "GET" : { |
22098 | "description" : "Role index.", | |
22099 | "name" : "index", | |
56122987 | 22100 | "parameters" : { |
56122987 DM |
22101 | "additionalProperties" : 0 |
22102 | }, | |
7aacca6f DM |
22103 | "permissions" : { |
22104 | "user" : "all" | |
22105 | }, | |
56122987 | 22106 | "returns" : { |
7aacca6f DM |
22107 | "type" : "array", |
22108 | "links" : [ | |
22109 | { | |
22110 | "href" : "{roleid}", | |
22111 | "rel" : "child" | |
22112 | } | |
22113 | ], | |
22114 | "items" : { | |
22115 | "type" : "object", | |
22116 | "properties" : { | |
22117 | "roleid" : { | |
22118 | "type" : "string" | |
22119 | } | |
22120 | } | |
22121 | } | |
56122987 | 22122 | }, |
7aacca6f DM |
22123 | "method" : "GET" |
22124 | }, | |
22125 | "POST" : { | |
22126 | "description" : "Create new role.", | |
22127 | "protected" : 1, | |
56122987 DM |
22128 | "permissions" : { |
22129 | "check" : [ | |
22130 | "perm", | |
22131 | "/access", | |
22132 | [ | |
22133 | "Sys.Modify" | |
22134 | ] | |
22135 | ] | |
22136 | }, | |
7aacca6f DM |
22137 | "parameters" : { |
22138 | "additionalProperties" : 0, | |
22139 | "properties" : { | |
22140 | "roleid" : { | |
22141 | "type" : "string", | |
22142 | "format" : "pve-roleid" | |
22143 | }, | |
22144 | "privs" : { | |
22145 | "format" : "pve-priv-list", | |
22146 | "optional" : 1, | |
22147 | "type" : "string" | |
22148 | } | |
22149 | } | |
22150 | }, | |
22151 | "name" : "create_role", | |
22152 | "method" : "POST", | |
22153 | "returns" : { | |
22154 | "type" : "null" | |
22155 | } | |
22156 | } | |
22157 | }, | |
22158 | "path" : "/access/roles", | |
22159 | "leaf" : 0 | |
22160 | }, | |
22161 | { | |
22162 | "info" : { | |
56122987 | 22163 | "GET" : { |
7aacca6f DM |
22164 | "permissions" : { |
22165 | "user" : "all", | |
22166 | "description" : "The returned list is restricted to objects where you have rights to modify permissions." | |
22167 | }, | |
22168 | "parameters" : { | |
22169 | "additionalProperties" : 0 | |
22170 | }, | |
22171 | "name" : "read_acl", | |
22172 | "description" : "Get Access Control List (ACLs).", | |
56122987 | 22173 | "returns" : { |
56122987 | 22174 | "items" : { |
56122987 | 22175 | "properties" : { |
7aacca6f DM |
22176 | "path" : { |
22177 | "type" : "string" | |
22178 | }, | |
22179 | "type" : { | |
22180 | "enum" : [ | |
22181 | "user", | |
22182 | "group" | |
22183 | ], | |
22184 | "type" : "string" | |
22185 | }, | |
22186 | "propagate" : { | |
22187 | "type" : "boolean" | |
22188 | }, | |
56122987 DM |
22189 | "roleid" : { |
22190 | "type" : "string" | |
7aacca6f DM |
22191 | }, |
22192 | "ugid" : { | |
22193 | "type" : "string" | |
56122987 | 22194 | } |
7aacca6f DM |
22195 | }, |
22196 | "type" : "object", | |
22197 | "additionalProperties" : 0 | |
22198 | }, | |
22199 | "type" : "array" | |
22200 | }, | |
22201 | "method" : "GET" | |
22202 | }, | |
22203 | "PUT" : { | |
22204 | "name" : "update_acl", | |
22205 | "parameters" : { | |
22206 | "additionalProperties" : 0, | |
22207 | "properties" : { | |
22208 | "delete" : { | |
22209 | "type" : "boolean", | |
22210 | "optional" : 1, | |
22211 | "description" : "Remove permissions (instead of adding it)." | |
22212 | }, | |
22213 | "users" : { | |
22214 | "format" : "pve-userid-list", | |
22215 | "type" : "string", | |
22216 | "optional" : 1, | |
22217 | "description" : "List of users." | |
22218 | }, | |
22219 | "path" : { | |
22220 | "description" : "Access control path", | |
22221 | "type" : "string" | |
22222 | }, | |
22223 | "roles" : { | |
22224 | "description" : "List of roles.", | |
22225 | "type" : "string", | |
22226 | "format" : "pve-roleid-list" | |
22227 | }, | |
22228 | "propagate" : { | |
22229 | "description" : "Allow to propagate (inherit) permissions.", | |
22230 | "type" : "boolean", | |
22231 | "optional" : 1, | |
22232 | "default" : 1 | |
22233 | }, | |
22234 | "groups" : { | |
22235 | "description" : "List of groups.", | |
22236 | "optional" : 1, | |
22237 | "type" : "string", | |
22238 | "format" : "pve-groupid-list" | |
56122987 DM |
22239 | } |
22240 | } | |
22241 | }, | |
56122987 | 22242 | "permissions" : { |
7aacca6f DM |
22243 | "check" : [ |
22244 | "perm-modify", | |
22245 | "{path}" | |
22246 | ] | |
22247 | }, | |
22248 | "description" : "Update Access Control List (add or remove permissions).", | |
22249 | "protected" : 1, | |
22250 | "returns" : { | |
22251 | "type" : "null" | |
56122987 | 22252 | }, |
7aacca6f | 22253 | "method" : "PUT" |
56122987 DM |
22254 | } |
22255 | }, | |
7aacca6f DM |
22256 | "text" : "acl", |
22257 | "leaf" : 1, | |
22258 | "path" : "/access/acl" | |
22259 | }, | |
22260 | { | |
22261 | "text" : "domains", | |
56122987 DM |
22262 | "children" : [ |
22263 | { | |
7aacca6f | 22264 | "path" : "/access/domains/{realm}", |
56122987 | 22265 | "leaf" : 1, |
7aacca6f | 22266 | "text" : "{realm}", |
56122987 DM |
22267 | "info" : { |
22268 | "PUT" : { | |
56122987 | 22269 | "parameters" : { |
56122987 | 22270 | "properties" : { |
7aacca6f DM |
22271 | "base_dn" : { |
22272 | "maxLength" : 256, | |
22273 | "type" : "string", | |
22274 | "optional" : 1, | |
22275 | "description" : "LDAP base domain name", | |
22276 | "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*" | |
22277 | }, | |
22278 | "realm" : { | |
22279 | "description" : "Authentication domain ID", | |
22280 | "type" : "string", | |
22281 | "format" : "pve-realm", | |
22282 | "maxLength" : 32 | |
22283 | }, | |
22284 | "user_attr" : { | |
22285 | "maxLength" : 256, | |
22286 | "pattern" : "\\S{2,}", | |
22287 | "description" : "LDAP user attribute name", | |
22288 | "optional" : 1, | |
56122987 DM |
22289 | "type" : "string" |
22290 | }, | |
7aacca6f | 22291 | "secure" : { |
56122987 | 22292 | "type" : "boolean", |
7aacca6f DM |
22293 | "optional" : 1, |
22294 | "description" : "Use secure LDAPS protocol." | |
56122987 | 22295 | }, |
7aacca6f DM |
22296 | "server1" : { |
22297 | "format" : "address", | |
22298 | "maxLength" : 256, | |
22299 | "optional" : 1, | |
22300 | "type" : "string", | |
22301 | "description" : "Server IP address (or DNS name)" | |
22302 | }, | |
22303 | "domain" : { | |
22304 | "maxLength" : 256, | |
22305 | "description" : "AD domain name", | |
22306 | "pattern" : "\\S+", | |
22307 | "optional" : 1, | |
56122987 | 22308 | "type" : "string" |
7aacca6f DM |
22309 | }, |
22310 | "server2" : { | |
22311 | "maxLength" : 256, | |
22312 | "format" : "address", | |
22313 | "type" : "string", | |
22314 | "optional" : 1, | |
22315 | "description" : "Fallback Server IP address (or DNS name)" | |
22316 | }, | |
22317 | "delete" : { | |
22318 | "type" : "string", | |
22319 | "optional" : 1, | |
22320 | "description" : "A list of settings you want to delete.", | |
22321 | "maxLength" : 4096, | |
22322 | "format" : "pve-configid-list" | |
22323 | }, | |
22324 | "comment" : { | |
22325 | "maxLength" : 4096, | |
22326 | "optional" : 1, | |
22327 | "type" : "string", | |
22328 | "description" : "Description." | |
22329 | }, | |
22330 | "default" : { | |
22331 | "description" : "Use this as default realm", | |
22332 | "type" : "boolean", | |
22333 | "optional" : 1 | |
22334 | }, | |
22335 | "port" : { | |
22336 | "description" : "Server port.", | |
22337 | "maximum" : 65535, | |
22338 | "type" : "integer", | |
22339 | "optional" : 1, | |
22340 | "minimum" : 1 | |
22341 | }, | |
22342 | "digest" : { | |
22343 | "optional" : 1, | |
22344 | "type" : "string", | |
22345 | "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", | |
22346 | "maxLength" : 40 | |
22347 | }, | |
22348 | "tfa" : { | |
22349 | "optional" : 1, | |
22350 | "type" : "string", | |
22351 | "description" : "Use Two-factor authentication.", | |
22352 | "maxLength" : 128, | |
22353 | "format" : "pve-tfa-config" | |
56122987 DM |
22354 | } |
22355 | }, | |
7aacca6f | 22356 | "type" : "object", |
56122987 DM |
22357 | "additionalProperties" : 0 |
22358 | }, | |
7aacca6f | 22359 | "name" : "update", |
56122987 DM |
22360 | "permissions" : { |
22361 | "check" : [ | |
22362 | "perm", | |
7aacca6f | 22363 | "/access/realm", |
56122987 | 22364 | [ |
7aacca6f | 22365 | "Realm.Allocate" |
56122987 DM |
22366 | ] |
22367 | ] | |
22368 | }, | |
7aacca6f DM |
22369 | "protected" : 1, |
22370 | "description" : "Update authentication server settings.", | |
22371 | "returns" : { | |
22372 | "type" : "null" | |
22373 | }, | |
22374 | "method" : "PUT" | |
22375 | }, | |
22376 | "DELETE" : { | |
22377 | "method" : "DELETE", | |
56122987 DM |
22378 | "returns" : { |
22379 | "type" : "null" | |
22380 | }, | |
7aacca6f DM |
22381 | "protected" : 1, |
22382 | "description" : "Delete an authentication server.", | |
56122987 | 22383 | "parameters" : { |
56122987 | 22384 | "properties" : { |
7aacca6f DM |
22385 | "realm" : { |
22386 | "format" : "pve-realm", | |
22387 | "maxLength" : 32, | |
56122987 | 22388 | "type" : "string", |
7aacca6f | 22389 | "description" : "Authentication domain ID" |
56122987 | 22390 | } |
56122987 | 22391 | }, |
7aacca6f DM |
22392 | "additionalProperties" : 0 |
22393 | }, | |
22394 | "name" : "delete", | |
22395 | "permissions" : { | |
22396 | "check" : [ | |
22397 | "perm", | |
22398 | "/access/realm", | |
22399 | [ | |
22400 | "Realm.Allocate" | |
56122987 | 22401 | ] |
7aacca6f DM |
22402 | ] |
22403 | } | |
22404 | }, | |
22405 | "GET" : { | |
22406 | "parameters" : { | |
22407 | "properties" : { | |
22408 | "realm" : { | |
22409 | "type" : "string", | |
22410 | "description" : "Authentication domain ID", | |
22411 | "format" : "pve-realm", | |
22412 | "maxLength" : 32 | |
22413 | } | |
56122987 | 22414 | }, |
7aacca6f | 22415 | "additionalProperties" : 0 |
56122987 | 22416 | }, |
7aacca6f DM |
22417 | "name" : "read", |
22418 | "permissions" : { | |
22419 | "check" : [ | |
22420 | "perm", | |
22421 | "/access/realm", | |
22422 | [ | |
22423 | "Realm.Allocate", | |
22424 | "Sys.Audit" | |
22425 | ], | |
22426 | "any", | |
22427 | 1 | |
22428 | ] | |
22429 | }, | |
22430 | "description" : "Get auth server configuration.", | |
22431 | "method" : "GET", | |
22432 | "returns" : {} | |
56122987 | 22433 | } |
56122987 DM |
22434 | } |
22435 | } | |
7aacca6f | 22436 | ], |
56122987 DM |
22437 | "info" : { |
22438 | "GET" : { | |
56122987 | 22439 | "returns" : { |
7aacca6f | 22440 | "type" : "array", |
56122987 DM |
22441 | "links" : [ |
22442 | { | |
22443 | "rel" : "child", | |
22444 | "href" : "{realm}" | |
22445 | } | |
22446 | ], | |
56122987 DM |
22447 | "items" : { |
22448 | "properties" : { | |
7aacca6f DM |
22449 | "comment" : { |
22450 | "optional" : 1, | |
22451 | "type" : "string" | |
22452 | }, | |
56122987 DM |
22453 | "realm" : { |
22454 | "type" : "string" | |
22455 | }, | |
22456 | "tfa" : { | |
7aacca6f | 22457 | "description" : "Two-factor authentication provider.", |
56122987 DM |
22458 | "enum" : [ |
22459 | "yubico", | |
22460 | "oath" | |
22461 | ], | |
56122987 DM |
22462 | "type" : "string", |
22463 | "optional" : 1 | |
22464 | } | |
22465 | }, | |
22466 | "type" : "object" | |
22467 | } | |
7aacca6f DM |
22468 | }, |
22469 | "method" : "GET", | |
22470 | "parameters" : { | |
22471 | "additionalProperties" : 0 | |
22472 | }, | |
22473 | "name" : "index", | |
22474 | "permissions" : { | |
22475 | "user" : "world", | |
22476 | "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated)." | |
22477 | }, | |
22478 | "description" : "Authentication domain index." | |
56122987 DM |
22479 | }, |
22480 | "POST" : { | |
7aacca6f DM |
22481 | "method" : "POST", |
22482 | "returns" : { | |
22483 | "type" : "null" | |
56122987 | 22484 | }, |
7aacca6f | 22485 | "description" : "Add an authentication server.", |
56122987 | 22486 | "protected" : 1, |
7aacca6f | 22487 | "name" : "create", |
56122987 DM |
22488 | "parameters" : { |
22489 | "properties" : { | |
22490 | "server1" : { | |
56122987 | 22491 | "optional" : 1, |
56122987 | 22492 | "type" : "string", |
7aacca6f | 22493 | "description" : "Server IP address (or DNS name)", |
56122987 | 22494 | "maxLength" : 256, |
7aacca6f | 22495 | "format" : "address" |
56122987 | 22496 | }, |
7aacca6f DM |
22497 | "secure" : { |
22498 | "description" : "Use secure LDAPS protocol.", | |
22499 | "type" : "boolean", | |
56122987 DM |
22500 | "optional" : 1 |
22501 | }, | |
56122987 | 22502 | "type" : { |
56122987 DM |
22503 | "description" : "Realm type.", |
22504 | "enum" : [ | |
22505 | "ldap", | |
7aacca6f | 22506 | "pam", |
56122987 | 22507 | "pve", |
7aacca6f DM |
22508 | "ad" |
22509 | ], | |
22510 | "type" : "string" | |
56122987 DM |
22511 | }, |
22512 | "user_attr" : { | |
56122987 DM |
22513 | "pattern" : "\\S{2,}", |
22514 | "description" : "LDAP user attribute name", | |
56122987 | 22515 | "optional" : 1, |
7aacca6f DM |
22516 | "type" : "string", |
22517 | "maxLength" : 256 | |
56122987 | 22518 | }, |
7aacca6f DM |
22519 | "realm" : { |
22520 | "format" : "pve-realm", | |
22521 | "maxLength" : 32, | |
22522 | "type" : "string", | |
22523 | "description" : "Authentication domain ID" | |
56122987 | 22524 | }, |
7aacca6f DM |
22525 | "base_dn" : { |
22526 | "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", | |
22527 | "description" : "LDAP base domain name", | |
22528 | "optional" : 1, | |
22529 | "type" : "string", | |
22530 | "maxLength" : 256 | |
56122987 | 22531 | }, |
7aacca6f DM |
22532 | "tfa" : { |
22533 | "description" : "Use Two-factor authentication.", | |
22534 | "optional" : 1, | |
22535 | "type" : "string", | |
22536 | "maxLength" : 128, | |
22537 | "format" : "pve-tfa-config" | |
56122987 | 22538 | }, |
7aacca6f DM |
22539 | "port" : { |
22540 | "minimum" : 1, | |
22541 | "maximum" : 65535, | |
22542 | "type" : "integer", | |
22543 | "optional" : 1, | |
22544 | "description" : "Server port." | |
56122987 | 22545 | }, |
7aacca6f DM |
22546 | "default" : { |
22547 | "optional" : 1, | |
22548 | "type" : "boolean", | |
22549 | "description" : "Use this as default realm" | |
56122987 | 22550 | }, |
7aacca6f DM |
22551 | "comment" : { |
22552 | "maxLength" : 4096, | |
22553 | "description" : "Description.", | |
22554 | "type" : "string", | |
22555 | "optional" : 1 | |
56122987 | 22556 | }, |
7aacca6f DM |
22557 | "domain" : { |
22558 | "maxLength" : 256, | |
22559 | "type" : "string", | |
22560 | "optional" : 1, | |
22561 | "pattern" : "\\S+", | |
22562 | "description" : "AD domain name" | |
22563 | }, | |
22564 | "server2" : { | |
22565 | "maxLength" : 256, | |
22566 | "format" : "address", | |
22567 | "type" : "string", | |
22568 | "optional" : 1, | |
22569 | "description" : "Fallback Server IP address (or DNS name)" | |
22570 | } | |
22571 | }, | |
22572 | "additionalProperties" : 0, | |
22573 | "type" : "object" | |
56122987 | 22574 | }, |
7aacca6f DM |
22575 | "permissions" : { |
22576 | "check" : [ | |
22577 | "perm", | |
22578 | "/access/realm", | |
22579 | [ | |
22580 | "Realm.Allocate" | |
22581 | ] | |
22582 | ] | |
22583 | } | |
56122987 | 22584 | } |
7aacca6f | 22585 | }, |
56122987 | 22586 | "path" : "/access/domains", |
7aacca6f | 22587 | "leaf" : 0 |
56122987 DM |
22588 | }, |
22589 | { | |
56122987 DM |
22590 | "info" : { |
22591 | "POST" : { | |
22592 | "method" : "POST", | |
56122987 | 22593 | "returns" : { |
7aacca6f | 22594 | "type" : "object", |
56122987 DM |
22595 | "properties" : { |
22596 | "CSRFPreventionToken" : { | |
22597 | "optional" : 1, | |
22598 | "type" : "string" | |
22599 | }, | |
22600 | "ticket" : { | |
7aacca6f DM |
22601 | "optional" : 1, |
22602 | "type" : "string" | |
56122987 DM |
22603 | }, |
22604 | "username" : { | |
22605 | "type" : "string" | |
22606 | } | |
7aacca6f | 22607 | } |
56122987 DM |
22608 | }, |
22609 | "parameters" : { | |
22610 | "properties" : { | |
7aacca6f DM |
22611 | "password" : { |
22612 | "description" : "The secret password. This can also be a valid ticket.", | |
22613 | "type" : "string" | |
22614 | }, | |
22615 | "privs" : { | |
22616 | "maxLength" : 64, | |
22617 | "format" : "pve-priv-list", | |
22618 | "optional" : 1, | |
22619 | "type" : "string", | |
22620 | "requires" : "path", | |
22621 | "description" : "Verify ticket, and check if user have access 'privs' on 'path'" | |
22622 | }, | |
56122987 | 22623 | "otp" : { |
56122987 | 22624 | "optional" : 1, |
7aacca6f DM |
22625 | "type" : "string", |
22626 | "description" : "One-time password for Two-factor authentication." | |
56122987 DM |
22627 | }, |
22628 | "path" : { | |
22629 | "requires" : "privs", | |
7aacca6f | 22630 | "description" : "Verify ticket, and check if user have access 'privs' on 'path'", |
56122987 | 22631 | "optional" : 1, |
7aacca6f DM |
22632 | "type" : "string", |
22633 | "maxLength" : 64 | |
56122987 DM |
22634 | }, |
22635 | "realm" : { | |
56122987 | 22636 | "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>.", |
7aacca6f | 22637 | "optional" : 1, |
56122987 | 22638 | "type" : "string", |
7aacca6f | 22639 | "maxLength" : 32, |
56122987 DM |
22640 | "format" : "pve-realm" |
22641 | }, | |
22642 | "username" : { | |
22643 | "description" : "User name", | |
56122987 | 22644 | "type" : "string", |
56122987 DM |
22645 | "maxLength" : 64 |
22646 | } | |
22647 | }, | |
22648 | "additionalProperties" : 0 | |
22649 | }, | |
7aacca6f | 22650 | "name" : "create_ticket", |
56122987 DM |
22651 | "permissions" : { |
22652 | "user" : "world", | |
22653 | "description" : "You need to pass valid credientials." | |
7aacca6f DM |
22654 | }, |
22655 | "description" : "Create or verify authentication ticket.", | |
22656 | "protected" : 1 | |
56122987 DM |
22657 | }, |
22658 | "GET" : { | |
7aacca6f DM |
22659 | "parameters" : { |
22660 | "additionalProperties" : 0 | |
22661 | }, | |
56122987 DM |
22662 | "permissions" : { |
22663 | "user" : "world" | |
22664 | }, | |
56122987 | 22665 | "name" : "get_ticket", |
7aacca6f | 22666 | "description" : "Dummy. Useful for formaters which want to priovde a login page.", |
56122987 DM |
22667 | "returns" : { |
22668 | "type" : "null" | |
7aacca6f DM |
22669 | }, |
22670 | "method" : "GET" | |
56122987 DM |
22671 | } |
22672 | }, | |
22673 | "text" : "ticket", | |
7aacca6f DM |
22674 | "leaf" : 1, |
22675 | "path" : "/access/ticket" | |
56122987 DM |
22676 | }, |
22677 | { | |
56122987 DM |
22678 | "info" : { |
22679 | "PUT" : { | |
7aacca6f DM |
22680 | "returns" : { |
22681 | "type" : "null" | |
22682 | }, | |
22683 | "method" : "PUT", | |
56122987 DM |
22684 | "permissions" : { |
22685 | "description" : "Each user is allowed to change his own password. A user can change the password of another user if he has 'Realm.AllocateUser' (on the realm of user <userid>) and 'User.Modify' permission on /access/groups/<group> on a group where user <userid> is member of.", | |
22686 | "check" : [ | |
22687 | "or", | |
22688 | [ | |
22689 | "userid-param", | |
22690 | "self" | |
22691 | ], | |
22692 | [ | |
22693 | "and", | |
22694 | [ | |
22695 | "userid-param", | |
22696 | "Realm.AllocateUser" | |
22697 | ], | |
22698 | [ | |
22699 | "userid-group", | |
22700 | [ | |
22701 | "User.Modify" | |
22702 | ] | |
22703 | ] | |
22704 | ] | |
22705 | ] | |
22706 | }, | |
56122987 DM |
22707 | "parameters" : { |
22708 | "properties" : { | |
22709 | "password" : { | |
56122987 | 22710 | "maxLength" : 64, |
7aacca6f | 22711 | "type" : "string", |
56122987 DM |
22712 | "description" : "The new password.", |
22713 | "minLength" : 5 | |
22714 | }, | |
22715 | "userid" : { | |
56122987 | 22716 | "format" : "pve-userid", |
7aacca6f DM |
22717 | "maxLength" : 64, |
22718 | "description" : "User ID", | |
56122987 DM |
22719 | "type" : "string" |
22720 | } | |
22721 | }, | |
22722 | "additionalProperties" : 0 | |
22723 | }, | |
22724 | "name" : "change_passsword", | |
7aacca6f DM |
22725 | "description" : "Change user password.", |
22726 | "protected" : 1 | |
22727 | } | |
22728 | }, | |
22729 | "text" : "password", | |
22730 | "leaf" : 1, | |
22731 | "path" : "/access/password" | |
22732 | } | |
22733 | ] | |
22734 | }, | |
22735 | { | |
22736 | "info" : { | |
22737 | "GET" : { | |
22738 | "description" : "Pool index.", | |
22739 | "name" : "index", | |
22740 | "parameters" : { | |
22741 | "additionalProperties" : 0 | |
22742 | }, | |
22743 | "permissions" : { | |
22744 | "user" : "all", | |
22745 | "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/<pool>." | |
22746 | }, | |
22747 | "returns" : { | |
22748 | "type" : "array", | |
22749 | "links" : [ | |
22750 | { | |
22751 | "rel" : "child", | |
22752 | "href" : "{poolid}" | |
22753 | } | |
22754 | ], | |
22755 | "items" : { | |
22756 | "properties" : { | |
22757 | "poolid" : { | |
22758 | "type" : "string" | |
22759 | } | |
22760 | }, | |
22761 | "type" : "object" | |
22762 | } | |
22763 | }, | |
22764 | "method" : "GET" | |
22765 | }, | |
22766 | "POST" : { | |
22767 | "name" : "create_pool", | |
22768 | "permissions" : { | |
22769 | "check" : [ | |
22770 | "perm", | |
22771 | "/pool/{poolid}", | |
22772 | [ | |
22773 | "Pool.Allocate" | |
22774 | ] | |
22775 | ] | |
22776 | }, | |
22777 | "parameters" : { | |
22778 | "additionalProperties" : 0, | |
22779 | "properties" : { | |
22780 | "poolid" : { | |
22781 | "format" : "pve-poolid", | |
22782 | "type" : "string" | |
22783 | }, | |
22784 | "comment" : { | |
22785 | "optional" : 1, | |
22786 | "type" : "string" | |
22787 | } | |
56122987 | 22788 | } |
7aacca6f DM |
22789 | }, |
22790 | "protected" : 1, | |
22791 | "description" : "Create new pool.", | |
22792 | "method" : "POST", | |
22793 | "returns" : { | |
22794 | "type" : "null" | |
56122987 DM |
22795 | } |
22796 | } | |
7aacca6f | 22797 | }, |
56122987 DM |
22798 | "children" : [ |
22799 | { | |
7aacca6f | 22800 | "leaf" : 1, |
56122987 DM |
22801 | "path" : "/pools/{poolid}", |
22802 | "info" : { | |
7aacca6f DM |
22803 | "PUT" : { |
22804 | "method" : "PUT", | |
22805 | "returns" : { | |
22806 | "type" : "null" | |
22807 | }, | |
56122987 DM |
22808 | "parameters" : { |
22809 | "additionalProperties" : 0, | |
22810 | "properties" : { | |
7aacca6f | 22811 | "storage" : { |
56122987 | 22812 | "type" : "string", |
7aacca6f DM |
22813 | "optional" : 1, |
22814 | "description" : "List of storage IDs.", | |
22815 | "format" : "pve-storage-id-list" | |
22816 | }, | |
22817 | "vms" : { | |
22818 | "format" : "pve-vmid-list", | |
22819 | "type" : "string", | |
22820 | "optional" : 1, | |
22821 | "description" : "List of virtual machines." | |
22822 | }, | |
22823 | "delete" : { | |
22824 | "description" : "Remove vms/storage (instead of adding it).", | |
22825 | "optional" : 1, | |
22826 | "type" : "boolean" | |
22827 | }, | |
22828 | "poolid" : { | |
22829 | "format" : "pve-poolid", | |
22830 | "type" : "string" | |
56122987 DM |
22831 | }, |
22832 | "comment" : { | |
22833 | "type" : "string", | |
22834 | "optional" : 1 | |
22835 | } | |
7aacca6f | 22836 | } |
56122987 DM |
22837 | }, |
22838 | "permissions" : { | |
22839 | "check" : [ | |
22840 | "perm", | |
22841 | "/pool/{poolid}", | |
22842 | [ | |
22843 | "Pool.Allocate" | |
22844 | ] | |
7aacca6f DM |
22845 | ], |
22846 | "description" : "You also need the right to modify permissions on any object you add/delete." | |
56122987 | 22847 | }, |
7aacca6f DM |
22848 | "name" : "update_pool", |
22849 | "description" : "Update pool data.", | |
22850 | "protected" : 1 | |
56122987 DM |
22851 | }, |
22852 | "DELETE" : { | |
7aacca6f DM |
22853 | "returns" : { |
22854 | "type" : "null" | |
22855 | }, | |
22856 | "method" : "DELETE", | |
22857 | "description" : "Delete pool.", | |
22858 | "protected" : 1, | |
22859 | "parameters" : { | |
22860 | "additionalProperties" : 0, | |
22861 | "properties" : { | |
22862 | "poolid" : { | |
22863 | "format" : "pve-poolid", | |
22864 | "type" : "string" | |
22865 | } | |
22866 | } | |
22867 | }, | |
22868 | "name" : "delete_pool", | |
56122987 | 22869 | "permissions" : { |
7aacca6f | 22870 | "description" : "You can only delete empty pools (no members).", |
56122987 DM |
22871 | "check" : [ |
22872 | "perm", | |
22873 | "/pool/{poolid}", | |
22874 | [ | |
22875 | "Pool.Allocate" | |
22876 | ] | |
7aacca6f DM |
22877 | ] |
22878 | } | |
22879 | }, | |
22880 | "GET" : { | |
22881 | "description" : "Get pool configuration.", | |
22882 | "name" : "read_pool", | |
56122987 DM |
22883 | "parameters" : { |
22884 | "properties" : { | |
22885 | "poolid" : { | |
7aacca6f DM |
22886 | "type" : "string", |
22887 | "format" : "pve-poolid" | |
56122987 DM |
22888 | } |
22889 | }, | |
22890 | "additionalProperties" : 0 | |
22891 | }, | |
56122987 | 22892 | "permissions" : { |
56122987 DM |
22893 | "check" : [ |
22894 | "perm", | |
22895 | "/pool/{poolid}", | |
22896 | [ | |
22897 | "Pool.Allocate" | |
22898 | ] | |
22899 | ] | |
22900 | }, | |
7aacca6f DM |
22901 | "method" : "GET", |
22902 | "returns" : { | |
56122987 | 22903 | "properties" : { |
7aacca6f DM |
22904 | "members" : { |
22905 | "type" : "array", | |
22906 | "items" : { | |
22907 | "additionalProperties" : 1, | |
22908 | "type" : "object", | |
22909 | "properties" : { | |
22910 | "vmid" : { | |
22911 | "optional" : 1, | |
22912 | "type" : "integer" | |
22913 | }, | |
22914 | "storage" : { | |
22915 | "type" : "string", | |
22916 | "optional" : 1 | |
22917 | }, | |
22918 | "id" : { | |
22919 | "type" : "string" | |
22920 | }, | |
22921 | "node" : { | |
22922 | "type" : "string" | |
22923 | }, | |
22924 | "type" : { | |
22925 | "type" : "string", | |
22926 | "enum" : [ | |
22927 | "qemu", | |
22928 | "lxc", | |
22929 | "openvz", | |
22930 | "storage" | |
22931 | ] | |
22932 | } | |
22933 | } | |
22934 | } | |
56122987 DM |
22935 | }, |
22936 | "comment" : { | |
22937 | "optional" : 1, | |
22938 | "type" : "string" | |
56122987 DM |
22939 | } |
22940 | }, | |
7aacca6f DM |
22941 | "additionalProperties" : 0, |
22942 | "type" : "object" | |
56122987 DM |
22943 | } |
22944 | } | |
22945 | }, | |
7aacca6f | 22946 | "text" : "{poolid}" |
56122987 | 22947 | } |
7aacca6f | 22948 | ], |
56122987 | 22949 | "text" : "pools", |
7aacca6f DM |
22950 | "leaf" : 0, |
22951 | "path" : "/pools" | |
56122987 DM |
22952 | }, |
22953 | { | |
7aacca6f | 22954 | "leaf" : 1, |
56122987 DM |
22955 | "path" : "/version", |
22956 | "info" : { | |
22957 | "GET" : { | |
56122987 DM |
22958 | "returns" : { |
22959 | "type" : "object", | |
22960 | "properties" : { | |
56122987 DM |
22961 | "version" : { |
22962 | "type" : "string" | |
22963 | }, | |
22964 | "repoid" : { | |
22965 | "type" : "string" | |
7aacca6f DM |
22966 | }, |
22967 | "release" : { | |
22968 | "type" : "string" | |
56122987 DM |
22969 | } |
22970 | } | |
22971 | }, | |
22972 | "method" : "GET", | |
7aacca6f | 22973 | "description" : "API version details. The result also includes the global datacenter confguration.", |
56122987 DM |
22974 | "permissions" : { |
22975 | "user" : "all" | |
22976 | }, | |
7aacca6f DM |
22977 | "parameters" : { |
22978 | "additionalProperties" : 0 | |
22979 | }, | |
22980 | "name" : "version" | |
56122987 DM |
22981 | } |
22982 | }, | |
56122987 DM |
22983 | "text" : "version" |
22984 | } | |
22985 | ] | |
22986 | ; | |
22987 |