line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#--------------------------------------------------------------------# |
2
|
|
|
|
|
|
|
# @class : Chef::Rest::Client::role # |
3
|
|
|
|
|
|
|
# @author : Bhavin Patel # |
4
|
|
|
|
|
|
|
#--------------------------------------------------------------------# |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Chef::REST::Client::role; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
972
|
use parent qw { Chef::REST::Client::EndPoints }; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$Chef::REST::Client::role::VERSION = 1.0; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
14
|
0
|
|
|
|
|
|
my $param = {@_}; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(@_); |
17
|
0
|
|
|
|
|
|
bless $self, $class; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
$self->name( |
20
|
|
|
|
|
|
|
$param->{'name' }); |
21
|
0
|
|
|
|
|
|
$self->url( |
22
|
|
|
|
|
|
|
$param->{'url' }); |
23
|
0
|
|
|
|
|
|
$self->run_list( |
24
|
|
|
|
|
|
|
$param->{'run_list' }); |
25
|
0
|
|
|
|
|
|
$self->description( |
26
|
|
|
|
|
|
|
$param->{'description' }); |
27
|
0
|
|
|
|
|
|
$self->override_attributes( |
28
|
|
|
|
|
|
|
$param->{'override_attributes'}); |
29
|
0
|
|
|
|
|
|
$self->default_attributes( |
30
|
|
|
|
|
|
|
$param->{'default_attributes' }); |
31
|
0
|
|
|
|
|
|
$self->env_run_lists( |
32
|
|
|
|
|
|
|
$param->{'env_run_lists' }); |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $self; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
0
|
0
|
|
0
|
1
|
|
sub override_attributes { $_[0]->{'override_attributes'} = $_[1] if defined $_[1]; return $_[0]->{'override_attributes'};} |
|
0
|
|
|
|
|
|
|
38
|
0
|
0
|
|
0
|
0
|
|
sub default_attributes { $_[0]->{'default_attributes' } = $_[1] if defined $_[1]; return $_[0]->{'default_attributes' };} |
|
0
|
|
|
|
|
|
|
39
|
0
|
0
|
|
0
|
1
|
|
sub env_run_lists { $_[0]->{'env_run_lists' } = $_[1] if defined $_[1]; return $_[0]->{'env_run_lists' };} |
|
0
|
|
|
|
|
|
|
40
|
0
|
0
|
|
0
|
1
|
|
sub run_list { $_[0]->{'run_list' } = $_[1] if defined $_[1]; return $_[0]->{'run_list' };} |
|
0
|
|
|
|
|
|
|
41
|
0
|
0
|
|
0
|
1
|
|
sub url { $_[0]->{'url' } = $_[1] if defined $_[1]; return $_[0]->{'url' };} |
|
0
|
|
|
|
|
|
|
42
|
0
|
0
|
|
0
|
1
|
|
sub name { $_[0]->{'name' } = $_[1] if defined $_[1]; return $_[0]->{'name' };} |
|
0
|
|
|
|
|
|
|
43
|
0
|
0
|
|
0
|
1
|
|
sub description { $_[0]->{'description' } = $_[1] if defined $_[1]; return $_[0]->{'descripton' };} |
|
0
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Chef::REST::Client::role |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 VERSION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1.0 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 SYNOPSIS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
use Chef::REST::Client::role; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $obj = new Chef::REST::Client::role( %params ); |
63
|
|
|
|
|
|
|
$obj->name |
64
|
|
|
|
|
|
|
$obj->url |
65
|
|
|
|
|
|
|
$obj->run_list |
66
|
|
|
|
|
|
|
$obj->description |
67
|
|
|
|
|
|
|
$obj->override_attributes |
68
|
|
|
|
|
|
|
$obj->default_attributes |
69
|
|
|
|
|
|
|
$obj->env_run_lists |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 DESCRIPTION |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Class that represents chef role |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 METHODS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 Constructor |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
return new L object. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 name ( $name ) |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
set or get name property |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 url ( $url ) |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
set or get url property |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 run_list ( $run_list ) |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
set or get run_list property |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 description ( $description ) |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
set or get description property |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head2 override_attributes ( $override_attributes ) |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
set or get override_attributes property |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 default ( $default_attributes ) |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
set or get default_attributes property |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 env_run_lists ( $env_run_lists ) |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
set or get env_run_lists property |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 KNOWN BUGS |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 SUPPORT |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
open a github ticket or email comments to Bhavin Patel |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This Software is free to use , licensed under : The Artisic License 2.0 (GPL Compatible) |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=cut |