line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chef::Knife::Cmd::Node::RunList; |
2
|
6
|
|
|
6
|
|
19
|
use Moo; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
20
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
has knife => (is => 'ro', required => 1, handles => [qw/run handle_options/]); |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub add { |
7
|
1
|
|
|
1
|
0
|
622
|
my ($self, $node, $entries_in, %options) = @_; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# build a comma separated list |
10
|
1
|
|
|
|
|
2
|
my @entries = map { $_ . ',' } @$entries_in; # add a comma to every entry |
|
2
|
|
|
|
|
17
|
|
11
|
1
|
|
|
|
|
2
|
chop($entries[-1]); # rm comma from last entry |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
3
|
my @opts = $self->handle_options(%options); |
14
|
1
|
|
|
|
|
4
|
my @cmd = (qw/knife node run_list add/, $node, @entries, @opts); |
15
|
1
|
|
|
|
|
3
|
$self->run(@cmd); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |