Virt/StorageVol.pm

filter: Statementstmt 36.8% 45 / 122 Branchbran n/a Conditioncond 0.0% 0 / 16 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 36.0% 9 / 25 Podpod 87.5% 14 / 16 totaltotal 36.3% 68 / 187 CC 17 SCAR 20.3
CC
17
Cov
33%
delete
12.0
download
12.0
get_info_flags
12.0
CRAP 7.6
« Virt/DomainSnapshot.pm ↑ Summary Virt/NetworkPort.pm »
1 ####################################################################
2 #
3 # This file was generated using XDR::Parse version v1.0.1
4 # and LibVirt version v12.9.0
5 #
6 # Don't edit this file, use the source template instead
7 #
8 # ANY CHANGES HERE WILL BE LOST !
9 #
10 ####################################################################
11  
12  
13 1 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use experimental 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use Future::AsyncAwait;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 class Sys::Async::Virt::StorageVol v0.6.9;
20  
21 1 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 ▶use Log::Any qw($log);
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 1 ▶use Protocol::Sys::Virt::Remote::XDR v12.9.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 my $remote = 'Protocol::Sys::Virt::Remote::XDR';
26  
27 1 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 FILE => 0,
29 BLOCK => 1,
30 DIR => 2,
31 NETWORK => 3,
32 NETDIR => 4,
33 PLOOP => 5,
34 DELETE_NORMAL => 0,
35 DELETE_ZEROED => 1 << 0,
36 DELETE_WITH_SNAPSHOTS => 1 << 1,
37 WIPE_ALG_ZERO => 0,
38 WIPE_ALG_NNSA => 1,
39 WIPE_ALG_DOD => 2,
40 WIPE_ALG_BSI => 3,
41 WIPE_ALG_GUTMANN => 4,
42 WIPE_ALG_SCHNEIER => 5,
43 WIPE_ALG_PFITZNER7 => 6,
44 WIPE_ALG_PFITZNER33 => 7,
45 WIPE_ALG_RANDOM => 8,
46 WIPE_ALG_TRIM => 9,
47 USE_ALLOCATION => 0,
48 GET_PHYSICAL => 1 << 0,
49 DOWNLOAD_SPARSE_STREAM => 1 << 0,
50 UPLOAD_SPARSE_STREAM => 1 << 0,
51 RESIZE_ALLOCATE => 1 << 0,
52 RESIZE_DELTA => 1 << 1,
53 RESIZE_SHRINK => 1 << 2,
54 1 };
55  
56  
57 0 ▶field $_rpc_id :param :reader;
Subroutine rpc_id: not called CC=1 SCAR=2.6
Pod undocumented
58 0 ▶field $_client :param :reader;
Subroutine client: not called CC=1 SCAR=2.6
Pod undocumented
59  
60 0 ▶method key() {
Subroutine key: not called CC=1 SCAR=6.9
Pod documented
61 0 return $_rpc_id->{key};
62 1 }
63  
64 0 ▶method name() {
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
65 0 return $_rpc_id->{name};
66 1 }
67  
68 0 ▶method pool() {
Subroutine pool: not called CC=1 SCAR=6.9
Pod documented
69 0 return $_client->_storage_pool_instance( $_rpc_id->{pool} );
70 1 }
71  
72 0 ▶method delete($flags = 0) {
Subroutine delete: not called CC=3 SCAR=24.8
Pod documented
73 0 ▶ return $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
74 $remote->PROC_STORAGE_VOL_DELETE,
75 { vol => $_rpc_id, flags => $flags // 0 }, empty => 1 );
76 1 }
77  
78 0 ▶method download($offset, $length, $flags = 0) {
Subroutine download: not called CC=3 SCAR=24.8
Pod documented
79 0 ▶ return $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
80 $remote->PROC_STORAGE_VOL_DOWNLOAD,
81 { vol => $_rpc_id, offset => $offset, length => $length, flags => $flags // 0 }, stream => 'read', empty => 1 );
82 1 }
83  
84 0 ▶method get_info() {
Subroutine get_info: not called CC=1 SCAR=6.9
Pod documented
85 0 return $_client->_call(
86 $remote->PROC_STORAGE_VOL_GET_INFO,
87 { vol => $_rpc_id } );
88 1 }
89  
90 0 ▶method get_info_flags($flags = 0) {
Subroutine get_info_flags: not called CC=3 SCAR=24.8
Pod documented
91 0 ▶ return $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
92 $remote->PROC_STORAGE_VOL_GET_INFO_FLAGS,
93 { vol => $_rpc_id, flags => $flags // 0 } );
94 1 }
95  
96 0 ▶async method get_path() {
Subroutine get_path: not called CC=1 SCAR=6.9
Pod documented
97 0 return await $_client->_call(
98 $remote->PROC_STORAGE_VOL_GET_PATH,
99 { vol => $_rpc_id }, unwrap => 'name' );
100 1 }
101  
102 0 ▶async method get_xml_desc($flags = 0) {
Subroutine get_xml_desc: not called CC=3 SCAR=24.8
Pod documented
103 0 ▶ return await $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
104 $remote->PROC_STORAGE_VOL_GET_XML_DESC,
105 { vol => $_rpc_id, flags => $flags // 0 }, unwrap => 'xml' );
106 1 }
107  
108 0 ▶async method pool_lookup_by_volume() {
Subroutine pool_lookup_by_volume: not called CC=1 SCAR=6.9
Pod documented
109 0 return await $_client->_call(
110 $remote->PROC_STORAGE_POOL_LOOKUP_BY_VOLUME,
111 { vol => $_rpc_id }, unwrap => 'pool' );
112 1 }
113  
114 0 ▶method resize($capacity, $flags = 0) {
Subroutine resize: not called CC=3 SCAR=24.8
Pod documented
115 0 ▶ return $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
116 $remote->PROC_STORAGE_VOL_RESIZE,
117 { vol => $_rpc_id, capacity => $capacity, flags => $flags // 0 }, empty => 1 );
118 1 }
119  
120 0 ▶method upload($offset, $length, $flags = 0) {
Subroutine upload: not called CC=3 SCAR=24.8
Pod documented
121 0 ▶ return $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
122 $remote->PROC_STORAGE_VOL_UPLOAD,
123 { vol => $_rpc_id, offset => $offset, length => $length, flags => $flags // 0 }, stream => 'write', empty => 1 );
124 1 }
125  
126 0 ▶method wipe($flags = 0) {
Subroutine wipe: not called CC=3 SCAR=24.8
Pod documented
127 0 ▶ return $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
128 $remote->PROC_STORAGE_VOL_WIPE,
129 { vol => $_rpc_id, flags => $flags // 0 }, empty => 1 );
130 1 }
131  
132 0 ▶method wipe_pattern($algorithm, $flags = 0) {
Subroutine wipe_pattern: not called CC=3 SCAR=24.8
Pod documented
133 0 ▶ return $_client->_call(
Condition0%0/2
$flags // 0
l!l
00
MC/DC0%0/1
$flags // 0
$flags
Truth table0%0/2
A
A= $flags
Aresult
11
00
134 $remote->PROC_STORAGE_VOL_WIPE_PATTERN,
135 { vol => $_rpc_id, algorithm => $algorithm, flags => $flags // 0 }, empty => 1 );
136 1 }
137  
138  
139  
140 1 1;
141  
142  
143 __END__
« Virt/DomainSnapshot.pm ↑ Summary Virt/NetworkPort.pm »