line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/bin/false |
2
|
|
|
|
|
|
|
# vim: softtabstop=2 tabstop=2 shiftwidth=2 ft=perl expandtab smarttab |
3
|
|
|
|
|
|
|
# PODNAME: Net::Proxmox::VE::Nodes |
4
|
|
|
|
|
|
|
# ABSTRACT: Functions for the 'nodes' portion of the API |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
7
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Net::Proxmox::VE::Nodes; |
10
|
|
|
|
|
|
|
$Net::Proxmox::VE::Nodes::VERSION = '0.38'; |
11
|
1
|
|
|
1
|
|
5
|
use parent 'Exporter'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
64
|
use Carp qw( croak ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3839
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our @EXPORT = qw( nodes ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $base = '/nodes'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub nodes { |
21
|
|
|
|
|
|
|
|
22
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return $self->get($base) |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub get_nodes { |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes()'; |
34
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes()' if ref $a; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return $self->get( $base, $a ) |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub get_nodes_aplinfo { |
42
|
|
|
|
|
|
|
|
43
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_aplinfo()'; |
46
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_aplinfo()' if ref $a; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'aplinfo' ) |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub create_nodes_aplinfo { |
54
|
|
|
|
|
|
|
|
55
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
56
|
|
|
|
|
|
|
|
57
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_aplinfo()'; |
58
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_aplinfo()' if ref $a; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
my @p = @_; |
61
|
|
|
|
|
|
|
|
62
|
0
|
0
|
|
|
|
|
croak 'No arguments for create_nodes_aplinfo()' unless @p; |
63
|
0
|
|
|
|
|
|
my %args; |
64
|
|
|
|
|
|
|
|
65
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
66
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for create_nodes_aplinfo()' |
67
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
68
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
else { |
71
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for create_nodes_aplinfo()' |
72
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
73
|
0
|
|
|
|
|
|
%args = @p; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'aplinfo', \%args ) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub get_nodes_dns { |
82
|
|
|
|
|
|
|
|
83
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
84
|
|
|
|
|
|
|
|
85
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_dns()'; |
86
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_dns()' if ref $a; |
87
|
|
|
|
|
|
|
|
88
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'dns' ) |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub update_nodes_dns { |
94
|
|
|
|
|
|
|
|
95
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
96
|
|
|
|
|
|
|
|
97
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for update_nodes_dns()'; |
98
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for update_nodes_dns()' if ref $a; |
99
|
|
|
|
|
|
|
|
100
|
0
|
|
|
|
|
|
my @p = @_; |
101
|
|
|
|
|
|
|
|
102
|
0
|
0
|
|
|
|
|
croak 'No arguments for update_nodes_dns()' unless @p; |
103
|
0
|
|
|
|
|
|
my %args; |
104
|
|
|
|
|
|
|
|
105
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
106
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for update_nodes_dns()' |
107
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
108
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
else { |
111
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for update_nodes_dns()' |
112
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
113
|
0
|
|
|
|
|
|
%args = @p; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
|
return $self->put( $base, $a, 'dns', \%args ) |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
sub get_nodes_rrd { |
122
|
|
|
|
|
|
|
|
123
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
124
|
|
|
|
|
|
|
|
125
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_rrd()'; |
126
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_rrd()' if ref $a; |
127
|
|
|
|
|
|
|
|
128
|
0
|
|
|
|
|
|
my @p = @_; |
129
|
|
|
|
|
|
|
|
130
|
0
|
0
|
|
|
|
|
croak 'No arguments for get_nodes_rrd()' unless @p; |
131
|
0
|
|
|
|
|
|
my %args; |
132
|
|
|
|
|
|
|
|
133
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
134
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for get_nodes_rrd()' |
135
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
136
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
else { |
139
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for get_nodes_rrd()' |
140
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
141
|
0
|
|
|
|
|
|
%args = @p; |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'rrd', \%args ) |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub get_nodes_rrddata { |
150
|
|
|
|
|
|
|
|
151
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
152
|
|
|
|
|
|
|
|
153
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_rrddata()'; |
154
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_rrddata()' if ref $a; |
155
|
|
|
|
|
|
|
|
156
|
0
|
|
|
|
|
|
my @p = @_; |
157
|
|
|
|
|
|
|
|
158
|
0
|
0
|
|
|
|
|
croak 'No arguments for get_nodes_rrddata()' unless @p; |
159
|
0
|
|
|
|
|
|
my %args; |
160
|
|
|
|
|
|
|
|
161
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
162
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for get_nodes_rrddata()' |
163
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
164
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
else { |
167
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for get_nodes_rrddata()' |
168
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
169
|
0
|
|
|
|
|
|
%args = @p; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'rrddata', \%args ) |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
sub get_nodes_status { |
178
|
|
|
|
|
|
|
|
179
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
180
|
|
|
|
|
|
|
|
181
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_status()'; |
182
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_status()' if ref $a; |
183
|
|
|
|
|
|
|
|
184
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'status' ) |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
} |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
sub update_nodes_status { |
191
|
|
|
|
|
|
|
|
192
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
193
|
|
|
|
|
|
|
|
194
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for update_nodes_status()'; |
195
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for update_nodes_status()' if ref $a; |
196
|
|
|
|
|
|
|
|
197
|
0
|
|
|
|
|
|
my @p = @_; |
198
|
|
|
|
|
|
|
|
199
|
0
|
0
|
|
|
|
|
croak 'No arguments for update_nodes_status()' unless @p; |
200
|
0
|
|
|
|
|
|
my %args; |
201
|
|
|
|
|
|
|
|
202
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
203
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for update_nodes_status()' |
204
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
205
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
else { |
208
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for update_nodes_status()' |
209
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
210
|
0
|
|
|
|
|
|
%args = @p; |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'status', \%args ) |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
sub get_nodes_subscription { |
220
|
|
|
|
|
|
|
|
221
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
222
|
|
|
|
|
|
|
|
223
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_subscription()'; |
224
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_subscription()' if ref $a; |
225
|
|
|
|
|
|
|
|
226
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'subscription' ) |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
sub create_nodes_subscription { |
232
|
|
|
|
|
|
|
|
233
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
234
|
|
|
|
|
|
|
|
235
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_subscription()'; |
236
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_subscription()' if ref $a; |
237
|
|
|
|
|
|
|
|
238
|
0
|
|
|
|
|
|
my @p = @_; |
239
|
|
|
|
|
|
|
|
240
|
0
|
0
|
|
|
|
|
croak 'No arguments for create_nodes_subscription()' unless @p; |
241
|
0
|
|
|
|
|
|
my %args; |
242
|
|
|
|
|
|
|
|
243
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
244
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for create_nodes_subscription()' |
245
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
246
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
else { |
249
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for create_nodes_subscription()' |
250
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
251
|
0
|
|
|
|
|
|
%args = @p; |
252
|
|
|
|
|
|
|
} |
253
|
|
|
|
|
|
|
|
254
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'subscription', \%args ) |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
sub update_nodes_subscription_key { |
260
|
|
|
|
|
|
|
|
261
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
262
|
|
|
|
|
|
|
|
263
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for update_nodes_subscription_key()'; |
264
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for update_nodes_subscription_key()' if ref $a; |
265
|
|
|
|
|
|
|
|
266
|
0
|
|
|
|
|
|
my @p = @_; |
267
|
|
|
|
|
|
|
|
268
|
0
|
0
|
|
|
|
|
croak 'No arguments for update_nodes_subscription_key()' unless @p; |
269
|
0
|
|
|
|
|
|
my %args; |
270
|
|
|
|
|
|
|
|
271
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
272
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for update_nodes_subscription_key()' |
273
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
274
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
else { |
277
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for update_nodes_subscription_key()' |
278
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
279
|
0
|
|
|
|
|
|
%args = @p; |
280
|
|
|
|
|
|
|
} |
281
|
|
|
|
|
|
|
|
282
|
0
|
|
|
|
|
|
return $self->put( $base, $a, 'subscription', \%args ) |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
} |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
sub get_nodes_syslog { |
288
|
|
|
|
|
|
|
|
289
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
290
|
|
|
|
|
|
|
|
291
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_syslog()'; |
292
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_syslog()' if ref $a; |
293
|
|
|
|
|
|
|
|
294
|
0
|
|
|
|
|
|
my @p = @_; |
295
|
|
|
|
|
|
|
|
296
|
0
|
0
|
|
|
|
|
croak 'No arguments for get_nodes_syslog()' unless @p; |
297
|
0
|
|
|
|
|
|
my %args; |
298
|
|
|
|
|
|
|
|
299
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
300
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for get_nodes_syslog()' |
301
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
302
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
else { |
305
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for get_nodes_syslog()' |
306
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
307
|
0
|
|
|
|
|
|
%args = @p; |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
|
310
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'syslog', \%args ) |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
} |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
sub get_nodes_time { |
316
|
|
|
|
|
|
|
|
317
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
318
|
|
|
|
|
|
|
|
319
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_time()'; |
320
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_time()' if ref $a; |
321
|
|
|
|
|
|
|
|
322
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'time' ) |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
sub update_nodes_time { |
328
|
|
|
|
|
|
|
|
329
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
330
|
|
|
|
|
|
|
|
331
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for update_nodes_time()'; |
332
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for update_nodes_time()' if ref $a; |
333
|
|
|
|
|
|
|
|
334
|
0
|
|
|
|
|
|
my @p = @_; |
335
|
|
|
|
|
|
|
|
336
|
0
|
0
|
|
|
|
|
croak 'No arguments for update_nodes_time()' unless @p; |
337
|
0
|
|
|
|
|
|
my %args; |
338
|
|
|
|
|
|
|
|
339
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
340
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for update_nodes_time()' |
341
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
342
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
} |
344
|
|
|
|
|
|
|
else { |
345
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for update_nodes_time()' |
346
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
347
|
0
|
|
|
|
|
|
%args = @p; |
348
|
|
|
|
|
|
|
} |
349
|
|
|
|
|
|
|
|
350
|
0
|
|
|
|
|
|
return $self->put( $base, $a, 'time', \%args ) |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
} |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
sub get_nodes_ubcfailcnt { |
356
|
|
|
|
|
|
|
|
357
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
358
|
|
|
|
|
|
|
|
359
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_ubcfailcnt()'; |
360
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_ubcfailcnt()' if ref $a; |
361
|
|
|
|
|
|
|
|
362
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'ubcfailcnt' ) |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
} |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
sub get_nodes_version { |
368
|
|
|
|
|
|
|
|
369
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
370
|
|
|
|
|
|
|
|
371
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_version()'; |
372
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_version()' if ref $a; |
373
|
|
|
|
|
|
|
|
374
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'version' ) |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
} |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
sub create_nodes_vncshell { |
380
|
|
|
|
|
|
|
|
381
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
382
|
|
|
|
|
|
|
|
383
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_vncshell()'; |
384
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_vncshell()' if ref $a; |
385
|
|
|
|
|
|
|
|
386
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'vncshell' ) |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
} |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
sub create_nodes_vzdump { |
392
|
|
|
|
|
|
|
|
393
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
394
|
|
|
|
|
|
|
|
395
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_vzdump()'; |
396
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_vzdump()' if ref $a; |
397
|
|
|
|
|
|
|
|
398
|
0
|
|
|
|
|
|
my @p = @_; |
399
|
|
|
|
|
|
|
|
400
|
0
|
0
|
|
|
|
|
croak 'No arguments for create_nodes_vzdump()' unless @p; |
401
|
0
|
|
|
|
|
|
my %args; |
402
|
|
|
|
|
|
|
|
403
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
404
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for create_nodes_vzdump()' |
405
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
406
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
} |
408
|
|
|
|
|
|
|
else { |
409
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for create_nodes_vzdump()' |
410
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
411
|
0
|
|
|
|
|
|
%args = @p; |
412
|
|
|
|
|
|
|
} |
413
|
|
|
|
|
|
|
|
414
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'dns', \%args ) |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
} |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
sub nodes_network { |
420
|
|
|
|
|
|
|
|
421
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
422
|
|
|
|
|
|
|
|
423
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for nodes_network()'; |
424
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for nodes_network()' if ref $a; |
425
|
|
|
|
|
|
|
|
426
|
0
|
|
|
|
|
|
my @p = @_; |
427
|
|
|
|
|
|
|
|
428
|
0
|
0
|
|
|
|
|
croak 'No arguments for nodes_network()' unless @p; |
429
|
0
|
|
|
|
|
|
my %args; |
430
|
|
|
|
|
|
|
|
431
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
432
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for nodes_network()' |
433
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
434
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
} |
436
|
|
|
|
|
|
|
else { |
437
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for nodes_network()' |
438
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
439
|
0
|
|
|
|
|
|
%args = @p; |
440
|
|
|
|
|
|
|
} |
441
|
|
|
|
|
|
|
|
442
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'network', \%args ) |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
} |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
sub create_nodes_network { |
448
|
|
|
|
|
|
|
|
449
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
450
|
|
|
|
|
|
|
|
451
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_network()'; |
452
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_network()' if ref $a; |
453
|
|
|
|
|
|
|
|
454
|
0
|
|
|
|
|
|
my @p = @_; |
455
|
|
|
|
|
|
|
|
456
|
0
|
0
|
|
|
|
|
croak 'No arguments for create_nodes_network()' unless @p; |
457
|
0
|
|
|
|
|
|
my %args; |
458
|
|
|
|
|
|
|
|
459
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
460
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for create_nodes_network()' |
461
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
462
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
} |
464
|
|
|
|
|
|
|
else { |
465
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for create_nodes_network()' |
466
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
467
|
0
|
|
|
|
|
|
%args = @p; |
468
|
|
|
|
|
|
|
} |
469
|
|
|
|
|
|
|
|
470
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'network', \%args ) |
471
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
} |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
sub revert_nodes_network { |
476
|
|
|
|
|
|
|
|
477
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
478
|
|
|
|
|
|
|
|
479
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for revert_nodes_network()'; |
480
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for revert_nodes_network()' if ref $a; |
481
|
|
|
|
|
|
|
|
482
|
0
|
|
|
|
|
|
return $self->delete( $base, $a ) |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
} |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
|
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
sub get_nodes_network_iface { |
489
|
|
|
|
|
|
|
|
490
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
491
|
|
|
|
|
|
|
|
492
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_network_iface()'; |
493
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No iface for get_nodes_network_iface()'; |
494
|
|
|
|
|
|
|
|
495
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_network_iface()' if ref $a; |
496
|
0
|
0
|
|
|
|
|
croak 'iface must be a scalar for get_nodes_network_iface()' if ref $b; |
497
|
|
|
|
|
|
|
|
498
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'network', $b ) |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
} |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
sub update_nodes_network_iface { |
504
|
|
|
|
|
|
|
|
505
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
506
|
|
|
|
|
|
|
|
507
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for update_nodes_network_iface()'; |
508
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No iface for update_nodes_network_iface()'; |
509
|
|
|
|
|
|
|
|
510
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for update_nodes_network_iface()' if ref $a; |
511
|
0
|
0
|
|
|
|
|
croak 'iface must be a scalar for update_nodes_network_iface()' if ref $b; |
512
|
|
|
|
|
|
|
|
513
|
0
|
|
|
|
|
|
my @p = @_; |
514
|
|
|
|
|
|
|
|
515
|
0
|
0
|
|
|
|
|
croak 'No arguments for update_nodes_network_iface()' unless @p; |
516
|
0
|
|
|
|
|
|
my %args; |
517
|
|
|
|
|
|
|
|
518
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
519
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for update_nodes_network_iface()' |
520
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
521
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
522
|
|
|
|
|
|
|
} |
523
|
|
|
|
|
|
|
else { |
524
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for update_nodes_network_iface()' |
525
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
526
|
0
|
|
|
|
|
|
%args = @p; |
527
|
|
|
|
|
|
|
} |
528
|
|
|
|
|
|
|
|
529
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'network', $b, \%args ) |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
} |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
sub delete_nodes_network_iface { |
535
|
|
|
|
|
|
|
|
536
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
537
|
|
|
|
|
|
|
|
538
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for delete_nodes_network_iface()'; |
539
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No iface for delete_nodes_network_iface()'; |
540
|
|
|
|
|
|
|
|
541
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for delete_nodes_network_iface()' if ref $a; |
542
|
0
|
0
|
|
|
|
|
croak 'iface must be a scalar for delete_nodes_network_iface()' if ref $b; |
543
|
|
|
|
|
|
|
|
544
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'network', $b ) |
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
} |
547
|
|
|
|
|
|
|
|
548
|
|
|
|
|
|
|
|
549
|
|
|
|
|
|
|
sub nodes_openvz { |
550
|
|
|
|
|
|
|
|
551
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
552
|
|
|
|
|
|
|
|
553
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for nodes_openvz()'; |
554
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for nodes_openvz()' if ref $a; |
555
|
|
|
|
|
|
|
|
556
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz') |
557
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
} |
559
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
sub create_nodes_openvz { |
562
|
|
|
|
|
|
|
|
563
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
564
|
|
|
|
|
|
|
|
565
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_openvz()'; |
566
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz()' if ref $a; |
567
|
|
|
|
|
|
|
|
568
|
0
|
|
|
|
|
|
my @p = @_; |
569
|
|
|
|
|
|
|
|
570
|
0
|
0
|
|
|
|
|
croak 'No arguments for create_nodes_openvz()' unless @p; |
571
|
0
|
|
|
|
|
|
my %args; |
572
|
|
|
|
|
|
|
|
573
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
574
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for create_nodes_openvz()' |
575
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
576
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
} |
578
|
|
|
|
|
|
|
else { |
579
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for create_nodes_openvz()' |
580
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
581
|
0
|
|
|
|
|
|
%args = @p; |
582
|
|
|
|
|
|
|
} |
583
|
|
|
|
|
|
|
|
584
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', \%args ) |
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
} |
587
|
|
|
|
|
|
|
|
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
sub get_nodes_openvz { |
590
|
|
|
|
|
|
|
|
591
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
592
|
|
|
|
|
|
|
|
593
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_openvz()'; |
594
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz()' if ref $a; |
595
|
|
|
|
|
|
|
|
596
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for get_nodes_openvz()'; |
597
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz()' if ref $b; |
598
|
|
|
|
|
|
|
|
599
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', $b ) |
600
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
} |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
sub delete_nodes_openvz { |
605
|
|
|
|
|
|
|
|
606
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
607
|
|
|
|
|
|
|
|
608
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for delete_nodes_openvz()'; |
609
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for delete_nodes_openvz()' if ref $a; |
610
|
|
|
|
|
|
|
|
611
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for delete_nodes_openvz()'; |
612
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for delete_nodes_openvz()' if ref $b; |
613
|
|
|
|
|
|
|
|
614
|
0
|
|
|
|
|
|
return $self->delete( $base, $a, 'openvz', $b ) |
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
} |
617
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
sub get_nodes_openvz_status { |
620
|
|
|
|
|
|
|
|
621
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
622
|
|
|
|
|
|
|
|
623
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_openvz_status()'; |
624
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status()' if ref $a; |
625
|
|
|
|
|
|
|
|
626
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for get_nodes_openvz_status()'; |
627
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status()' if ref $b; |
628
|
|
|
|
|
|
|
|
629
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', $b, 'status' ) |
630
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
} |
632
|
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
sub get_nodes_openvz_status_current { |
635
|
|
|
|
|
|
|
|
636
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
637
|
|
|
|
|
|
|
|
638
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_openvz_status_current()'; |
639
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status_current()' if ref $a; |
640
|
|
|
|
|
|
|
|
641
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for get_nodes_openvz_status_current()'; |
642
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status_current()' if ref $b; |
643
|
|
|
|
|
|
|
|
644
|
0
|
|
|
|
|
|
return $self->get( $base, $a, 'openvz', $b, 'status', 'current' ) |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
} |
647
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
sub create_nodes_openvz_status_mount { |
650
|
|
|
|
|
|
|
|
651
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
652
|
|
|
|
|
|
|
|
653
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_openvz_status_mount()'; |
654
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_mount()' if ref $a; |
655
|
|
|
|
|
|
|
|
656
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for create_nodes_openvz_status_mount()'; |
657
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_mount()' if ref $b; |
658
|
|
|
|
|
|
|
|
659
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'mount' ) |
660
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
} |
662
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
sub create_nodes_openvz_status_shutdown { |
665
|
|
|
|
|
|
|
|
666
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
667
|
|
|
|
|
|
|
|
668
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_openvz_status_shutdown()'; |
669
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_shutdown()' if ref $a; |
670
|
|
|
|
|
|
|
|
671
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for create_nodes_openvz_status_shutdown()'; |
672
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_shutdown()' if ref $b; |
673
|
|
|
|
|
|
|
|
674
|
0
|
|
|
|
|
|
my @p = @_; |
675
|
|
|
|
|
|
|
|
676
|
0
|
0
|
|
|
|
|
croak 'No arguments for create_nodes_openvz_status_shutdown()' unless @p; |
677
|
0
|
|
|
|
|
|
my %args; |
678
|
|
|
|
|
|
|
|
679
|
0
|
0
|
|
|
|
|
if ( @p == 1 ) { |
680
|
0
|
0
|
|
|
|
|
croak 'Single argument not a hash for create_nodes_openvz_status_shutdown()' |
681
|
|
|
|
|
|
|
unless ref $a eq 'HASH'; |
682
|
0
|
|
|
|
|
|
%args = %{ $p[0] }; |
|
0
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
} |
684
|
|
|
|
|
|
|
else { |
685
|
0
|
0
|
|
|
|
|
croak 'Odd number of arguments for create_nodes_openvz_status_shutdown()' |
686
|
|
|
|
|
|
|
if ( scalar @p % 2 != 0 ); |
687
|
0
|
|
|
|
|
|
%args = @p; |
688
|
|
|
|
|
|
|
} |
689
|
|
|
|
|
|
|
|
690
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'shutdown', \%args ) |
691
|
|
|
|
|
|
|
|
692
|
|
|
|
|
|
|
} |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
sub create_nodes_openvz_status_start { |
696
|
|
|
|
|
|
|
|
697
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
698
|
|
|
|
|
|
|
|
699
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_openvz_status_start()'; |
700
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_start()' if ref $a; |
701
|
|
|
|
|
|
|
|
702
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for create_nodes_openvz_status_start()'; |
703
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_start()' if ref $b; |
704
|
|
|
|
|
|
|
|
705
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'start' ) |
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
} |
708
|
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
|
710
|
|
|
|
|
|
|
sub create_nodes_openvz_status_stop { |
711
|
|
|
|
|
|
|
|
712
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
713
|
|
|
|
|
|
|
|
714
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for create_nodes_openvz_status_stop()'; |
715
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_stop()' if ref $a; |
716
|
|
|
|
|
|
|
|
717
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for create_nodes_openvz_status_stop()'; |
718
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for create_nodes_openvz_status_stop()' if ref $b; |
719
|
|
|
|
|
|
|
|
720
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'start' ) |
721
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
} |
723
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
sub get_nodes_openvz_status_ubc { |
726
|
|
|
|
|
|
|
|
727
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
728
|
|
|
|
|
|
|
|
729
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_openvz_status_ubc()'; |
730
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status_ubc()' if ref $a; |
731
|
|
|
|
|
|
|
|
732
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for get_nodes_openvz_status_ubc()'; |
733
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status_ubc()' if ref $b; |
734
|
|
|
|
|
|
|
|
735
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'ubc' ) |
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
} |
738
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
|
740
|
|
|
|
|
|
|
sub get_nodes_openvz_status_umount { |
741
|
|
|
|
|
|
|
|
742
|
0
|
0
|
|
0
|
1
|
|
my $self = shift or return; |
743
|
|
|
|
|
|
|
|
744
|
0
|
0
|
|
|
|
|
my $a = shift or croak 'No node for get_nodes_openvz_status_umount()'; |
745
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status_umount()' if ref $a; |
746
|
|
|
|
|
|
|
|
747
|
0
|
0
|
|
|
|
|
my $b = shift or croak 'No node for get_nodes_openvz_status_umount()'; |
748
|
0
|
0
|
|
|
|
|
croak 'node must be a scalar for get_nodes_openvz_status_umount()' if ref $b; |
749
|
|
|
|
|
|
|
|
750
|
0
|
|
|
|
|
|
return $self->post( $base, $a, 'openvz', $b, 'status', 'umount' ) |
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
} |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
1; |
756
|
|
|
|
|
|
|
|
757
|
|
|
|
|
|
|
__END__ |