hammer_cli_foreman_rh_cloud 1.0.3 → 1.0.4
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/lib/hammer_cli_foreman_rh_cloud/cloud_connector.rb +2 -1
- data/lib/hammer_cli_foreman_rh_cloud/i18n.rb +1 -1
- data/lib/hammer_cli_foreman_rh_cloud/insights.rb +17 -0
- data/lib/hammer_cli_foreman_rh_cloud/inventory.rb +30 -1
- data/lib/hammer_cli_foreman_rh_cloud/version.rb +1 -1
- data/lib/hammer_cli_foreman_rh_cloud.rb +5 -19
- data/locale/bn/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/bn/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/bn_IN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/bn_IN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/bqi/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/bqi/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ca/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ca/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/cs_CZ/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/cs_CZ/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/de/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/de/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/de_AT/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/de_AT/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/de_DE/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/de_DE/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/el/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/el/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/en/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/en/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/en_GB/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/en_GB/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/en_US/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/en_US/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/es/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/es/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/et_EE/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/et_EE/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/fr/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/fr/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
- data/locale/gl/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/gl/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/gu/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/gu/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/he_IL/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/he_IL/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/hi/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/hi/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/id/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/id/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/it/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/it/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ja/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ja/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
- data/locale/ka/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ka/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/kn/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/kn/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ko/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo +0 -0
- data/locale/ko/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +16 -6
- data/locale/ml_IN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ml_IN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/mr/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/mr/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/nl_NL/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/nl_NL/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/or/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/or/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/pa/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/pa/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/pl/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/pl/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +4 -4
- data/locale/pl_PL/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/pl_PL/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +4 -4
- data/locale/pt/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/pt/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/pt_BR/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/pt_BR/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ro/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ro/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ro_RO/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ro_RO/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ru/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ru/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +4 -4
- data/locale/sl/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/sl/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
- data/locale/sv_SE/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/sv_SE/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ta/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ta/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/ta_IN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/ta_IN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/te/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/te/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/tr/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/tr/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/vi/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/vi/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/vi_VN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/vi_VN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/zh/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/zh/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/locale/zh_CN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/zh_CN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
- data/locale/zh_TW/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
- data/locale/zh_TW/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
- data/test/data/3.15/foreman_api.json +1 -0
- data/test/functional/cloud_connector/cloud_connector_test.rb +21 -0
- data/test/functional/inventory/download_report_test.rb +31 -0
- data/test/functional/inventory/generate_report_test.rb +37 -0
- data/test/functional/inventory/sync_test.rb +31 -0
- data/test/task_helper.rb +7 -0
- data/test/test_helper.rb +21 -0
- metadata +243 -106
- data/lib/hammer_cli_foreman_rh_cloud/report.rb +0 -30
- data/locale/ko/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo +0 -0
- /data/locale/{hammer-cli-foreman-rh-cloud.pot → hammer_cli_foreman_rh_cloud.pot} +0 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../../test_helper')
|
2
|
+
|
3
|
+
describe 'insights inventory cloud-connector enable' do
|
4
|
+
include ForemanTaskHelpers
|
5
|
+
before do
|
6
|
+
@cmd = %w[insights cloud-connector enable]
|
7
|
+
end
|
8
|
+
let(:task_id) { '5' }
|
9
|
+
let(:response) do
|
10
|
+
{
|
11
|
+
'id' => task_id,
|
12
|
+
'state' => 'planned',
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'succeeds on sync with organization-id' do
|
17
|
+
api_expects(:inventory, :enable_cloud_connector).returns(response)
|
18
|
+
result = run_cmd(@cmd)
|
19
|
+
assert_match(/Cloud connector enable task started/, result.out)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../../test_helper')
|
2
|
+
|
3
|
+
describe 'insights inventory download-report' do
|
4
|
+
before do
|
5
|
+
@cmd = %w[insights inventory download-report]
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'fails on missing organization-id' do
|
9
|
+
api_expects_no_call
|
10
|
+
params = ['--path', '/tmp']
|
11
|
+
result = run_cmd(@cmd + params)
|
12
|
+
expected_error = 'please set one of options --organization-id, --organization, --organization-title'
|
13
|
+
assert_equal(result.exit_code, HammerCLI::EX_SOFTWARE)
|
14
|
+
assert_match(/#{expected_error}/, result.err)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'fails if required path param is missing' do
|
18
|
+
api_expects_no_call
|
19
|
+
params = ['--organization-id', '2']
|
20
|
+
result = run_cmd(@cmd + params)
|
21
|
+
expected_error = 'Option \'--path\' is required'
|
22
|
+
assert_equal(result.exit_code, HammerCLI::EX_USAGE)
|
23
|
+
assert_match(/#{expected_error}/, result.err)
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'succeeds on sync with organization-id' do
|
27
|
+
api_expects(:inventory, :download_file).with_params('organization_id' => 2)
|
28
|
+
params = ['--organization-id', '2', '--path', '/tmp']
|
29
|
+
run_cmd(@cmd + params)
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../../test_helper')
|
2
|
+
|
3
|
+
describe 'insights inventory generate-report' do
|
4
|
+
include ForemanTaskHelpers
|
5
|
+
before do
|
6
|
+
@cmd = %w[insights inventory generate-report]
|
7
|
+
end
|
8
|
+
let(:task_id) { '5' }
|
9
|
+
let(:response) do
|
10
|
+
{
|
11
|
+
'id' => task_id,
|
12
|
+
'state' => 'planned',
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'fails on missing organization-id' do
|
17
|
+
api_expects_no_call
|
18
|
+
result = run_cmd(@cmd)
|
19
|
+
expected_error = 'please set one of options --organization-id, --organization, --organization-title'
|
20
|
+
assert_equal(result.exit_code, HammerCLI::EX_SOFTWARE)
|
21
|
+
assert_match(/#{expected_error}/, result.err)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'succeeds on sync with organization-id' do
|
25
|
+
api_expects(:inventory, :generate_report).with_params('organization_id' => 2).returns(response)
|
26
|
+
params = ['--organization-id', '2']
|
27
|
+
result = run_cmd(@cmd + params)
|
28
|
+
assert_match(/Report generation started successfully/, result.out)
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'succeeds on sync with no-upload' do
|
32
|
+
api_expects(:inventory, :generate_report).with_params('organization_id' => 2, 'no_upload' => true).returns(response)
|
33
|
+
params = ['--organization-id', '2', '--no-upload']
|
34
|
+
result = run_cmd(@cmd + params)
|
35
|
+
assert_match(/Report generation started successfully/, result.out)
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../../test_helper')
|
2
|
+
|
3
|
+
describe 'insights inventory sync' do
|
4
|
+
include ForemanTaskHelpers
|
5
|
+
before do
|
6
|
+
@cmd = %w[insights inventory sync]
|
7
|
+
end
|
8
|
+
let(:task_id) { '5' }
|
9
|
+
let(:response) do
|
10
|
+
{
|
11
|
+
'id' => task_id,
|
12
|
+
'state' => 'planned',
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'fails on missing organization-id' do
|
17
|
+
api_expects_no_call
|
18
|
+
result = run_cmd(@cmd)
|
19
|
+
expected_error = 'please set one of options --organization-id, --organization, --organization-title'
|
20
|
+
assert_equal(result.exit_code, HammerCLI::EX_SOFTWARE)
|
21
|
+
assert_match(/#{expected_error}/, result.err)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'succeeds on sync with organization-id' do
|
25
|
+
api_expects(:inventory, :sync_inventory_status).with_params('organization_id' => 2).returns(response)
|
26
|
+
params = ['--organization-id', '2']
|
27
|
+
result = run_cmd(@cmd + params)
|
28
|
+
assert_match(/Inventory sync task started successfully/, result.out)
|
29
|
+
assert_match(/Task id: 5/, result.out)
|
30
|
+
end
|
31
|
+
end
|
data/test/task_helper.rb
ADDED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'minitest/autorun'
|
4
|
+
require 'minitest/spec'
|
5
|
+
require 'mocha/minitest'
|
6
|
+
require 'hammer_cli/testing/command_assertions'
|
7
|
+
require 'hammer_cli/testing/output_matchers'
|
8
|
+
require 'hammer_cli'
|
9
|
+
require 'hammer_cli_foreman/testing/api_expectations'
|
10
|
+
require File.join(File.dirname(__FILE__), './task_helper.rb')
|
11
|
+
FOREMAN_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.15')
|
12
|
+
|
13
|
+
include HammerCLIForeman::Testing::APIExpectations
|
14
|
+
HammerCLI.context[:api_connection].create('foreman') do
|
15
|
+
api_connection({}, FOREMAN_VERSION)
|
16
|
+
end
|
17
|
+
|
18
|
+
include HammerCLI::Testing::CommandAssertions
|
19
|
+
include HammerCLI::Testing::OutputMatchers
|
20
|
+
|
21
|
+
require 'hammer_cli_foreman_rh_cloud'
|
metadata
CHANGED
@@ -1,35 +1,158 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_foreman_rh_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shimon Shtein
|
8
|
+
- Chris Roberts
|
9
|
+
- Ewoud Kohl van Wijngaarden
|
10
|
+
- Archana Kumari
|
11
|
+
- Oleh Fedorenko
|
12
|
+
- Partha Aji
|
8
13
|
autorequire:
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
|
-
date:
|
16
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
12
17
|
dependencies:
|
13
18
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
19
|
+
name: hammer_cli_katello
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - "<"
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '2.0'
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - "<"
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '2.0'
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: ci_reporter
|
15
34
|
requirement: !ruby/object:Gem::Requirement
|
16
35
|
requirements:
|
17
36
|
- - ">="
|
18
37
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
38
|
+
version: 1.6.3
|
39
|
+
- - "<"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 2.0.0
|
42
|
+
type: :development
|
43
|
+
prerelease: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.6.3
|
49
|
+
- - "<"
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: 2.0.0
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: gettext
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 3.1.3
|
20
59
|
- - "<"
|
21
60
|
- !ruby/object:Gem::Version
|
22
61
|
version: 4.0.0
|
23
|
-
type: :
|
62
|
+
type: :development
|
24
63
|
prerelease: false
|
25
64
|
version_requirements: !ruby/object:Gem::Requirement
|
26
65
|
requirements:
|
27
66
|
- - ">="
|
28
67
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.
|
68
|
+
version: 3.1.3
|
30
69
|
- - "<"
|
31
70
|
- !ruby/object:Gem::Version
|
32
71
|
version: 4.0.0
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: minitest
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - '='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 4.7.4
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - '='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 4.7.4
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: minitest-spec-context
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - "~>"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 0.0.5
|
93
|
+
type: :development
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 0.0.5
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: mocha
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - "~>"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '2.0'
|
107
|
+
type: :development
|
108
|
+
prerelease: false
|
109
|
+
version_requirements: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - "~>"
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '2.0'
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: rake
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - "~>"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '10.0'
|
121
|
+
type: :development
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - "~>"
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '10.0'
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: theforeman-rubocop
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - "~>"
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 0.1.0
|
135
|
+
type: :development
|
136
|
+
prerelease: false
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - "~>"
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 0.1.0
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: thor
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - "~>"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '1.0'
|
149
|
+
type: :development
|
150
|
+
prerelease: false
|
151
|
+
version_requirements: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - "~>"
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '1.0'
|
33
156
|
description:
|
34
157
|
email:
|
35
158
|
- sshtein@redhat.com
|
@@ -43,109 +166,116 @@ files:
|
|
43
166
|
- lib/hammer_cli_foreman_rh_cloud.rb
|
44
167
|
- lib/hammer_cli_foreman_rh_cloud/cloud_connector.rb
|
45
168
|
- lib/hammer_cli_foreman_rh_cloud/i18n.rb
|
169
|
+
- lib/hammer_cli_foreman_rh_cloud/insights.rb
|
46
170
|
- lib/hammer_cli_foreman_rh_cloud/inventory.rb
|
47
|
-
- lib/hammer_cli_foreman_rh_cloud/report.rb
|
48
171
|
- lib/hammer_cli_foreman_rh_cloud/version.rb
|
49
|
-
- locale/bn/LC_MESSAGES/
|
50
|
-
- locale/bn/
|
51
|
-
- locale/bn_IN/LC_MESSAGES/
|
52
|
-
- locale/bn_IN/
|
53
|
-
- locale/bqi/LC_MESSAGES/
|
54
|
-
- locale/bqi/
|
55
|
-
- locale/ca/LC_MESSAGES/
|
56
|
-
- locale/ca/
|
57
|
-
- locale/cs_CZ/LC_MESSAGES/
|
58
|
-
- locale/cs_CZ/
|
59
|
-
- locale/de/LC_MESSAGES/
|
60
|
-
- locale/de/
|
61
|
-
- locale/de_AT/LC_MESSAGES/
|
62
|
-
- locale/de_AT/
|
63
|
-
- locale/de_DE/LC_MESSAGES/
|
64
|
-
- locale/de_DE/
|
65
|
-
- locale/el/LC_MESSAGES/
|
66
|
-
- locale/el/
|
67
|
-
- locale/en/LC_MESSAGES/
|
68
|
-
- locale/en/
|
69
|
-
- locale/en_GB/LC_MESSAGES/
|
70
|
-
- locale/en_GB/
|
71
|
-
- locale/en_US/LC_MESSAGES/
|
72
|
-
- locale/en_US/
|
73
|
-
- locale/es/LC_MESSAGES/
|
74
|
-
- locale/es/
|
75
|
-
- locale/et_EE/LC_MESSAGES/
|
76
|
-
- locale/et_EE/
|
77
|
-
- locale/fr/LC_MESSAGES/
|
78
|
-
- locale/fr/
|
79
|
-
- locale/gl/LC_MESSAGES/
|
80
|
-
- locale/gl/
|
81
|
-
- locale/gu/LC_MESSAGES/
|
82
|
-
- locale/gu/
|
83
|
-
- locale/
|
84
|
-
- locale/he_IL/LC_MESSAGES/
|
85
|
-
- locale/he_IL/
|
86
|
-
- locale/hi/LC_MESSAGES/
|
87
|
-
- locale/hi/
|
88
|
-
- locale/id/LC_MESSAGES/
|
89
|
-
- locale/id/
|
90
|
-
- locale/it/LC_MESSAGES/
|
91
|
-
- locale/it/
|
92
|
-
- locale/ja/LC_MESSAGES/
|
93
|
-
- locale/ja/
|
94
|
-
- locale/ka/LC_MESSAGES/
|
95
|
-
- locale/ka/
|
96
|
-
- locale/kn/LC_MESSAGES/
|
97
|
-
- locale/kn/
|
98
|
-
- locale/ko/LC_MESSAGES/
|
99
|
-
- locale/ko/
|
100
|
-
- locale/ml_IN/LC_MESSAGES/
|
101
|
-
- locale/ml_IN/
|
102
|
-
- locale/mr/LC_MESSAGES/
|
103
|
-
- locale/mr/
|
104
|
-
- locale/nl_NL/LC_MESSAGES/
|
105
|
-
- locale/nl_NL/
|
106
|
-
- locale/or/LC_MESSAGES/
|
107
|
-
- locale/or/
|
108
|
-
- locale/pa/LC_MESSAGES/
|
109
|
-
- locale/pa/
|
110
|
-
- locale/pl/LC_MESSAGES/
|
111
|
-
- locale/pl/
|
112
|
-
- locale/pl_PL/LC_MESSAGES/
|
113
|
-
- locale/pl_PL/
|
114
|
-
- locale/pt/LC_MESSAGES/
|
115
|
-
- locale/pt/
|
116
|
-
- locale/pt_BR/LC_MESSAGES/
|
117
|
-
- locale/pt_BR/
|
118
|
-
- locale/ro/LC_MESSAGES/
|
119
|
-
- locale/ro/
|
120
|
-
- locale/ro_RO/LC_MESSAGES/
|
121
|
-
- locale/ro_RO/
|
122
|
-
- locale/ru/LC_MESSAGES/
|
123
|
-
- locale/ru/
|
124
|
-
- locale/sl/LC_MESSAGES/
|
125
|
-
- locale/sl/
|
126
|
-
- locale/sv_SE/LC_MESSAGES/
|
127
|
-
- locale/sv_SE/
|
128
|
-
- locale/ta/LC_MESSAGES/
|
129
|
-
- locale/ta/
|
130
|
-
- locale/ta_IN/LC_MESSAGES/
|
131
|
-
- locale/ta_IN/
|
132
|
-
- locale/te/LC_MESSAGES/
|
133
|
-
- locale/te/
|
134
|
-
- locale/tr/LC_MESSAGES/
|
135
|
-
- locale/tr/
|
136
|
-
- locale/vi/LC_MESSAGES/
|
137
|
-
- locale/vi/
|
138
|
-
- locale/vi_VN/LC_MESSAGES/
|
139
|
-
- locale/vi_VN/
|
140
|
-
- locale/zh/LC_MESSAGES/
|
141
|
-
- locale/zh/
|
142
|
-
- locale/zh_CN/LC_MESSAGES/
|
143
|
-
- locale/zh_CN/
|
144
|
-
- locale/zh_TW/LC_MESSAGES/
|
145
|
-
- locale/zh_TW/
|
172
|
+
- locale/bn/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
173
|
+
- locale/bn/hammer_cli_foreman_rh_cloud.po
|
174
|
+
- locale/bn_IN/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
175
|
+
- locale/bn_IN/hammer_cli_foreman_rh_cloud.po
|
176
|
+
- locale/bqi/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
177
|
+
- locale/bqi/hammer_cli_foreman_rh_cloud.po
|
178
|
+
- locale/ca/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
179
|
+
- locale/ca/hammer_cli_foreman_rh_cloud.po
|
180
|
+
- locale/cs_CZ/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
181
|
+
- locale/cs_CZ/hammer_cli_foreman_rh_cloud.po
|
182
|
+
- locale/de/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
183
|
+
- locale/de/hammer_cli_foreman_rh_cloud.po
|
184
|
+
- locale/de_AT/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
185
|
+
- locale/de_AT/hammer_cli_foreman_rh_cloud.po
|
186
|
+
- locale/de_DE/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
187
|
+
- locale/de_DE/hammer_cli_foreman_rh_cloud.po
|
188
|
+
- locale/el/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
189
|
+
- locale/el/hammer_cli_foreman_rh_cloud.po
|
190
|
+
- locale/en/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
191
|
+
- locale/en/hammer_cli_foreman_rh_cloud.po
|
192
|
+
- locale/en_GB/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
193
|
+
- locale/en_GB/hammer_cli_foreman_rh_cloud.po
|
194
|
+
- locale/en_US/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
195
|
+
- locale/en_US/hammer_cli_foreman_rh_cloud.po
|
196
|
+
- locale/es/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
197
|
+
- locale/es/hammer_cli_foreman_rh_cloud.po
|
198
|
+
- locale/et_EE/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
199
|
+
- locale/et_EE/hammer_cli_foreman_rh_cloud.po
|
200
|
+
- locale/fr/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
201
|
+
- locale/fr/hammer_cli_foreman_rh_cloud.po
|
202
|
+
- locale/gl/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
203
|
+
- locale/gl/hammer_cli_foreman_rh_cloud.po
|
204
|
+
- locale/gu/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
205
|
+
- locale/gu/hammer_cli_foreman_rh_cloud.po
|
206
|
+
- locale/hammer_cli_foreman_rh_cloud.pot
|
207
|
+
- locale/he_IL/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
208
|
+
- locale/he_IL/hammer_cli_foreman_rh_cloud.po
|
209
|
+
- locale/hi/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
210
|
+
- locale/hi/hammer_cli_foreman_rh_cloud.po
|
211
|
+
- locale/id/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
212
|
+
- locale/id/hammer_cli_foreman_rh_cloud.po
|
213
|
+
- locale/it/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
214
|
+
- locale/it/hammer_cli_foreman_rh_cloud.po
|
215
|
+
- locale/ja/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
216
|
+
- locale/ja/hammer_cli_foreman_rh_cloud.po
|
217
|
+
- locale/ka/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
218
|
+
- locale/ka/hammer_cli_foreman_rh_cloud.po
|
219
|
+
- locale/kn/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
220
|
+
- locale/kn/hammer_cli_foreman_rh_cloud.po
|
221
|
+
- locale/ko/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
222
|
+
- locale/ko/hammer_cli_foreman_rh_cloud.po
|
223
|
+
- locale/ml_IN/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
224
|
+
- locale/ml_IN/hammer_cli_foreman_rh_cloud.po
|
225
|
+
- locale/mr/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
226
|
+
- locale/mr/hammer_cli_foreman_rh_cloud.po
|
227
|
+
- locale/nl_NL/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
228
|
+
- locale/nl_NL/hammer_cli_foreman_rh_cloud.po
|
229
|
+
- locale/or/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
230
|
+
- locale/or/hammer_cli_foreman_rh_cloud.po
|
231
|
+
- locale/pa/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
232
|
+
- locale/pa/hammer_cli_foreman_rh_cloud.po
|
233
|
+
- locale/pl/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
234
|
+
- locale/pl/hammer_cli_foreman_rh_cloud.po
|
235
|
+
- locale/pl_PL/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
236
|
+
- locale/pl_PL/hammer_cli_foreman_rh_cloud.po
|
237
|
+
- locale/pt/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
238
|
+
- locale/pt/hammer_cli_foreman_rh_cloud.po
|
239
|
+
- locale/pt_BR/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
240
|
+
- locale/pt_BR/hammer_cli_foreman_rh_cloud.po
|
241
|
+
- locale/ro/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
242
|
+
- locale/ro/hammer_cli_foreman_rh_cloud.po
|
243
|
+
- locale/ro_RO/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
244
|
+
- locale/ro_RO/hammer_cli_foreman_rh_cloud.po
|
245
|
+
- locale/ru/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
246
|
+
- locale/ru/hammer_cli_foreman_rh_cloud.po
|
247
|
+
- locale/sl/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
248
|
+
- locale/sl/hammer_cli_foreman_rh_cloud.po
|
249
|
+
- locale/sv_SE/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
250
|
+
- locale/sv_SE/hammer_cli_foreman_rh_cloud.po
|
251
|
+
- locale/ta/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
252
|
+
- locale/ta/hammer_cli_foreman_rh_cloud.po
|
253
|
+
- locale/ta_IN/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
254
|
+
- locale/ta_IN/hammer_cli_foreman_rh_cloud.po
|
255
|
+
- locale/te/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
256
|
+
- locale/te/hammer_cli_foreman_rh_cloud.po
|
257
|
+
- locale/tr/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
258
|
+
- locale/tr/hammer_cli_foreman_rh_cloud.po
|
259
|
+
- locale/vi/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
260
|
+
- locale/vi/hammer_cli_foreman_rh_cloud.po
|
261
|
+
- locale/vi_VN/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
262
|
+
- locale/vi_VN/hammer_cli_foreman_rh_cloud.po
|
263
|
+
- locale/zh/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
264
|
+
- locale/zh/hammer_cli_foreman_rh_cloud.po
|
265
|
+
- locale/zh_CN/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
266
|
+
- locale/zh_CN/hammer_cli_foreman_rh_cloud.po
|
267
|
+
- locale/zh_TW/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo
|
268
|
+
- locale/zh_TW/hammer_cli_foreman_rh_cloud.po
|
269
|
+
- test/data/3.15/foreman_api.json
|
270
|
+
- test/functional/cloud_connector/cloud_connector_test.rb
|
271
|
+
- test/functional/inventory/download_report_test.rb
|
272
|
+
- test/functional/inventory/generate_report_test.rb
|
273
|
+
- test/functional/inventory/sync_test.rb
|
274
|
+
- test/task_helper.rb
|
275
|
+
- test/test_helper.rb
|
146
276
|
homepage: https://github.com/theforeman/hammer-cli-foreman-rh-cloud
|
147
277
|
licenses:
|
148
|
-
- GPL-3.0
|
278
|
+
- GPL-3.0-or-later
|
149
279
|
metadata: {}
|
150
280
|
post_install_message:
|
151
281
|
rdoc_options: []
|
@@ -169,4 +299,11 @@ rubygems_version: 3.2.33
|
|
169
299
|
signing_key:
|
170
300
|
specification_version: 4
|
171
301
|
summary: Foreman Rh Cloud plugin for Hammer CLI
|
172
|
-
test_files:
|
302
|
+
test_files:
|
303
|
+
- test/data/3.15/foreman_api.json
|
304
|
+
- test/functional/cloud_connector/cloud_connector_test.rb
|
305
|
+
- test/functional/inventory/download_report_test.rb
|
306
|
+
- test/functional/inventory/generate_report_test.rb
|
307
|
+
- test/functional/inventory/sync_test.rb
|
308
|
+
- test/task_helper.rb
|
309
|
+
- test/test_helper.rb
|
@@ -1,30 +0,0 @@
|
|
1
|
-
module HammerCLIForemanRhCloud
|
2
|
-
class ReportCommand < HammerCLIForeman::Command
|
3
|
-
resource :inventory
|
4
|
-
command_name 'rh_cloud_report'
|
5
|
-
|
6
|
-
class DownloadCommand < HammerCLIForeman::DownloadCommand
|
7
|
-
command_name 'download'
|
8
|
-
desc 'Download the last generated report'
|
9
|
-
|
10
|
-
action :download_file
|
11
|
-
|
12
|
-
failure_message _('Failed to download report')
|
13
|
-
|
14
|
-
build_options
|
15
|
-
end
|
16
|
-
|
17
|
-
class GenerateCommand < HammerCLIForeman::Command
|
18
|
-
command_name 'generate'
|
19
|
-
action :generate_report
|
20
|
-
desc 'Start new report generation'
|
21
|
-
|
22
|
-
success_message _('Report generation started successfully')
|
23
|
-
failure_message _('Failed to start report generation task, please check server logs for more information.')
|
24
|
-
|
25
|
-
build_options
|
26
|
-
end
|
27
|
-
|
28
|
-
autoload_subcommands
|
29
|
-
end
|
30
|
-
end
|
Binary file
|
File without changes
|