File Coverage

blib/lib/Linux/LVM2/VG.pm
Criterion Covered Total %
statement 11 13 84.6
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 16 18 88.8


line stmt bran cond sub pod time code
1             package Linux::LVM2::VG;
2             {
3             $Linux::LVM2::VG::VERSION = '0.14';
4             }
5             BEGIN {
6 1     1   1241 $Linux::LVM2::VG::AUTHORITY = 'cpan:TEX';
7             }
8             # ABSTRACT: a class representing an VG in a Linux LVM2
9              
10 1     1   32 use 5.010_000;
  1         3  
  1         41  
11 1     1   6 use mro 'c3';
  1         1  
  1         11  
12 1     1   29 use feature ':5.10';
  1         2  
  1         121  
13              
14 1     1   499 use Moose;
  0            
  0            
15             use namespace::autoclean;
16              
17             # use IO::Handle;
18             # use autodie;
19             # use MooseX::Params::Validate;
20              
21             has 'parent' => (
22             'is' => 'ro',
23             'isa' => 'Linux::LVM2',
24             'required' => 1,
25             'weak_ref' => 1,
26             );
27              
28             has 'name' => (
29             'is' => 'ro',
30             'isa' => 'Str',
31             'required' => 1,
32             );
33              
34             has 'access' => (
35             'is' => 'rw',
36             'isa' => 'Str',
37             'required' => 1,
38             );
39              
40             has 'status' => (
41             'is' => 'rw',
42             'isa' => 'Int',
43             'required' => 1,
44             );
45              
46             has 'vgid' => (
47             'is' => 'ro',
48             'isa' => 'Int',
49             'required' => 1,
50             );
51              
52             has 'maxlvs' => (
53             'is' => 'ro',
54             'isa' => 'Int',
55             'required' => 1,
56             );
57              
58             has 'curlvs' => (
59             'is' => 'rw',
60             'isa' => 'Int',
61             'required' => 1,
62             );
63              
64             has 'openlvs' => (
65             'is' => 'rw',
66             'isa' => 'Int',
67             'required' => 1,
68             );
69              
70             has 'maxlvsize' => (
71             'is' => 'ro',
72             'isa' => 'Int',
73             'required' => 1,
74             );
75              
76             has 'maxpvs' => (
77             'is' => 'ro',
78             'isa' => 'Int',
79             'required' => 1,
80             );
81              
82             has 'curpvs' => (
83             'is' => 'rw',
84             'isa' => 'Int',
85             'required' => 1,
86             );
87              
88             has 'numpvs' => (
89             'is' => 'rw',
90             'isa' => 'Int',
91             'required' => 1,
92             );
93              
94             has 'vgsize' => (
95             'is' => 'rw',
96             'isa' => 'Int',
97             'required' => 1,
98             );
99              
100             has 'pesize' => (
101             'is' => 'rw',
102             'isa' => 'Int',
103             'required' => 1,
104             );
105              
106             has 'totalpe' => (
107             'is' => 'rw',
108             'isa' => 'Int',
109             'required' => 1,
110             );
111              
112             has 'allocpe' => (
113             'is' => 'rw',
114             'isa' => 'Int',
115             'required' => 1,
116             );
117              
118             has 'freepe' => (
119             'is' => 'rw',
120             'isa' => 'Int',
121             'required' => 1,
122             );
123              
124             has 'uuid' => (
125             'is' => 'rw',
126             'isa' => 'Str',
127             'required' => 1,
128             );
129              
130             has 'pvs' => (
131             'is' => 'rw',
132             'isa' => 'HashRef[Linux::LVM2::PV]',
133             'default' => sub { {} },
134             );
135              
136             has 'lvs' => (
137             'is' => 'rw',
138             'isa' => 'HashRef[Linux::LVM2::LV]',
139             'default' => sub { {} },
140             );
141              
142             sub update {
143             my $self = shift;
144             $self->parent()->update();
145             return 1;
146             }
147              
148             no Moose;
149             __PACKAGE__->meta->make_immutable;
150              
151             1;
152              
153             =pod
154              
155             =encoding utf-8
156              
157             =head1 NAME
158              
159             Linux::LVM2::VG - a class representing an VG in a Linux LVM2
160              
161             =head1 SYNOPSIS
162              
163             Instances of this class are usually create by Linux::LVM2::_find_vgs.
164              
165             =head1 DESCRIPTION
166              
167             This clas models a volume-group inside a Linux LVM2 setup.
168              
169             =head1 ATTRIBUTES
170              
171             =head2 parent
172              
173             Our parent node, must be an instance of Linux::LVM2
174              
175             =head2 name
176              
177             The name of this VG.
178              
179             =head2 access
180              
181             UNDOCUMENTED
182              
183             =head2 status
184              
185             UNDOCUMENTED
186              
187             =head2 vgid
188              
189             UNDOCUMENTED
190              
191             =head2 maxlvs
192              
193             UNDOCUMENTED
194              
195             =head2 curlvs
196              
197             UNDOCUMENTED
198              
199             =head2 openlvs
200              
201             UNDOCUMENTED
202              
203             =head2 maxlvsize
204              
205             UNDOCUMENTED
206              
207             =head2 maxpvs
208              
209             UNDOCUMENTED
210              
211             =head2 curpvs
212              
213             UNDOCUMENTED
214              
215             =head2 numpvs
216              
217             UNDOCUMENTED
218              
219             =head2 vgsize
220              
221             UNDOCUMENTED
222              
223             =head2 pesize
224              
225             UNDOCUMENTED
226              
227             =head2 totalpe
228              
229             UNDOCUMENTED
230              
231             =head2 allocpe
232              
233             UNDOCUMENTED
234              
235             =head2 freepe
236              
237             UNDOCUMENTED
238              
239             =head2 uuid
240              
241             UNDOCUMENTED
242              
243             =head2 pvs
244              
245             UNDOCUMENTED
246              
247             =head2 lvs
248              
249             UNDOCUMENTED
250              
251             =head1 METHODS
252              
253             =head2 update
254              
255             Synchronize the model with the underlying data structures.
256              
257             =head1 NAME
258              
259             Linux::LVM2::VG - Model a LVM2 volume-group.
260              
261             =head1 AUTHOR
262              
263             Dominik Schulz <dominik.schulz@gauner.org>
264              
265             =head1 COPYRIGHT AND LICENSE
266              
267             This software is copyright (c) 2012 by Dominik Schulz.
268              
269             This is free software; you can redistribute it and/or modify it under
270             the same terms as the Perl 5 programming language system itself.
271              
272             =cut
273              
274             __END__
275              
276              
277             1; # End of Linux::LVM2::VG