line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Chef::Knife::Cmd::Vault; |
2
|
6
|
|
|
6
|
|
25
|
use Moo; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
32
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
has knife => (is => 'ro', required => 1, handles => [qw/handle_options run/]); |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub create { |
7
|
1
|
|
|
1
|
0
|
674
|
my ($self, $vault, $item, $values, %options) = @_; |
8
|
1
|
|
|
|
|
17
|
my @opts = $self->handle_options(%options); |
9
|
1
|
|
|
|
|
2
|
my @cmd = (qw/knife vault create/, $vault, $item); |
10
|
1
|
50
|
|
|
|
6
|
push @cmd, $values if $values; |
11
|
1
|
|
|
|
|
2
|
push @cmd, @opts; |
12
|
1
|
|
|
|
|
17
|
$self->run(@cmd); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub update { |
16
|
1
|
|
|
1
|
0
|
954
|
my ($self, $vault, $item, $values, %options) = @_; |
17
|
1
|
|
|
|
|
15
|
my @opts = $self->handle_options(%options); |
18
|
1
|
|
|
|
|
3
|
my @cmd = (qw/knife vault update/, $vault, $item); |
19
|
1
|
50
|
|
|
|
3
|
push @cmd, $values if $values; |
20
|
1
|
|
|
|
|
3
|
push @cmd, @opts; |
21
|
1
|
|
|
|
|
15
|
$self->run(@cmd); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub delete { |
25
|
1
|
|
|
1
|
0
|
542
|
my ($self, $vault, $item, %options) = @_; |
26
|
1
|
|
|
|
|
16
|
my @opts = $self->handle_options(%options); |
27
|
1
|
|
|
|
|
4
|
my @cmd = (qw/knife vault delete/, $vault, $item); |
28
|
1
|
|
|
|
|
3
|
push @cmd, @opts; |
29
|
1
|
|
|
|
|
13
|
$self->run(@cmd); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub show { |
33
|
1
|
|
|
1
|
0
|
500
|
my ($self, $vault, $item, %options) = @_; |
34
|
1
|
|
|
|
|
15
|
my @opts = $self->handle_options(%options); |
35
|
1
|
|
|
|
|
4
|
my @cmd = (qw/knife vault show/, $vault); |
36
|
1
|
50
|
|
|
|
4
|
push @cmd, $item if $item; |
37
|
1
|
|
|
|
|
2
|
push @cmd, @opts; |
38
|
1
|
|
|
|
|
14
|
$self->run(@cmd); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub list { |
42
|
1
|
|
|
1
|
0
|
464
|
my ($self, %options) = @_; |
43
|
1
|
|
|
|
|
15
|
my @opts = $self->handle_options(%options); |
44
|
1
|
|
|
|
|
3
|
my @cmd = (qw/knife vault list/); |
45
|
1
|
|
|
|
|
2
|
push @cmd, @opts; |
46
|
1
|
|
|
|
|
14
|
$self->run(@cmd); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub remove { |
50
|
1
|
|
|
1
|
0
|
473
|
my ($self, $vault, $item, $values, %options) = @_; |
51
|
1
|
|
|
|
|
15
|
my @opts = $self->handle_options(%options); |
52
|
1
|
|
|
|
|
3
|
my @cmd = (qw/knife vault remove/, $vault, $item); |
53
|
1
|
50
|
|
|
|
3
|
push @cmd, $values if $values; |
54
|
1
|
|
|
|
|
3
|
push @cmd, @opts; |
55
|
1
|
|
|
|
|
14
|
$self->run(@cmd); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub download { |
59
|
1
|
|
|
1
|
0
|
486
|
my ($self, $vault, $item, $path, %options) = @_; |
60
|
1
|
|
|
|
|
14
|
my @opts = $self->handle_options(%options); |
61
|
1
|
|
|
|
|
4
|
my @cmd = (qw/knife vault download/, $vault, $item, $path); |
62
|
1
|
|
|
|
|
2
|
push @cmd, @opts; |
63
|
1
|
|
|
|
|
13
|
$self->run(@cmd); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |