line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# vim: set ts=3 sw=3 tw=0: |
5
|
|
|
|
|
|
|
# vim: set expandtab: |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
WebService::ProfitBricks::Image - Manages Images |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Manage the images. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my @images = Images->list; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package WebService::ProfitBricks::Image; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
2039
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
24
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
11
|
use WebService::ProfitBricks::Class; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
99
|
|
27
|
1
|
|
|
1
|
|
6
|
use base qw(WebService::ProfitBricks); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
79
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
attrs qw/imageId |
30
|
|
|
|
|
|
|
imageName |
31
|
|
|
|
|
|
|
imageType |
32
|
|
|
|
|
|
|
writeable |
33
|
|
|
|
|
|
|
cpuHotpluggable |
34
|
|
|
|
|
|
|
memoryHotpluggable |
35
|
|
|
|
|
|
|
region |
36
|
|
|
|
|
|
|
osType/; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
does find => { through => "imageName" }; |
39
|
|
|
|
|
|
|
does list => { through => "getAllImages" }; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has_many server => "WebService::ProfitBricks::Server" => { |
42
|
|
|
|
|
|
|
through => sub { |
43
|
|
|
|
|
|
|
my ($self) = @_; |
44
|
|
|
|
|
|
|
map { $_ = { serverId => $_ } } $self->serverIds; |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
}; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
"Mirror Mirror on the wall"; |