hammer_cli_foreman_remote_execution 0.3.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 728c575df08eaa7700ff80da947324200ddcf3d30472e8169659371024f43295
|
|
4
|
+
data.tar.gz: e32c8cb6341618664b69e2f442f811d83fd91b599091af49f9bcbbf800121cd0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e674f549716085bb6fee409a93d42e391fbcadd0e162f3369200b75fdf381883ec7e7a089289831d7b82547cd1e1789c6e18c15dbc9c9de98cd724d626cd603
|
|
7
|
+
data.tar.gz: f1648d88367a4aabc09eb132bd36a2082c6bf840af09646037908e0cbc881b9e70677116d999f8b34dcf2c031850168157c0f985c391664f86d00a308bc36084
|
|
@@ -25,6 +25,7 @@ module HammerCLIForemanRemoteExecution
|
|
|
25
25
|
field :description, _('Description'), Fields::Text
|
|
26
26
|
field :cloned_from_id, _("Cloned from id"), nil, :hide_blank => true
|
|
27
27
|
field :template_inputs, _('Inputs')
|
|
28
|
+
field :locked, _('Locked')
|
|
28
29
|
HammerCLIForeman::References.taxonomies(self)
|
|
29
30
|
end
|
|
30
31
|
|
|
@@ -59,6 +60,28 @@ module HammerCLIForemanRemoteExecution
|
|
|
59
60
|
end
|
|
60
61
|
end
|
|
61
62
|
|
|
63
|
+
class CloneCommand < HammerCLIForeman::CreateCommand
|
|
64
|
+
command_name 'clone'
|
|
65
|
+
action :clone
|
|
66
|
+
desc _('Clone a job template')
|
|
67
|
+
|
|
68
|
+
option '--new-name', 'NEW_NAME', N_('Name for the cloned template'),
|
|
69
|
+
:attribute_name => :option_new_name, :required => true
|
|
70
|
+
|
|
71
|
+
success_message _('Job template cloned')
|
|
72
|
+
failure_message _('Could not clone the job template')
|
|
73
|
+
|
|
74
|
+
def request_params
|
|
75
|
+
params = super
|
|
76
|
+
params['job_template']['name'] = option_new_name
|
|
77
|
+
params
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
build_options do |o|
|
|
81
|
+
o.without(:name)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
62
85
|
class ImportCommand < HammerCLIForeman::CreateCommand
|
|
63
86
|
command_name 'import'
|
|
64
87
|
action :import
|
|
@@ -38,7 +38,7 @@ describe HammerCLIForemanRemoteExecution::JobTemplate do
|
|
|
38
38
|
|
|
39
39
|
describe 'output' do
|
|
40
40
|
with_params ['--id=1'] do
|
|
41
|
-
it_should_print_columns ['ID', 'Name', 'Job Category', 'Provider', 'Type']
|
|
41
|
+
it_should_print_columns ['ID', 'Name', 'Job Category', 'Provider', 'Type', 'Locked']
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -108,4 +108,13 @@ describe HammerCLIForemanRemoteExecution::JobTemplate do
|
|
|
108
108
|
'--provider-type=SSH']
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
|
+
|
|
112
|
+
describe 'CloneCommand' do
|
|
113
|
+
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::CloneCommand.new('', ctx) }
|
|
114
|
+
|
|
115
|
+
describe 'parameters' do
|
|
116
|
+
it_should_accept 'id and new-name', ['--id=1', '--new-name=Cloned Template']
|
|
117
|
+
it_should_accept 'name and new-name', ['--name=Parent Template', '--new-name=Cloned Template']
|
|
118
|
+
end
|
|
119
|
+
end
|
|
111
120
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hammer_cli_foreman_remote_execution
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Foreman Remote Execution team
|
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
128
|
- !ruby/object:Gem::Version
|
|
129
129
|
version: '0'
|
|
130
130
|
requirements: []
|
|
131
|
-
rubygems_version:
|
|
131
|
+
rubygems_version: 4.0.3
|
|
132
132
|
specification_version: 4
|
|
133
133
|
summary: CLI for the Foreman remote execution plugin
|
|
134
134
|
test_files:
|