hammer_cli_katello 1.11.2 → 1.13.0
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_katello/capsule.rb +48 -14
- data/lib/hammer_cli_katello/command_extensions/kickstart_repository.rb +1 -1
- data/lib/hammer_cli_katello/content_view.rb +56 -9
- data/lib/hammer_cli_katello/content_view_version.rb +13 -0
- data/lib/hammer_cli_katello/host_extensions.rb +6 -2
- data/lib/hammer_cli_katello/organization.rb +0 -23
- data/lib/hammer_cli_katello/product.rb +17 -0
- data/lib/hammer_cli_katello/repository.rb +70 -15
- data/lib/hammer_cli_katello/subscription.rb +2 -2
- data/lib/hammer_cli_katello/version.rb +1 -1
- data/lib/hammer_cli_katello.rb +0 -6
- data/locale/bn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bn/hammer-cli-katello.edit.po +3255 -0
- data/locale/bn/hammer-cli-katello.po +1 -94
- data/locale/bn/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/bn_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bn_IN/hammer-cli-katello.edit.po +3255 -0
- data/locale/bn_IN/hammer-cli-katello.po +1 -94
- data/locale/bn_IN/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/bqi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bqi/hammer-cli-katello.edit.po +3251 -0
- data/locale/bqi/hammer-cli-katello.po +2133 -0
- data/locale/bqi/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ca/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ca/hammer-cli-katello.edit.po +3255 -0
- data/locale/ca/hammer-cli-katello.po +1 -94
- data/locale/ca/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/cs_CZ/hammer-cli-katello.edit.po +3256 -0
- data/locale/cs_CZ/hammer-cli-katello.po +1 -94
- data/locale/cs_CZ/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/de/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de/hammer-cli-katello.edit.po +3329 -0
- data/locale/de/hammer-cli-katello.po +1 -94
- data/locale/de/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/de_AT/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_AT/hammer-cli-katello.edit.po +3251 -0
- data/locale/de_AT/hammer-cli-katello.po +1 -94
- data/locale/de_AT/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/de_DE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_DE/hammer-cli-katello.edit.po +3257 -0
- data/locale/de_DE/hammer-cli-katello.po +1 -94
- data/locale/de_DE/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/el/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/el/hammer-cli-katello.edit.po +3255 -0
- data/locale/el/hammer-cli-katello.po +1 -94
- data/locale/el/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/en/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en/hammer-cli-katello.edit.po +2745 -0
- data/locale/en/hammer-cli-katello.po +134 -125
- data/locale/en/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/en_GB/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_GB/hammer-cli-katello.edit.po +3256 -0
- data/locale/en_GB/hammer-cli-katello.po +1 -94
- data/locale/en_GB/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/en_US/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_US/hammer-cli-katello.edit.po +3251 -0
- data/locale/en_US/hammer-cli-katello.po +1 -94
- data/locale/en_US/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/es/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/es/hammer-cli-katello.edit.po +3323 -0
- data/locale/es/hammer-cli-katello.po +5 -96
- data/locale/es/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/et_EE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/et_EE/hammer-cli-katello.edit.po +3251 -0
- data/locale/et_EE/hammer-cli-katello.po +1 -94
- data/locale/et_EE/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/fr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/fr/hammer-cli-katello.edit.po +3347 -0
- data/locale/fr/hammer-cli-katello.po +12 -106
- data/locale/fr/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/gl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gl/hammer-cli-katello.edit.po +3255 -0
- data/locale/gl/hammer-cli-katello.po +1 -94
- data/locale/gl/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/gu/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gu/hammer-cli-katello.edit.po +3255 -0
- data/locale/gu/hammer-cli-katello.po +1 -94
- data/locale/gu/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/hammer-cli-katello.pot +304 -312
- data/locale/he_IL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/he_IL/hammer-cli-katello.edit.po +3255 -0
- data/locale/he_IL/hammer-cli-katello.po +3 -96
- data/locale/he_IL/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/hi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/hi/hammer-cli-katello.edit.po +3255 -0
- data/locale/hi/hammer-cli-katello.po +1 -94
- data/locale/hi/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/id/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/id/hammer-cli-katello.edit.po +3255 -0
- data/locale/id/hammer-cli-katello.po +13 -102
- data/locale/id/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/it/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/it/hammer-cli-katello.edit.po +3261 -0
- data/locale/it/hammer-cli-katello.po +1 -94
- data/locale/it/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ja/hammer-cli-katello.edit.po +3273 -0
- data/locale/ja/hammer-cli-katello.po +4 -97
- data/locale/ja/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ka/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ka/hammer-cli-katello.edit.po +3351 -0
- data/locale/ka/hammer-cli-katello.po +1 -94
- data/locale/ka/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/kn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/kn/hammer-cli-katello.edit.po +3255 -0
- data/locale/kn/hammer-cli-katello.po +1 -94
- data/locale/kn/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ko/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ko/hammer-cli-katello.edit.po +3258 -0
- data/locale/ko/hammer-cli-katello.po +1 -94
- data/locale/ko/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ml_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ml_IN/hammer-cli-katello.edit.po +3251 -0
- data/locale/ml_IN/hammer-cli-katello.po +1 -94
- data/locale/ml_IN/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/mr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/mr/hammer-cli-katello.edit.po +3255 -0
- data/locale/mr/hammer-cli-katello.po +1 -94
- data/locale/mr/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/nl_NL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/nl_NL/hammer-cli-katello.edit.po +3259 -0
- data/locale/nl_NL/hammer-cli-katello.po +1 -94
- data/locale/nl_NL/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/or/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/or/hammer-cli-katello.edit.po +3255 -0
- data/locale/or/hammer-cli-katello.po +1 -94
- data/locale/or/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/pa/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pa/hammer-cli-katello.edit.po +3255 -0
- data/locale/pa/hammer-cli-katello.po +1 -94
- data/locale/pa/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/pl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl/hammer-cli-katello.edit.po +3256 -0
- data/locale/pl/hammer-cli-katello.po +1 -94
- data/locale/pl/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/pl_PL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl_PL/hammer-cli-katello.edit.po +3251 -0
- data/locale/pl_PL/hammer-cli-katello.po +1 -94
- data/locale/pl_PL/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/pt/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt/hammer-cli-katello.edit.po +3255 -0
- data/locale/pt/hammer-cli-katello.po +1 -94
- data/locale/pt/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt_BR/hammer-cli-katello.edit.po +3315 -0
- data/locale/pt_BR/hammer-cli-katello.po +5 -96
- data/locale/pt_BR/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ro/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro/hammer-cli-katello.edit.po +3251 -0
- data/locale/ro/hammer-cli-katello.po +1 -94
- data/locale/ro/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ro_RO/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro_RO/hammer-cli-katello.edit.po +3251 -0
- data/locale/ro_RO/hammer-cli-katello.po +1 -94
- data/locale/ro_RO/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ru/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ru/hammer-cli-katello.edit.po +3260 -0
- data/locale/ru/hammer-cli-katello.po +1 -94
- data/locale/ru/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/sl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sl/hammer-cli-katello.edit.po +3255 -0
- data/locale/sl/hammer-cli-katello.po +1 -94
- data/locale/sl/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/sv_SE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sv_SE/hammer-cli-katello.edit.po +3256 -0
- data/locale/sv_SE/hammer-cli-katello.po +1 -94
- data/locale/sv_SE/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ta/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta/hammer-cli-katello.edit.po +3255 -0
- data/locale/ta/hammer-cli-katello.po +1 -94
- data/locale/ta/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/ta_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta_IN/hammer-cli-katello.edit.po +3255 -0
- data/locale/ta_IN/hammer-cli-katello.po +1 -94
- data/locale/ta_IN/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/te/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/te/hammer-cli-katello.edit.po +3255 -0
- data/locale/te/hammer-cli-katello.po +1 -94
- data/locale/te/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/tr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/tr/hammer-cli-katello.edit.po +3255 -0
- data/locale/tr/hammer-cli-katello.po +1 -94
- data/locale/tr/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/vi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi/hammer-cli-katello.edit.po +3251 -0
- data/locale/vi/hammer-cli-katello.po +1 -94
- data/locale/vi/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/vi_VN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi_VN/hammer-cli-katello.edit.po +3251 -0
- data/locale/vi_VN/hammer-cli-katello.po +1 -94
- data/locale/vi_VN/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/zh/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh/hammer-cli-katello.edit.po +3251 -0
- data/locale/zh/hammer-cli-katello.po +1 -94
- data/locale/zh/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_CN/hammer-cli-katello.edit.po +3268 -0
- data/locale/zh_CN/hammer-cli-katello.po +4 -97
- data/locale/zh_CN/hammer-cli-katello.po.time_stamp +0 -0
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_TW/hammer-cli-katello.edit.po +3257 -0
- data/locale/zh_TW/hammer-cli-katello.po +1 -94
- data/locale/zh_TW/hammer-cli-katello.po.time_stamp +0 -0
- data/test/functional/acs/create_test.rb +3 -3
- data/test/functional/content_credentials/create_test.rb +2 -2
- data/test/functional/content_export/complete/repository_test.rb +7 -7
- data/test/functional/content_export/incremental/repository_test.rb +6 -6
- data/test/functional/content_import/library_test.rb +5 -3
- data/test/functional/content_import/version_test.rb +5 -3
- data/test/functional/content_view/component/add_test.rb +4 -4
- data/test/functional/content_view/component/remove_test.rb +6 -6
- data/test/functional/content_view/component/update_test.rb +5 -5
- data/test/functional/content_view/create_test.rb +3 -3
- data/test/functional/organization/info_test.rb +0 -14
- data/test/functional/product/{update_proxy.rb → update_proxy_test.rb} +8 -14
- data/test/functional/product/verify_checksum_test.rb +31 -0
- data/test/functional/repository/create_test.rb +3 -3
- data/test/functional/repository/info_test.rb +2 -2
- data/test/functional/repository/verify_checksum_test.rb +105 -0
- data/test/functional/sync_plan/create_test.rb +9 -9
- data/test/functional/sync_plan/delete_test.rb +3 -3
- data/test/functional/sync_plan/update_test.rb +5 -5
- data/test/test_helper.rb +1 -0
- metadata +118 -146
- data/lib/hammer_cli_katello/simple_content_access.rb +0 -59
- data/test/functional/simple_content_access/disable_test.rb +0 -48
- data/test/functional/simple_content_access/enable_test.rb +0 -46
- data/test/functional/simple_content_access/status_test.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 259eec49a3c0e1fb35c8ac5333ef563235d500363c6502c3b1cba8b93a011a95
|
4
|
+
data.tar.gz: 982937c903bed8199e89f4e4375c0411dfbd67d36d677104737fab8b44cc2621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e6c290259d07d4b6cf983023d26f2588225b9f3d0e814dde9c64b5cbdae93d76269aa76410014ef2ddcb67d3ac6995918be63be17a68f9251bb94a49a137a29
|
7
|
+
data.tar.gz: bcc0aa004a258b7d3dca182d1a6428cbd09e591fff3c2dea65cd5363f900dbc58b11dd8323197c52543145b39937ecf0bfb69671549fa57eaddc856dc1b50af1
|
@@ -121,6 +121,26 @@ module HammerCLIKatello
|
|
121
121
|
build_options
|
122
122
|
end
|
123
123
|
|
124
|
+
class VerifyChecksumCommand < HammerCLIKatello::SingleResourceCommand
|
125
|
+
include HammerCLIForemanTasks::Async
|
126
|
+
include LifecycleEnvironmentNameMapping
|
127
|
+
|
128
|
+
resource :capsule_content, :verify_checksum
|
129
|
+
command_name "verify-checksum"
|
130
|
+
|
131
|
+
success_message _("Capsule content checksum is being verified in task %{id}.")
|
132
|
+
failure_message _("Could not verify capsule content checksum")
|
133
|
+
|
134
|
+
option "--organization-id", "ID", _("Organization ID"),
|
135
|
+
:attribute_name => :option_organization_id
|
136
|
+
option "--organization", "NAME", _("Organization name"),
|
137
|
+
:attribute_name => :option_organization_name
|
138
|
+
|
139
|
+
build_options
|
140
|
+
|
141
|
+
extend_with(HammerCLIKatello::CommandExtensions::LifecycleEnvironment.new)
|
142
|
+
end
|
143
|
+
|
124
144
|
class SyncStatusCommand < HammerCLIKatello::InfoCommand
|
125
145
|
resource :capsule_content, :sync_status
|
126
146
|
command_name "synchronization-status"
|
@@ -191,20 +211,34 @@ module HammerCLIKatello
|
|
191
211
|
field :name, _("Repository Name")
|
192
212
|
label _('Content Counts') do
|
193
213
|
from :_content_counts do
|
194
|
-
field :warning, _('Warning')
|
195
|
-
|
196
|
-
field :
|
197
|
-
|
198
|
-
field :
|
199
|
-
|
200
|
-
field :
|
201
|
-
|
202
|
-
field :
|
203
|
-
|
204
|
-
field :
|
205
|
-
|
206
|
-
field :
|
207
|
-
|
214
|
+
field :warning, _('Warning'), Fields::Field,
|
215
|
+
:hide_blank => true
|
216
|
+
field :rpm, _('Packages'), Fields::Field,
|
217
|
+
:hide_blank => true
|
218
|
+
field :srpm, _('SRPMs'), Fields::Field,
|
219
|
+
:hide_blank => true
|
220
|
+
field :module_stream, _('Module Streams'), Fields::Field,
|
221
|
+
:hide_blank => true
|
222
|
+
field :package_group, _('Package Groups'), Fields::Field,
|
223
|
+
:hide_blank => true
|
224
|
+
field :erratum, _('Errata'), Fields::Field,
|
225
|
+
:hide_blank => true
|
226
|
+
field :deb, _('Debian Packages'), Fields::Field,
|
227
|
+
:hide_blank => true
|
228
|
+
field :docker_tag, _('Container Tags'), Fields::Field,
|
229
|
+
:hide_blank => true
|
230
|
+
field :docker_manifest, _('Container Manifests'), Fields::Field,
|
231
|
+
:hide_blank => true
|
232
|
+
field :docker_manifest_list, _('Container Manifest Lists'), Fields::Field,
|
233
|
+
:hide_blank => true
|
234
|
+
field :file, _('Files'), Fields::Field,
|
235
|
+
:hide_blank => true
|
236
|
+
field :ansible_collection, _('Ansible Collections'), Fields::Field,
|
237
|
+
:hide_blank => true
|
238
|
+
field :ostree_ref, _('OSTree Refs'), Fields::Field,
|
239
|
+
:hide_blank => true
|
240
|
+
field :python_package, _('Python Packages'), Fields::Field,
|
241
|
+
:hide_blank => true
|
208
242
|
end
|
209
243
|
end
|
210
244
|
end
|
@@ -41,7 +41,7 @@ module HammerCLIKatello
|
|
41
41
|
repos = repo_resource.call(:index, index_options)['results']
|
42
42
|
if repos.empty?
|
43
43
|
raise _("No such repository with name %{name}, in lifecycle environment"\
|
44
|
-
" %{environment_id} and content view %{content_view_id}" % index_options
|
44
|
+
" %{environment_id} and content view %{content_view_id}") % index_options
|
45
45
|
end
|
46
46
|
repos.first['id']
|
47
47
|
end
|
@@ -14,7 +14,7 @@ module HammerCLIKatello
|
|
14
14
|
field :id, _("Content View ID")
|
15
15
|
field :name, _("Name")
|
16
16
|
field :label, _("Label")
|
17
|
-
field :composite, _("Composite")
|
17
|
+
field :composite, _("Composite"), Fields::Boolean
|
18
18
|
field :last_published, _("Last Published"), Fields::Date, :hide_blank => true
|
19
19
|
field :repository_ids, _("Repository IDs"), Fields::List, :max_width => 300
|
20
20
|
end
|
@@ -26,33 +26,64 @@ module HammerCLIKatello
|
|
26
26
|
|
27
27
|
class InfoCommand < HammerCLIKatello::InfoCommand
|
28
28
|
include OrganizationOptions
|
29
|
+
# rubocop:disable Layout/LineLength
|
29
30
|
|
30
31
|
output do
|
31
32
|
field :id, _("Id")
|
32
33
|
field :name, _("Name")
|
33
34
|
field :label, _("Label")
|
34
|
-
field :composite, _("Composite")
|
35
|
+
field :composite, _("Composite"), Fields::Boolean
|
35
36
|
field :description, _("Description")
|
36
37
|
field :content_host_count, _("Content Host Count")
|
37
|
-
field :solve_dependencies, _("Solve Dependencies")
|
38
|
+
field :solve_dependencies, _("Solve Dependencies"), Fields::Boolean
|
38
39
|
|
39
40
|
from :organization do
|
40
41
|
field :name, _("Organization")
|
41
42
|
end
|
42
43
|
|
43
|
-
collection :_yum_repositories, _("Yum Repositories") do
|
44
|
+
collection :_yum_repositories, _("Yum Repositories"), hide_blank: true, hide_empty: true do
|
44
45
|
field :id, _("Id")
|
45
46
|
field :name, _("Name")
|
46
47
|
field :label, _("Label")
|
47
48
|
end
|
48
49
|
|
49
|
-
collection :
|
50
|
+
collection :_file_repositories, _("File Repositories"), hide_blank: true, hide_empty: true do
|
50
51
|
field :id, _("Id")
|
51
52
|
field :name, _("Name")
|
52
53
|
field :label, _("Label")
|
53
54
|
end
|
54
55
|
|
55
|
-
collection :
|
56
|
+
collection :_docker_repositories, _("Container Image Repositories"), hide_blank: true, hide_empty: true do
|
57
|
+
field :id, _("Id")
|
58
|
+
field :name, _("Name")
|
59
|
+
field :label, _("Label")
|
60
|
+
end
|
61
|
+
|
62
|
+
collection :_ostree_repositories, _("OSTree Repositories"), hide_blank: true, hide_empty: true do
|
63
|
+
field :id, _("Id")
|
64
|
+
field :name, _("Name")
|
65
|
+
field :label, _("Label")
|
66
|
+
end
|
67
|
+
|
68
|
+
collection :_ansible_collection_repositories, _("Ansible Repositories"), hide_blank: true, hide_empty: true do
|
69
|
+
field :id, _("Id")
|
70
|
+
field :name, _("Name")
|
71
|
+
field :label, _("Label")
|
72
|
+
end
|
73
|
+
|
74
|
+
collection :_file_repositories, _("File Repositories"), hide_blank: true, hide_empty: true do
|
75
|
+
field :id, _("Id")
|
76
|
+
field :name, _("Name")
|
77
|
+
field :label, _("Label")
|
78
|
+
end
|
79
|
+
|
80
|
+
collection :_deb_repositories, _("Debian Repositories"), hide_blank: true, hide_empty: true do
|
81
|
+
field :id, _("Id")
|
82
|
+
field :name, _("Name")
|
83
|
+
field :label, _("Label")
|
84
|
+
end
|
85
|
+
|
86
|
+
collection :_python_repositories, _("Python Repositories"), hide_blank: true, hide_empty: true do
|
56
87
|
field :id, _("Id")
|
57
88
|
field :name, _("Name")
|
58
89
|
field :label, _("Label")
|
@@ -69,28 +100,44 @@ module HammerCLIKatello
|
|
69
100
|
field :published, _("Published"), Fields::Date
|
70
101
|
end
|
71
102
|
|
72
|
-
collection :
|
103
|
+
collection :cv_components, _("Components"), hide_blank: true, hide_empty: true do
|
73
104
|
field :id, _("Id")
|
74
105
|
field :name, _("Name")
|
106
|
+
field :latest, _("Latest version"), Fields::Boolean
|
107
|
+
field :unpublished, _("Not yet published"), Fields::Boolean
|
108
|
+
field :always_latest, _("Always update to the latest"), Fields::Boolean
|
75
109
|
end
|
76
110
|
|
77
|
-
collection :activation_keys, _("Activation Keys") do
|
111
|
+
collection :activation_keys, _("Activation Keys"), hide_blank: true, hide_empty: true do
|
78
112
|
custom_field Fields::Reference
|
79
113
|
end
|
80
114
|
end
|
81
115
|
|
82
116
|
def extend_data(data)
|
83
|
-
%w(yum docker ostree).each do |content_type|
|
117
|
+
%w(yum docker ostree file deb ansible_collection python).each do |content_type|
|
84
118
|
data["_#{content_type}_repositories"] = data["repositories"].select do |repo|
|
85
119
|
repo["content_type"] == content_type
|
86
120
|
end
|
87
121
|
end
|
88
122
|
|
123
|
+
if data["composite"]
|
124
|
+
data["cv_components"] = data["content_view_components"]&.map do |component|
|
125
|
+
cv_latest = component.dig("content_view", "latest_version")
|
126
|
+
{
|
127
|
+
"id" => component.dig("content_view_version", "id"),
|
128
|
+
"name" => component.dig("content_view_version", "name") || component.dig("content_view", "name"),
|
129
|
+
"always_latest" => component["latest"],
|
130
|
+
"latest" => cv_latest == component.dig("content_view_version", "version"),
|
131
|
+
"unpublished" => component["content_view_version"].nil?
|
132
|
+
}
|
133
|
+
end
|
134
|
+
end
|
89
135
|
data
|
90
136
|
end
|
91
137
|
|
92
138
|
build_options
|
93
139
|
end
|
140
|
+
# rubocop:enable Layout/LineLength
|
94
141
|
|
95
142
|
class CreateCommand < HammerCLIKatello::CreateCommand
|
96
143
|
success_message _("Content view created.")
|
@@ -109,6 +109,19 @@ module HammerCLIKatello
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
+
class VerifyChecksum < HammerCLIKatello::SingleResourceCommand
|
113
|
+
include HammerCLIForemanTasks::Async
|
114
|
+
|
115
|
+
action :verify_checksum
|
116
|
+
command_name "verify-checksum"
|
117
|
+
|
118
|
+
success_message _("Verifying checksum of Content View Version repositories with task %{id}.")
|
119
|
+
failure_message _("Could not verify checksum of repositories in the Content View Version")
|
120
|
+
build_options do |o|
|
121
|
+
o.expand(:all).including(:content_views, :organizations)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
112
125
|
class PromoteCommand < HammerCLIKatello::SingleResourceCommand
|
113
126
|
include HammerCLIForemanTasks::Async
|
114
127
|
include LifecycleEnvironmentNameMapping
|
@@ -26,8 +26,12 @@ module HammerCLIKatello
|
|
26
26
|
::HammerCLIForeman::Host::ListCommand.instance_eval do
|
27
27
|
output do
|
28
28
|
from :content_facet_attributes do
|
29
|
-
|
30
|
-
|
29
|
+
from :content_view do
|
30
|
+
field :name, _('Content View'), Fields::List
|
31
|
+
end
|
32
|
+
from :lifecycle_environment do
|
33
|
+
field :name, _('Lifecycle environment'), Fields::List
|
34
|
+
end
|
31
35
|
from :errata_counts do
|
32
36
|
field :security, _("Security"), nil, :sets => ['ALL']
|
33
37
|
field :bugfix, _("Bugfix"), nil, :sets => ['ALL']
|
@@ -20,7 +20,6 @@ module HammerCLIKatello
|
|
20
20
|
output do
|
21
21
|
field :label, _("Label")
|
22
22
|
field :description, _("Description")
|
23
|
-
field :simple_content_access_label, _("Simple Content Access")
|
24
23
|
field :service_levels, _("Service Levels"), Fields::List
|
25
24
|
from :cdn_configuration do
|
26
25
|
label "CDN configuration", hide_blank: true do
|
@@ -39,11 +38,6 @@ module HammerCLIKatello
|
|
39
38
|
end
|
40
39
|
|
41
40
|
def extend_data(data)
|
42
|
-
data["simple_content_access_label"] = if data["simple_content_access"]
|
43
|
-
_("Enabled")
|
44
|
-
else
|
45
|
-
_("Disabled")
|
46
|
-
end
|
47
41
|
setup_cdn_type(data)
|
48
42
|
data
|
49
43
|
end
|
@@ -68,23 +62,6 @@ module HammerCLIKatello
|
|
68
62
|
success_message _("Organization updated.")
|
69
63
|
failure_message _("Could not update the organization")
|
70
64
|
|
71
|
-
def request_params
|
72
|
-
params = super
|
73
|
-
# This is so Hammer doesn't say "Nothing to update" when toggling SCA.
|
74
|
-
# (see hammer-cli-foreman)
|
75
|
-
# Rails will safely ignore the extra parameter.
|
76
|
-
if params.key?('simple_content_access')
|
77
|
-
params["organization"] = params.fetch('organization', {}).merge(
|
78
|
-
"_simple_content_access" => params['simple_content_access'])
|
79
|
-
unless params['simple_content_access']
|
80
|
-
warn(
|
81
|
-
_("Simple Content Access will be required for all organizations in the next release.")
|
82
|
-
)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
params
|
86
|
-
end
|
87
|
-
|
88
65
|
build_options do |o|
|
89
66
|
o.expand(:all).except(:environments)
|
90
67
|
end
|
@@ -78,6 +78,7 @@ module HammerCLIKatello
|
|
78
78
|
end
|
79
79
|
|
80
80
|
class UpdateProxyCommand < HammerCLIKatello::SingleResourceCommand
|
81
|
+
include HammerCLIForemanTasks::Async
|
81
82
|
desc _("Updates an HTTP Proxy for a product")
|
82
83
|
resource :products_bulk_actions, :update_http_proxy
|
83
84
|
command_name 'update-proxy'
|
@@ -93,6 +94,22 @@ module HammerCLIKatello
|
|
93
94
|
build_options
|
94
95
|
end
|
95
96
|
|
97
|
+
class VerifyChecksumCommand < HammerCLIKatello::SingleResourceCommand
|
98
|
+
include HammerCLIForemanTasks::Async
|
99
|
+
desc _("Verify checksum for one or more products")
|
100
|
+
resource :products_bulk_actions, :verify_checksum_products
|
101
|
+
command_name 'verify-checksum'
|
102
|
+
|
103
|
+
success_message _("Verified checksum of product repositories with task %{id}.")
|
104
|
+
failure_message _("Could not verify checksum of repositories in the product")
|
105
|
+
|
106
|
+
validate_options do
|
107
|
+
option(:option_ids).required
|
108
|
+
end
|
109
|
+
|
110
|
+
build_options
|
111
|
+
end
|
112
|
+
|
96
113
|
class DeleteCommand < HammerCLIKatello::DeleteCommand
|
97
114
|
success_message _("Product destroyed.")
|
98
115
|
failure_message _("Could not destroy the product")
|
@@ -85,6 +85,11 @@ module HammerCLIKatello
|
|
85
85
|
Fields::Field, :hide_blank => true
|
86
86
|
field :ignorable_content, _("Ignorable Content Units"), Fields::List, :hide_blank => true
|
87
87
|
|
88
|
+
label _("Publish Settings") do
|
89
|
+
field :restrict_to_arch, _("Restrict to architecture")
|
90
|
+
field :restrict_to_os_versions, _("Restrict to OS Version")
|
91
|
+
end
|
92
|
+
|
88
93
|
label _("HTTP Proxy") do
|
89
94
|
from :http_proxy do
|
90
95
|
field :id, _("Id"), Fields::Field, :hide_blank => true
|
@@ -116,17 +121,34 @@ module HammerCLIKatello
|
|
116
121
|
field :updated_at, _("Updated"), Fields::Date
|
117
122
|
|
118
123
|
label _("Content Counts") do
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
124
|
+
from :content_counts do
|
125
|
+
field :rpm, _('Packages'), Fields::Field,
|
126
|
+
:hide_blank => true
|
127
|
+
field :srpm, _('SRPMs'), Fields::Field,
|
128
|
+
:hide_blank => true
|
129
|
+
field :module_stream, _('Module Streams'), Fields::Field,
|
130
|
+
:hide_blank => true
|
131
|
+
field :package_group, _('Package Groups'), Fields::Field,
|
132
|
+
:hide_blank => true
|
133
|
+
field :erratum, _('Errata'), Fields::Field,
|
134
|
+
:hide_blank => true
|
135
|
+
field :deb, _('Debian Packages'), Fields::Field,
|
136
|
+
:hide_blank => true
|
137
|
+
field :docker_tag, _('Container Tags'), Fields::Field,
|
138
|
+
:hide_blank => true
|
139
|
+
field :docker_manifest, _('Container Manifests'), Fields::Field,
|
140
|
+
:hide_blank => true
|
141
|
+
field :docker_manifest_list, _('Container Manifest Lists'), Fields::Field,
|
142
|
+
:hide_blank => true
|
143
|
+
field :file, _('Files'), Fields::Field,
|
144
|
+
:hide_blank => true
|
145
|
+
field :ansible_collection, _('Ansible Collections'), Fields::Field,
|
146
|
+
:hide_blank => true
|
147
|
+
field :ostree_ref, _('OSTree Refs'), Fields::Field,
|
148
|
+
:hide_blank => true
|
149
|
+
field :python_package, _('Python Packages'), Fields::Field,
|
150
|
+
:hide_blank => true
|
151
|
+
end
|
130
152
|
end
|
131
153
|
end
|
132
154
|
|
@@ -139,6 +161,7 @@ module HammerCLIKatello
|
|
139
161
|
data["gpg_key_name"] = data["gpg_key"]["name"]
|
140
162
|
end
|
141
163
|
|
164
|
+
setup_arch_and_os(data)
|
142
165
|
setup_sync_state(data)
|
143
166
|
setup_booleans(data)
|
144
167
|
setup_mirroring_policy(data)
|
@@ -146,6 +169,14 @@ module HammerCLIKatello
|
|
146
169
|
data
|
147
170
|
end
|
148
171
|
|
172
|
+
def setup_arch_and_os(data)
|
173
|
+
arch = data["arch"]
|
174
|
+
data["restrict_to_arch"] = arch == 'noarch' ? _('No restriction') : arch
|
175
|
+
os_versions = data["os_versions"] || []
|
176
|
+
data["restrict_to_os_versions"] = _('No restriction')
|
177
|
+
data["restrict_to_os_versions"] = os_versions.join(", ") unless os_versions.empty?
|
178
|
+
end
|
179
|
+
|
149
180
|
def setup_booleans(data)
|
150
181
|
data["_redhat_repo"] = data.dig("product", "redhat") ? _("yes") : _("no")
|
151
182
|
data["_publish_via_http"] = data["unprotected"] ? _("yes") : _("no")
|
@@ -547,14 +578,13 @@ module HammerCLIKatello
|
|
547
578
|
load_task(task_id)
|
548
579
|
end
|
549
580
|
|
550
|
-
# rubocop:disable CyclomaticComplexity
|
551
581
|
# rubocop:disable PerceivedComplexity
|
552
582
|
def print_results(name, results, async)
|
553
583
|
if !%w(error warning).include?(results) && !async # task successful && no async flag used
|
554
584
|
upload_results = results.dig('output', 'upload_results') || []
|
555
585
|
|
556
586
|
if upload_results.empty?
|
557
|
-
print_message _("Successfully uploaded file %s" % name
|
587
|
+
print_message _("Successfully uploaded file %s") % name
|
558
588
|
else
|
559
589
|
upload_results.each do |result|
|
560
590
|
if result['type'] == 'docker_manifest'
|
@@ -562,7 +592,7 @@ module HammerCLIKatello
|
|
562
592
|
_("Successfully uploaded manifest file '%{name}' with digest '%{digest}'") % {
|
563
593
|
:name => name, :digest => result['digest'] })
|
564
594
|
else
|
565
|
-
print_message _("Successfully uploaded file %s" % name
|
595
|
+
print_message _("Successfully uploaded file %s") % name
|
566
596
|
end
|
567
597
|
end
|
568
598
|
end
|
@@ -572,7 +602,6 @@ module HammerCLIKatello
|
|
572
602
|
print_message _("Could not upload the content.")
|
573
603
|
end
|
574
604
|
end
|
575
|
-
# rubocop:enable CyclomaticComplexity
|
576
605
|
# rubocop:enable PerceivedComplexity
|
577
606
|
|
578
607
|
def silence_warnings
|
@@ -645,6 +674,32 @@ module HammerCLIKatello
|
|
645
674
|
end
|
646
675
|
end
|
647
676
|
|
677
|
+
class VerifyChecksum < HammerCLIKatello::SingleResourceCommand
|
678
|
+
extend RepositoryScopedToProduct
|
679
|
+
include HammerCLIForemanTasks::Async
|
680
|
+
include OrganizationOptions
|
681
|
+
|
682
|
+
validate_repo_name_requires_product_options
|
683
|
+
action :verify_checksum
|
684
|
+
command_name "verify-checksum"
|
685
|
+
|
686
|
+
success_message _("Verified checksum of repository with task %{id}.")
|
687
|
+
failure_message _("Could not verify checksum of repository")
|
688
|
+
|
689
|
+
validate_options :before, 'IdResolution' do
|
690
|
+
organization_options = [:option_organization_id, :option_organization_name, \
|
691
|
+
:option_organization_label]
|
692
|
+
|
693
|
+
if option(:option_product_name).exist?
|
694
|
+
any(*organization_options).required
|
695
|
+
end
|
696
|
+
end
|
697
|
+
|
698
|
+
build_options do |o|
|
699
|
+
o.expand(:all).including(:products)
|
700
|
+
end
|
701
|
+
end
|
702
|
+
|
648
703
|
class ReclaimSpaceCommand < HammerCLIKatello::SingleResourceCommand
|
649
704
|
extend RepositoryScopedToProduct
|
650
705
|
include HammerCLIForemanTasks::Async
|
@@ -32,9 +32,9 @@ module HammerCLIKatello
|
|
32
32
|
if !data["virt_only"]
|
33
33
|
_("Physical")
|
34
34
|
elsif data["host"]
|
35
|
-
_("Guests of %s" % data['host']['name']
|
35
|
+
_("Guests of %s") % data['host']['name']
|
36
36
|
elsif data["hypervisor"]
|
37
|
-
_("Guests of %s" % data['hypervisor']['name']
|
37
|
+
_("Guests of %s") % data['hypervisor']['name']
|
38
38
|
elsif data["unmapper_guest"]
|
39
39
|
_("Temporary")
|
40
40
|
else
|
data/lib/hammer_cli_katello.rb
CHANGED
@@ -154,12 +154,6 @@ module HammerCLIKatello
|
|
154
154
|
'hammer_cli_katello/srpm'
|
155
155
|
)
|
156
156
|
|
157
|
-
HammerCLI::MainCommand.lazy_subcommand("simple-content-access",
|
158
|
-
_("Simple content access commands"),
|
159
|
-
'HammerCLIKatello::SimpleContentAccess',
|
160
|
-
'hammer_cli_katello/simple_content_access'
|
161
|
-
)
|
162
|
-
|
163
157
|
HammerCLI::MainCommand.lazy_subcommand("docker", _("Manipulate docker content"),
|
164
158
|
'HammerCLIKatello::DockerCommand',
|
165
159
|
'hammer_cli_katello/docker'
|
Binary file
|