hammer_cli_foreman_remote_execution 0.0.4 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +4 -0
- data/.travis.yml +5 -3
- data/.tx/config +8 -0
- data/Gemfile +8 -3
- data/README.md +53 -14
- data/Rakefile +19 -8
- data/hammer_cli_foreman_remote_execution.gemspec +3 -3
- data/lib/hammer_cli_foreman_remote_execution.rb +1 -0
- data/lib/hammer_cli_foreman_remote_execution/foreign_input_set.rb +4 -4
- data/lib/hammer_cli_foreman_remote_execution/i18n.rb +13 -1
- data/lib/hammer_cli_foreman_remote_execution/job_invocation.rb +65 -7
- data/lib/hammer_cli_foreman_remote_execution/job_template.rb +31 -1
- data/lib/hammer_cli_foreman_remote_execution/remote_execution_feature.rb +41 -0
- data/lib/hammer_cli_foreman_remote_execution/template_input.rb +12 -4
- data/lib/hammer_cli_foreman_remote_execution/version.rb +1 -1
- data/locale/Makefile +57 -0
- data/locale/README.md +18 -0
- data/locale/de/hammer-cli-foreman-remote-execution.po +93 -0
- data/locale/en/hammer-cli-foreman-remote-execution.po +209 -0
- data/locale/es/hammer-cli-foreman-remote-execution.po +93 -0
- data/locale/fr/hammer-cli-foreman-remote-execution.po +93 -0
- data/locale/hammer-cli-foreman-remote-execution.pot +358 -0
- data/locale/it/hammer-cli-foreman-remote-execution.po +93 -0
- data/locale/ja/hammer-cli-foreman-remote-execution.po +93 -0
- data/locale/ko/hammer-cli-foreman-remote-execution.po +93 -0
- data/locale/pt_BR/hammer-cli-foreman-remote-execution.po +94 -0
- data/locale/ru/hammer-cli-foreman-remote-execution.po +95 -0
- data/locale/zh_CN/hammer-cli-foreman-remote-execution.po +94 -0
- data/locale/zh_TW/hammer-cli-foreman-remote-execution.po +94 -0
- data/test/data/1.14/foreman_api.json +1 -0
- data/test/data/1.16/foreman_api.json +1 -0
- data/test/data/1.17/foreman_api.json +1 -0
- data/test/data/export.erb +9 -0
- data/test/{unit/data → data}/template.txt +0 -0
- data/test/unit/foreign_input_set_test.rb +3 -3
- data/test/unit/job_invocation_test.rb +41 -5
- data/test/unit/job_template_test.rb +31 -4
- data/test/unit/remote_execution_feature_test.rb +44 -0
- data/test/unit/template_input_test.rb +11 -3
- metadata +35 -12
- data/test/unit/data/1.10/foreman_api.json +0 -1
@@ -0,0 +1,41 @@
|
|
1
|
+
module HammerCLIForemanRemoteExecution
|
2
|
+
class RemoteExecutionFeature < HammerCLIForeman::Command
|
3
|
+
resource :remote_execution_features
|
4
|
+
desc _('Manage remote execution features')
|
5
|
+
|
6
|
+
class ListCommand < HammerCLIForeman::ListCommand
|
7
|
+
output do
|
8
|
+
field :id, _('ID')
|
9
|
+
field :name, _('Name')
|
10
|
+
field :description, _('Description')
|
11
|
+
field :job_template_name, _('Job template name')
|
12
|
+
end
|
13
|
+
|
14
|
+
build_options
|
15
|
+
end
|
16
|
+
|
17
|
+
class InfoCommand < HammerCLIForeman::InfoCommand
|
18
|
+
output do
|
19
|
+
field :id, _('ID')
|
20
|
+
field :label, _('Label')
|
21
|
+
field :name, _('Name')
|
22
|
+
field :description, _('Description')
|
23
|
+
field :job_template_name, _('Job template name')
|
24
|
+
field :job_template_id, _('Job template ID')
|
25
|
+
end
|
26
|
+
|
27
|
+
build_options
|
28
|
+
end
|
29
|
+
|
30
|
+
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
31
|
+
success_message _('Remote execution feature updated')
|
32
|
+
failure_message _('Could not update the remote execution feature')
|
33
|
+
|
34
|
+
build_options
|
35
|
+
end
|
36
|
+
|
37
|
+
autoload_subcommands
|
38
|
+
end
|
39
|
+
|
40
|
+
HammerCLI::MainCommand.subcommand 'remote-execution-feature', _('Manage remote execution features'), RemoteExecutionFeature
|
41
|
+
end
|
@@ -5,7 +5,7 @@ module HammerCLIForemanRemoteExecution
|
|
5
5
|
|
6
6
|
class ListCommand < HammerCLIForeman::ListCommand
|
7
7
|
output do
|
8
|
-
field :id, _('
|
8
|
+
field :id, _('ID')
|
9
9
|
field :name, _('Name')
|
10
10
|
field :input_type, _('Input type')
|
11
11
|
end
|
@@ -15,7 +15,7 @@ module HammerCLIForemanRemoteExecution
|
|
15
15
|
|
16
16
|
class InfoCommand < HammerCLIForeman::InfoCommand
|
17
17
|
output do
|
18
|
-
field :id, _('
|
18
|
+
field :id, _('ID')
|
19
19
|
field :name, _('Name')
|
20
20
|
field :input_type, _('Input type')
|
21
21
|
|
@@ -23,20 +23,28 @@ module HammerCLIForemanRemoteExecution
|
|
23
23
|
field :variable_name, _('Variable name')
|
24
24
|
field :puppet_parameter_name, _('Puppet parameter name')
|
25
25
|
field :options, _('Options'), Fields::List, :width => 25, :hide_blank => true
|
26
|
+
field :default, _('Default value')
|
26
27
|
end
|
27
28
|
|
28
29
|
build_options
|
29
30
|
end
|
30
31
|
|
31
32
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
32
|
-
success_message _('Template input created')
|
33
|
+
success_message _('Template input created.')
|
33
34
|
failure_message _('Could not create the template input')
|
34
35
|
|
35
36
|
build_options
|
36
37
|
end
|
37
38
|
|
39
|
+
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
40
|
+
success_message _('Template input updated.')
|
41
|
+
failure_message _('Could not update the template input')
|
42
|
+
|
43
|
+
build_options
|
44
|
+
end
|
45
|
+
|
38
46
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
39
|
-
success_message _('Template input deleted')
|
47
|
+
success_message _('Template input deleted.')
|
40
48
|
failure_message _('Could not delete the template input')
|
41
49
|
|
42
50
|
build_options
|
data/locale/Makefile
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#
|
2
|
+
# Makefile for PO merging and MO generation. More info in the README.
|
3
|
+
#
|
4
|
+
# make all-mo (default) - generate MO files
|
5
|
+
# make check - check translations using translate-tool
|
6
|
+
# make tx-update - download and merge translations from Transifex
|
7
|
+
# make clean - clean everything
|
8
|
+
#
|
9
|
+
DOMAIN = hammer-cli-foreman-remote-execution
|
10
|
+
VERSION = $(shell ruby -e 'require "rubygems";spec = Gem::Specification::load("../hammer_cli_foreman_remote_execution.gemspec");puts spec.version')
|
11
|
+
POTFILE = $(DOMAIN).pot
|
12
|
+
MOFILE = $(DOMAIN).mo
|
13
|
+
POFILES = $(shell find . -name '$(DOMAIN).po')
|
14
|
+
MOFILES = $(patsubst %.po,%.mo,$(POFILES))
|
15
|
+
POXFILES = $(patsubst %.po,%.pox,$(POFILES))
|
16
|
+
EDITFILES = $(patsubst %.po,%.edit.po,$(POFILES))
|
17
|
+
|
18
|
+
%.mo: %.po
|
19
|
+
mkdir -p $(shell dirname $@)/LC_MESSAGES
|
20
|
+
msgfmt -o $(shell dirname $@)/LC_MESSAGES/$(MOFILE) $<
|
21
|
+
|
22
|
+
# Generate MO files from PO files
|
23
|
+
all-mo: $(MOFILES)
|
24
|
+
|
25
|
+
# Check for malformed strings
|
26
|
+
%.pox: %.po
|
27
|
+
msgfmt -c $<
|
28
|
+
pofilter --nofuzzy -t variables -t blank -t urls -t emails -t long -t newlines \
|
29
|
+
-t endwhitespace -t endpunc -t puncspacing -t options -t printf -t validchars --gnome $< > $@
|
30
|
+
cat $@
|
31
|
+
! grep -q msgid $@
|
32
|
+
|
33
|
+
check: $(POXFILES)
|
34
|
+
|
35
|
+
# Unify duplicate translations
|
36
|
+
uniq-po:
|
37
|
+
for f in $(shell find ./ -name "*.po") ; do \
|
38
|
+
msguniq $$f -o $$f ; \
|
39
|
+
done
|
40
|
+
|
41
|
+
tx-pull: $(EDITFILES)
|
42
|
+
tx pull -f
|
43
|
+
for f in $(POFILES) ; do \
|
44
|
+
sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
|
45
|
+
done
|
46
|
+
|
47
|
+
# Extract strings and update the .pot, prepare .edit.po files
|
48
|
+
extract-strings:
|
49
|
+
bundle exec rake gettext:find
|
50
|
+
|
51
|
+
# Merge .edit.po into .po
|
52
|
+
update-po:
|
53
|
+
bundle exec rake gettext:find
|
54
|
+
|
55
|
+
tx-update: extract-strings tx-pull $(MOFILES)
|
56
|
+
git commit -m "i18n - extracting new, pulling from tx" ../locale
|
57
|
+
-echo Changes commited!
|
data/locale/README.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Updating the translations
|
2
|
+
-------------------------
|
3
|
+
|
4
|
+
1. Check if there are any new languages with progress more than 50% on [transifex](https://www.transifex.com/projects/p/foreman/resource/hammer-cli-foreman/). If so, do the following for each of the new languages:
|
5
|
+
|
6
|
+
```
|
7
|
+
mkdir locale/<lang>
|
8
|
+
cp locale/hammer-cli-foreman.pot locale/<lang>/hammer-cli-foreman.po
|
9
|
+
```
|
10
|
+
2. Make sure you have `transifex-client` installed
|
11
|
+
|
12
|
+
3. Update the translations. From GIT repo root directory run:
|
13
|
+
|
14
|
+
```
|
15
|
+
make -C locale tx-update
|
16
|
+
```
|
17
|
+
|
18
|
+
It will download translations from transifex, generates `mo` files, updates strings in `pot` file and wraps all the changes in a new commit. Transifex automatically updates its strings when the commit is pushed to Github.
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
2
|
+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
+
# This file is distributed under the same license as the hammer_cli_foreman_tasks package.
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
|
+
#
|
6
|
+
#, fuzzy
|
7
|
+
msgid ""
|
8
|
+
msgstr ""
|
9
|
+
"Project-Id-Version: hammer_cli_foreman_tasks 0.0.9\n"
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
11
|
+
"PO-Revision-Date: 2016-02-18 10:36-0500\n"
|
12
|
+
"Last-Translator: Wiederoder <stefanwiederoder@googlemail.com>, 2017\n"
|
13
|
+
"Language-Team: German (https://www.transifex.com/foreman/teams/114/de/)\n"
|
14
|
+
"MIME-Version: 1.0\n"
|
15
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
16
|
+
"Content-Transfer-Encoding: 8bit\n"
|
17
|
+
"Language: de\n"
|
18
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19
|
+
|
20
|
+
msgid "ID"
|
21
|
+
msgstr "ID"
|
22
|
+
|
23
|
+
msgid "Cron line"
|
24
|
+
msgstr "Cron-Zeile"
|
25
|
+
|
26
|
+
msgid "End time"
|
27
|
+
msgstr "Endzeit"
|
28
|
+
|
29
|
+
msgid "Iteration"
|
30
|
+
msgstr "Wiederholung"
|
31
|
+
|
32
|
+
msgid "State"
|
33
|
+
msgstr "Status"
|
34
|
+
|
35
|
+
msgid "Recurring logic cancelled."
|
36
|
+
msgstr "Wiederholungslogik abgebrochen."
|
37
|
+
|
38
|
+
msgid "Could not cancel the recurring logic."
|
39
|
+
msgstr "Wiederholungslogik konnte nicht abgebrochen werden."
|
40
|
+
|
41
|
+
msgid "Recurring logic related actions."
|
42
|
+
msgstr "Aktionen im Zusammenhang mit Wiederholungslogik"
|
43
|
+
|
44
|
+
msgid "Show the progress of the task"
|
45
|
+
msgstr "Fortschritt der Aufgabe anzeigen"
|
46
|
+
|
47
|
+
msgid "Name"
|
48
|
+
msgstr "Name"
|
49
|
+
|
50
|
+
msgid "Owner"
|
51
|
+
msgstr "Besitzer"
|
52
|
+
|
53
|
+
msgid "Started at"
|
54
|
+
msgstr "Gestartet um"
|
55
|
+
|
56
|
+
msgid "Ended at"
|
57
|
+
msgstr "Beendet um"
|
58
|
+
|
59
|
+
msgid "Result"
|
60
|
+
msgstr "Ergebnis"
|
61
|
+
|
62
|
+
msgid "Task action"
|
63
|
+
msgstr "Aufgabenaktion"
|
64
|
+
|
65
|
+
msgid "Task errors"
|
66
|
+
msgstr "Aufgabenfehler"
|
67
|
+
|
68
|
+
msgid "Resume all tasks paused in error state"
|
69
|
+
msgstr "Alle in Fehler-Status angehaltenen Aufgaben fortsetzen"
|
70
|
+
|
71
|
+
msgid "Total tasks found paused in error state"
|
72
|
+
msgstr "Alle in Fehler-Status gefundenen Aufgaben "
|
73
|
+
|
74
|
+
msgid "Total tasks resumed"
|
75
|
+
msgstr "Insgesamt fortgesetzte Aufgaben"
|
76
|
+
|
77
|
+
msgid "Resumed tasks"
|
78
|
+
msgstr "Fortgesetzte Aufgaben"
|
79
|
+
|
80
|
+
msgid "Task identifier"
|
81
|
+
msgstr "Aufgabenbezeichner"
|
82
|
+
|
83
|
+
msgid "Total tasks failed to resume"
|
84
|
+
msgstr "Gesamtzahl der Aufgaben, die nicht fortgesetzt werden konnten"
|
85
|
+
|
86
|
+
msgid "Failed tasks"
|
87
|
+
msgstr "Fehlgeschlagene Aufgaben"
|
88
|
+
|
89
|
+
msgid "Total tasks skipped"
|
90
|
+
msgstr "Insgesamt übersprungene Aufgaben"
|
91
|
+
|
92
|
+
msgid "Skipped tasks"
|
93
|
+
msgstr "Übersprungene Aufgaben"
|
@@ -0,0 +1,209 @@
|
|
1
|
+
# English translations for hammer-cli-foreman-remote-execution package.
|
2
|
+
# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
+
# This file is distributed under the same license as the hammer-cli-foreman-remote-execution package.
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
|
5
|
+
#
|
6
|
+
msgid ""
|
7
|
+
msgstr ""
|
8
|
+
"Project-Id-Version: hammer-cli-foreman-remote-execution 0.0.4\n"
|
9
|
+
"Report-Msgid-Bugs-To: \n"
|
10
|
+
"PO-Revision-Date: 2016-02-10 14:04-0500\n"
|
11
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
12
|
+
"Language-Team: English\n"
|
13
|
+
"Language: en\n"
|
14
|
+
"MIME-Version: 1.0\n"
|
15
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
16
|
+
"Content-Transfer-Encoding: 8bit\n"
|
17
|
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18
|
+
"\n"
|
19
|
+
|
20
|
+
msgid "Manage foreign input sets"
|
21
|
+
msgstr ""
|
22
|
+
|
23
|
+
msgid "ID"
|
24
|
+
msgstr ""
|
25
|
+
|
26
|
+
msgid "Target template ID"
|
27
|
+
msgstr ""
|
28
|
+
|
29
|
+
msgid "Target template name"
|
30
|
+
msgstr ""
|
31
|
+
|
32
|
+
msgid "Name"
|
33
|
+
msgstr ""
|
34
|
+
|
35
|
+
msgid "Include all"
|
36
|
+
msgstr ""
|
37
|
+
|
38
|
+
msgid "Include"
|
39
|
+
msgstr ""
|
40
|
+
|
41
|
+
msgid "Exclude"
|
42
|
+
msgstr ""
|
43
|
+
|
44
|
+
msgid "Foreign input set updated"
|
45
|
+
msgstr ""
|
46
|
+
|
47
|
+
msgid "Could not update the input set"
|
48
|
+
msgstr ""
|
49
|
+
|
50
|
+
msgid "Foreign input set created"
|
51
|
+
msgstr ""
|
52
|
+
|
53
|
+
msgid "Could not create the input set"
|
54
|
+
msgstr ""
|
55
|
+
|
56
|
+
msgid "Foreign input set deleted"
|
57
|
+
msgstr ""
|
58
|
+
|
59
|
+
msgid "Could not delete the input set"
|
60
|
+
msgstr ""
|
61
|
+
|
62
|
+
msgid "Description"
|
63
|
+
msgstr ""
|
64
|
+
|
65
|
+
msgid "Status"
|
66
|
+
msgstr ""
|
67
|
+
|
68
|
+
msgid "Success"
|
69
|
+
msgstr ""
|
70
|
+
|
71
|
+
msgid "Failed"
|
72
|
+
msgstr ""
|
73
|
+
|
74
|
+
msgid "Pending"
|
75
|
+
msgstr ""
|
76
|
+
|
77
|
+
msgid "Total"
|
78
|
+
msgstr ""
|
79
|
+
|
80
|
+
msgid "Start"
|
81
|
+
msgstr ""
|
82
|
+
|
83
|
+
msgid "Job Category"
|
84
|
+
msgstr ""
|
85
|
+
|
86
|
+
msgid "Mode"
|
87
|
+
msgstr ""
|
88
|
+
|
89
|
+
msgid "Cron line"
|
90
|
+
msgstr ""
|
91
|
+
|
92
|
+
msgid "Recurring logic ID"
|
93
|
+
msgstr ""
|
94
|
+
|
95
|
+
msgid "Hosts"
|
96
|
+
msgstr ""
|
97
|
+
|
98
|
+
msgid "View the output for a host"
|
99
|
+
msgstr ""
|
100
|
+
|
101
|
+
msgid "Do not wait for job to complete, shows current output only"
|
102
|
+
msgstr ""
|
103
|
+
|
104
|
+
msgid "Job invocation %{id} created"
|
105
|
+
msgstr ""
|
106
|
+
|
107
|
+
msgid "Schedule the execution for a later time"
|
108
|
+
msgstr ""
|
109
|
+
|
110
|
+
msgid "Execution should be cancelled if it cannot be started before --start-at"
|
111
|
+
msgstr ""
|
112
|
+
|
113
|
+
msgid "Create a recurring execution"
|
114
|
+
msgstr ""
|
115
|
+
|
116
|
+
msgid "Perform no more executions after this time, used with --cron-line"
|
117
|
+
msgstr ""
|
118
|
+
|
119
|
+
msgid "Specify inputs from command line"
|
120
|
+
msgstr ""
|
121
|
+
|
122
|
+
msgid "Read input values from files"
|
123
|
+
msgstr ""
|
124
|
+
|
125
|
+
msgid "Dynamic search queries are evaluated at run time"
|
126
|
+
msgstr ""
|
127
|
+
|
128
|
+
msgid "Manage job invocations"
|
129
|
+
msgstr ""
|
130
|
+
|
131
|
+
msgid "Provider"
|
132
|
+
msgstr ""
|
133
|
+
|
134
|
+
msgid "Type"
|
135
|
+
msgstr ""
|
136
|
+
|
137
|
+
msgid "Inputs"
|
138
|
+
msgstr ""
|
139
|
+
|
140
|
+
msgid "View job template content"
|
141
|
+
msgstr ""
|
142
|
+
|
143
|
+
msgid "Path to a file that contains the template"
|
144
|
+
msgstr ""
|
145
|
+
|
146
|
+
msgid "Job template created"
|
147
|
+
msgstr ""
|
148
|
+
|
149
|
+
msgid "Could not create the job template"
|
150
|
+
msgstr ""
|
151
|
+
|
152
|
+
msgid "Job template updated"
|
153
|
+
msgstr ""
|
154
|
+
|
155
|
+
msgid "Could not update the job template"
|
156
|
+
msgstr ""
|
157
|
+
|
158
|
+
msgid "Job template deleted"
|
159
|
+
msgstr ""
|
160
|
+
|
161
|
+
msgid "Could not delete the job template"
|
162
|
+
msgstr ""
|
163
|
+
|
164
|
+
msgid "Manage job templates"
|
165
|
+
msgstr ""
|
166
|
+
|
167
|
+
msgid ""
|
168
|
+
"Comma-separated list of key=file, where file is a path to a text file to be re"
|
169
|
+
"ad"
|
170
|
+
msgstr ""
|
171
|
+
|
172
|
+
msgid ""
|
173
|
+
"Cron line format 'a b c d e', where:\n"
|
174
|
+
" a. is minute (range: 0-59)\n"
|
175
|
+
" b. is hour (range: 0-23)\n"
|
176
|
+
" c. is day of month (range: 1-31)\n"
|
177
|
+
" d. is month (range: 1-12)\n"
|
178
|
+
" e. is day of week (range: 0-6)"
|
179
|
+
msgstr ""
|
180
|
+
|
181
|
+
msgid "Manage template inputs"
|
182
|
+
msgstr ""
|
183
|
+
|
184
|
+
msgid "Input type"
|
185
|
+
msgstr ""
|
186
|
+
|
187
|
+
msgid "Fact name"
|
188
|
+
msgstr ""
|
189
|
+
|
190
|
+
msgid "Variable name"
|
191
|
+
msgstr ""
|
192
|
+
|
193
|
+
msgid "Puppet parameter name"
|
194
|
+
msgstr ""
|
195
|
+
|
196
|
+
msgid "Options"
|
197
|
+
msgstr ""
|
198
|
+
|
199
|
+
msgid "Template input created"
|
200
|
+
msgstr ""
|
201
|
+
|
202
|
+
msgid "Could not create the template input"
|
203
|
+
msgstr ""
|
204
|
+
|
205
|
+
msgid "Template input deleted"
|
206
|
+
msgstr ""
|
207
|
+
|
208
|
+
msgid "Could not delete the template input"
|
209
|
+
msgstr ""
|