File Coverage

blib/lib/API/Docker/Network.pm
Criterion Covered Total %
statement 6 14 42.8
branch n/a
condition n/a
subroutine 2 6 33.3
pod 4 4 100.0
total 12 24 50.0


line stmt bran cond sub pod time code
1             package API::Docker::Network;
2             # ABSTRACT: Docker network entity
3             our $VERSION = '0.001';
4 7     7   42 use Moo;
  7         12  
  7         41  
5 7     7   2606 use namespace::clean;
  7         14  
  7         41  
6              
7              
8             has client => (
9             is => 'ro',
10             weak_ref => 1,
11             );
12              
13              
14             has Id => (is => 'ro');
15              
16              
17             has Name => (is => 'ro');
18              
19              
20             has Created => (is => 'ro');
21             has Scope => (is => 'ro');
22             has Driver => (is => 'ro');
23              
24              
25             has EnableIPv6 => (is => 'ro');
26             has IPAM => (is => 'ro');
27             has Internal => (is => 'ro');
28             has Attachable => (is => 'ro');
29             has Ingress => (is => 'ro');
30             has Options => (is => 'ro');
31             has Labels => (is => 'ro');
32             has Containers => (is => 'ro');
33             has ConfigFrom => (is => 'ro');
34             has ConfigOnly => (is => 'ro');
35              
36             sub inspect {
37 0     0 1   my ($self) = @_;
38 0           return $self->client->networks->inspect($self->Id);
39             }
40              
41              
42             sub remove {
43 0     0 1   my ($self) = @_;
44 0           return $self->client->networks->remove($self->Id);
45             }
46              
47              
48             sub connect {
49 0     0 1   my ($self, %opts) = @_;
50 0           return $self->client->networks->connect($self->Id, %opts);
51             }
52              
53              
54             sub disconnect {
55 0     0 1   my ($self, %opts) = @_;
56 0           return $self->client->networks->disconnect($self->Id, %opts);
57             }
58              
59              
60              
61             1;
62              
63             __END__