VE/Nodes.pm

filter: Statementstmt 4.8% 16 / 327 Branchbran 0.0% 0 / 396 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 9.5% 4 / 42 Podpod 100% 38 / 38 totaltotal 7.2% 58 / 803 CC 199 SCAR 40.2
CC
199
Cov
2%
update_node_network_iface
110.0
create_node_openvz_status_shutdown
110.0
create_node_aplinfo
72.0
CRAP 55.6
« VE.pm ↑ Summary VE/Pools.pm »
1 #!/bin/false
2 # vim: softtabstop=4 tabstop=4 shiftwidth=4 ft=perl expandtab smarttab
3 # PODNAME: Net::Proxmox::VE::Nodes
4 # ABSTRACT: Functions for the 'nodes' portion of the API
5  
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 package Net::Proxmox::VE::Nodes;
10 2 $Net::Proxmox::VE::Nodes::VERSION = '0.44';
11 2 ▶use parent 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶use Net::Proxmox::VE::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 our @EXPORT = qw( nodes get_node );
16  
17  
18 2 my $BASEPATH = '/nodes';
19  
20 0 ▶sub nodes {
Subroutine nodes: not called CC=2 SCAR=17.9
Pod documented
21  
22 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
23  
24 0 return $self->_get( $BASEPATH, undef );
25  
26 }
27  
28  
29 0 ▶sub get_node {
Subroutine get_node: not called CC=4 SCAR=30.0
Pod documented
30  
31 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
32  
33 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node()") 0 0 0
34 or Net::Proxmox::VE::Exception->throw('No node for get_node()');
35 0 ▶ Net::Proxmox::VE::Exception->throw('node must be a scalar for get_node()')
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
36 if ref $node;
37  
38 0 return $self->get( $BASEPATH, $node );
39  
40 }
41  
42  
43 0 ▶sub get_node_aplinfo {
Subroutine get_node_aplinfo: not called CC=4 SCAR=30.0
Pod documented
44  
45 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
46  
47 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_aplinfo()") 0 0 0
48 or Net::Proxmox::VE::Exception->throw('No node for get_node_aplinfo()');
49 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
50 'node must be a scalar for get_node_aplinfo()')
51 if ref $node;
52  
53 0 return $self->get( $BASEPATH, $node, 'aplinfo' );
54  
55 }
56  
57  
58 0 ▶sub create_node_aplinfo {
Subroutine create_node_aplinfo: not called CC=8 SCAR=42.8
Pod documented
59  
60 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
61  
62 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_aplinfo()") 0 0 0
63 or
64 Net::Proxmox::VE::Exception->throw('No node for create_node_aplinfo()');
65 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
66 'node must be a scalar for create_node_aplinfo()')
67 if ref $node;
68  
69 0 my @p = @_;
70  
71 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for create_node_aplinfo()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
72 unless @p;
73 0 my %args;
74  
75 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
76 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
77 'Single argument not a hash for create_node_aplinfo()')
78 unless ref $node eq 'HASH';
79 0 %args = %{ $p[0] };
80 }
81 else {
82 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
83 'Odd number of arguments for create_node_aplinfo()')
84 if ( scalar @p % 2 != 0 );
85 0 %args = @p;
86 }
87  
88 0 return $self->post( $BASEPATH, $node, 'aplinfo', \%args );
89  
90 }
91  
92  
93 0 ▶sub get_node_dns {
Subroutine get_node_dns: not called CC=4 SCAR=30.0
Pod documented
94  
95 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
96  
97 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_dns()") 0 0 0
98 or Net::Proxmox::VE::Exception->throw('No node for get_node_dns()');
99 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
100 'node must be a scalar for get_node_dns()')
101 if ref $node;
102  
103 0 return $self->get( $BASEPATH, $node, 'dns' );
104  
105 }
106  
107  
108 0 ▶sub update_node_dns {
Subroutine update_node_dns: not called CC=8 SCAR=42.8
Pod documented
109  
110 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
111  
112 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for update_node_dns()") 0 0 0
113 or Net::Proxmox::VE::Exception->throw('No node for update_node_dns()');
114 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
115 'node must be a scalar for update_node_dns()')
116 if ref $node;
117  
118 0 my @p = @_;
119  
120 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for update_node_dns()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
121 unless @p;
122 0 my %args;
123  
124 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
125 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
126 'Single argument not a hash for update_node_dns()')
127 unless ref $node eq 'HASH';
128 0 %args = %{ $p[0] };
129 }
130 else {
131 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
132 'Odd number of arguments for update_node_dns()')
133 if ( scalar @p % 2 != 0 );
134 0 %args = @p;
135 }
136  
137 0 return $self->put( $BASEPATH, $node, 'dns', \%args );
138  
139 }
140  
141  
142 0 ▶sub get_node_rrd {
Subroutine get_node_rrd: not called CC=8 SCAR=42.8
Pod documented
143  
144 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
145  
146 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_rrd()") 0 0 0
147 or Net::Proxmox::VE::Exception->throw('No node for get_node_rrd()');
148 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
149 'node must be a scalar for get_node_rrd()')
150 if ref $node;
151  
152 0 my @p = @_;
153  
154 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for get_node_rrd()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
155 unless @p;
156 0 my %args;
157  
158 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
159 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
160 'Single argument not a hash for get_node_rrd()')
161 unless ref $node eq 'HASH';
162 0 %args = %{ $p[0] };
163 }
164 else {
165 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
166 'Odd number of arguments for get_node_rrd()')
167 if ( scalar @p % 2 != 0 );
168 0 %args = @p;
169 }
170  
171 0 return $self->get( $BASEPATH, $node, 'rrd', \%args );
172  
173 }
174  
175  
176 0 ▶sub get_node_rrddata {
Subroutine get_node_rrddata: not called CC=8 SCAR=42.8
Pod documented
177  
178 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
179  
180 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_rrddata()") 0 0 0
181 or Net::Proxmox::VE::Exception->throw('No node for get_node_rrddata()');
182 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
183 'node must be a scalar for get_node_rrddata()')
184 if ref $node;
185  
186 0 my @p = @_;
187  
188 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for get_node_rrddata()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
189 unless @p;
190 0 my %args;
191  
192 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
193 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
194 'Single argument not a hash for get_node_rrddata()')
195 unless ref $node eq 'HASH';
196 0 %args = %{ $p[0] };
197 }
198 else {
199 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
200 'Odd number of arguments for get_node_rrddata()')
201 if ( scalar @p % 2 != 0 );
202 0 %args = @p;
203 }
204  
205 0 return $self->get( $BASEPATH, $node, 'rrddata', \%args );
206  
207 }
208  
209  
210 0 ▶sub get_node_status {
Subroutine get_node_status: not called CC=4 SCAR=30.0
Pod documented
211  
212 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
213  
214 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_status()") 0 0 0
215 or Net::Proxmox::VE::Exception->throw('No node for get_node_status()');
216 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
217 'node must be a scalar for get_node_status()')
218 if ref $node;
219  
220 0 return $self->get( $BASEPATH, $node, 'status' );
221  
222 }
223  
224  
225 0 ▶sub update_node_status {
Subroutine update_node_status: not called CC=8 SCAR=42.8
Pod documented
226  
227 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
228  
229 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for update_node_status()") 0 0 0
230 or Net::Proxmox::VE::Exception->throw('No node for update_node_status()');
231 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
232 'node must be a scalar for update_node_status()')
233 if ref $node;
234  
235 0 my @p = @_;
236  
237 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for update_node_status()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
238 unless @p;
239 0 my %args;
240  
241 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
242 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
243 'Single argument not a hash for update_node_status()')
244 unless ref $node eq 'HASH';
245 0 %args = %{ $p[0] };
246 }
247 else {
248 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
249 'Odd number of arguments for update_node_status()')
250 if ( scalar @p % 2 != 0 );
251 0 %args = @p;
252 }
253  
254 0 return $self->post( $BASEPATH, $node, 'status', \%args );
255  
256 }
257  
258  
259 0 ▶sub get_node_subscription {
Subroutine get_node_subscription: not called CC=4 SCAR=30.0
Pod documented
260  
261 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
262  
263 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_subscription()") 0 0 0
264 or
265 Net::Proxmox::VE::Exception->throw('No node for get_node_subscription()');
266 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
267 'node must be a scalar for get_node_subscription()')
268 if ref $node;
269  
270 0 return $self->get( $BASEPATH, $node, 'subscription' );
271  
272 }
273  
274  
275 0 ▶sub create_node_subscription {
Subroutine create_node_subscription: not called CC=8 SCAR=42.8
Pod documented
276  
277 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
278  
279 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_subscription()") 0 0 0
280 or Net::Proxmox::VE::Exception->throw(
281 'No node for create_node_subscription()');
282 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
283 'node must be a scalar for create_node_subscription()')
284 if ref $node;
285  
286 0 my @p = @_;
287  
288 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
289 'No arguments for create_node_subscription()')
290 unless @p;
291 0 my %args;
292  
293 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
294 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
295 'Single argument not a hash for create_node_subscription()')
296 unless ref $node eq 'HASH';
297 0 %args = %{ $p[0] };
298 }
299 else {
300 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
301 'Odd number of arguments for create_node_subscription()')
302 if ( scalar @p % 2 != 0 );
303 0 %args = @p;
304 }
305  
306 0 return $self->post( $BASEPATH, $node, 'subscription', \%args );
307  
308 }
309  
310  
311 0 ▶sub update_node_subscription_key {
Subroutine update_node_subscription_key: not called CC=8 SCAR=42.8
Pod documented
312  
313 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
314  
315 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for update_node_subscription_key()") 0 0 0
316 or Net::Proxmox::VE::Exception->throw(
317 'No node for update_node_subscription_key()');
318 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
319 'node must be a scalar for update_node_subscription_key()')
320 if ref $node;
321  
322 0 my @p = @_;
323  
324 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
325 'No arguments for update_node_subscription_key()')
326 unless @p;
327 0 my %args;
328  
329 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
330 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
331 'Single argument not a hash for update_node_subscription_key()')
332 unless ref $node eq 'HASH';
333 0 %args = %{ $p[0] };
334 }
335 else {
336 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
337 'Odd number of arguments for update_node_subscription_key()')
338 if ( scalar @p % 2 != 0 );
339 0 %args = @p;
340 }
341  
342 0 return $self->put( $BASEPATH, $node, 'subscription', \%args );
343  
344 }
345  
346  
347 0 ▶sub get_node_syslog {
Subroutine get_node_syslog: not called CC=8 SCAR=42.8
Pod documented
348  
349 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
350  
351 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_syslog()") 0 0 0
352 or Net::Proxmox::VE::Exception->throw('No node for get_node_syslog()');
353 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
354 'node must be a scalar for get_node_syslog()')
355 if ref $node;
356  
357 0 my @p = @_;
358  
359 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for get_node_syslog()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
360 unless @p;
361 0 my %args;
362  
363 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
364 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
365 'Single argument not a hash for get_node_syslog()')
366 unless ref $node eq 'HASH';
367 0 %args = %{ $p[0] };
368 }
369 else {
370 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
371 'Odd number of arguments for get_node_syslog()')
372 if ( scalar @p % 2 != 0 );
373 0 %args = @p;
374 }
375  
376 0 return $self->get( $BASEPATH, $node, 'syslog', \%args );
377  
378 }
379  
380  
381 0 ▶sub get_node_time {
Subroutine get_node_time: not called CC=4 SCAR=30.0
Pod documented
382  
383 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
384  
385 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_time()") 0 0 0
386 or Net::Proxmox::VE::Exception->throw('No node for get_node_time()');
387 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
388 'node must be a scalar for get_node_time()')
389 if ref $node;
390  
391 0 return $self->get( $BASEPATH, $node, 'time' );
392  
393 }
394  
395  
396 0 ▶sub update_node_time {
Subroutine update_node_time: not called CC=8 SCAR=42.8
Pod documented
397  
398 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
399  
400 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for update_node_time()") 0 0 0
401 or Net::Proxmox::VE::Exception->throw('No node for update_node_time()');
402 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
403 'node must be a scalar for update_node_time()')
404 if ref $node;
405  
406 0 my @p = @_;
407  
408 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for update_node_time()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
409 unless @p;
410 0 my %args;
411  
412 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
413 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
414 'Single argument not a hash for update_node_time()')
415 unless ref $node eq 'HASH';
416 0 %args = %{ $p[0] };
417 }
418 else {
419 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
420 'Odd number of arguments for update_node_time()')
421 if ( scalar @p % 2 != 0 );
422 0 %args = @p;
423 }
424  
425 0 return $self->put( $BASEPATH, $node, 'time', \%args );
426  
427 }
428  
429  
430 0 ▶sub get_node_ubcfailcnt {
Subroutine get_node_ubcfailcnt: not called CC=4 SCAR=30.0
Pod documented
431  
432 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
433  
434 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_ubcfailcnt()") 0 0 0
435 or
436 Net::Proxmox::VE::Exception->throw('No node for get_node_ubcfailcnt()');
437 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
438 'node must be a scalar for get_node_ubcfailcnt()')
439 if ref $node;
440  
441 0 return $self->get( $BASEPATH, $node, 'ubcfailcnt' );
442  
443 }
444  
445  
446 0 ▶sub get_node_version {
Subroutine get_node_version: not called CC=4 SCAR=30.0
Pod documented
447  
448 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
449  
450 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_version()") 0 0 0
451 or Net::Proxmox::VE::Exception->throw('No node for get_node_version()');
452 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
453 'node must be a scalar for get_node_version()')
454 if ref $node;
455  
456 0 return $self->get( $BASEPATH, $node, 'version' );
457  
458 }
459  
460  
461 0 ▶sub create_node_vncshell {
Subroutine create_node_vncshell: not called CC=4 SCAR=30.0
Pod documented
462  
463 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
464  
465 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_vncshell()") 0 0 0
466 or
467 Net::Proxmox::VE::Exception->throw('No node for create_node_vncshell()');
468 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
469 'node must be a scalar for create_node_vncshell()')
470 if ref $node;
471  
472 0 return $self->post( $BASEPATH, $node, 'vncshell' );
473  
474 }
475  
476  
477 0 ▶sub create_node_vzdump {
Subroutine create_node_vzdump: not called CC=8 SCAR=42.8
Pod documented
478  
479 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
480  
481 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_vzdump()") 0 0 0
482 or Net::Proxmox::VE::Exception->throw('No node for create_node_vzdump()');
483 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
484 'node must be a scalar for create_node_vzdump()')
485 if ref $node;
486  
487 0 my @p = @_;
488  
489 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for create_node_vzdump()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
490 unless @p;
491 0 my %args;
492  
493 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
494 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
495 'Single argument not a hash for create_node_vzdump()')
496 unless ref $node eq 'HASH';
497 0 %args = %{ $p[0] };
498 }
499 else {
500 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
501 'Odd number of arguments for create_node_vzdump()')
502 if ( scalar @p % 2 != 0 );
503 0 %args = @p;
504 }
505  
506 0 return $self->post( $BASEPATH, $node, 'dns', \%args );
507  
508 }
509  
510  
511 0 ▶sub nodes_network {
Subroutine nodes_network: not called CC=8 SCAR=42.8
Pod documented
512  
513 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
514  
515 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for nodes_network()") 0 0 0
516 or Net::Proxmox::VE::Exception->throw('No node for nodes_network()');
517 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
518 'node must be a scalar for nodes_network()')
519 if ref $node;
520  
521 0 my @p = @_;
522  
523 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for nodes_network()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
524 unless @p;
525 0 my %args;
526  
527 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
528 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
529 'Single argument not a hash for nodes_network()')
530 unless ref $node eq 'HASH';
531 0 %args = %{ $p[0] };
532 }
533 else {
534 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
535 'Odd number of arguments for nodes_network()')
536 if ( scalar @p % 2 != 0 );
537 0 %args = @p;
538 }
539  
540 0 return $self->get( $BASEPATH, $node, 'network', \%args );
541  
542 }
543  
544  
545 0 ▶sub create_node_network {
Subroutine create_node_network: not called CC=8 SCAR=42.8
Pod documented
546  
547 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
548  
549 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_network()") 0 0 0
550 or
551 Net::Proxmox::VE::Exception->throw('No node for create_node_network()');
552 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
553 'node must be a scalar for create_node_network()')
554 if ref $node;
555  
556 0 my @p = @_;
557  
558 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for create_node_network()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
559 unless @p;
560 0 my %args;
561  
562 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
563 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
564 'Single argument not a hash for create_node_network()')
565 unless ref $node eq 'HASH';
566 0 %args = %{ $p[0] };
567 }
568 else {
569 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
570 'Odd number of arguments for create_node_network()')
571 if ( scalar @p % 2 != 0 );
572 0 %args = @p;
573 }
574  
575 0 return $self->post( $BASEPATH, $node, 'network', \%args );
576  
577 }
578  
579  
580 0 ▶sub revert_nodes_network {
Subroutine revert_nodes_network: not called CC=4 SCAR=30.0
Pod documented
581  
582 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
583  
584 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for revert_nodes_network()") 0 0 0
585 or
586 Net::Proxmox::VE::Exception->throw('No node for revert_nodes_network()');
587 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
588 'node must be a scalar for revert_nodes_network()')
589 if ref $node;
590  
591 0 return $self->delete( $BASEPATH, $node );
592  
593 }
594  
595  
596 0 ▶sub get_node_network_iface {
Subroutine get_node_network_iface: not called CC=6 SCAR=37.4
Pod documented
597  
598 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
599  
600 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_network_iface()") 0 0 0
601 or Net::Proxmox::VE::Exception->throw(
602 'No node for get_node_network_iface()');
603 0 ▶ my $b = shift
Branch: 1 branch
BranchTrueFalseTotal
my $b = shift() or "Net::Proxmox::VE::Exception"->throw("No iface for get_node_network_iface()") 0 0 0
604 or Net::Proxmox::VE::Exception->throw(
605 'No iface for get_node_network_iface()');
606  
607 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
608 'node must be a scalar for get_node_network_iface()')
609 if ref $node;
610 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $b 0 0 0
611 'iface must be a scalar for get_node_network_iface()')
612 if ref $b;
613  
614 0 return $self->get( $BASEPATH, $node, 'network', $b );
615  
616 }
617  
618  
619 0 ▶sub update_node_network_iface {
Subroutine update_node_network_iface: not called CC=10 SCAR=47.0
Pod documented
620  
621 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
622  
623 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for update_node_network_iface()") 0 0 0
624 or Net::Proxmox::VE::Exception->throw(
625 'No node for update_node_network_iface()');
626 0 ▶ my $b = shift
Branch: 1 branch
BranchTrueFalseTotal
my $b = shift() or "Net::Proxmox::VE::Exception"->throw("No iface for update_node_network_iface()") 0 0 0
627 or Net::Proxmox::VE::Exception->throw(
628 'No iface for update_node_network_iface()');
629  
630 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
631 'node must be a scalar for update_node_network_iface()')
632 if ref $node;
633 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $b 0 0 0
634 'iface must be a scalar for update_node_network_iface()')
635 if ref $b;
636  
637 0 my @p = @_;
638  
639 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
640 'No arguments for update_node_network_iface()')
641 unless @p;
642 0 my %args;
643  
644 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
645 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
646 'Single argument not a hash for update_node_network_iface()')
647 unless ref $node eq 'HASH';
648 0 %args = %{ $p[0] };
649 }
650 else {
651 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
652 'Odd number of arguments for update_node_network_iface()')
653 if ( scalar @p % 2 != 0 );
654 0 %args = @p;
655 }
656  
657 0 return $self->post( $BASEPATH, $node, 'network', $b, \%args );
658  
659 }
660  
661  
662 0 ▶sub delete_nodes_network_iface {
Subroutine delete_nodes_network_iface: not called CC=6 SCAR=37.4
Pod documented
663  
664 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
665  
666 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for delete_nodes_network_iface()") 0 0 0
667 or Net::Proxmox::VE::Exception->throw(
668 'No node for delete_nodes_network_iface()');
669 0 ▶ my $iface = shift
Branch: 1 branch
BranchTrueFalseTotal
my $iface = shift() or "Net::Proxmox::VE::Exception"->throw("No iface for delete_nodes_network_iface()") 0 0 0
670 or Net::Proxmox::VE::Exception->throw(
671 'No iface for delete_nodes_network_iface()');
672  
673 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
674 'node must be a scalar for delete_nodes_network_iface()')
675 if ref $node;
676 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $iface 0 0 0
677 'iface must be a scalar for delete_nodes_network_iface()')
678 if ref $iface;
679  
680 0 return $self->get( $BASEPATH, $node, 'network', $iface );
681  
682 }
683  
684  
685 0 ▶sub nodes_openvz {
Subroutine nodes_openvz: not called CC=4 SCAR=30.0
Pod documented
686  
687 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
688  
689 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for nodes_openvz()") 0 0 0
690 or Net::Proxmox::VE::Exception->throw('No node for nodes_openvz()');
691 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
692 'node must be a scalar for nodes_openvz()')
693 if ref $node;
694  
695 0 return $self->get( $BASEPATH, $node, 'openvz' );
696  
697 }
698  
699  
700 0 ▶sub create_node_openvz {
Subroutine create_node_openvz: not called CC=8 SCAR=42.8
Pod documented
701  
702 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
703  
704 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_openvz()") 0 0 0
705 or Net::Proxmox::VE::Exception->throw('No node for create_node_openvz()');
706 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
707 'node must be a scalar for create_node_openvz()')
708 if ref $node;
709  
710 0 my @p = @_;
711  
712 0 ▶ Net::Proxmox::VE::Exception->throw('No arguments for create_node_openvz()')
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
713 unless @p;
714 0 my %args;
715  
716 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
717 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
718 'Single argument not a hash for create_node_openvz()')
719 unless ref $node eq 'HASH';
720 0 %args = %{ $p[0] };
721 }
722 else {
723 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
724 'Odd number of arguments for create_node_openvz()')
725 if ( scalar @p % 2 != 0 );
726 0 %args = @p;
727 }
728  
729 0 return $self->get( $BASEPATH, $node, 'openvz', \%args );
730  
731 }
732  
733  
734 0 ▶sub get_node_openvz {
Subroutine get_node_openvz: not called CC=6 SCAR=37.4
Pod documented
735  
736 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
737  
738 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_openvz()") 0 0 0
739 or Net::Proxmox::VE::Exception->throw('No node for get_node_openvz()');
740 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
741 'node must be a scalar for get_node_openvz()')
742 if ref $node;
743  
744 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No vmid for get_node_openvz()") 0 0 0
745 or Net::Proxmox::VE::Exception->throw('No vmid for get_node_openvz()');
746 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
747 'vmid must be a scalar for get_node_openvz()')
748 if ref $vmid;
749  
750 0 return $self->get( $BASEPATH, $node, 'openvz', $vmid );
751  
752 }
753  
754  
755 0 ▶sub delete_nodes_openvz {
Subroutine delete_nodes_openvz: not called CC=6 SCAR=37.4
Pod documented
756  
757 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
758  
759 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for delete_nodes_openvz()") 0 0 0
760 or
761 Net::Proxmox::VE::Exception->throw('No node for delete_nodes_openvz()');
762 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
763 'node must be a scalar for delete_nodes_openvz()')
764 if ref $node;
765  
766 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No node for delete_nodes_openvz()") 0 0 0
767 or
768 Net::Proxmox::VE::Exception->throw('No node for delete_nodes_openvz()');
769 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
770 'vmid must be a scalar for delete_nodes_openvz()')
771 if ref $vmid;
772  
773 0 return $self->delete( $BASEPATH, $node, 'openvz', $vmid );
774  
775 }
776  
777  
778 0 ▶sub get_node_openvz_status {
Subroutine get_node_openvz_status: not called CC=6 SCAR=37.4
Pod documented
779  
780 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
781  
782 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_openvz_status()") 0 0 0
783 or Net::Proxmox::VE::Exception->throw(
784 'No node for get_node_openvz_status()');
785 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
786 'node must be a scalar for get_node_openvz_status()')
787 if ref $node;
788  
789 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_openvz_status()") 0 0 0
790 or Net::Proxmox::VE::Exception->throw(
791 'No node for get_node_openvz_status()');
792 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
793 'node must be a scalar for get_node_openvz_status()')
794 if ref $vmid;
795  
796 0 return $self->get( $BASEPATH, $node, 'openvz', $vmid, 'status' );
797  
798 }
799  
800  
801 0 ▶sub get_node_openvz_status_current {
Subroutine get_node_openvz_status_current: not called CC=6 SCAR=37.4
Pod documented
802  
803 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
804  
805 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_openvz_status_current()") 0 0 0
806 or Net::Proxmox::VE::Exception->throw(
807 'No node for get_node_openvz_status_current()');
808 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
809 'node must be a scalar for get_node_openvz_status_current()')
810 if ref $node;
811  
812 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_openvz_status_current()") 0 0 0
813 or Net::Proxmox::VE::Exception->throw(
814 'No node for get_node_openvz_status_current()');
815 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
816 'node must be a scalar for get_node_openvz_status_current()')
817 if ref $vmid;
818  
819 0 return $self->get( $BASEPATH, $node, 'openvz', $vmid, 'status', 'current' );
820  
821 }
822  
823  
824 0 ▶sub create_node_openvz_status_mount {
Subroutine create_node_openvz_status_mount: not called CC=6 SCAR=37.4
Pod documented
825  
826 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
827  
828 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_openvz_status_mount()") 0 0 0
829 or Net::Proxmox::VE::Exception->throw(
830 'No node for create_node_openvz_status_mount()');
831 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
832 'node must be a scalar for create_node_openvz_status_mount()')
833 if ref $node;
834  
835 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_openvz_status_mount()") 0 0 0
836 or Net::Proxmox::VE::Exception->throw(
837 'No node for create_node_openvz_status_mount()');
838 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
839 'node must be a scalar for create_node_openvz_status_mount()')
840 if ref $vmid;
841  
842 0 return $self->post( $BASEPATH, $node, 'openvz', $vmid, 'status', 'mount' );
843  
844 }
845  
846  
847 0 ▶sub create_node_openvz_status_shutdown {
Subroutine create_node_openvz_status_shutdown: not called CC=10 SCAR=47.0
Pod documented
848  
849 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
850  
851 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_openvz_status_shutdown()") 0 0 0
852 or Net::Proxmox::VE::Exception->throw(
853 'No node for create_node_openvz_status_shutdown()');
854 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
855 'node must be a scalar for create_node_openvz_status_shutdown()')
856 if ref $node;
857  
858 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No vmid for create_node_openvz_status_shutdown()") 0 0 0
859 or Net::Proxmox::VE::Exception->throw(
860 'No vmid for create_node_openvz_status_shutdown()');
861 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
862 'vmid must be a scalar for create_node_openvz_status_shutdown()')
863 if ref $vmid;
864  
865 0 my @p = @_;
866 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless @p 0 0 0
867 'No arguments for create_node_openvz_status_shutdown()')
868 unless @p;
869 0 my %args;
870  
871 0 ▶ if ( @p == 1 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (@p == 1) { } 0 0 0
872 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless ref $node eq "HASH" 0 0 0
873 'Single argument not a hash for create_node_openvz_status_shutdown()'
874 ) unless ref $node eq 'HASH';
875 0 %args = %{ $p[0] };
876 }
877 else {
878 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if scalar @p % 2 != 0 0 0 0
879 'Odd number of arguments for create_node_openvz_status_shutdown()')
880 if ( scalar @p % 2 != 0 );
881 0 %args = @p;
882 }
883  
884 0 return $self->post( $BASEPATH, $node, 'openvz', $vmid, 'status',
885 'shutdown', \%args );
886  
887 }
888  
889  
890 0 ▶sub create_node_openvz_status_start {
Subroutine create_node_openvz_status_start: not called CC=6 SCAR=37.4
Pod documented
891  
892 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
893  
894 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_openvz_status_start()") 0 0 0
895 or Net::Proxmox::VE::Exception->throw(
896 'No node for create_node_openvz_status_start()');
897 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
898 'node must be a scalar for create_node_openvz_status_start()')
899 if ref $node;
900  
901 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No vmid for create_node_openvz_status_start()") 0 0 0
902 or Net::Proxmox::VE::Exception->throw(
903 'No vmid for create_node_openvz_status_start()');
904 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
905 'vmid must be a scalar for create_node_openvz_status_start()')
906 if ref $vmid;
907  
908 0 return $self->post( $BASEPATH, $node, 'openvz', $vmid, 'status', 'start' );
909  
910 }
911  
912  
913 0 ▶sub create_node_openvz_status_stop {
Subroutine create_node_openvz_status_stop: not called CC=6 SCAR=37.4
Pod documented
914  
915 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
916  
917 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for create_node_openvz_status_stop()") 0 0 0
918 or Net::Proxmox::VE::Exception->throw(
919 'No node for create_node_openvz_status_stop()');
920 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
921 'node must be a scalar for create_node_openvz_status_stop()')
922 if ref $node;
923  
924 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No vmid for create_node_openvz_status_stop()") 0 0 0
925 or Net::Proxmox::VE::Exception->throw(
926 'No vmid for create_node_openvz_status_stop()');
927 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
928 'vmid must be a scalar for create_node_openvz_status_stop()')
929 if ref $vmid;
930  
931 0 return $self->post( $BASEPATH, $node, 'openvz', $vmid, 'status', 'start' );
932  
933 }
934  
935  
936 0 ▶sub get_node_openvz_status_ubc {
Subroutine get_node_openvz_status_ubc: not called CC=6 SCAR=37.4
Pod documented
937  
938 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
939  
940 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_openvz_status_ubc()") 0 0 0
941 or Net::Proxmox::VE::Exception->throw(
942 'No node for get_node_openvz_status_ubc()');
943 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
944 'node must be a scalar for get_node_openvz_status_ubc()')
945 if ref $node;
946  
947 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No vmid for get_node_openvz_status_ubc()") 0 0 0
948 or Net::Proxmox::VE::Exception->throw(
949 'No vmid for get_node_openvz_status_ubc()');
950 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
951 'vmid must be a scalar for get_node_openvz_status_ubc()')
952 if ref $vmid;
953  
954 0 return $self->post( $BASEPATH, $node, 'openvz', $vmid, 'status', 'ubc' );
955  
956 }
957  
958  
959 0 ▶sub get_node_openvz_status_umount {
Subroutine get_node_openvz_status_umount: not called CC=6 SCAR=37.4
Pod documented
960  
961 0 ▶ my $self = shift or return;
Branch: 1 branch
BranchTrueFalseTotal
my $self = shift() or return 0 0 0
962  
963 0 ▶ my $node = shift
Branch: 1 branch
BranchTrueFalseTotal
my $node = shift() or "Net::Proxmox::VE::Exception"->throw("No node for get_node_openvz_status_umount()") 0 0 0
964 or Net::Proxmox::VE::Exception->throw(
965 'No node for get_node_openvz_status_umount()');
966 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $node 0 0 0
967 'node must be a scalar for get_node_openvz_status_umount()')
968 if ref $node;
969  
970 0 ▶ my $vmid = shift
Branch: 1 branch
BranchTrueFalseTotal
my $vmid = shift() or "Net::Proxmox::VE::Exception"->throw("No vmid for get_node_openvz_status_umount()") 0 0 0
971 or Net::Proxmox::VE::Exception->throw(
972 'No vmid for get_node_openvz_status_umount()');
973 0 ▶ Net::Proxmox::VE::Exception->throw(
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmid 0 0 0
974 'vmid must be a scalar for get_node_openvz_status_umount()')
975 if ref $vmid;
976  
977 0 return $self->post( $BASEPATH, $node, 'openvz', $vmid, 'status', 'umount' );
978  
979 }
980  
981  
982 2 1;
983  
984 __END__
« VE.pm ↑ Summary VE/Pools.pm »