line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/bin/false |
2
|
|
|
|
|
|
|
# PODNAME: Net::Proxmox::VE::Nodes |
3
|
|
|
|
|
|
|
# ABSTRACT: Functions for the 'nodes' portion of the API |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Net::Proxmox::VE::Nodes; |
9
|
|
|
|
|
|
|
$Net::Proxmox::VE::Nodes::VERSION = '0.36'; |
10
|
1
|
|
|
1
|
|
5
|
use parent 'Exporter'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @EXPORT = qw( nodes ); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $base = '/nodes'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub nodes { |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
return $self->get($base) |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub get_nodes { |
27
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
29
|
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes()'; |
31
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes()' if ref $a; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
return $self->get( $base, $a ) |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub get_nodes_aplinfo { |
39
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
41
|
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_aplinfo()'; |
43
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_aplinfo()' if ref $a; |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'aplinfo' ) |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub create_nodes_aplinfo { |
51
|
|
|
|
|
|
|
|
52
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
53
|
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_aplinfo()'; |
55
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_aplinfo()' if ref $a; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my @p = @_; |
58
|
|
|
|
|
|
|
|
59
|
0
|
0
|
|
|
|
|
die 'No arguments for create_nodes_aplinfo()' unless @p; |
60
|
0
|
|
|
|
|
|
my %args; |
61
|
|
|
|
|
|
|
|
62
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
63
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for create_nodes_aplinfo()' |
64
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
65
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
else { |
68
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for create_nodes_aplinfo()' |
69
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
70
|
0
|
|
|
|
|
|
%args = @p; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'aplinfo', \%args ) |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub get_nodes_dns { |
79
|
|
|
|
|
|
|
|
80
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
81
|
|
|
|
|
|
|
|
82
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_dns()'; |
83
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_dns()' if ref $a; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'dns' ) |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub update_nodes_dns { |
91
|
|
|
|
|
|
|
|
92
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
93
|
|
|
|
|
|
|
|
94
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for update_nodes_dns()'; |
95
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for update_nodes_dns()' if ref $a; |
96
|
|
|
|
|
|
|
|
97
|
0
|
|
|
|
|
|
my @p = @_; |
98
|
|
|
|
|
|
|
|
99
|
0
|
0
|
|
|
|
|
die 'No arguments for update_nodes_dns()' unless @p; |
100
|
0
|
|
|
|
|
|
my %args; |
101
|
|
|
|
|
|
|
|
102
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
103
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for update_nodes_dns()' |
104
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
105
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
else { |
108
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for update_nodes_dns()' |
109
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
110
|
0
|
|
|
|
|
|
%args = @p; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
return $self->put( $base, $a, 'dns', \%args ) |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
} |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub get_nodes_rrd { |
119
|
|
|
|
|
|
|
|
120
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
121
|
|
|
|
|
|
|
|
122
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_rrd()'; |
123
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_rrd()' if ref $a; |
124
|
|
|
|
|
|
|
|
125
|
0
|
|
|
|
|
|
my @p = @_; |
126
|
|
|
|
|
|
|
|
127
|
0
|
0
|
|
|
|
|
die 'No arguments for get_nodes_rrd()' unless @p; |
128
|
0
|
|
|
|
|
|
my %args; |
129
|
|
|
|
|
|
|
|
130
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
131
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for get_nodes_rrd()' |
132
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
133
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
else { |
136
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for get_nodes_rrd()' |
137
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
138
|
0
|
|
|
|
|
|
%args = @p; |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
|
141
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'rrd', \%args ) |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub get_nodes_rrddata { |
147
|
|
|
|
|
|
|
|
148
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
149
|
|
|
|
|
|
|
|
150
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_rrddata()'; |
151
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_rrddata()' if ref $a; |
152
|
|
|
|
|
|
|
|
153
|
0
|
|
|
|
|
|
my @p = @_; |
154
|
|
|
|
|
|
|
|
155
|
0
|
0
|
|
|
|
|
die 'No arguments for get_nodes_rrddata()' unless @p; |
156
|
0
|
|
|
|
|
|
my %args; |
157
|
|
|
|
|
|
|
|
158
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
159
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for get_nodes_rrddata()' |
160
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
161
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
} |
163
|
|
|
|
|
|
|
else { |
164
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for get_nodes_rrddata()' |
165
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
166
|
0
|
|
|
|
|
|
%args = @p; |
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'rrddata', \%args ) |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
sub get_nodes_status { |
175
|
|
|
|
|
|
|
|
176
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
177
|
|
|
|
|
|
|
|
178
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_status()'; |
179
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_status()' if ref $a; |
180
|
|
|
|
|
|
|
|
181
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'status' ) |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
sub update_nodes_status { |
188
|
|
|
|
|
|
|
|
189
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
190
|
|
|
|
|
|
|
|
191
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for update_nodes_status()'; |
192
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for update_nodes_status()' if ref $a; |
193
|
|
|
|
|
|
|
|
194
|
0
|
|
|
|
|
|
my @p = @_; |
195
|
|
|
|
|
|
|
|
196
|
0
|
0
|
|
|
|
|
die 'No arguments for update_nodes_status()' unless @p; |
197
|
0
|
|
|
|
|
|
my %args; |
198
|
|
|
|
|
|
|
|
199
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
200
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for update_nodes_status()' |
201
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
202
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
} |
204
|
|
|
|
|
|
|
else { |
205
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for update_nodes_status()' |
206
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
207
|
0
|
|
|
|
|
|
%args = @p; |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'status', \%args ) |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
} |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
sub get_nodes_subscription { |
217
|
|
|
|
|
|
|
|
218
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
219
|
|
|
|
|
|
|
|
220
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_subscription()'; |
221
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_subscription()' if ref $a; |
222
|
|
|
|
|
|
|
|
223
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'subscription' ) |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
} |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
sub create_nodes_subscription { |
229
|
|
|
|
|
|
|
|
230
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
231
|
|
|
|
|
|
|
|
232
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_subscription()'; |
233
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_subscription()' if ref $a; |
234
|
|
|
|
|
|
|
|
235
|
0
|
|
|
|
|
|
my @p = @_; |
236
|
|
|
|
|
|
|
|
237
|
0
|
0
|
|
|
|
|
die 'No arguments for create_nodes_subscription()' unless @p; |
238
|
0
|
|
|
|
|
|
my %args; |
239
|
|
|
|
|
|
|
|
240
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
241
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for create_nodes_subscription()' |
242
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
243
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
else { |
246
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for create_nodes_subscription()' |
247
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
248
|
0
|
|
|
|
|
|
%args = @p; |
249
|
|
|
|
|
|
|
} |
250
|
|
|
|
|
|
|
|
251
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'subscription', \%args ) |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
sub update_nodes_subscription_key { |
257
|
|
|
|
|
|
|
|
258
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
259
|
|
|
|
|
|
|
|
260
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for update_nodes_subscription_key()'; |
261
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for update_nodes_subscription_key()' if ref $a; |
262
|
|
|
|
|
|
|
|
263
|
0
|
|
|
|
|
|
my @p = @_; |
264
|
|
|
|
|
|
|
|
265
|
0
|
0
|
|
|
|
|
die 'No arguments for update_nodes_subscription_key()' unless @p; |
266
|
0
|
|
|
|
|
|
my %args; |
267
|
|
|
|
|
|
|
|
268
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
269
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for update_nodes_subscription_key()' |
270
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
271
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
} |
273
|
|
|
|
|
|
|
else { |
274
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for update_nodes_subscription_key()' |
275
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
276
|
0
|
|
|
|
|
|
%args = @p; |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
|
279
|
0
|
|
|
|
|
|
return $self->put( $base, $a, 'subscription', \%args ) |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
sub get_nodes_syslog { |
285
|
|
|
|
|
|
|
|
286
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
287
|
|
|
|
|
|
|
|
288
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_syslog()'; |
289
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_syslog()' if ref $a; |
290
|
|
|
|
|
|
|
|
291
|
0
|
|
|
|
|
|
my @p = @_; |
292
|
|
|
|
|
|
|
|
293
|
0
|
0
|
|
|
|
|
die 'No arguments for get_nodes_syslog()' unless @p; |
294
|
0
|
|
|
|
|
|
my %args; |
295
|
|
|
|
|
|
|
|
296
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
297
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for get_nodes_syslog()' |
298
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
299
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
else { |
302
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for get_nodes_syslog()' |
303
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
304
|
0
|
|
|
|
|
|
%args = @p; |
305
|
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
|
307
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'syslog', \%args ) |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
} |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
sub get_nodes_time { |
313
|
|
|
|
|
|
|
|
314
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
315
|
|
|
|
|
|
|
|
316
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_time()'; |
317
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_time()' if ref $a; |
318
|
|
|
|
|
|
|
|
319
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'time' ) |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
} |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
sub update_nodes_time { |
325
|
|
|
|
|
|
|
|
326
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
327
|
|
|
|
|
|
|
|
328
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for update_nodes_time()'; |
329
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for update_nodes_time()' if ref $a; |
330
|
|
|
|
|
|
|
|
331
|
0
|
|
|
|
|
|
my @p = @_; |
332
|
|
|
|
|
|
|
|
333
|
0
|
0
|
|
|
|
|
die 'No arguments for update_nodes_time()' unless @p; |
334
|
0
|
|
|
|
|
|
my %args; |
335
|
|
|
|
|
|
|
|
336
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
337
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for update_nodes_time()' |
338
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
339
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
else { |
342
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for update_nodes_time()' |
343
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
344
|
0
|
|
|
|
|
|
%args = @p; |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
|
347
|
0
|
|
|
|
|
|
return $self->put( $base, $a, 'time', \%args ) |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
} |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
sub get_nodes_ubcfailcnt { |
353
|
|
|
|
|
|
|
|
354
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
355
|
|
|
|
|
|
|
|
356
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_ubcfailcnt()'; |
357
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_ubcfailcnt()' if ref $a; |
358
|
|
|
|
|
|
|
|
359
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'ubcfailcnt' ) |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
} |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
sub get_nodes_version { |
365
|
|
|
|
|
|
|
|
366
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
367
|
|
|
|
|
|
|
|
368
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_version()'; |
369
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_version()' if ref $a; |
370
|
|
|
|
|
|
|
|
371
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'version' ) |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
} |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
sub create_nodes_vncshell { |
377
|
|
|
|
|
|
|
|
378
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
379
|
|
|
|
|
|
|
|
380
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_vncshell()'; |
381
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_vncshell()' if ref $a; |
382
|
|
|
|
|
|
|
|
383
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'vncshell' ) |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
} |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
sub create_nodes_vzdump { |
389
|
|
|
|
|
|
|
|
390
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
391
|
|
|
|
|
|
|
|
392
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_vzdump()'; |
393
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_vzdump()' if ref $a; |
394
|
|
|
|
|
|
|
|
395
|
0
|
|
|
|
|
|
my @p = @_; |
396
|
|
|
|
|
|
|
|
397
|
0
|
0
|
|
|
|
|
die 'No arguments for create_nodes_vzdump()' unless @p; |
398
|
0
|
|
|
|
|
|
my %args; |
399
|
|
|
|
|
|
|
|
400
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
401
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for create_nodes_vzdump()' |
402
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
403
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
} |
405
|
|
|
|
|
|
|
else { |
406
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for create_nodes_vzdump()' |
407
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
408
|
0
|
|
|
|
|
|
%args = @p; |
409
|
|
|
|
|
|
|
} |
410
|
|
|
|
|
|
|
|
411
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'dns', \%args ) |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
} |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
sub nodes_network { |
417
|
|
|
|
|
|
|
|
418
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
419
|
|
|
|
|
|
|
|
420
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for nodes_network()'; |
421
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for nodes_network()' if ref $a; |
422
|
|
|
|
|
|
|
|
423
|
0
|
|
|
|
|
|
my @p = @_; |
424
|
|
|
|
|
|
|
|
425
|
0
|
0
|
|
|
|
|
die 'No arguments for nodes_network()' unless @p; |
426
|
0
|
|
|
|
|
|
my %args; |
427
|
|
|
|
|
|
|
|
428
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
429
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for nodes_network()' |
430
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
431
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
} |
433
|
|
|
|
|
|
|
else { |
434
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for nodes_network()' |
435
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
436
|
0
|
|
|
|
|
|
%args = @p; |
437
|
|
|
|
|
|
|
} |
438
|
|
|
|
|
|
|
|
439
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'network', \%args ) |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
} |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
sub create_nodes_network { |
445
|
|
|
|
|
|
|
|
446
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
447
|
|
|
|
|
|
|
|
448
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_network()'; |
449
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_network()' if ref $a; |
450
|
|
|
|
|
|
|
|
451
|
0
|
|
|
|
|
|
my @p = @_; |
452
|
|
|
|
|
|
|
|
453
|
0
|
0
|
|
|
|
|
die 'No arguments for create_nodes_network()' unless @p; |
454
|
0
|
|
|
|
|
|
my %args; |
455
|
|
|
|
|
|
|
|
456
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
457
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for create_nodes_network()' |
458
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
459
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
} |
461
|
|
|
|
|
|
|
else { |
462
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for create_nodes_network()' |
463
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
464
|
0
|
|
|
|
|
|
%args = @p; |
465
|
|
|
|
|
|
|
} |
466
|
|
|
|
|
|
|
|
467
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'network', \%args ) |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
} |
470
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
sub revert_nodes_network { |
473
|
|
|
|
|
|
|
|
474
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
475
|
|
|
|
|
|
|
|
476
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for revert_nodes_network()'; |
477
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for revert_nodes_network()' if ref $a; |
478
|
|
|
|
|
|
|
|
479
|
0
|
|
|
|
|
|
return $self->delete( $base, $a ) |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
} |
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
sub get_nodes_network_iface { |
486
|
|
|
|
|
|
|
|
487
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
488
|
|
|
|
|
|
|
|
489
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_network_iface()'; |
490
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No iface for get_nodes_network_iface()'; |
491
|
|
|
|
|
|
|
|
492
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_network_iface()' if ref $a; |
493
|
0
|
0
|
|
|
|
|
die 'iface must be a scalar for get_nodes_network_iface()' if ref $b; |
494
|
|
|
|
|
|
|
|
495
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'network', $b ) |
496
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
} |
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
sub update_nodes_network_iface { |
501
|
|
|
|
|
|
|
|
502
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
503
|
|
|
|
|
|
|
|
504
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for update_nodes_network_iface()'; |
505
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No iface for update_nodes_network_iface()'; |
506
|
|
|
|
|
|
|
|
507
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for update_nodes_network_iface()' if ref $a; |
508
|
0
|
0
|
|
|
|
|
die 'iface must be a scalar for update_nodes_network_iface()' if ref $b; |
509
|
|
|
|
|
|
|
|
510
|
0
|
|
|
|
|
|
my @p = @_; |
511
|
|
|
|
|
|
|
|
512
|
0
|
0
|
|
|
|
|
die 'No arguments for update_nodes_network_iface()' unless @p; |
513
|
0
|
|
|
|
|
|
my %args; |
514
|
|
|
|
|
|
|
|
515
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
516
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for update_nodes_network_iface()' |
517
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
518
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
} |
520
|
|
|
|
|
|
|
else { |
521
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for update_nodes_network_iface()' |
522
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
523
|
0
|
|
|
|
|
|
%args = @p; |
524
|
|
|
|
|
|
|
} |
525
|
|
|
|
|
|
|
|
526
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'network', $b, \%args ) |
527
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
} |
529
|
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
sub delete_nodes_network_iface { |
532
|
|
|
|
|
|
|
|
533
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
534
|
|
|
|
|
|
|
|
535
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for delete_nodes_network_iface()'; |
536
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No iface for delete_nodes_network_iface()'; |
537
|
|
|
|
|
|
|
|
538
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for delete_nodes_network_iface()' if ref $a; |
539
|
0
|
0
|
|
|
|
|
die 'iface must be a scalar for delete_nodes_network_iface()' if ref $b; |
540
|
|
|
|
|
|
|
|
541
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'network', $b ) |
542
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
} |
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
sub nodes_openvz { |
547
|
|
|
|
|
|
|
|
548
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
549
|
|
|
|
|
|
|
|
550
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for nodes_openvz()'; |
551
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for nodes_openvz()' if ref $a; |
552
|
|
|
|
|
|
|
|
553
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz') |
554
|
|
|
|
|
|
|
|
555
|
|
|
|
|
|
|
} |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
sub create_nodes_openvz { |
559
|
|
|
|
|
|
|
|
560
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
561
|
|
|
|
|
|
|
|
562
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_openvz()'; |
563
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz()' if ref $a; |
564
|
|
|
|
|
|
|
|
565
|
0
|
|
|
|
|
|
my @p = @_; |
566
|
|
|
|
|
|
|
|
567
|
0
|
0
|
|
|
|
|
die 'No arguments for create_nodes_openvz()' unless @p; |
568
|
0
|
|
|
|
|
|
my %args; |
569
|
|
|
|
|
|
|
|
570
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
571
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for create_nodes_openvz()' |
572
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
573
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
} |
575
|
|
|
|
|
|
|
else { |
576
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for create_nodes_openvz()' |
577
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
578
|
0
|
|
|
|
|
|
%args = @p; |
579
|
|
|
|
|
|
|
} |
580
|
|
|
|
|
|
|
|
581
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', \%args ) |
582
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
} |
584
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
sub get_nodes_openvz { |
587
|
|
|
|
|
|
|
|
588
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
589
|
|
|
|
|
|
|
|
590
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_openvz()'; |
591
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz()' if ref $a; |
592
|
|
|
|
|
|
|
|
593
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for get_nodes_openvz()'; |
594
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz()' if ref $b; |
595
|
|
|
|
|
|
|
|
596
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', $b ) |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
} |
599
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
sub delete_nodes_openvz { |
602
|
|
|
|
|
|
|
|
603
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
604
|
|
|
|
|
|
|
|
605
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for delete_nodes_openvz()'; |
606
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for delete_nodes_openvz()' if ref $a; |
607
|
|
|
|
|
|
|
|
608
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for delete_nodes_openvz()'; |
609
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for delete_nodes_openvz()' if ref $b; |
610
|
|
|
|
|
|
|
|
611
|
0
|
|
|
|
|
|
return $self->delete( $base, $a, 'openvz', $b ) |
612
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
} |
614
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
sub get_nodes_openvz_status { |
617
|
|
|
|
|
|
|
|
618
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
619
|
|
|
|
|
|
|
|
620
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_openvz_status()'; |
621
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status()' if ref $a; |
622
|
|
|
|
|
|
|
|
623
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for get_nodes_openvz_status()'; |
624
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status()' if ref $b; |
625
|
|
|
|
|
|
|
|
626
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', $b, 'status' ) |
627
|
|
|
|
|
|
|
|
628
|
|
|
|
|
|
|
} |
629
|
|
|
|
|
|
|
|
630
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
sub get_nodes_openvz_status_current { |
632
|
|
|
|
|
|
|
|
633
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
634
|
|
|
|
|
|
|
|
635
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_openvz_status_current()'; |
636
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status_current()' if ref $a; |
637
|
|
|
|
|
|
|
|
638
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for get_nodes_openvz_status_current()'; |
639
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status_current()' if ref $b; |
640
|
|
|
|
|
|
|
|
641
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', $b, 'status', 'current' ) |
642
|
|
|
|
|
|
|
|
643
|
|
|
|
|
|
|
} |
644
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
sub create_nodes_openvz_status_mount { |
647
|
|
|
|
|
|
|
|
648
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
649
|
|
|
|
|
|
|
|
650
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_openvz_status_mount()'; |
651
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_mount()' if ref $a; |
652
|
|
|
|
|
|
|
|
653
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for create_nodes_openvz_status_mount()'; |
654
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_mount()' if ref $b; |
655
|
|
|
|
|
|
|
|
656
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'mount' ) |
657
|
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
} |
659
|
|
|
|
|
|
|
|
660
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
sub create_nodes_openvz_status_shutdown { |
662
|
|
|
|
|
|
|
|
663
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
664
|
|
|
|
|
|
|
|
665
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_openvz_status_shutdown()'; |
666
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_shutdown()' if ref $a; |
667
|
|
|
|
|
|
|
|
668
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for create_nodes_openvz_status_shutdown()'; |
669
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_shutdown()' if ref $b; |
670
|
|
|
|
|
|
|
|
671
|
0
|
|
|
|
|
|
my @p = @_; |
672
|
|
|
|
|
|
|
|
673
|
0
|
0
|
|
|
|
|
die 'No arguments for create_nodes_openvz_status_shutdown()' unless @p; |
674
|
0
|
|
|
|
|
|
my %args; |
675
|
|
|
|
|
|
|
|
676
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
677
|
0
|
0
|
|
|
|
|
die 'Single argument not a hash for create_nodes_openvz_status_shutdown()' |
678
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
679
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
680
|
|
|
|
|
|
|
} |
681
|
|
|
|
|
|
|
else { |
682
|
0
|
0
|
|
|
|
|
die 'Odd number of arguments for create_nodes_openvz_status_shutdown()' |
683
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
684
|
0
|
|
|
|
|
|
%args = @p; |
685
|
|
|
|
|
|
|
} |
686
|
|
|
|
|
|
|
|
687
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'shutdown', \%args ) |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
} |
690
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
|
692
|
|
|
|
|
|
|
sub create_nodes_openvz_status_start { |
693
|
|
|
|
|
|
|
|
694
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
695
|
|
|
|
|
|
|
|
696
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_openvz_status_start()'; |
697
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_start()' if ref $a; |
698
|
|
|
|
|
|
|
|
699
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for create_nodes_openvz_status_start()'; |
700
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_start()' if ref $b; |
701
|
|
|
|
|
|
|
|
702
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'start' ) |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
} |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
sub create_nodes_openvz_status_stop { |
708
|
|
|
|
|
|
|
|
709
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
710
|
|
|
|
|
|
|
|
711
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for create_nodes_openvz_status_stop()'; |
712
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_stop()' if ref $a; |
713
|
|
|
|
|
|
|
|
714
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for create_nodes_openvz_status_stop()'; |
715
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for create_nodes_openvz_status_stop()' if ref $b; |
716
|
|
|
|
|
|
|
|
717
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'start' ) |
718
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
} |
720
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
sub get_nodes_openvz_status_ubc { |
723
|
|
|
|
|
|
|
|
724
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
725
|
|
|
|
|
|
|
|
726
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_openvz_status_ubc()'; |
727
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status_ubc()' if ref $a; |
728
|
|
|
|
|
|
|
|
729
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for get_nodes_openvz_status_ubc()'; |
730
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status_ubc()' if ref $b; |
731
|
|
|
|
|
|
|
|
732
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'ubc' ) |
733
|
|
|
|
|
|
|
|
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
sub get_nodes_openvz_status_umount { |
738
|
|
|
|
|
|
|
|
739
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
740
|
|
|
|
|
|
|
|
741
|
0
|
0
|
|
|
|
|
my $a = shift or die 'No node for get_nodes_openvz_status_umount()'; |
742
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status_umount()' if ref $a; |
743
|
|
|
|
|
|
|
|
744
|
0
|
0
|
|
|
|
|
my $b = shift or die 'No node for get_nodes_openvz_status_umount()'; |
745
|
0
|
0
|
|
|
|
|
die 'node must be a scalar for get_nodes_openvz_status_umount()' if ref $b; |
746
|
|
|
|
|
|
|
|
747
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'umount' ) |
748
|
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
} |
750
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
1; |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
=pod |
755
|
|
|
|
|
|
|
|
756
|
|
|
|
|
|
|
=encoding UTF-8 |
757
|
|
|
|
|
|
|
|
758
|
|
|
|
|
|
|
=head1 NAME |
759
|
|
|
|
|
|
|
|
760
|
|
|
|
|
|
|
Net::Proxmox::VE::Nodes - Functions for the 'nodes' portion of the API |
761
|
|
|
|
|
|
|
|
762
|
|
|
|
|
|
|
=head1 VERSION |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
version 0.36 |
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
=head1 SYNOPSIS |
767
|
|
|
|
|
|
|
|
768
|
|
|
|
|
|
|
# assuming $obj is a Net::Proxmox::VE object |
769
|
|
|
|
|
|
|
|
770
|
|
|
|
|
|
|
=head1 METHODS |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
=head2 nodes |
773
|
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
Returns the 'Cluster node index' |
775
|
|
|
|
|
|
|
|
776
|
|
|
|
|
|
|
Note: Accessible by all authententicated users. |
777
|
|
|
|
|
|
|
|
778
|
|
|
|
|
|
|
=head2 get_nodes |
779
|
|
|
|
|
|
|
|
780
|
|
|
|
|
|
|
Gets a single nodes details |
781
|
|
|
|
|
|
|
|
782
|
|
|
|
|
|
|
$ok = $obj->get_nodes('node') |
783
|
|
|
|
|
|
|
|
784
|
|
|
|
|
|
|
node is a string in pve-node format |
785
|
|
|
|
|
|
|
|
786
|
|
|
|
|
|
|
Note: Accessible by all authententicated users. |
787
|
|
|
|
|
|
|
|
788
|
|
|
|
|
|
|
=head2 get_nodes_aplinfo |
789
|
|
|
|
|
|
|
|
790
|
|
|
|
|
|
|
Gets a single nodes list of appliances |
791
|
|
|
|
|
|
|
|
792
|
|
|
|
|
|
|
$ok = $obj->get_nodes_aplinfo('node') |
793
|
|
|
|
|
|
|
|
794
|
|
|
|
|
|
|
node is a string in pve-node format |
795
|
|
|
|
|
|
|
|
796
|
|
|
|
|
|
|
Note: Accessible by all authententicated users. |
797
|
|
|
|
|
|
|
|
798
|
|
|
|
|
|
|
=head2 create_nodes_aplinfo |
799
|
|
|
|
|
|
|
|
800
|
|
|
|
|
|
|
Create (upload) appliance templates. |
801
|
|
|
|
|
|
|
|
802
|
|
|
|
|
|
|
$ok = $obj->download_nodes_aplinfo('node',\%args) |
803
|
|
|
|
|
|
|
|
804
|
|
|
|
|
|
|
node is a string in pve-node format |
805
|
|
|
|
|
|
|
|
806
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
807
|
|
|
|
|
|
|
|
808
|
|
|
|
|
|
|
=over 4 |
809
|
|
|
|
|
|
|
|
810
|
|
|
|
|
|
|
=item storage |
811
|
|
|
|
|
|
|
|
812
|
|
|
|
|
|
|
String. The storage to be used in pve-storage-id format. Required. |
813
|
|
|
|
|
|
|
|
814
|
|
|
|
|
|
|
=item template |
815
|
|
|
|
|
|
|
|
816
|
|
|
|
|
|
|
Data. The actual template. Required. |
817
|
|
|
|
|
|
|
|
818
|
|
|
|
|
|
|
=back |
819
|
|
|
|
|
|
|
|
820
|
|
|
|
|
|
|
Note: required permissions are ["perm","/storage/{storage}",["Datastore.AllocateTemplate"]] |
821
|
|
|
|
|
|
|
|
822
|
|
|
|
|
|
|
=head2 get_nodes_dns |
823
|
|
|
|
|
|
|
|
824
|
|
|
|
|
|
|
Get DNS settings. |
825
|
|
|
|
|
|
|
|
826
|
|
|
|
|
|
|
$ok = $obj->get_nodes_dns('node') |
827
|
|
|
|
|
|
|
|
828
|
|
|
|
|
|
|
node is a string in pve-node format |
829
|
|
|
|
|
|
|
|
830
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
=head2 update_nodes_dns |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
Updates (writes) DNS settings. |
835
|
|
|
|
|
|
|
|
836
|
|
|
|
|
|
|
$ok = $obj->update_nodes_dns('node', \%args) |
837
|
|
|
|
|
|
|
|
838
|
|
|
|
|
|
|
node is a string in pve-node format |
839
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
841
|
|
|
|
|
|
|
|
842
|
|
|
|
|
|
|
=over 4 |
843
|
|
|
|
|
|
|
|
844
|
|
|
|
|
|
|
=item search |
845
|
|
|
|
|
|
|
|
846
|
|
|
|
|
|
|
String. Search domain for host-name lookup. Required. |
847
|
|
|
|
|
|
|
|
848
|
|
|
|
|
|
|
=back |
849
|
|
|
|
|
|
|
|
850
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
851
|
|
|
|
|
|
|
|
852
|
|
|
|
|
|
|
=head2 get_nodes_rrd |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
Get nodes RRD statistics (returns PNG). |
855
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
$ok = $obj->get_nodes_rrd('node', \%args) |
857
|
|
|
|
|
|
|
|
858
|
|
|
|
|
|
|
node is a string in pve-node format |
859
|
|
|
|
|
|
|
|
860
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
861
|
|
|
|
|
|
|
|
862
|
|
|
|
|
|
|
=over 4 |
863
|
|
|
|
|
|
|
|
864
|
|
|
|
|
|
|
=item ds |
865
|
|
|
|
|
|
|
|
866
|
|
|
|
|
|
|
String. The list of datasources you wish to see, in pve-configid-list format. Required. |
867
|
|
|
|
|
|
|
|
868
|
|
|
|
|
|
|
=item timeframe |
869
|
|
|
|
|
|
|
|
870
|
|
|
|
|
|
|
Enum. Is either hour, day, week, month or year. Required. |
871
|
|
|
|
|
|
|
|
872
|
|
|
|
|
|
|
=item cf |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
Enum. Is either AVERAGE or MAX. Controls the RRD consolidation function. Optional. |
875
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
=back |
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
=head2 get_nodes_rrddata |
881
|
|
|
|
|
|
|
|
882
|
|
|
|
|
|
|
Get nodes RRD statistics. |
883
|
|
|
|
|
|
|
|
884
|
|
|
|
|
|
|
$ok = $obj->get_nodes_rrddata('node', \%args) |
885
|
|
|
|
|
|
|
|
886
|
|
|
|
|
|
|
node is a string in pve-node format |
887
|
|
|
|
|
|
|
|
888
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
889
|
|
|
|
|
|
|
|
890
|
|
|
|
|
|
|
=over 4 |
891
|
|
|
|
|
|
|
|
892
|
|
|
|
|
|
|
=item timeframe |
893
|
|
|
|
|
|
|
|
894
|
|
|
|
|
|
|
Enum. Is either hour, day, week, month or year. Required. |
895
|
|
|
|
|
|
|
|
896
|
|
|
|
|
|
|
=item cf |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
Enum. Is either AVERAGE or MAX. Controls the RRD consolidation function. Optional. |
899
|
|
|
|
|
|
|
|
900
|
|
|
|
|
|
|
=back |
901
|
|
|
|
|
|
|
|
902
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
903
|
|
|
|
|
|
|
|
904
|
|
|
|
|
|
|
=head2 get_nodes_status |
905
|
|
|
|
|
|
|
|
906
|
|
|
|
|
|
|
Gets node status |
907
|
|
|
|
|
|
|
|
908
|
|
|
|
|
|
|
$ok = $obj->get_nodes_status('node') |
909
|
|
|
|
|
|
|
|
910
|
|
|
|
|
|
|
node is a string in pve-node format |
911
|
|
|
|
|
|
|
|
912
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
913
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
=head2 update_nodes_status |
915
|
|
|
|
|
|
|
|
916
|
|
|
|
|
|
|
Reboot or shutdown a node |
917
|
|
|
|
|
|
|
|
918
|
|
|
|
|
|
|
$ok = $obj->updates_nodes_status('node', \%args) |
919
|
|
|
|
|
|
|
|
920
|
|
|
|
|
|
|
node is a string in pve-node format |
921
|
|
|
|
|
|
|
|
922
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
923
|
|
|
|
|
|
|
|
924
|
|
|
|
|
|
|
=over 4 |
925
|
|
|
|
|
|
|
|
926
|
|
|
|
|
|
|
=item command |
927
|
|
|
|
|
|
|
|
928
|
|
|
|
|
|
|
Enum. Either reboot or shutdown. Specifies the command. Required. |
929
|
|
|
|
|
|
|
|
930
|
|
|
|
|
|
|
=back |
931
|
|
|
|
|
|
|
|
932
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.PowerMgmt"]] |
933
|
|
|
|
|
|
|
|
934
|
|
|
|
|
|
|
=head2 get_nodes_subscription |
935
|
|
|
|
|
|
|
|
936
|
|
|
|
|
|
|
Read nodes subscription info |
937
|
|
|
|
|
|
|
|
938
|
|
|
|
|
|
|
$ok = $obj->get_nodes_subscription('node') |
939
|
|
|
|
|
|
|
|
940
|
|
|
|
|
|
|
node is a string in pve-node format |
941
|
|
|
|
|
|
|
|
942
|
|
|
|
|
|
|
Note: Root only. |
943
|
|
|
|
|
|
|
|
944
|
|
|
|
|
|
|
=head2 create_nodes_subscription |
945
|
|
|
|
|
|
|
|
946
|
|
|
|
|
|
|
Create/update nodes subscription info |
947
|
|
|
|
|
|
|
|
948
|
|
|
|
|
|
|
$ok = $obj->create_nodes_subscription('node', \%args) |
949
|
|
|
|
|
|
|
|
950
|
|
|
|
|
|
|
node is a string in pve-node format |
951
|
|
|
|
|
|
|
|
952
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
953
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
=over 4 |
955
|
|
|
|
|
|
|
|
956
|
|
|
|
|
|
|
=item force |
957
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
Boolean. Always connect to the server, even if we have up to date info inside local cache. Optional. |
959
|
|
|
|
|
|
|
|
960
|
|
|
|
|
|
|
=back |
961
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
Note: Root only. |
963
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
=head2 update_nodes_subscription_key |
965
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
Updates/sets subscription key |
967
|
|
|
|
|
|
|
|
968
|
|
|
|
|
|
|
$ok = $obj->update_nodes_subscription_key('node', \%args) |
969
|
|
|
|
|
|
|
|
970
|
|
|
|
|
|
|
node is a string in pve-node format |
971
|
|
|
|
|
|
|
|
972
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
973
|
|
|
|
|
|
|
|
974
|
|
|
|
|
|
|
=over 4 |
975
|
|
|
|
|
|
|
|
976
|
|
|
|
|
|
|
=item key |
977
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
Boolean. Proxmox VE subscription key. Required. |
979
|
|
|
|
|
|
|
|
980
|
|
|
|
|
|
|
=back |
981
|
|
|
|
|
|
|
|
982
|
|
|
|
|
|
|
Note: Root only. |
983
|
|
|
|
|
|
|
|
984
|
|
|
|
|
|
|
=head2 get_nodes_syslog |
985
|
|
|
|
|
|
|
|
986
|
|
|
|
|
|
|
Reads system log |
987
|
|
|
|
|
|
|
|
988
|
|
|
|
|
|
|
$ok = $obj->get_nodes_syslog('node', \%args) |
989
|
|
|
|
|
|
|
|
990
|
|
|
|
|
|
|
node is a string in pve-node format |
991
|
|
|
|
|
|
|
|
992
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Syslog"]] |
993
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
=head2 get_nodes_time |
995
|
|
|
|
|
|
|
|
996
|
|
|
|
|
|
|
Read server time and time zone settings |
997
|
|
|
|
|
|
|
|
998
|
|
|
|
|
|
|
$ok = $obj->get_nodes_time('node') |
999
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
node is a string in pve-node format |
1001
|
|
|
|
|
|
|
|
1002
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
1003
|
|
|
|
|
|
|
|
1004
|
|
|
|
|
|
|
=head2 update_nodes_time |
1005
|
|
|
|
|
|
|
|
1006
|
|
|
|
|
|
|
Updates time zone |
1007
|
|
|
|
|
|
|
|
1008
|
|
|
|
|
|
|
$ok = $obj->update_nodes_time('node', \%args) |
1009
|
|
|
|
|
|
|
|
1010
|
|
|
|
|
|
|
node is a string in pve-node format |
1011
|
|
|
|
|
|
|
|
1012
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
1013
|
|
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
=over 4 |
1015
|
|
|
|
|
|
|
|
1016
|
|
|
|
|
|
|
=item timezone |
1017
|
|
|
|
|
|
|
|
1018
|
|
|
|
|
|
|
String. Time zone to be used, see '/usr/share/zoneinfo/zone.tab'. Required. |
1019
|
|
|
|
|
|
|
|
1020
|
|
|
|
|
|
|
=back |
1021
|
|
|
|
|
|
|
|
1022
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Modify"]] |
1023
|
|
|
|
|
|
|
|
1024
|
|
|
|
|
|
|
=head2 get_nodes_ubcfailcnt |
1025
|
|
|
|
|
|
|
|
1026
|
|
|
|
|
|
|
Get user_beancounters failcnt for all active containers. |
1027
|
|
|
|
|
|
|
|
1028
|
|
|
|
|
|
|
$ok = $obj->get_nodes_ubcfailcnt('node') |
1029
|
|
|
|
|
|
|
|
1030
|
|
|
|
|
|
|
node is a string in pve-node format |
1031
|
|
|
|
|
|
|
|
1032
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
1033
|
|
|
|
|
|
|
|
1034
|
|
|
|
|
|
|
=head2 get_nodes_version |
1035
|
|
|
|
|
|
|
|
1036
|
|
|
|
|
|
|
Get user_beancounters failcnt for all active containers. |
1037
|
|
|
|
|
|
|
|
1038
|
|
|
|
|
|
|
$ok = $obj->get_nodes_version('node') |
1039
|
|
|
|
|
|
|
|
1040
|
|
|
|
|
|
|
node is a string in pve-node format |
1041
|
|
|
|
|
|
|
|
1042
|
|
|
|
|
|
|
Note: Accessible by all authententicated users. |
1043
|
|
|
|
|
|
|
|
1044
|
|
|
|
|
|
|
=head2 create_nodes_vncshell |
1045
|
|
|
|
|
|
|
|
1046
|
|
|
|
|
|
|
Creates a VNC Shell proxy. |
1047
|
|
|
|
|
|
|
|
1048
|
|
|
|
|
|
|
$ok = $obj->create_nodes_vncshell('node') |
1049
|
|
|
|
|
|
|
|
1050
|
|
|
|
|
|
|
node is a string in pve-node format |
1051
|
|
|
|
|
|
|
|
1052
|
|
|
|
|
|
|
Note: Restricted to users on realm 'pam'. Required permissions are ["perm","/nodes/{node}",["Sys.Console"]] |
1053
|
|
|
|
|
|
|
|
1054
|
|
|
|
|
|
|
=head2 create_nodes_vzdump |
1055
|
|
|
|
|
|
|
|
1056
|
|
|
|
|
|
|
Create backup. |
1057
|
|
|
|
|
|
|
|
1058
|
|
|
|
|
|
|
$ok = $obj->create_nodes_vzdump('node', \%args) |
1059
|
|
|
|
|
|
|
|
1060
|
|
|
|
|
|
|
node is a string in pve-node format |
1061
|
|
|
|
|
|
|
|
1062
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
1063
|
|
|
|
|
|
|
|
1064
|
|
|
|
|
|
|
=over 4 |
1065
|
|
|
|
|
|
|
|
1066
|
|
|
|
|
|
|
=item all |
1067
|
|
|
|
|
|
|
|
1068
|
|
|
|
|
|
|
Boolean. Backup all known VMs on this host. Optional. |
1069
|
|
|
|
|
|
|
|
1070
|
|
|
|
|
|
|
=item bwlimit |
1071
|
|
|
|
|
|
|
|
1072
|
|
|
|
|
|
|
Integer. Limit I/O bandwidth (KBytes per second). Optional. |
1073
|
|
|
|
|
|
|
|
1074
|
|
|
|
|
|
|
=item compress |
1075
|
|
|
|
|
|
|
|
1076
|
|
|
|
|
|
|
Enum. Either 0, 1, gzip or lzo. Comress dump file. Optional |
1077
|
|
|
|
|
|
|
|
1078
|
|
|
|
|
|
|
=item dumpdir |
1079
|
|
|
|
|
|
|
|
1080
|
|
|
|
|
|
|
String. Store resulting files to specified directory. Optional. |
1081
|
|
|
|
|
|
|
|
1082
|
|
|
|
|
|
|
=item exclude |
1083
|
|
|
|
|
|
|
|
1084
|
|
|
|
|
|
|
String. Exclude specified VMs (assumes --all) in pve-vmid-list. Optional. |
1085
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
=item exclude-path |
1087
|
|
|
|
|
|
|
|
1088
|
|
|
|
|
|
|
String. Exclude certain files/directories (regex) in string-alist. Optional. |
1089
|
|
|
|
|
|
|
|
1090
|
|
|
|
|
|
|
=item ionice |
1091
|
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
Integer. Set CFQ ionice priority. Optional. |
1093
|
|
|
|
|
|
|
|
1094
|
|
|
|
|
|
|
=item lockwait |
1095
|
|
|
|
|
|
|
|
1096
|
|
|
|
|
|
|
Integer. Maximal time to wait for the global lock (minutes). Optional. |
1097
|
|
|
|
|
|
|
|
1098
|
|
|
|
|
|
|
=item mailto |
1099
|
|
|
|
|
|
|
|
1100
|
|
|
|
|
|
|
String. List of email addresses in string-list format. Optional. |
1101
|
|
|
|
|
|
|
|
1102
|
|
|
|
|
|
|
=item maxfiles |
1103
|
|
|
|
|
|
|
|
1104
|
|
|
|
|
|
|
Integer. Maximal number of backup files per vm. Optional. |
1105
|
|
|
|
|
|
|
|
1106
|
|
|
|
|
|
|
=item mode |
1107
|
|
|
|
|
|
|
|
1108
|
|
|
|
|
|
|
Enum. A value from snapshot, suspend or stop. Backup mode. Optional. |
1109
|
|
|
|
|
|
|
|
1110
|
|
|
|
|
|
|
=item quiet |
1111
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
Boolean. Be quiet. Optional. |
1113
|
|
|
|
|
|
|
|
1114
|
|
|
|
|
|
|
=item remove |
1115
|
|
|
|
|
|
|
|
1116
|
|
|
|
|
|
|
Boolean. Remove old backup files if there are more than 'maxfiles' backup files. Optional. |
1117
|
|
|
|
|
|
|
|
1118
|
|
|
|
|
|
|
=item script |
1119
|
|
|
|
|
|
|
|
1120
|
|
|
|
|
|
|
String. Use specified hook script. Optional. |
1121
|
|
|
|
|
|
|
|
1122
|
|
|
|
|
|
|
=item size |
1123
|
|
|
|
|
|
|
|
1124
|
|
|
|
|
|
|
Integer. LVM snapshot size in MB. Optional. |
1125
|
|
|
|
|
|
|
|
1126
|
|
|
|
|
|
|
=item stdexcludes |
1127
|
|
|
|
|
|
|
|
1128
|
|
|
|
|
|
|
Boolean. Exclude temporary files and logs. Optional. |
1129
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
=item stdout |
1131
|
|
|
|
|
|
|
|
1132
|
|
|
|
|
|
|
Boolean. Write tar to stdout rather than to a file. Optional. |
1133
|
|
|
|
|
|
|
|
1134
|
|
|
|
|
|
|
=item stopwait |
1135
|
|
|
|
|
|
|
|
1136
|
|
|
|
|
|
|
Integer. Maximal time to wait until a VM is stopped (minutes). Optional. |
1137
|
|
|
|
|
|
|
|
1138
|
|
|
|
|
|
|
=item storage |
1139
|
|
|
|
|
|
|
|
1140
|
|
|
|
|
|
|
String. Store resulting file to this storage, in pve-storage-id format. Optional. |
1141
|
|
|
|
|
|
|
|
1142
|
|
|
|
|
|
|
=item tmpdir |
1143
|
|
|
|
|
|
|
|
1144
|
|
|
|
|
|
|
String. Store temporary files to specified directory. Optional. |
1145
|
|
|
|
|
|
|
|
1146
|
|
|
|
|
|
|
=item vmid |
1147
|
|
|
|
|
|
|
|
1148
|
|
|
|
|
|
|
String. The ID of the VM you want to backup in pve-vm-list format. Optional. |
1149
|
|
|
|
|
|
|
|
1150
|
|
|
|
|
|
|
=back |
1151
|
|
|
|
|
|
|
|
1152
|
|
|
|
|
|
|
Note: The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage. |
1153
|
|
|
|
|
|
|
|
1154
|
|
|
|
|
|
|
=head2 nodes_network |
1155
|
|
|
|
|
|
|
|
1156
|
|
|
|
|
|
|
List available networks on the node |
1157
|
|
|
|
|
|
|
|
1158
|
|
|
|
|
|
|
$ok = $obj->nodes_network('node', \%args) |
1159
|
|
|
|
|
|
|
|
1160
|
|
|
|
|
|
|
node is a string in pve-node format |
1161
|
|
|
|
|
|
|
|
1162
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
1163
|
|
|
|
|
|
|
|
1164
|
|
|
|
|
|
|
=over 4 |
1165
|
|
|
|
|
|
|
|
1166
|
|
|
|
|
|
|
=item type |
1167
|
|
|
|
|
|
|
|
1168
|
|
|
|
|
|
|
Enum. One of bond, bridge, alias or eth. Only list specific interface types. Optional. |
1169
|
|
|
|
|
|
|
|
1170
|
|
|
|
|
|
|
=back |
1171
|
|
|
|
|
|
|
|
1172
|
|
|
|
|
|
|
Note: Accessible by all authententicated users. |
1173
|
|
|
|
|
|
|
|
1174
|
|
|
|
|
|
|
=head2 create_nodes_network |
1175
|
|
|
|
|
|
|
|
1176
|
|
|
|
|
|
|
Create network device configuration |
1177
|
|
|
|
|
|
|
|
1178
|
|
|
|
|
|
|
$ok = $obj->create_nodes_network('node', \%args) |
1179
|
|
|
|
|
|
|
|
1180
|
|
|
|
|
|
|
node is a string in pve-node format |
1181
|
|
|
|
|
|
|
|
1182
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
1183
|
|
|
|
|
|
|
|
1184
|
|
|
|
|
|
|
=over 4 |
1185
|
|
|
|
|
|
|
|
1186
|
|
|
|
|
|
|
=item iface |
1187
|
|
|
|
|
|
|
|
1188
|
|
|
|
|
|
|
String. The network interface name in pve-iface format. Required. |
1189
|
|
|
|
|
|
|
|
1190
|
|
|
|
|
|
|
=item address |
1191
|
|
|
|
|
|
|
|
1192
|
|
|
|
|
|
|
String. The ipv4 network address. Optional. |
1193
|
|
|
|
|
|
|
|
1194
|
|
|
|
|
|
|
=item autostart |
1195
|
|
|
|
|
|
|
|
1196
|
|
|
|
|
|
|
Boolean. Automatically start interface on boot. Optional. |
1197
|
|
|
|
|
|
|
|
1198
|
|
|
|
|
|
|
=item bond_mode |
1199
|
|
|
|
|
|
|
|
1200
|
|
|
|
|
|
|
Enum. Either of balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb or balance-alb. Specifies the bonding mode. Optional. |
1201
|
|
|
|
|
|
|
|
1202
|
|
|
|
|
|
|
=item bridge_ports |
1203
|
|
|
|
|
|
|
|
1204
|
|
|
|
|
|
|
String. Specify the interfaces you want to add to your bridge in pve-iface-list format. Optional. |
1205
|
|
|
|
|
|
|
|
1206
|
|
|
|
|
|
|
=item gateway |
1207
|
|
|
|
|
|
|
|
1208
|
|
|
|
|
|
|
String. Default ipv4 gateway address. Optional. |
1209
|
|
|
|
|
|
|
|
1210
|
|
|
|
|
|
|
=item netmask |
1211
|
|
|
|
|
|
|
|
1212
|
|
|
|
|
|
|
String. Network mask for ipv4. Optional. |
1213
|
|
|
|
|
|
|
|
1214
|
|
|
|
|
|
|
=item slaves |
1215
|
|
|
|
|
|
|
|
1216
|
|
|
|
|
|
|
String. Specify the interfaces used by the bonding device in pve-iface-list format. Optional. |
1217
|
|
|
|
|
|
|
|
1218
|
|
|
|
|
|
|
=back |
1219
|
|
|
|
|
|
|
|
1220
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Modify"]] |
1221
|
|
|
|
|
|
|
|
1222
|
|
|
|
|
|
|
=head2 revert_nodes_network |
1223
|
|
|
|
|
|
|
|
1224
|
|
|
|
|
|
|
Revert network configuration changes. |
1225
|
|
|
|
|
|
|
|
1226
|
|
|
|
|
|
|
$ok = $obj->revert_nodes_network('node') |
1227
|
|
|
|
|
|
|
|
1228
|
|
|
|
|
|
|
node is a string in pve-node format |
1229
|
|
|
|
|
|
|
|
1230
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Modify"]] |
1231
|
|
|
|
|
|
|
|
1232
|
|
|
|
|
|
|
=head2 get_nodes_network_iface |
1233
|
|
|
|
|
|
|
|
1234
|
|
|
|
|
|
|
Read network device configuration |
1235
|
|
|
|
|
|
|
|
1236
|
|
|
|
|
|
|
$ok = $obj->get_nodes_network_iface('node', 'iface') |
1237
|
|
|
|
|
|
|
|
1238
|
|
|
|
|
|
|
node is a string in pve-node format, iface is a string in pve-iface format |
1239
|
|
|
|
|
|
|
|
1240
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Audit"]] |
1241
|
|
|
|
|
|
|
|
1242
|
|
|
|
|
|
|
=head2 update_nodes_network_iface |
1243
|
|
|
|
|
|
|
|
1244
|
|
|
|
|
|
|
Create network device configuration |
1245
|
|
|
|
|
|
|
|
1246
|
|
|
|
|
|
|
$ok = $obj->update_nodes_network_iface('node', 'iface', \%args) |
1247
|
|
|
|
|
|
|
|
1248
|
|
|
|
|
|
|
node is a string in pve-node format, iface is a string in pve-iface format |
1249
|
|
|
|
|
|
|
|
1250
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
1251
|
|
|
|
|
|
|
|
1252
|
|
|
|
|
|
|
=over 4 |
1253
|
|
|
|
|
|
|
|
1254
|
|
|
|
|
|
|
=item address |
1255
|
|
|
|
|
|
|
|
1256
|
|
|
|
|
|
|
String. The ipv4 network address. Optional. |
1257
|
|
|
|
|
|
|
|
1258
|
|
|
|
|
|
|
=item autostart |
1259
|
|
|
|
|
|
|
|
1260
|
|
|
|
|
|
|
Boolean. Automatically start interface on boot. Optional. |
1261
|
|
|
|
|
|
|
|
1262
|
|
|
|
|
|
|
=item bond_mode |
1263
|
|
|
|
|
|
|
|
1264
|
|
|
|
|
|
|
Enum. Either of balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb or balance-alb. Specifies the bonding mode. Optional. |
1265
|
|
|
|
|
|
|
|
1266
|
|
|
|
|
|
|
=item delete |
1267
|
|
|
|
|
|
|
|
1268
|
|
|
|
|
|
|
String. Settings you want to delete in pve-configid-list format. Optional. |
1269
|
|
|
|
|
|
|
|
1270
|
|
|
|
|
|
|
=item bridge_ports |
1271
|
|
|
|
|
|
|
|
1272
|
|
|
|
|
|
|
String. Specify the interfaces you want to add to your bridge in pve-iface-list format. Optional. |
1273
|
|
|
|
|
|
|
|
1274
|
|
|
|
|
|
|
=item gateway |
1275
|
|
|
|
|
|
|
|
1276
|
|
|
|
|
|
|
String. Default ipv4 gateway address. Optional. |
1277
|
|
|
|
|
|
|
|
1278
|
|
|
|
|
|
|
=item netmask |
1279
|
|
|
|
|
|
|
|
1280
|
|
|
|
|
|
|
String. Network mask for ipv4. Optional. |
1281
|
|
|
|
|
|
|
|
1282
|
|
|
|
|
|
|
=item slaves |
1283
|
|
|
|
|
|
|
|
1284
|
|
|
|
|
|
|
String. Specify the interfaces used by the bonding device in pve-iface-list format. Optional. |
1285
|
|
|
|
|
|
|
|
1286
|
|
|
|
|
|
|
=back |
1287
|
|
|
|
|
|
|
|
1288
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Modify"]] |
1289
|
|
|
|
|
|
|
|
1290
|
|
|
|
|
|
|
=head2 delete_nodes_network_iface |
1291
|
|
|
|
|
|
|
|
1292
|
|
|
|
|
|
|
Delete network device configuration |
1293
|
|
|
|
|
|
|
|
1294
|
|
|
|
|
|
|
$ok = $obj->delete_nodes_network_iface('node', 'iface') |
1295
|
|
|
|
|
|
|
|
1296
|
|
|
|
|
|
|
node is a string in pve-node format, iface is a string in pve-iface format |
1297
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
Note: required permissions are ["perm","/nodes/{node}",["Sys.Modify"]] |
1299
|
|
|
|
|
|
|
|
1300
|
|
|
|
|
|
|
=head2 nodes_openvz |
1301
|
|
|
|
|
|
|
|
1302
|
|
|
|
|
|
|
OpenVZ container index (per node). |
1303
|
|
|
|
|
|
|
|
1304
|
|
|
|
|
|
|
$ok = $obj->nodes_openvz('node') |
1305
|
|
|
|
|
|
|
|
1306
|
|
|
|
|
|
|
node is a string in pve-node format |
1307
|
|
|
|
|
|
|
|
1308
|
|
|
|
|
|
|
Note: Only lists VMs where you have VM.Audit permissons on /vms/. |
1309
|
|
|
|
|
|
|
|
1310
|
|
|
|
|
|
|
=head2 create_nodes_openvz |
1311
|
|
|
|
|
|
|
|
1312
|
|
|
|
|
|
|
Create or restore a container. |
1313
|
|
|
|
|
|
|
|
1314
|
|
|
|
|
|
|
$ok = $obj->create_nodes_openvz('node', \%args) |
1315
|
|
|
|
|
|
|
|
1316
|
|
|
|
|
|
|
node is a string in pve-node format |
1317
|
|
|
|
|
|
|
|
1318
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
1319
|
|
|
|
|
|
|
|
1320
|
|
|
|
|
|
|
=over 4 |
1321
|
|
|
|
|
|
|
|
1322
|
|
|
|
|
|
|
=item ostemplate |
1323
|
|
|
|
|
|
|
|
1324
|
|
|
|
|
|
|
String. The OS template or backup file. Required. |
1325
|
|
|
|
|
|
|
|
1326
|
|
|
|
|
|
|
=item vmid |
1327
|
|
|
|
|
|
|
|
1328
|
|
|
|
|
|
|
Integer. The unique ID of the vm in pve-vmid format. Required. |
1329
|
|
|
|
|
|
|
|
1330
|
|
|
|
|
|
|
=item cpus |
1331
|
|
|
|
|
|
|
|
1332
|
|
|
|
|
|
|
Integer. The number of CPUs for this container. Optional. |
1333
|
|
|
|
|
|
|
|
1334
|
|
|
|
|
|
|
=item cpuunits |
1335
|
|
|
|
|
|
|
|
1336
|
|
|
|
|
|
|
Integer. 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. Optional. |
1337
|
|
|
|
|
|
|
|
1338
|
|
|
|
|
|
|
=item description |
1339
|
|
|
|
|
|
|
|
1340
|
|
|
|
|
|
|
String. Container description. Only used in the web interface. Optional. |
1341
|
|
|
|
|
|
|
|
1342
|
|
|
|
|
|
|
=item disk |
1343
|
|
|
|
|
|
|
|
1344
|
|
|
|
|
|
|
Number. Amount of disk space for the VM in GB. A zero indicates no limit. Optional. |
1345
|
|
|
|
|
|
|
|
1346
|
|
|
|
|
|
|
=item force |
1347
|
|
|
|
|
|
|
|
1348
|
|
|
|
|
|
|
Boolean. Allow to overwrite existing container. Optional. |
1349
|
|
|
|
|
|
|
|
1350
|
|
|
|
|
|
|
=item hostname |
1351
|
|
|
|
|
|
|
|
1352
|
|
|
|
|
|
|
String. Set a host name for the container. Optional. |
1353
|
|
|
|
|
|
|
|
1354
|
|
|
|
|
|
|
=item ip_address |
1355
|
|
|
|
|
|
|
|
1356
|
|
|
|
|
|
|
String. Specifies the address the container will be assigned. Optional. |
1357
|
|
|
|
|
|
|
|
1358
|
|
|
|
|
|
|
=item memory |
1359
|
|
|
|
|
|
|
|
1360
|
|
|
|
|
|
|
Integer. Amount of RAM for the VM in MB. Optional. |
1361
|
|
|
|
|
|
|
|
1362
|
|
|
|
|
|
|
=item nameserver |
1363
|
|
|
|
|
|
|
|
1364
|
|
|
|
|
|
|
String. Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver. Optional. |
1365
|
|
|
|
|
|
|
|
1366
|
|
|
|
|
|
|
=item netif |
1367
|
|
|
|
|
|
|
|
1368
|
|
|
|
|
|
|
String. Specifies network interfaces for the container in pve-openvz-netif format. Optional. |
1369
|
|
|
|
|
|
|
|
1370
|
|
|
|
|
|
|
=item onboot |
1371
|
|
|
|
|
|
|
|
1372
|
|
|
|
|
|
|
Boolean. Specifies weather a VM will be started during the system bootup. Optional. |
1373
|
|
|
|
|
|
|
|
1374
|
|
|
|
|
|
|
=item password |
1375
|
|
|
|
|
|
|
|
1376
|
|
|
|
|
|
|
String. Sets root password insider the container. Optional. |
1377
|
|
|
|
|
|
|
|
1378
|
|
|
|
|
|
|
=item pool |
1379
|
|
|
|
|
|
|
|
1380
|
|
|
|
|
|
|
String. Add the VM to a specified pool in pve-poolid format. Optional. |
1381
|
|
|
|
|
|
|
|
1382
|
|
|
|
|
|
|
=item quotatime |
1383
|
|
|
|
|
|
|
|
1384
|
|
|
|
|
|
|
Integer. Set quota grace period (seconds). Optional. |
1385
|
|
|
|
|
|
|
|
1386
|
|
|
|
|
|
|
=item quotaugidlimit |
1387
|
|
|
|
|
|
|
|
1388
|
|
|
|
|
|
|
Integer. Set maximum number of user/group IDs in a container for which disk quota inside the container will be accounted. If this value is set to 0, user and group quotas inside the container will not. Optional. |
1389
|
|
|
|
|
|
|
|
1390
|
|
|
|
|
|
|
=item restore |
1391
|
|
|
|
|
|
|
|
1392
|
|
|
|
|
|
|
Boolean. Mark this as a restore task. Optional. |
1393
|
|
|
|
|
|
|
|
1394
|
|
|
|
|
|
|
=item searchdomain |
1395
|
|
|
|
|
|
|
|
1396
|
|
|
|
|
|
|
String. Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver. Optional. |
1397
|
|
|
|
|
|
|
|
1398
|
|
|
|
|
|
|
=item storage |
1399
|
|
|
|
|
|
|
|
1400
|
|
|
|
|
|
|
String. Target storage in pve-storage-id. Optional. |
1401
|
|
|
|
|
|
|
|
1402
|
|
|
|
|
|
|
=item swap |
1403
|
|
|
|
|
|
|
|
1404
|
|
|
|
|
|
|
Integer. Amount of SWAP for the VM in MB. Optional |
1405
|
|
|
|
|
|
|
|
1406
|
|
|
|
|
|
|
=back |
1407
|
|
|
|
|
|
|
|
1408
|
|
|
|
|
|
|
Note: You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}, and 'Datastore.AllocateSpace' on the storage. |
1409
|
|
|
|
|
|
|
|
1410
|
|
|
|
|
|
|
required permissions are ["or",["perm","/vms/{vmid}",["VM.Allocate"]],["perm","/pool/{pool}",["VM.Allocate"],"require_param","pool"]] |
1411
|
|
|
|
|
|
|
|
1412
|
|
|
|
|
|
|
=head2 get_nodes_openvz |
1413
|
|
|
|
|
|
|
|
1414
|
|
|
|
|
|
|
Gets an openvz nodes details |
1415
|
|
|
|
|
|
|
|
1416
|
|
|
|
|
|
|
$ok = $obj->get_nodes_openvz('node','vmid') |
1417
|
|
|
|
|
|
|
|
1418
|
|
|
|
|
|
|
node is a string in pve-node format |
1419
|
|
|
|
|
|
|
|
1420
|
|
|
|
|
|
|
mvid is an integer in pve-vmid format |
1421
|
|
|
|
|
|
|
|
1422
|
|
|
|
|
|
|
Note: Accessible by all authententicated users. |
1423
|
|
|
|
|
|
|
|
1424
|
|
|
|
|
|
|
=head2 delete_nodes_openvz |
1425
|
|
|
|
|
|
|
|
1426
|
|
|
|
|
|
|
Destroy the container (also delete all uses files). |
1427
|
|
|
|
|
|
|
|
1428
|
|
|
|
|
|
|
$ok = $obj->delete_nodes_openvz('node','vmid') |
1429
|
|
|
|
|
|
|
|
1430
|
|
|
|
|
|
|
node is a string in pve-node format |
1431
|
|
|
|
|
|
|
|
1432
|
|
|
|
|
|
|
mvid is an integer in pve-vmid format |
1433
|
|
|
|
|
|
|
|
1434
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.Allocate"]] |
1435
|
|
|
|
|
|
|
|
1436
|
|
|
|
|
|
|
=head2 get_nodes_openvz_status |
1437
|
|
|
|
|
|
|
|
1438
|
|
|
|
|
|
|
Directory index |
1439
|
|
|
|
|
|
|
|
1440
|
|
|
|
|
|
|
$ok = $obj->get_nodes_openvz_status('node','vmid') |
1441
|
|
|
|
|
|
|
|
1442
|
|
|
|
|
|
|
node is a string in pve-node format |
1443
|
|
|
|
|
|
|
|
1444
|
|
|
|
|
|
|
mvid is an integer in pve-vmid format |
1445
|
|
|
|
|
|
|
|
1446
|
|
|
|
|
|
|
Note: Accessible by all authententicated users. |
1447
|
|
|
|
|
|
|
|
1448
|
|
|
|
|
|
|
=head2 get_nodes_openvz_status_current |
1449
|
|
|
|
|
|
|
|
1450
|
|
|
|
|
|
|
Get virtual machine status. |
1451
|
|
|
|
|
|
|
|
1452
|
|
|
|
|
|
|
$ok = $obj->get_nodes_openvz_status_current('node','vmid') |
1453
|
|
|
|
|
|
|
|
1454
|
|
|
|
|
|
|
node is a string in pve-node format |
1455
|
|
|
|
|
|
|
|
1456
|
|
|
|
|
|
|
mvid is an integer in pve-vmid format |
1457
|
|
|
|
|
|
|
|
1458
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.Audit"]] |
1459
|
|
|
|
|
|
|
|
1460
|
|
|
|
|
|
|
=head2 create_nodes_openvz_status_mount |
1461
|
|
|
|
|
|
|
|
1462
|
|
|
|
|
|
|
Mounts container private area. |
1463
|
|
|
|
|
|
|
|
1464
|
|
|
|
|
|
|
$ok = $obj->create_nodes_openvz_status_mount('node','vmid') |
1465
|
|
|
|
|
|
|
|
1466
|
|
|
|
|
|
|
node is a string in pve-node format |
1467
|
|
|
|
|
|
|
|
1468
|
|
|
|
|
|
|
mvid is an integer in pve-vmid format |
1469
|
|
|
|
|
|
|
|
1470
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.PowerMgmt"]] |
1471
|
|
|
|
|
|
|
|
1472
|
|
|
|
|
|
|
=head2 create_nodes_openvz_status_shutdown |
1473
|
|
|
|
|
|
|
|
1474
|
|
|
|
|
|
|
Shutdown the container. |
1475
|
|
|
|
|
|
|
|
1476
|
|
|
|
|
|
|
$ok = $obj->create_nodes_openvz_status_shutdown('node','vmid', \%args) |
1477
|
|
|
|
|
|
|
|
1478
|
|
|
|
|
|
|
node is a string in pve-node format |
1479
|
|
|
|
|
|
|
|
1480
|
|
|
|
|
|
|
vmid is an integer in pve-vmid format |
1481
|
|
|
|
|
|
|
|
1482
|
|
|
|
|
|
|
I<%args> may items contain from the following list |
1483
|
|
|
|
|
|
|
|
1484
|
|
|
|
|
|
|
=over 4 |
1485
|
|
|
|
|
|
|
|
1486
|
|
|
|
|
|
|
=item forceStop |
1487
|
|
|
|
|
|
|
|
1488
|
|
|
|
|
|
|
Boolean. Make sure the container stops. Note the capital S. Optional. |
1489
|
|
|
|
|
|
|
|
1490
|
|
|
|
|
|
|
=item timeout |
1491
|
|
|
|
|
|
|
|
1492
|
|
|
|
|
|
|
Integer. Wait maximal timeout seconds |
1493
|
|
|
|
|
|
|
|
1494
|
|
|
|
|
|
|
=back |
1495
|
|
|
|
|
|
|
|
1496
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.PowerMgmt"]] |
1497
|
|
|
|
|
|
|
|
1498
|
|
|
|
|
|
|
=head2 create_nodes_openvz_status_start |
1499
|
|
|
|
|
|
|
|
1500
|
|
|
|
|
|
|
Start the container. |
1501
|
|
|
|
|
|
|
|
1502
|
|
|
|
|
|
|
$ok = $obj->create_nodes_openvz_status_start('node','vmid') |
1503
|
|
|
|
|
|
|
|
1504
|
|
|
|
|
|
|
node is a string in pve-node format |
1505
|
|
|
|
|
|
|
|
1506
|
|
|
|
|
|
|
vmid is an integer in pve-vmid format |
1507
|
|
|
|
|
|
|
|
1508
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.PowerMgmt"]] |
1509
|
|
|
|
|
|
|
|
1510
|
|
|
|
|
|
|
=head2 create_nodes_openvz_status_stop |
1511
|
|
|
|
|
|
|
|
1512
|
|
|
|
|
|
|
Stop the container. |
1513
|
|
|
|
|
|
|
|
1514
|
|
|
|
|
|
|
$ok = $obj->create_nodes_openvz_status_stop('node','vmid') |
1515
|
|
|
|
|
|
|
|
1516
|
|
|
|
|
|
|
node is a string in pve-node format |
1517
|
|
|
|
|
|
|
|
1518
|
|
|
|
|
|
|
vmid is an integer in pve-vmid format |
1519
|
|
|
|
|
|
|
|
1520
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.PowerMgmt"]] |
1521
|
|
|
|
|
|
|
|
1522
|
|
|
|
|
|
|
=head2 get_nodes_openvz_status_ubc |
1523
|
|
|
|
|
|
|
|
1524
|
|
|
|
|
|
|
Get container user_beancounters. |
1525
|
|
|
|
|
|
|
|
1526
|
|
|
|
|
|
|
$ok = $obj->get_nodes_openvz_status_ubc('node','vmid') |
1527
|
|
|
|
|
|
|
|
1528
|
|
|
|
|
|
|
node is a string in pve-node format |
1529
|
|
|
|
|
|
|
|
1530
|
|
|
|
|
|
|
vmid is an integer in pve-vmid format |
1531
|
|
|
|
|
|
|
|
1532
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.Audit"]] |
1533
|
|
|
|
|
|
|
|
1534
|
|
|
|
|
|
|
=head2 get_nodes_openvz_status_umount |
1535
|
|
|
|
|
|
|
|
1536
|
|
|
|
|
|
|
Unmounts container private area. |
1537
|
|
|
|
|
|
|
|
1538
|
|
|
|
|
|
|
$ok = $obj->get_nodes_openvz_status_umount('node','vmid') |
1539
|
|
|
|
|
|
|
|
1540
|
|
|
|
|
|
|
node is a string in pve-node format |
1541
|
|
|
|
|
|
|
|
1542
|
|
|
|
|
|
|
vmid is an integer in pve-vmid format |
1543
|
|
|
|
|
|
|
|
1544
|
|
|
|
|
|
|
Note: required permissions are ["perm","/vms/{vmid}",["VM.PowerMgmt"]] |
1545
|
|
|
|
|
|
|
|
1546
|
|
|
|
|
|
|
=head1 SEE ALSO |
1547
|
|
|
|
|
|
|
|
1548
|
|
|
|
|
|
|
L |
1549
|
|
|
|
|
|
|
|
1550
|
|
|
|
|
|
|
=head1 AUTHOR |
1551
|
|
|
|
|
|
|
|
1552
|
|
|
|
|
|
|
Brendan Beveridge , Dean Hamstead |
1553
|
|
|
|
|
|
|
|
1554
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
1555
|
|
|
|
|
|
|
|
1556
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Dean Hamstad. |
1557
|
|
|
|
|
|
|
|
1558
|
|
|
|
|
|
|
This is free software, licensed under: |
1559
|
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
The MIT (X11) License |
1561
|
|
|
|
|
|
|
|
1562
|
|
|
|
|
|
|
=cut |
1563
|
|
|
|
|
|
|
|
1564
|
|
|
|
|
|
|
__END__ |