1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QemuVmlistResponseDataInner {
/// Current CPU usage.
#[serde(rename = "cpu", skip_serializing_if = "Option::is_none")]
pub cpu: Option<f64>,
/// Maximum usable CPUs.
#[serde(rename = "cpus", skip_serializing_if = "Option::is_none")]
pub cpus: Option<f64>,
/// The amount of bytes the guest read from it's block devices since the guest was started. (Note: This info is not available for all storage types.)
#[serde(rename = "diskread", skip_serializing_if = "Option::is_none")]
pub diskread: Option<i64>,
/// The amount of bytes the guest wrote from it's block devices since the guest was started. (Note: This info is not available for all storage types.)
#[serde(rename = "diskwrite", skip_serializing_if = "Option::is_none")]
pub diskwrite: Option<i64>,
/// The current config lock, if any.
#[serde(rename = "lock", skip_serializing_if = "Option::is_none")]
pub lock: Option<String>,
/// Root disk size in bytes.
#[serde(rename = "maxdisk", skip_serializing_if = "Option::is_none")]
pub maxdisk: Option<i64>,
/// Maximum memory in bytes.
#[serde(rename = "maxmem", skip_serializing_if = "Option::is_none")]
pub maxmem: Option<i64>,
/// Currently used memory in bytes. Does not take into account kernel same-page merging (KSM). Uses information from ballooning when available.
#[serde(rename = "mem", skip_serializing_if = "Option::is_none")]
pub mem: Option<i64>,
/// Current memory usage on the host. Does not take into account kernel same-page merging (KSM).
#[serde(rename = "memhost", skip_serializing_if = "Option::is_none")]
pub memhost: Option<i64>,
/// VM (host)name.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// The amount of traffic in bytes that was sent to the guest over the network since it was started.
#[serde(rename = "netin", skip_serializing_if = "Option::is_none")]
pub netin: Option<i64>,
/// The amount of traffic in bytes that was sent from the guest over the network since it was started.
#[serde(rename = "netout", skip_serializing_if = "Option::is_none")]
pub netout: Option<i64>,
/// PID of the QEMU process, if the VM is running.
#[serde(rename = "pid", skip_serializing_if = "Option::is_none")]
pub pid: Option<i64>,
/// CPU Full pressure stall average over the last 10 seconds.
#[serde(rename = "pressurecpufull", skip_serializing_if = "Option::is_none")]
pub pressurecpufull: Option<f64>,
/// CPU Some pressure stall average over the last 10 seconds.
#[serde(rename = "pressurecpusome", skip_serializing_if = "Option::is_none")]
pub pressurecpusome: Option<f64>,
/// IO Full pressure stall average over the last 10 seconds.
#[serde(rename = "pressureiofull", skip_serializing_if = "Option::is_none")]
pub pressureiofull: Option<f64>,
/// IO Some pressure stall average over the last 10 seconds.
#[serde(rename = "pressureiosome", skip_serializing_if = "Option::is_none")]
pub pressureiosome: Option<f64>,
/// Memory Full pressure stall average over the last 10 seconds.
#[serde(rename = "pressurememoryfull", skip_serializing_if = "Option::is_none")]
pub pressurememoryfull: Option<f64>,
/// Memory Some pressure stall average over the last 10 seconds.
#[serde(rename = "pressurememorysome", skip_serializing_if = "Option::is_none")]
pub pressurememorysome: Option<f64>,
/// VM run state from the 'query-status' QMP monitor command.
#[serde(rename = "qmpstatus", skip_serializing_if = "Option::is_none")]
pub qmpstatus: Option<String>,
/// The currently running machine type (if running).
#[serde(rename = "running-machine", skip_serializing_if = "Option::is_none")]
pub running_machine: Option<String>,
/// The QEMU version the VM is currently using (if running).
#[serde(rename = "running-qemu", skip_serializing_if = "Option::is_none")]
pub running_qemu: Option<String>,
/// Guest has serial device configured.
#[serde(rename = "serial", skip_serializing_if = "Option::is_none")]
pub serial: Option<models::PveBoolean>,
/// QEMU process status.
#[serde(rename = "status")]
pub status: models::PveStatusEnum,
/// The current configured tags, if any
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<String>,
/// Determines if the guest is a template.
#[serde(rename = "template", skip_serializing_if = "Option::is_none")]
pub template: Option<models::PveBoolean>,
/// Uptime in seconds.
#[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
pub uptime: Option<i64>,
/// The (unique) ID of the VM.
#[serde(rename = "vmid")]
pub vmid: i32,
}
impl QemuVmlistResponseDataInner {
pub fn new(status: models::PveStatusEnum, vmid: i32) -> QemuVmlistResponseDataInner {
QemuVmlistResponseDataInner {
cpu: None,
cpus: None,
diskread: None,
diskwrite: None,
lock: None,
maxdisk: None,
maxmem: None,
mem: None,
memhost: None,
name: None,
netin: None,
netout: None,
pid: None,
pressurecpufull: None,
pressurecpusome: None,
pressureiofull: None,
pressureiosome: None,
pressurememoryfull: None,
pressurememorysome: None,
qmpstatus: None,
running_machine: None,
running_qemu: None,
serial: None,
status,
tags: None,
template: None,
uptime: None,
vmid,
}
}
}