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