| 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
|
|
11
|
use v5.26; |
|
|
1
|
|
|
|
|
3
|
|
|
14
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
44
|
|
|
15
|
1
|
|
|
1
|
|
3
|
use experimental 'signatures'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
7
|
|
|
16
|
1
|
|
|
1
|
|
204
|
use Future::AsyncAwait; |
|
|
1
|
|
|
|
|
10
|
|
|
|
1
|
|
|
|
|
8
|
|
|
17
|
1
|
|
|
1
|
|
54
|
use Object::Pad; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
8
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
class Sys::Async::Virt::Connection::Factory v0.6.1; |
|
20
|
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
295
|
use Carp qw(croak); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
46
|
|
|
22
|
1
|
|
|
1
|
|
5
|
use Log::Any qw($log); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
11
|
|
|
23
|
1
|
|
|
1
|
|
254
|
use Protocol::Sys::Virt::URI; # imports 'parse_url' |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
1297
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our @default_drivers = ( |
|
26
|
|
|
|
|
|
|
{ transport => '', class => 'Local', host => 0 }, |
|
27
|
|
|
|
|
|
|
{ transport => 'unix', class => 'Local', host => 0 }, |
|
28
|
|
|
|
|
|
|
{ transport => '', class => 'TLS', host => 1 }, |
|
29
|
|
|
|
|
|
|
{ transport => 'tls', class => 'TLS' }, |
|
30
|
|
|
|
|
|
|
{ transport => 'tcp', class => 'TCP' }, |
|
31
|
|
|
|
|
|
|
{ transport => 'ext', class => 'Process' }, |
|
32
|
|
|
|
|
|
|
{ transport => 'ssh', class => 'SSH' }, |
|
33
|
|
|
|
|
|
|
); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
field $_drivers :param = \@default_drivers; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Not documented in the POD: not a method |
|
39
|
0
|
|
|
0
|
|
|
sub _cls_name($n) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
return ($n =~ s/^\+//) |
|
41
|
|
|
|
|
|
|
? $n : "Sys::Async::Virt::Connection::$n"; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
0
|
|
|
0
|
1
|
|
method create_connection( $url, %args ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my %components = parse_url( $url ); |
|
46
|
0
|
|
0
|
|
|
|
my $transport = $components{transport} // ''; |
|
47
|
0
|
|
0
|
|
|
|
my $host = $components{host} // ''; |
|
48
|
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
for my $driver ($_drivers->@*) { |
|
50
|
0
|
0
|
|
|
|
|
if ($transport eq $driver->{transport}) { |
|
51
|
0
|
0
|
|
|
|
|
if (defined $driver->{host}) { |
|
52
|
0
|
0
|
0
|
|
|
|
if (($driver->{host} and $host) |
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
53
|
|
|
|
|
|
|
or (not $driver->{host} and not $host)) { |
|
54
|
0
|
|
|
|
|
|
my $c = _cls_name( $driver->{class} ); |
|
55
|
0
|
0
|
|
|
|
|
if (not eval "require $c; 1") { |
|
56
|
0
|
|
|
|
|
|
die @!; |
|
57
|
|
|
|
|
|
|
} |
|
58
|
0
|
|
|
|
|
|
return $c->new( url => $url, %args ); |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
else { # "host" not defined, so not required |
|
62
|
0
|
|
|
|
|
|
my $c = _cls_name( $driver->{class} ); |
|
63
|
0
|
0
|
|
|
|
|
if (not eval "require $c; 1") { |
|
64
|
0
|
|
|
|
|
|
die @!; |
|
65
|
|
|
|
|
|
|
} |
|
66
|
0
|
|
|
|
|
|
return $c->new( url => $url, %args ); |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
die $log->fatal( "No handler for: $url" ); |
|
72
|
|
|
|
|
|
|
} |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
1; |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
__END__ |