Virt/StoragePool.pm

filter: Statementstmt 31.9% 52 / 163 Branchbran n/a Conditioncond 0.0% 0 / 16 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 28.1% 9 / 32 Podpod 91.3% 21 / 23 totaltotal 33.8% 82 / 242 CC 17 SCAR 19.1
CC
17
Cov
29%
build
12.0
create
12.0
delete
12.0
CRAP 6.8
« Virt/NodeDevice.pm ↑ Summary Virt/Network.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::StoragePool 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 INACTIVE => 0,
29 BUILDING => 1,
30 RUNNING => 2,
31 DEGRADED => 3,
32 INACCESSIBLE => 4,
33 BUILD_NEW => 0,
34 BUILD_REPAIR => (1 << 0),
35 BUILD_RESIZE => (1 << 1),
36 BUILD_NO_OVERWRITE => (1 << 2),
37 BUILD_OVERWRITE => (1 << 3),
38 DELETE_NORMAL => 0,
39 DELETE_ZEROED => 1 << 0,
40 XML_INACTIVE => (1 << 0),
41 EVENT_DEFINED => 0,
42 EVENT_UNDEFINED => 1,
43 EVENT_STARTED => 2,
44 EVENT_STOPPED => 3,
45 EVENT_CREATED => 4,
46 EVENT_DELETED => 5,
47 1 };
48  
49  
50 0 ▶field $_rpc_id :param :reader;
Subroutine rpc_id: not called CC=1 SCAR=2.6
Pod undocumented
51 0 ▶field $_client :param :reader;
Subroutine client: not called CC=1 SCAR=2.6
Pod undocumented
52  
53 0 ▶method name() {
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
54 0 return $_rpc_id->{name};
55 1 }
56  
57 0 ▶method uuid() {
Subroutine uuid: not called CC=1 SCAR=6.9
Pod documented
58 0 return $_rpc_id->{uuid};
59 1 }
60  
61 0 ▶method uuid_string() {
Subroutine uuid_string: not called CC=1 SCAR=6.9
Pod documented
62 0 return join( '-', unpack('H8H4H4H4H12', $_rpc_id->{uuid}) );
63 1 }
64  
65  
66 0 ▶method build($flags = 0) {
Subroutine build: not called CC=3 SCAR=24.8
Pod documented
67 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
68 $remote->PROC_STORAGE_POOL_BUILD,
69 { pool => $_rpc_id, flags => $flags // 0 }, empty => 1 );
70 1 }
71  
72 0 ▶method create($flags = 0) {
Subroutine create: 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_POOL_CREATE,
75 { pool => $_rpc_id, flags => $flags // 0 }, empty => 1 );
76 1 }
77  
78 0 ▶method delete($flags = 0) {
Subroutine delete: 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_POOL_DELETE,
81 { pool => $_rpc_id, flags => $flags // 0 }, empty => 1 );
82 1 }
83  
84 0 ▶method destroy() {
Subroutine destroy: not called CC=1 SCAR=6.9
Pod documented
85 0 return $_client->_call(
86 $remote->PROC_STORAGE_POOL_DESTROY,
87 { pool => $_rpc_id }, empty => 1 );
88 1 }
89  
90 0 ▶async method get_autostart() {
Subroutine get_autostart: not called CC=1 SCAR=6.9
Pod documented
91 0 return await $_client->_call(
92 $remote->PROC_STORAGE_POOL_GET_AUTOSTART,
93 { pool => $_rpc_id }, unwrap => 'autostart' );
94 1 }
95  
96 0 ▶method get_info() {
Subroutine get_info: not called CC=1 SCAR=6.9
Pod documented
97 0 return $_client->_call(
98 $remote->PROC_STORAGE_POOL_GET_INFO,
99 { pool => $_rpc_id } );
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_POOL_GET_XML_DESC,
105 { pool => $_rpc_id, flags => $flags // 0 }, unwrap => 'xml' );
106 1 }
107  
108 0 ▶async method is_active() {
Subroutine is_active: not called CC=1 SCAR=6.9
Pod documented
109 0 return await $_client->_call(
110 $remote->PROC_STORAGE_POOL_IS_ACTIVE,
111 { pool => $_rpc_id }, unwrap => 'active' );
112 1 }
113  
114 0 ▶async method is_persistent() {
Subroutine is_persistent: not called CC=1 SCAR=6.9
Pod documented
115 0 return await $_client->_call(
116 $remote->PROC_STORAGE_POOL_IS_PERSISTENT,
117 { pool => $_rpc_id }, unwrap => 'persistent' );
118 1 }
119  
120 0 ▶async method list_all_volumes($flags = 0) {
Subroutine list_all_volumes: not called CC=3 SCAR=24.8
Pod documented
121 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
122 $remote->PROC_STORAGE_POOL_LIST_ALL_VOLUMES,
123 { pool => $_rpc_id, need_results => $remote->STORAGE_VOL_LIST_MAX, flags => $flags // 0 }, unwrap => 'vols' );
124 1 }
125  
126 0 ▶async method list_volumes() {
Subroutine list_volumes: not called CC=1 SCAR=6.9
Pod documented
127 0 return await $_client->_call(
128 $remote->PROC_STORAGE_POOL_LIST_VOLUMES,
129 { pool => $_rpc_id, maxnames => $remote->STORAGE_VOL_LIST_MAX }, unwrap => 'names' );
130 1 }
131  
132 0 ▶async method num_of_volumes() {
Subroutine num_of_volumes: not called CC=1 SCAR=6.9
Pod documented
133 0 return await $_client->_call(
134 $remote->PROC_STORAGE_POOL_NUM_OF_VOLUMES,
135 { pool => $_rpc_id }, unwrap => 'num' );
136 1 }
137  
138 0 ▶method refresh($flags = 0) {
Subroutine refresh: not called CC=3 SCAR=24.8
Pod documented
139 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
140 $remote->PROC_STORAGE_POOL_REFRESH,
141 { pool => $_rpc_id, flags => $flags // 0 }, empty => 1 );
142 1 }
143  
144 0 ▶method set_autostart($autostart) {
Subroutine set_autostart: not called CC=1 SCAR=6.9
Pod documented
145 0 return $_client->_call(
146 $remote->PROC_STORAGE_POOL_SET_AUTOSTART,
147 { pool => $_rpc_id, autostart => $autostart }, empty => 1 );
148 1 }
149  
150 0 ▶method undefine() {
Subroutine undefine: not called CC=1 SCAR=6.9
Pod documented
151 0 return $_client->_call(
152 $remote->PROC_STORAGE_POOL_UNDEFINE,
153 { pool => $_rpc_id }, empty => 1 );
154 1 }
155  
156 0 ▶async method vol_create_xml($xml, $flags = 0) {
Subroutine vol_create_xml: not called CC=3 SCAR=24.8
Pod documented
157 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
158 $remote->PROC_STORAGE_VOL_CREATE_XML,
159 { pool => $_rpc_id, xml => $xml, flags => $flags // 0 }, unwrap => 'vol' );
160 1 }
161  
162 0 ▶async method vol_create_xml_from($xml, $clonevol, $flags = 0) {
Subroutine vol_create_xml_from: not called CC=3 SCAR=24.8
Pod documented
163 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
164 $remote->PROC_STORAGE_VOL_CREATE_XML_FROM,
165 { pool => $_rpc_id, xml => $xml, clonevol => $clonevol, flags => $flags // 0 }, unwrap => 'vol' );
166 1 }
167  
168 0 ▶async method vol_lookup_by_name($name) {
Subroutine vol_lookup_by_name: not called CC=1 SCAR=6.9
Pod documented
169 0 return await $_client->_call(
170 $remote->PROC_STORAGE_VOL_LOOKUP_BY_NAME,
171 { pool => $_rpc_id, name => $name }, unwrap => 'vol' );
172 1 }
173  
174  
175  
176 1 1;
177  
178  
179 __END__
« Virt/NodeDevice.pm ↑ Summary Virt/Network.pm »