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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hammer_cli_foreman_rh_cloud/cloud_connector.rb +2 -1
  3. data/lib/hammer_cli_foreman_rh_cloud/i18n.rb +1 -1
  4. data/lib/hammer_cli_foreman_rh_cloud/insights.rb +17 -0
  5. data/lib/hammer_cli_foreman_rh_cloud/inventory.rb +30 -1
  6. data/lib/hammer_cli_foreman_rh_cloud/version.rb +1 -1
  7. data/lib/hammer_cli_foreman_rh_cloud.rb +5 -19
  8. data/locale/bn/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  9. data/locale/bn/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  10. data/locale/bn_IN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  11. data/locale/bn_IN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  12. data/locale/bqi/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  13. data/locale/bqi/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  14. data/locale/ca/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  15. data/locale/ca/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  16. data/locale/cs_CZ/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  17. data/locale/cs_CZ/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  18. data/locale/de/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  19. data/locale/de/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  20. data/locale/de_AT/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  21. data/locale/de_AT/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  22. data/locale/de_DE/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  23. data/locale/de_DE/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  24. data/locale/el/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  25. data/locale/el/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  26. data/locale/en/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  27. data/locale/en/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  28. data/locale/en_GB/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  29. data/locale/en_GB/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  30. data/locale/en_US/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  31. data/locale/en_US/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  32. data/locale/es/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  33. data/locale/es/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  34. data/locale/et_EE/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  35. data/locale/et_EE/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  36. data/locale/fr/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  37. data/locale/fr/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
  38. data/locale/gl/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  39. data/locale/gl/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  40. data/locale/gu/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  41. data/locale/gu/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  42. data/locale/he_IL/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  43. data/locale/he_IL/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  44. data/locale/hi/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  45. data/locale/hi/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  46. data/locale/id/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  47. data/locale/id/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  48. data/locale/it/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  49. data/locale/it/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  50. data/locale/ja/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  51. data/locale/ja/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
  52. data/locale/ka/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  53. data/locale/ka/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  54. data/locale/kn/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  55. data/locale/kn/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  56. data/locale/ko/LC_MESSAGES/hammer_cli_foreman_rh_cloud.mo +0 -0
  57. data/locale/ko/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +16 -6
  58. data/locale/ml_IN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  59. data/locale/ml_IN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  60. data/locale/mr/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  61. data/locale/mr/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  62. data/locale/nl_NL/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  63. data/locale/nl_NL/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  64. data/locale/or/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  65. data/locale/or/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  66. data/locale/pa/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  67. data/locale/pa/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  68. data/locale/pl/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  69. data/locale/pl/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +4 -4
  70. data/locale/pl_PL/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  71. data/locale/pl_PL/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +4 -4
  72. data/locale/pt/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  73. data/locale/pt/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  74. data/locale/pt_BR/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  75. data/locale/pt_BR/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  76. data/locale/ro/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  77. data/locale/ro/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  78. data/locale/ro_RO/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  79. data/locale/ro_RO/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  80. data/locale/ru/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  81. data/locale/ru/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +4 -4
  82. data/locale/sl/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  83. data/locale/sl/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
  84. data/locale/sv_SE/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  85. data/locale/sv_SE/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  86. data/locale/ta/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  87. data/locale/ta/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  88. data/locale/ta_IN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  89. data/locale/ta_IN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  90. data/locale/te/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  91. data/locale/te/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  92. data/locale/tr/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  93. data/locale/tr/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  94. data/locale/vi/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  95. data/locale/vi/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  96. data/locale/vi_VN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  97. data/locale/vi_VN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  98. data/locale/zh/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  99. data/locale/zh/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  100. data/locale/zh_CN/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  101. data/locale/zh_CN/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +3 -3
  102. data/locale/zh_TW/LC_MESSAGES/{hammer-cli-foreman-rh-cloud.mo → hammer_cli_foreman_rh_cloud.mo} +0 -0
  103. data/locale/zh_TW/{hammer-cli-foreman-rh-cloud.po → hammer_cli_foreman_rh_cloud.po} +1 -1
  104. data/test/data/3.15/foreman_api.json +1 -0
  105. data/test/functional/cloud_connector/cloud_connector_test.rb +21 -0
  106. data/test/functional/inventory/download_report_test.rb +31 -0
  107. data/test/functional/inventory/generate_report_test.rb +37 -0
  108. data/test/functional/inventory/sync_test.rb +31 -0
  109. data/test/task_helper.rb +7 -0
  110. data/test/test_helper.rb +21 -0
  111. metadata +243 -106
  112. data/lib/hammer_cli_foreman_rh_cloud/report.rb +0 -30
  113. data/locale/ko/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo +0 -0
  114. /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
@@ -0,0 +1,7 @@
1
+ module ForemanTaskHelpers
2
+ def expect_foreman_task(task_id)
3
+ ex = api_expects(:foreman_tasks, :show, 'Show task')
4
+ ex.returns('id' => task_id, 'state' => 'stopped', 'progress' => 1,
5
+ 'humanized' => { 'output' => '', 'errors' => '' })
6
+ end
7
+ end
@@ -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.3
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: 2024-09-19 00:00:00.000000000 Z
16
+ date: 2025-04-01 00:00:00.000000000 Z
12
17
  dependencies:
13
18
  - !ruby/object:Gem::Dependency
14
- name: hammer_cli_foreman
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: 3.0.0
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: :runtime
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.0.0
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/hammer-cli-foreman-rh-cloud.mo
50
- - locale/bn/hammer-cli-foreman-rh-cloud.po
51
- - locale/bn_IN/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
52
- - locale/bn_IN/hammer-cli-foreman-rh-cloud.po
53
- - locale/bqi/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
54
- - locale/bqi/hammer-cli-foreman-rh-cloud.po
55
- - locale/ca/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
56
- - locale/ca/hammer-cli-foreman-rh-cloud.po
57
- - locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
58
- - locale/cs_CZ/hammer-cli-foreman-rh-cloud.po
59
- - locale/de/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
60
- - locale/de/hammer-cli-foreman-rh-cloud.po
61
- - locale/de_AT/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
62
- - locale/de_AT/hammer-cli-foreman-rh-cloud.po
63
- - locale/de_DE/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
64
- - locale/de_DE/hammer-cli-foreman-rh-cloud.po
65
- - locale/el/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
66
- - locale/el/hammer-cli-foreman-rh-cloud.po
67
- - locale/en/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
68
- - locale/en/hammer-cli-foreman-rh-cloud.po
69
- - locale/en_GB/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
70
- - locale/en_GB/hammer-cli-foreman-rh-cloud.po
71
- - locale/en_US/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
72
- - locale/en_US/hammer-cli-foreman-rh-cloud.po
73
- - locale/es/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
74
- - locale/es/hammer-cli-foreman-rh-cloud.po
75
- - locale/et_EE/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
76
- - locale/et_EE/hammer-cli-foreman-rh-cloud.po
77
- - locale/fr/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
78
- - locale/fr/hammer-cli-foreman-rh-cloud.po
79
- - locale/gl/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
80
- - locale/gl/hammer-cli-foreman-rh-cloud.po
81
- - locale/gu/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
82
- - locale/gu/hammer-cli-foreman-rh-cloud.po
83
- - locale/hammer-cli-foreman-rh-cloud.pot
84
- - locale/he_IL/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
85
- - locale/he_IL/hammer-cli-foreman-rh-cloud.po
86
- - locale/hi/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
87
- - locale/hi/hammer-cli-foreman-rh-cloud.po
88
- - locale/id/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
89
- - locale/id/hammer-cli-foreman-rh-cloud.po
90
- - locale/it/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
91
- - locale/it/hammer-cli-foreman-rh-cloud.po
92
- - locale/ja/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
93
- - locale/ja/hammer-cli-foreman-rh-cloud.po
94
- - locale/ka/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
95
- - locale/ka/hammer-cli-foreman-rh-cloud.po
96
- - locale/kn/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
97
- - locale/kn/hammer-cli-foreman-rh-cloud.po
98
- - locale/ko/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
99
- - locale/ko/hammer-cli-foreman-rh-cloud.po
100
- - locale/ml_IN/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
101
- - locale/ml_IN/hammer-cli-foreman-rh-cloud.po
102
- - locale/mr/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
103
- - locale/mr/hammer-cli-foreman-rh-cloud.po
104
- - locale/nl_NL/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
105
- - locale/nl_NL/hammer-cli-foreman-rh-cloud.po
106
- - locale/or/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
107
- - locale/or/hammer-cli-foreman-rh-cloud.po
108
- - locale/pa/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
109
- - locale/pa/hammer-cli-foreman-rh-cloud.po
110
- - locale/pl/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
111
- - locale/pl/hammer-cli-foreman-rh-cloud.po
112
- - locale/pl_PL/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
113
- - locale/pl_PL/hammer-cli-foreman-rh-cloud.po
114
- - locale/pt/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
115
- - locale/pt/hammer-cli-foreman-rh-cloud.po
116
- - locale/pt_BR/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
117
- - locale/pt_BR/hammer-cli-foreman-rh-cloud.po
118
- - locale/ro/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
119
- - locale/ro/hammer-cli-foreman-rh-cloud.po
120
- - locale/ro_RO/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
121
- - locale/ro_RO/hammer-cli-foreman-rh-cloud.po
122
- - locale/ru/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
123
- - locale/ru/hammer-cli-foreman-rh-cloud.po
124
- - locale/sl/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
125
- - locale/sl/hammer-cli-foreman-rh-cloud.po
126
- - locale/sv_SE/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
127
- - locale/sv_SE/hammer-cli-foreman-rh-cloud.po
128
- - locale/ta/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
129
- - locale/ta/hammer-cli-foreman-rh-cloud.po
130
- - locale/ta_IN/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
131
- - locale/ta_IN/hammer-cli-foreman-rh-cloud.po
132
- - locale/te/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
133
- - locale/te/hammer-cli-foreman-rh-cloud.po
134
- - locale/tr/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
135
- - locale/tr/hammer-cli-foreman-rh-cloud.po
136
- - locale/vi/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
137
- - locale/vi/hammer-cli-foreman-rh-cloud.po
138
- - locale/vi_VN/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
139
- - locale/vi_VN/hammer-cli-foreman-rh-cloud.po
140
- - locale/zh/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
141
- - locale/zh/hammer-cli-foreman-rh-cloud.po
142
- - locale/zh_CN/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
143
- - locale/zh_CN/hammer-cli-foreman-rh-cloud.po
144
- - locale/zh_TW/LC_MESSAGES/hammer-cli-foreman-rh-cloud.mo
145
- - locale/zh_TW/hammer-cli-foreman-rh-cloud.po
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