hammer_cli_katello 1.14.2 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hammer_cli_katello/activation_key.rb +46 -26
- data/lib/hammer_cli_katello/content_view_environment.rb +28 -0
- data/lib/hammer_cli_katello/foreman_search_options_creators.rb +4 -0
- data/lib/hammer_cli_katello/host_extensions.rb +8 -7
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/lib/hammer_cli_katello.rb +6 -0
- data/locale/bn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bn/hammer-cli-katello.po +1 -1
- data/locale/bn_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bn_IN/hammer-cli-katello.po +1 -1
- data/locale/bqi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bqi/hammer-cli-katello.po +1 -1
- data/locale/ca/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ca/hammer-cli-katello.po +1 -1
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/cs_CZ/hammer-cli-katello.po +1 -1
- data/locale/de/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de/hammer-cli-katello.po +1 -1
- data/locale/de_AT/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_AT/hammer-cli-katello.po +1 -1
- data/locale/de_DE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_DE/hammer-cli-katello.po +1 -1
- data/locale/el/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/el/hammer-cli-katello.po +1 -1
- data/locale/en/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en/hammer-cli-katello.po +1 -1
- data/locale/en_GB/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_GB/hammer-cli-katello.po +8 -8
- data/locale/en_US/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_US/hammer-cli-katello.po +1 -1
- data/locale/es/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/es/hammer-cli-katello.po +1 -1
- data/locale/et_EE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/et_EE/hammer-cli-katello.po +1 -1
- data/locale/fr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/fr/hammer-cli-katello.po +192 -120
- data/locale/gl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gl/hammer-cli-katello.po +1 -1
- data/locale/gu/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gu/hammer-cli-katello.po +1 -1
- data/locale/he_IL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/he_IL/hammer-cli-katello.po +1 -1
- data/locale/hi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/hi/hammer-cli-katello.po +1 -1
- data/locale/id/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/id/hammer-cli-katello.po +1 -1
- data/locale/it/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/it/hammer-cli-katello.po +1 -1
- data/locale/ja/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ja/hammer-cli-katello.po +176 -131
- data/locale/ka/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ka/hammer-cli-katello.po +1 -1
- data/locale/kn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/kn/hammer-cli-katello.po +1 -1
- data/locale/ko/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ko/hammer-cli-katello.po +1 -1
- data/locale/ml_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ml_IN/hammer-cli-katello.po +1 -1
- data/locale/mr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/mr/hammer-cli-katello.po +1 -1
- data/locale/nl_NL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/nl_NL/hammer-cli-katello.po +1 -1
- data/locale/or/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/or/hammer-cli-katello.po +1 -1
- data/locale/pa/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pa/hammer-cli-katello.po +1 -1
- data/locale/pl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl/hammer-cli-katello.po +1 -1
- data/locale/pl_PL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl_PL/hammer-cli-katello.po +1 -1
- data/locale/pt/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt/hammer-cli-katello.po +1 -1
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt_BR/hammer-cli-katello.po +1 -1
- data/locale/ro/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro/hammer-cli-katello.po +1 -1
- data/locale/ro_RO/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro_RO/hammer-cli-katello.po +1 -1
- data/locale/ru/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ru/hammer-cli-katello.po +1 -1
- data/locale/sl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sl/hammer-cli-katello.po +1 -1
- data/locale/sv_SE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sv_SE/hammer-cli-katello.po +1 -1
- data/locale/ta/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta/hammer-cli-katello.po +1 -1
- data/locale/ta_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta_IN/hammer-cli-katello.po +1 -1
- data/locale/te/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/te/hammer-cli-katello.po +1 -1
- data/locale/tr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/tr/hammer-cli-katello.po +1 -1
- data/locale/vi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi/hammer-cli-katello.po +1 -1
- data/locale/vi_VN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi_VN/hammer-cli-katello.po +1 -1
- data/locale/zh/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh/hammer-cli-katello.po +1 -1
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_CN/hammer-cli-katello.po +189 -170
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_TW/hammer-cli-katello.po +1 -1
- data/test/data/4.14/foreman_api.json +1 -0
- data/test/functional/activation_key/data/activation_key.json +43 -1
- data/test/functional/activation_key/info_test.rb +28 -2
- data/test/functional/activation_key/list_test.rb +10 -8
- data/test/functional/host/extensions/data/host_list.json +21 -0
- data/test/functional/host/extensions/list_test.rb +2 -2
- data/test/functional/repository/update_test.rb +0 -1
- data/test/test_helper.rb +1 -1
- metadata +8 -5
@@ -13,5 +13,47 @@
|
|
13
13
|
"name": "Library",
|
14
14
|
"id": 1
|
15
15
|
},
|
16
|
-
"purpose_addons": "Test Addon1, Test Addon2"
|
16
|
+
"purpose_addons": "Test Addon1, Test Addon2",
|
17
|
+
"multi_content_view_environment": true,
|
18
|
+
"organization": {
|
19
|
+
"name": "Default Organization",
|
20
|
+
"label": "Default_Organization",
|
21
|
+
"id": 1
|
22
|
+
},
|
23
|
+
"content_view_environments": [
|
24
|
+
{
|
25
|
+
"content_view": {
|
26
|
+
"id": 2,
|
27
|
+
"name": "RHEL-8",
|
28
|
+
"composite": false,
|
29
|
+
"content_view_version": "1.0",
|
30
|
+
"content_view_version_id": 4,
|
31
|
+
"content_view_version_latest": true,
|
32
|
+
"content_view_default": false
|
33
|
+
},
|
34
|
+
"lifecycle_environment": {
|
35
|
+
"id": 1,
|
36
|
+
"name": "Library",
|
37
|
+
"lifecycle_environment_library": true
|
38
|
+
},
|
39
|
+
"label": "Library/RHEL-8"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"content_view": {
|
43
|
+
"id": 4,
|
44
|
+
"name": "Zoo",
|
45
|
+
"composite": false,
|
46
|
+
"content_view_version": "1.0",
|
47
|
+
"content_view_version_id": 2,
|
48
|
+
"content_view_version_latest": true,
|
49
|
+
"content_view_default": false
|
50
|
+
},
|
51
|
+
"lifecycle_environment": {
|
52
|
+
"id": 2,
|
53
|
+
"name": "Dev",
|
54
|
+
"lifecycle_environment_library": false
|
55
|
+
},
|
56
|
+
"label": "Dev/Zoo"
|
57
|
+
}
|
58
|
+
]
|
17
59
|
}
|
@@ -17,11 +17,37 @@ describe 'activation-key info' do
|
|
17
17
|
|
18
18
|
result = run_cmd(@cmd + params)
|
19
19
|
|
20
|
-
expected_fields = [['
|
20
|
+
expected_fields = [['Name', 'test key2'],
|
21
|
+
['Id', '1'],
|
22
|
+
['Description', 'Activation key'],
|
21
23
|
['Purpose Usage', 'Usage'],
|
22
24
|
['Purpose Role', 'Role'],
|
23
25
|
['Purpose Addons', 'Test Addon1, Test Addon2'],
|
24
|
-
['
|
26
|
+
['Multi Content View Environment', 'yes'],
|
27
|
+
['Organization', ''],
|
28
|
+
['Id', '1'],
|
29
|
+
['Name', 'Default Organization'],
|
30
|
+
['Content View Environments', ''],
|
31
|
+
['Content View', ''],
|
32
|
+
['Id', '2'],
|
33
|
+
['Name', 'RHEL-8'],
|
34
|
+
['Version', '1.0'],
|
35
|
+
['Content View version Id', '4'],
|
36
|
+
['Composite', 'no'],
|
37
|
+
['Lifecycle environment', ''],
|
38
|
+
['Id', '1'],
|
39
|
+
['Name', 'Library'],
|
40
|
+
['Label', 'Library/RHEL-8'],
|
41
|
+
['Content View', ''],
|
42
|
+
['Id', '4'],
|
43
|
+
['Name', 'Zoo'],
|
44
|
+
['Version', '1.0'],
|
45
|
+
['Content View version Id', '2'],
|
46
|
+
['Composite', 'no'],
|
47
|
+
['Lifecycle environment', ''],
|
48
|
+
['Id', '2'],
|
49
|
+
['Name', 'Dev'],
|
50
|
+
['Label', 'Dev/Zoo']]
|
25
51
|
|
26
52
|
expected_results = expected_fields.map { |field| success_result(FieldMatcher.new(*field)) }
|
27
53
|
expected_results.each { |expected| assert_cmd(expected, result) }
|
@@ -35,15 +35,16 @@ describe 'listing activation-keys' do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
ex.returns(empty_response)
|
38
|
-
|
39
|
-
expected_result = success_result("
|
40
|
-
ID | NAME | HOST LIMIT |
|
41
|
-
|
38
|
+
# rubocop:disable Layout/LineLength
|
39
|
+
expected_result = success_result("---|------|------------|---------------------------|-------------------------------
|
40
|
+
ID | NAME | HOST LIMIT | CONTENT VIEW ENVIRONMENTS | MULTI CONTENT VIEW ENVIRONMENT
|
41
|
+
---|------|------------|---------------------------|-------------------------------
|
42
42
|
")
|
43
43
|
|
44
44
|
result = run_cmd(@cmd + params)
|
45
45
|
assert_cmd(expected_result, result)
|
46
46
|
end
|
47
|
+
# rubocop:enable Layout/LineLength
|
47
48
|
|
48
49
|
it "lists the activation-keys belonging to a lifecycle environment by name" do
|
49
50
|
params = ["--organization-id=#{org_id}", '--lifecycle-environment=test']
|
@@ -56,13 +57,14 @@ ID | NAME | HOST LIMIT | LIFECYCLE ENVIRONMENT | CONTENT VIEW
|
|
56
57
|
end
|
57
58
|
|
58
59
|
ex.returns(empty_response)
|
59
|
-
|
60
|
-
expected_result = success_result("
|
61
|
-
ID | NAME | HOST LIMIT |
|
62
|
-
|
60
|
+
# rubocop:disable Layout/LineLength
|
61
|
+
expected_result = success_result("---|------|------------|---------------------------|-------------------------------
|
62
|
+
ID | NAME | HOST LIMIT | CONTENT VIEW ENVIRONMENTS | MULTI CONTENT VIEW ENVIRONMENT
|
63
|
+
---|------|------------|---------------------------|-------------------------------
|
63
64
|
")
|
64
65
|
|
65
66
|
result = run_cmd(@cmd + params)
|
66
67
|
assert_cmd(expected_result, result)
|
67
68
|
end
|
69
|
+
# rubocop:enable Layout/LineLength
|
68
70
|
end
|
@@ -95,6 +95,27 @@
|
|
95
95
|
"id":1,
|
96
96
|
"name":"Library"
|
97
97
|
},
|
98
|
+
"content_view_environment_labels": "Library",
|
99
|
+
"multi_content_view_environment": false,
|
100
|
+
"content_view_environments": [
|
101
|
+
{
|
102
|
+
"content_view": {
|
103
|
+
"id": 1,
|
104
|
+
"name": "Default Organization View",
|
105
|
+
"composite": false,
|
106
|
+
"content_view_version": "1.0",
|
107
|
+
"content_view_version_id": 1,
|
108
|
+
"content_view_version_latest": true,
|
109
|
+
"content_view_default": true
|
110
|
+
},
|
111
|
+
"lifecycle_environment": {
|
112
|
+
"id": 1,
|
113
|
+
"name": "Library",
|
114
|
+
"lifecycle_environment_library": true
|
115
|
+
},
|
116
|
+
"label": "Library"
|
117
|
+
}
|
118
|
+
],
|
98
119
|
"errata_counts":{
|
99
120
|
"security":0,
|
100
121
|
"bugfix":0,
|
@@ -13,8 +13,8 @@ describe 'host list' do
|
|
13
13
|
|
14
14
|
result = run_cmd(@cmd)
|
15
15
|
|
16
|
-
fields = ['CONTENT VIEW', '
|
17
|
-
values = ['
|
16
|
+
fields = ['CONTENT VIEW ENVIRONMENTS', 'MULTI CONTENT VIEW ENVIRONMENT', 'TRACE STATUS']
|
17
|
+
values = ['Library', 'no', 'updated']
|
18
18
|
expected_result = success_result(IndexMatcher.new([fields, values]))
|
19
19
|
assert_cmd(expected_result, result)
|
20
20
|
end
|
@@ -27,7 +27,6 @@ module HammerCLIKatello # rubocop:disable Metrics/ModuleLength
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
it "adds a tag to an image" do
|
30
|
-
skip "Until we https://projects.theforeman.org/issues/34817 is resolved"
|
31
30
|
ex = api_expects(:content_uploads, :create)
|
32
31
|
.with_params('repository_id' => repo_id, :size => 0)
|
33
32
|
|
data/test/test_helper.rb
CHANGED
@@ -5,7 +5,7 @@ require 'mocha/minitest'
|
|
5
5
|
require 'hammer_cli'
|
6
6
|
require 'ostruct'
|
7
7
|
|
8
|
-
KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '4.
|
8
|
+
KATELLO_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '4.14')
|
9
9
|
|
10
10
|
if HammerCLI.context[:api_connection]
|
11
11
|
HammerCLI.context[:api_connection].create('foreman') do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Price
|
@@ -37,7 +37,7 @@ authors:
|
|
37
37
|
autorequire:
|
38
38
|
bindir: bin
|
39
39
|
cert_chain: []
|
40
|
-
date: 2024-
|
40
|
+
date: 2024-11-05 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: theforeman-rubocop
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/hammer_cli_katello/content_units.rb
|
116
116
|
- lib/hammer_cli_katello/content_view.rb
|
117
117
|
- lib/hammer_cli_katello/content_view_component.rb
|
118
|
+
- lib/hammer_cli_katello/content_view_environment.rb
|
118
119
|
- lib/hammer_cli_katello/content_view_name_resolvable.rb
|
119
120
|
- lib/hammer_cli_katello/content_view_purge.rb
|
120
121
|
- lib/hammer_cli_katello/content_view_version.rb
|
@@ -294,6 +295,7 @@ files:
|
|
294
295
|
- test/data/4.0/foreman_api.json
|
295
296
|
- test/data/4.1/foreman_api.json
|
296
297
|
- test/data/4.10/foreman_api.json
|
298
|
+
- test/data/4.14/foreman_api.json
|
297
299
|
- test/data/4.3/foreman_api.json
|
298
300
|
- test/data/4.4/foreman_api.json
|
299
301
|
- test/data/4.5/foreman_api.json
|
@@ -490,7 +492,7 @@ files:
|
|
490
492
|
- test/unit/search_options_creators_test.rb
|
491
493
|
homepage: https://github.com/Katello/hammer-cli-katello
|
492
494
|
licenses:
|
493
|
-
- GPL-3.0
|
495
|
+
- GPL-3.0-or-later
|
494
496
|
metadata: {}
|
495
497
|
post_install_message:
|
496
498
|
rdoc_options: []
|
@@ -503,14 +505,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
503
505
|
version: '2.7'
|
504
506
|
- - "<"
|
505
507
|
- !ruby/object:Gem::Version
|
506
|
-
version: '
|
508
|
+
version: '4'
|
507
509
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
508
510
|
requirements:
|
509
511
|
- - ">="
|
510
512
|
- !ruby/object:Gem::Version
|
511
513
|
version: '0'
|
512
514
|
requirements: []
|
513
|
-
rubygems_version: 3.
|
515
|
+
rubygems_version: 3.2.33
|
514
516
|
signing_key:
|
515
517
|
specification_version: 4
|
516
518
|
summary: Katello commands for Hammer
|
@@ -537,6 +539,7 @@ test_files:
|
|
537
539
|
- test/data/4.0/foreman_api.json
|
538
540
|
- test/data/4.1/foreman_api.json
|
539
541
|
- test/data/4.10/foreman_api.json
|
542
|
+
- test/data/4.14/foreman_api.json
|
540
543
|
- test/data/4.3/foreman_api.json
|
541
544
|
- test/data/4.4/foreman_api.json
|
542
545
|
- test/data/4.5/foreman_api.json
|