line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Fastly::Origin; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
28
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
132
|
|
4
|
4
|
|
|
4
|
|
21
|
use base qw(Net::Fastly::BelongsToServiceAndVersion); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
857
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Net::Fastly::Origin->mk_accessors(qw(service_id name comment)); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::Fastly::Origin - Representation of a logical group of directors - for example the asset server directors from all your DCNs |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 ACCESSORS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head2 service_id |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
The id of the service this belongs to. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head2 version |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
The number of the version this belongs to. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head2 name |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
The domain name of this domain |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 add_director |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Add a director to an origin. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Returns true on success and false on failure. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
sub add_director { |
36
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
37
|
0
|
|
|
|
|
|
my $director = shift; |
38
|
0
|
|
|
|
|
|
my $hash = $self->_fetcher->client->_post($self->_put_path($self)."/director/".$director->name); |
39
|
0
|
|
|
|
|
|
return !!(keys %$hash); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 delete_director |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Delete a director from an origin. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Returns true on success and false on failure. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
sub delete_director { |
50
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
51
|
0
|
|
|
|
|
|
my $director = shift; |
52
|
0
|
|
|
|
|
|
my $hash = $self->_fetcher->client->_delete($self->_put_path($self)."/director/".$director->name); |
53
|
0
|
|
|
|
|
|
return !!(keys %$hash); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |