line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chef::Knife::Cmd::Node; |
2
|
6
|
|
|
6
|
|
21
|
use feature qw/say/; |
|
6
|
|
|
|
|
5
|
|
|
6
|
|
|
|
|
399
|
|
3
|
6
|
|
|
6
|
|
20
|
use Moo; |
|
6
|
|
|
|
|
6
|
|
|
6
|
|
|
|
|
20
|
|
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
1126
|
use Chef::Knife::Cmd::Node::RunList; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
101
|
|
6
|
6
|
|
|
6
|
|
1944
|
use Chef::Knife::Cmd::Node::From; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
1764
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has knife => (is => 'ro', required => 1, handles => [qw/handle_options run/]); |
9
|
|
|
|
|
|
|
has run_list => (is => 'lazy'); |
10
|
|
|
|
|
|
|
has from => (is => 'lazy'); |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
628
|
sub _build_run_list { Chef::Knife::Cmd::Node::RunList->new(knife => shift) } |
13
|
1
|
|
|
1
|
|
647
|
sub _build_from { Chef::Knife::Cmd::Node::From->new(knife => shift) } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub show { |
16
|
1
|
|
|
1
|
0
|
748
|
my ($self, $node, %options) = @_; |
17
|
1
|
|
|
|
|
4
|
my @opts = $self->handle_options(%options); |
18
|
1
|
|
|
|
|
2
|
my @cmd = (qw/knife node show/, $node, @opts); |
19
|
1
|
|
|
|
|
3
|
$self->run(@cmd); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub delete { |
23
|
1
|
|
|
1
|
0
|
302
|
my ($self, $node, %options) = @_; |
24
|
1
|
|
|
|
|
29
|
my @opts = $self->handle_options(%options); |
25
|
1
|
|
|
|
|
3
|
my @cmd = (qw/knife node delete/, $node, @opts); |
26
|
1
|
|
|
|
|
15
|
$self->run(@cmd); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub create { |
30
|
1
|
|
|
1
|
0
|
463
|
my ($self, $node, %options) = @_; |
31
|
1
|
|
|
|
|
16
|
my @opts = $self->handle_options(%options); |
32
|
1
|
|
|
|
|
2
|
my @cmd = (qw/knife node create/, $node, @opts); |
33
|
1
|
|
|
|
|
16
|
$self->run(@cmd); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub list { |
37
|
1
|
|
|
1
|
0
|
337
|
my ($self, $node, %options) = @_; |
38
|
1
|
|
|
|
|
15
|
my @opts = $self->handle_options(%options); |
39
|
1
|
|
|
|
|
3
|
my @cmd = (qw/knife node list/, @opts); |
40
|
1
|
|
|
|
|
14
|
$self->run(@cmd); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub flip { |
44
|
1
|
|
|
1
|
0
|
332
|
my ($self, $node, $environment, %options) = @_; |
45
|
1
|
|
|
|
|
15
|
my @opts = $self->handle_options(%options); |
46
|
1
|
|
|
|
|
3
|
my @cmd = (qw/knife node flip/, $node, $environment, @opts); |
47
|
1
|
|
|
|
|
14
|
$self->run(@cmd); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |