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