File Coverage

blib/lib/Sys/Async/Virt/NwFilter.pm
Criterion Covered Total %
statement 23 49 46.9
branch n/a
condition n/a
subroutine 8 15 53.3
pod 5 7 71.4
total 36 71 50.7


line stmt bran cond sub pod time code
1             ####################################################################
2             #
3             # This file was generated using XDR::Parse version v1.0.1
4             # and LibVirt version v12.1.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     1   10 use v5.26;
  1         3  
14 1     1   4 use warnings;
  1         1  
  1         45  
15 1     1   3 use experimental 'signatures';
  1         1  
  1         6  
16 1     1   102 use Future::AsyncAwait;
  1         1  
  1         5  
17 1     1   35 use Object::Pad;
  1         1  
  1         6  
18              
19             class Sys::Async::Virt::NwFilter v0.6.1;
20              
21 1     1   236 use Carp qw(croak);
  1         2  
  1         46  
22 1     1   3 use Log::Any qw($log);
  1         2  
  1         6  
23              
24 1     1   223 use Protocol::Sys::Virt::Remote::XDR v12.1.0;
  1         11  
  1         1379  
25             my $remote = 'Protocol::Sys::Virt::Remote::XDR';
26              
27              
28              
29 0     0 0   field $_rpc_id :param :reader;
  0            
30 0     0 0   field $_client :param :reader;
  0            
31              
32 0     0 1   method name() {
  0            
  0            
33 0           return $_rpc_id->{name};
34             }
35              
36 0     0 1   method uuid() {
  0            
  0            
37 0           return $_rpc_id->{uuid};
38             }
39              
40 0     0 1   method uuid_string() {
  0            
  0            
41 0           return join( '-', unpack('H8H4H4H4H12', $_rpc_id->{uuid}) );
42             }
43              
44              
45 0     0 1   async method get_xml_desc($flags = 0) {
  0            
  0            
  0            
  0            
46 0           return await $_client->_call(
47             $remote->PROC_NWFILTER_GET_XML_DESC,
48             { nwfilter => $_rpc_id, flags => $flags // 0 }, unwrap => 'xml' );
49             }
50              
51 0     0 1   method undefine() {
  0            
  0            
52 0           return $_client->_call(
53             $remote->PROC_NWFILTER_UNDEFINE,
54             { nwfilter => $_rpc_id }, empty => 1 );
55             }
56              
57              
58              
59             1;
60              
61             __END__