hammer_cli_foreman_remote_execution 0.3.0 → 0.3.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 +4 -4
- data/.github/workflows/ci_test.yml +22 -0
- data/.rubocop.yml +7 -4
- data/.rubocop_todo.yml +81 -0
- data/.tx/config +4 -4
- data/Gemfile +10 -9
- data/Rakefile +5 -1
- data/hammer_cli_foreman_remote_execution.gemspec +6 -2
- data/lib/hammer_cli_foreman_remote_execution/foreign_input_set.rb +2 -0
- data/lib/hammer_cli_foreman_remote_execution/i18n.rb +5 -7
- data/lib/hammer_cli_foreman_remote_execution/interface_extensions.rb +2 -2
- data/lib/hammer_cli_foreman_remote_execution/job_invocation.rb +6 -4
- data/lib/hammer_cli_foreman_remote_execution/job_template.rb +8 -6
- data/lib/hammer_cli_foreman_remote_execution/options/normalizers.rb +5 -3
- data/lib/hammer_cli_foreman_remote_execution/remote_execution_feature.rb +4 -1
- data/lib/hammer_cli_foreman_remote_execution/subnet_extensions.rb +3 -1
- data/lib/hammer_cli_foreman_remote_execution/template_input.rb +2 -0
- data/lib/hammer_cli_foreman_remote_execution/version.rb +3 -1
- data/lib/hammer_cli_foreman_remote_execution.rb +2 -0
- data/locale/ca/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/ca/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +41 -47
- data/locale/cs_CZ/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/cs_CZ/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +41 -47
- data/locale/de/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/de/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +41 -47
- data/locale/en/LC_MESSAGES/{hammer-cli-foreman-remote-execution.mo → hammer_cli_foreman_remote_execution.mo} +0 -0
- data/locale/en/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +1 -1
- data/locale/es/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/es/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +42 -48
- data/locale/fr/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/fr/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +48 -52
- data/locale/it/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/it/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +41 -47
- data/locale/ja/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/ja/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +50 -56
- data/locale/ka/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/ka/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +41 -47
- data/locale/ko/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/ko/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +64 -70
- data/locale/pt_BR/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/pt_BR/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +41 -47
- data/locale/ru/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/ru/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +44 -50
- data/locale/zh_CN/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/zh_CN/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +50 -56
- data/locale/zh_TW/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
- data/locale/zh_TW/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +41 -47
- data/test/unit/foreign_input_set_test.rb +2 -0
- data/test/unit/job_invocation_test.rb +10 -6
- data/test/unit/job_template_test.rb +9 -4
- data/test/unit/remote_execution_feature_test.rb +2 -1
- data/test/unit/template_input_test.rb +2 -0
- metadata +41 -36
- data/locale/ca/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/de/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/es/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/fr/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/it/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ja/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ka/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ko/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ru/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- /data/locale/{hammer-cli-foreman-remote-execution.pot → hammer_cli_foreman_remote_execution.pot} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90e3a16f1acf556e56d0e4302d47a1dc408c110d002b012b674abc2c8ae79251
|
|
4
|
+
data.tar.gz: 8a8eb33d582b2cd246fe51b458fc0829cb4ea3d553c3a320c6d84e20b5a7cce2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18e67331e046360e779fc47d0df68e3e4e14accf8bf5c9a7095b2cad813e72f375e3264b15604763866b4c06d4b75bb8990e54316c0e3632e0cf044fe55ed10c
|
|
7
|
+
data.tar.gz: 343b148c08a660e02366e6098918514db6c6e5eacd0297ff665417b06b6785d100228b70826b686d6faaea296ca828ae003f99ffe333d8ba31520087f2fe0ec6
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "master"
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.ref_name }}-${{ github.workflow }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
jobs:
|
|
11
|
+
rubocop:
|
|
12
|
+
name: Rubocop
|
|
13
|
+
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
|
|
14
|
+
with:
|
|
15
|
+
command: bundle exec rubocop --parallel --format github
|
|
16
|
+
|
|
17
|
+
test:
|
|
18
|
+
name: Tests
|
|
19
|
+
needs: rubocop
|
|
20
|
+
uses: theforeman/actions/.github/workflows/test-gem.yml@v0
|
|
21
|
+
with:
|
|
22
|
+
command: bundle exec rake test
|
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Max: 100
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
inherit_gem:
|
|
4
|
+
theforeman-rubocop:
|
|
5
|
+
- lenient.yml
|
|
6
|
+
|
|
7
|
+
AllCops:
|
|
8
|
+
TargetRubyVersion: 2.7
|
|
6
9
|
|
|
7
10
|
Style/HashSyntax:
|
|
8
11
|
EnforcedStyle: hash_rockets
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2024-08-02 06:59:11 UTC using RuboCop version 1.64.1.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
12
|
+
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
13
|
+
Layout/ArrayAlignment:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'test/unit/job_invocation_test.rb'
|
|
16
|
+
|
|
17
|
+
# Offense count: 1
|
|
18
|
+
# Configuration parameters: MaximumRangeSize.
|
|
19
|
+
Lint/MissingCopEnableDirective:
|
|
20
|
+
Exclude:
|
|
21
|
+
- 'test/unit/template_input_test.rb'
|
|
22
|
+
|
|
23
|
+
# Offense count: 3
|
|
24
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
25
|
+
Metrics/AbcSize:
|
|
26
|
+
Max: 21
|
|
27
|
+
|
|
28
|
+
# Offense count: 3
|
|
29
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
30
|
+
# AllowedMethods: refine
|
|
31
|
+
Metrics/BlockLength:
|
|
32
|
+
Max: 82
|
|
33
|
+
|
|
34
|
+
# Offense count: 1
|
|
35
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
36
|
+
Metrics/CyclomaticComplexity:
|
|
37
|
+
Max: 8
|
|
38
|
+
|
|
39
|
+
# Offense count: 3
|
|
40
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
41
|
+
Metrics/MethodLength:
|
|
42
|
+
Max: 13
|
|
43
|
+
|
|
44
|
+
# Offense count: 4
|
|
45
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
46
|
+
# Configuration parameters: Include.
|
|
47
|
+
# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
|
|
48
|
+
Rails/Output:
|
|
49
|
+
Exclude:
|
|
50
|
+
- 'lib/hammer_cli_foreman_remote_execution/job_invocation.rb'
|
|
51
|
+
- 'lib/hammer_cli_foreman_remote_execution/job_template.rb'
|
|
52
|
+
|
|
53
|
+
# Offense count: 1
|
|
54
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
55
|
+
# Configuration parameters: EnforcedStyle, Include.
|
|
56
|
+
# SupportedStyles: assert_not, refute
|
|
57
|
+
# Include: **/test/**/*
|
|
58
|
+
Rails/RefuteMethods:
|
|
59
|
+
Exclude:
|
|
60
|
+
- 'test/unit/job_invocation_test.rb'
|
|
61
|
+
|
|
62
|
+
# Offense count: 4
|
|
63
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
64
|
+
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
|
|
65
|
+
# SupportedStyles: annotated, template, unannotated
|
|
66
|
+
# AllowedMethods: redirect
|
|
67
|
+
Style/FormatStringToken:
|
|
68
|
+
EnforcedStyle: template
|
|
69
|
+
|
|
70
|
+
# Offense count: 1
|
|
71
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
72
|
+
Style/HashTransformValues:
|
|
73
|
+
Exclude:
|
|
74
|
+
- 'lib/hammer_cli_foreman_remote_execution/options/normalizers.rb'
|
|
75
|
+
|
|
76
|
+
# Offense count: 5
|
|
77
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
78
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
79
|
+
# URISchemes: http, https
|
|
80
|
+
Layout/LineLength:
|
|
81
|
+
Max: 208
|
data/.tx/config
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[main]
|
|
2
2
|
host = https://app.transifex.com
|
|
3
3
|
|
|
4
|
-
[o:foreman:p:foreman:r:
|
|
5
|
-
file_filter = locale/<lang>/
|
|
6
|
-
source_file = locale/
|
|
4
|
+
[o:foreman:p:foreman:r:hammer_cli_foreman_remote_execution]
|
|
5
|
+
file_filter = locale/<lang>/hammer_cli_foreman_remote_execution.edit.po
|
|
6
|
+
source_file = locale/hammer_cli_foreman_remote_execution.pot
|
|
7
7
|
source_lang = en
|
|
8
8
|
type = PO
|
|
9
|
-
resource_name =
|
|
9
|
+
resource_name = hammer_cli_foreman_remote_execution
|
data/Gemfile
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source 'https://rubygems.org'
|
|
2
4
|
|
|
3
5
|
gemspec
|
|
4
6
|
|
|
7
|
+
gem 'fast_gettext', '< 1.2.0' if RUBY_VERSION < '2.1.0'
|
|
5
8
|
gem 'gettext', '>= 3.1.3', '< 4.0.0'
|
|
6
|
-
if RUBY_VERSION < '2.1.0'
|
|
7
|
-
gem 'fast_gettext', '< 1.2.0'
|
|
8
|
-
end
|
|
9
9
|
|
|
10
10
|
group :test do
|
|
11
|
-
gem '
|
|
12
|
-
gem '
|
|
13
|
-
gem 'minitest', '< 4.7.4'
|
|
11
|
+
gem 'ci_reporter', '>= 1.6.3', '< 2.0.0', :require => false
|
|
12
|
+
gem 'minitest', '>= 5.1'
|
|
14
13
|
gem 'minitest-spec-context'
|
|
15
|
-
gem 'simplecov'
|
|
16
14
|
gem 'mocha'
|
|
17
|
-
gem '
|
|
15
|
+
gem 'rake', '~> 13.1.0'
|
|
16
|
+
gem 'simplecov'
|
|
17
|
+
gem 'theforeman-rubocop', '~> 0.1.0'
|
|
18
|
+
gem 'thor'
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
# load local gemfile
|
|
21
22
|
['Gemfile.local.rb', 'Gemfile.local'].map do |file_name|
|
|
22
23
|
local_gemfile = File.join(File.dirname(__FILE__), file_name)
|
|
23
|
-
|
|
24
|
+
instance_eval(Bundler.read_file(local_gemfile)) if File.exist?(local_gemfile)
|
|
24
25
|
end
|
data/Rakefile
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'bundler/gem_tasks'
|
|
2
4
|
require 'rake/testtask'
|
|
3
5
|
require 'ci/reporter/rake/minitest'
|
|
@@ -6,6 +8,7 @@ Rake::TestTask.new :test do |t|
|
|
|
6
8
|
t.libs.push "lib"
|
|
7
9
|
t.test_files = Dir.glob('test/**/*_test.rb')
|
|
8
10
|
t.verbose = true
|
|
11
|
+
t.warning = ENV.key?('RUBY_WARNINGS')
|
|
9
12
|
end
|
|
10
13
|
|
|
11
14
|
namespace :pkg do
|
|
@@ -18,4 +21,5 @@ task :default => :test
|
|
|
18
21
|
require "hammer_cli_foreman_remote_execution/version"
|
|
19
22
|
require "hammer_cli_foreman_remote_execution/i18n"
|
|
20
23
|
require "hammer_cli/i18n/find_task"
|
|
21
|
-
HammerCLI::I18n::FindTask.define(HammerCLIForemanRemoteExecution::I18n::LocaleDomain.new,
|
|
24
|
+
HammerCLI::I18n::FindTask.define(HammerCLIForemanRemoteExecution::I18n::LocaleDomain.new,
|
|
25
|
+
HammerCLIForemanRemoteExecution.version.to_s)
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require File.expand_path('lib/hammer_cli_foreman_remote_execution/version', __dir__)
|
|
2
4
|
|
|
3
5
|
Gem::Specification.new do |s|
|
|
4
6
|
s.name = 'hammer_cli_foreman_remote_execution'
|
|
@@ -10,7 +12,7 @@ Gem::Specification.new do |s|
|
|
|
10
12
|
s.license = 'GPL-3.0-or-later'
|
|
11
13
|
|
|
12
14
|
s.summary = 'CLI for the Foreman remote execution plugin'
|
|
13
|
-
s.description = 'CLI for the Foreman remote execution plugin'
|
|
15
|
+
s.description = 'This gem provides CLI support for the Foreman remote execution plugin'
|
|
14
16
|
|
|
15
17
|
s.files = `git ls-files`.split("\n")
|
|
16
18
|
s.test_files = `git ls-files test`.split("\n")
|
|
@@ -18,4 +20,6 @@ Gem::Specification.new do |s|
|
|
|
18
20
|
|
|
19
21
|
s.add_dependency 'hammer_cli_foreman', '>= 0.1.3', '< 4.0.0'
|
|
20
22
|
s.add_dependency 'hammer_cli_foreman_tasks', '~> 0.0.3'
|
|
23
|
+
|
|
24
|
+
s.required_ruby_version = '>= 2.7', '< 4'
|
|
21
25
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'hammer_cli/i18n'
|
|
2
4
|
|
|
3
5
|
module HammerCLIForemanRemoteExecution
|
|
4
6
|
module I18n
|
|
5
|
-
|
|
6
7
|
class LocaleDomain < HammerCLI::I18n::LocaleDomain
|
|
7
|
-
|
|
8
8
|
def translated_files
|
|
9
9
|
Dir.glob(File.join(File.dirname(__FILE__), '../**/*.rb'))
|
|
10
10
|
end
|
|
@@ -14,20 +14,18 @@ module HammerCLIForemanRemoteExecution
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def domain_name
|
|
17
|
-
'
|
|
17
|
+
'hammer_cli_foreman_remote_execution'
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
class SystemLocaleDomain < LocaleDomain
|
|
22
|
-
|
|
23
22
|
def locale_dir
|
|
24
23
|
'/usr/share/locale'
|
|
25
24
|
end
|
|
26
|
-
|
|
27
25
|
end
|
|
28
|
-
|
|
29
26
|
end
|
|
30
27
|
end
|
|
31
28
|
|
|
32
|
-
domain = [HammerCLIForemanRemoteExecution::I18n::LocaleDomain.new,
|
|
29
|
+
domain = [HammerCLIForemanRemoteExecution::I18n::LocaleDomain.new,
|
|
30
|
+
HammerCLIForemanRemoteExecution::I18n::SystemLocaleDomain.new].find(&:available?)
|
|
33
31
|
HammerCLI::I18n.add_domain(domain) if domain
|
|
@@ -16,9 +16,9 @@ module HammerCLIForemanRemoteExecution
|
|
|
16
16
|
type = super(nic)
|
|
17
17
|
if nic['execution']
|
|
18
18
|
if nic['primary'] || nic['provision']
|
|
19
|
-
type[-1] = ', '+_('execution') +')'
|
|
19
|
+
type[-1] = ', ' + _('execution') + ')'
|
|
20
20
|
else
|
|
21
|
-
type += ' ('+_('execution') +')'
|
|
21
|
+
type += ' (' + _('execution') + ')'
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
type
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module HammerCLIForemanRemoteExecution
|
|
2
4
|
class JobInvocation < HammerCLIForeman::Command
|
|
3
5
|
resource :job_invocations
|
|
@@ -112,13 +114,13 @@ module HammerCLIForemanRemoteExecution
|
|
|
112
114
|
def execute
|
|
113
115
|
data = get_output
|
|
114
116
|
if data['delayed']
|
|
115
|
-
puts _('The job is scheduled to start at %{timestamp}')
|
|
117
|
+
puts format(_('The job is scheduled to start at %{timestamp}'), :timestamp => data['start_at'])
|
|
116
118
|
return HammerCLI::EX_OK if option_async?
|
|
117
119
|
end
|
|
118
120
|
since = print_data(data)
|
|
119
121
|
|
|
120
122
|
output_loop(data, since)
|
|
121
|
-
|
|
123
|
+
HammerCLI::EX_OK
|
|
122
124
|
end
|
|
123
125
|
|
|
124
126
|
build_options do |o|
|
|
@@ -129,7 +131,7 @@ module HammerCLIForemanRemoteExecution
|
|
|
129
131
|
private
|
|
130
132
|
|
|
131
133
|
def output_loop(data, since = nil)
|
|
132
|
-
while data['refresh'] && !option_async?
|
|
134
|
+
while data['refresh'] && !option_async?
|
|
133
135
|
sleep 1
|
|
134
136
|
data = get_output(since)
|
|
135
137
|
since = print_data(data)
|
|
@@ -186,7 +188,7 @@ module HammerCLIForemanRemoteExecution
|
|
|
186
188
|
super(task)
|
|
187
189
|
end
|
|
188
190
|
|
|
189
|
-
|
|
191
|
+
alias_method :original_option_async?, :option_async?
|
|
190
192
|
|
|
191
193
|
def option_async?
|
|
192
194
|
if immediate?
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module HammerCLIForemanRemoteExecution
|
|
2
4
|
class JobTemplate < HammerCLIForeman::Command
|
|
3
5
|
resource :job_templates
|
|
@@ -45,8 +47,8 @@ module HammerCLIForemanRemoteExecution
|
|
|
45
47
|
|
|
46
48
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
|
47
49
|
option '--file', 'TEMPLATE', N_('Path to a file that contains the template'),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
:attribute_name => :option_template, :required => true,
|
|
51
|
+
:format => HammerCLI::Options::Normalizers::File.new
|
|
50
52
|
|
|
51
53
|
success_message _('Job template created')
|
|
52
54
|
failure_message _('Could not create the job template')
|
|
@@ -61,8 +63,8 @@ module HammerCLIForemanRemoteExecution
|
|
|
61
63
|
action :import
|
|
62
64
|
|
|
63
65
|
option '--file', 'TEMPLATE', N_('Path to a file that contains the template - must include ERB metadata'),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
:attribute_name => :option_template, :required => true,
|
|
67
|
+
:format => HammerCLI::Options::Normalizers::File.new
|
|
66
68
|
|
|
67
69
|
success_message _('Job template imported')
|
|
68
70
|
failure_message _('Could not import the job template')
|
|
@@ -87,8 +89,8 @@ module HammerCLIForemanRemoteExecution
|
|
|
87
89
|
|
|
88
90
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
|
89
91
|
option '--file', 'TEMPLATE', N_('Path to a file that contains the template'),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
:attribute_name => :option_template,
|
|
93
|
+
:format => HammerCLI::Options::Normalizers::File.new
|
|
92
94
|
|
|
93
95
|
success_message _('Job template updated')
|
|
94
96
|
failure_message _('Could not update the job template')
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module HammerCLIForemanRemoteExecution
|
|
2
4
|
module Options
|
|
3
5
|
module Normalizers
|
|
@@ -11,11 +13,11 @@ module HammerCLIForemanRemoteExecution
|
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
def complete(value)
|
|
14
|
-
Dir[value.to_s+'*'].collect do |file|
|
|
16
|
+
Dir[value.to_s + '*'].collect do |file|
|
|
15
17
|
if ::File.directory?(file)
|
|
16
|
-
file+'/'
|
|
18
|
+
file + '/'
|
|
17
19
|
else
|
|
18
|
-
file+' '
|
|
20
|
+
file + ' '
|
|
19
21
|
end
|
|
20
22
|
end
|
|
21
23
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module HammerCLIForemanRemoteExecution
|
|
2
4
|
class RemoteExecutionFeature < HammerCLIForeman::Command
|
|
3
5
|
resource :remote_execution_features
|
|
@@ -37,5 +39,6 @@ module HammerCLIForemanRemoteExecution
|
|
|
37
39
|
autoload_subcommands
|
|
38
40
|
end
|
|
39
41
|
|
|
40
|
-
HammerCLI::MainCommand.subcommand 'remote-execution-feature', _('Manage remote execution features'),
|
|
42
|
+
HammerCLI::MainCommand.subcommand 'remote-execution-feature', _('Manage remote execution features'),
|
|
43
|
+
RemoteExecutionFeature
|
|
41
44
|
end
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'hammer_cli_foreman/subnet'
|
|
2
4
|
|
|
3
5
|
module HammerCLIForemanRemoteExecution
|
|
4
6
|
class SubnetExtensions < ::HammerCLI::CommandExtensions
|
|
5
7
|
output do |definition|
|
|
6
|
-
definition.insert(:after, _("Smart Proxies"))do
|
|
8
|
+
definition.insert(:after, _("Smart Proxies")) do
|
|
7
9
|
collection :remote_execution_proxies, _('Remote execution proxies'), :numbered => false do
|
|
8
10
|
field :id, _('Id')
|
|
9
11
|
field :name, _('Name')
|
|
Binary file
|
data/locale/ca/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po}
RENAMED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
# Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2016
|
|
8
8
|
msgid ""
|
|
9
9
|
msgstr ""
|
|
10
|
-
"Project-Id-Version:
|
|
10
|
+
"Project-Id-Version: hammer_cli_foreman_remote_execution 0.3.0\n"
|
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
|
12
|
-
"POT-Creation-Date:
|
|
12
|
+
"POT-Creation-Date: 2023-07-12 15:59+0000\n"
|
|
13
13
|
"PO-Revision-Date: 2016-02-12 07:57+0000\n"
|
|
14
14
|
"Last-Translator: Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2017\n"
|
|
15
15
|
"Language-Team: Catalan (http://app.transifex.com/foreman/foreman/language/"
|
|
@@ -62,6 +62,12 @@ msgstr "S'ha eliminat el conjunt d'entrades foranies"
|
|
|
62
62
|
msgid "Could not delete the input set"
|
|
63
63
|
msgstr "No s'ha pogut eliminar el conjunt d'entrades"
|
|
64
64
|
|
|
65
|
+
msgid "Execution"
|
|
66
|
+
msgstr "Execució"
|
|
67
|
+
|
|
68
|
+
msgid "execution"
|
|
69
|
+
msgstr ""
|
|
70
|
+
|
|
65
71
|
msgid "Description"
|
|
66
72
|
msgstr "Descripció"
|
|
67
73
|
|
|
@@ -83,6 +89,21 @@ msgstr "Total"
|
|
|
83
89
|
msgid "Start"
|
|
84
90
|
msgstr "Inicia"
|
|
85
91
|
|
|
92
|
+
msgid "Randomized ordering"
|
|
93
|
+
msgstr ""
|
|
94
|
+
|
|
95
|
+
msgid "Inputs"
|
|
96
|
+
msgstr "Entrades"
|
|
97
|
+
|
|
98
|
+
msgid "Show the complete input of the job"
|
|
99
|
+
msgstr ""
|
|
100
|
+
|
|
101
|
+
msgid "Show job status for the hosts"
|
|
102
|
+
msgstr ""
|
|
103
|
+
|
|
104
|
+
msgid "Missing"
|
|
105
|
+
msgstr ""
|
|
106
|
+
|
|
86
107
|
msgid "Job Category"
|
|
87
108
|
msgstr "Categoria del treball"
|
|
88
109
|
|
|
@@ -95,6 +116,9 @@ msgstr "Línia de cron"
|
|
|
95
116
|
msgid "Recurring logic ID"
|
|
96
117
|
msgstr "ID de lògica de recurrència"
|
|
97
118
|
|
|
119
|
+
msgid "Time to pickup"
|
|
120
|
+
msgstr ""
|
|
121
|
+
|
|
98
122
|
msgid "Hosts"
|
|
99
123
|
msgstr "Amfitrions"
|
|
100
124
|
|
|
@@ -159,9 +183,6 @@ msgstr "Proveïdor"
|
|
|
159
183
|
msgid "Type"
|
|
160
184
|
msgstr "Tipus"
|
|
161
185
|
|
|
162
|
-
msgid "Inputs"
|
|
163
|
-
msgstr "Entrades"
|
|
164
|
-
|
|
165
186
|
msgid "View job template content"
|
|
166
187
|
msgstr "Visualitza el contingut de la plantilla del treball"
|
|
167
188
|
|
|
@@ -241,6 +262,15 @@ msgstr ""
|
|
|
241
262
|
msgid "Could not update the remote execution feature"
|
|
242
263
|
msgstr ""
|
|
243
264
|
|
|
265
|
+
msgid "Smart Proxies"
|
|
266
|
+
msgstr "Servidors intermediaris intel·ligents"
|
|
267
|
+
|
|
268
|
+
msgid "Remote execution proxies"
|
|
269
|
+
msgstr ""
|
|
270
|
+
|
|
271
|
+
msgid "Id"
|
|
272
|
+
msgstr "Id."
|
|
273
|
+
|
|
244
274
|
msgid "Manage template inputs"
|
|
245
275
|
msgstr "Gestiona les entrades de les plantilles"
|
|
246
276
|
|
|
@@ -259,54 +289,15 @@ msgstr "Nom del paràmetre de Puppet"
|
|
|
259
289
|
msgid "Options"
|
|
260
290
|
msgstr "Opcions"
|
|
261
291
|
|
|
262
|
-
msgid "Template input created"
|
|
263
|
-
msgstr "S'ha creat l'entrada de la plantilla"
|
|
264
|
-
|
|
265
|
-
msgid "Could not create the template input"
|
|
266
|
-
msgstr "No s'ha pogut crear l'entrada de la plantilla"
|
|
267
|
-
|
|
268
|
-
msgid "Template input deleted"
|
|
269
|
-
msgstr "S'ha eliminat l'entrada de la plantilla"
|
|
270
|
-
|
|
271
|
-
msgid "Could not delete the template input"
|
|
272
|
-
msgstr "No s'ha pogut eliminar l'entrada de la plantilla"
|
|
273
|
-
|
|
274
|
-
msgid "Execution"
|
|
275
|
-
msgstr ""
|
|
276
|
-
|
|
277
|
-
msgid "execution"
|
|
278
|
-
msgstr ""
|
|
279
|
-
|
|
280
|
-
msgid "Randomized ordering"
|
|
281
|
-
msgstr ""
|
|
282
|
-
|
|
283
|
-
msgid "Show the complete input of the job"
|
|
284
|
-
msgstr ""
|
|
285
|
-
|
|
286
|
-
msgid "Show job status for the hosts"
|
|
287
|
-
msgstr ""
|
|
288
|
-
|
|
289
|
-
msgid "Missing"
|
|
290
|
-
msgstr ""
|
|
291
|
-
|
|
292
|
-
msgid "Time to pickup"
|
|
293
|
-
msgstr ""
|
|
294
|
-
|
|
295
|
-
msgid "Smart Proxies"
|
|
296
|
-
msgstr ""
|
|
297
|
-
|
|
298
|
-
msgid "Remote execution proxies"
|
|
299
|
-
msgstr ""
|
|
300
|
-
|
|
301
|
-
msgid "Id"
|
|
302
|
-
msgstr ""
|
|
303
|
-
|
|
304
292
|
msgid "Default value"
|
|
305
293
|
msgstr ""
|
|
306
294
|
|
|
307
295
|
msgid "Template input created."
|
|
308
296
|
msgstr ""
|
|
309
297
|
|
|
298
|
+
msgid "Could not create the template input"
|
|
299
|
+
msgstr "No s'ha pogut crear l'entrada de la plantilla"
|
|
300
|
+
|
|
310
301
|
msgid "Template input updated."
|
|
311
302
|
msgstr ""
|
|
312
303
|
|
|
@@ -315,3 +306,6 @@ msgstr ""
|
|
|
315
306
|
|
|
316
307
|
msgid "Template input deleted."
|
|
317
308
|
msgstr ""
|
|
309
|
+
|
|
310
|
+
msgid "Could not delete the template input"
|
|
311
|
+
msgstr "No s'ha pogut eliminar l'entrada de la plantilla"
|
|
Binary file
|