hammer_cli_katello 1.12.0 → 1.14.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/capsule.rb +20 -0
- data/lib/hammer_cli_katello/content_view.rb +16 -1
- data/lib/hammer_cli_katello/content_view_version.rb +13 -0
- data/lib/hammer_cli_katello/erratum.rb +13 -2
- data/lib/hammer_cli_katello/id_resolver.rb +15 -0
- 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 +40 -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.po +85 -69
- data/locale/bn_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bn_IN/hammer-cli-katello.po +90 -74
- data/locale/bqi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/bqi/hammer-cli-katello.po +2133 -0
- data/locale/ca/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ca/hammer-cli-katello.po +90 -74
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/cs_CZ/hammer-cli-katello.po +106 -90
- data/locale/de/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de/hammer-cli-katello.po +189 -155
- data/locale/de_AT/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_AT/hammer-cli-katello.po +87 -71
- data/locale/de_DE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/de_DE/hammer-cli-katello.po +90 -74
- data/locale/el/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/el/hammer-cli-katello.po +96 -80
- data/locale/en/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en/hammer-cli-katello.po +85 -70
- data/locale/en_GB/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_GB/hammer-cli-katello.po +88 -72
- data/locale/en_US/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/en_US/hammer-cli-katello.po +87 -71
- data/locale/es/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/es/hammer-cli-katello.po +176 -150
- data/locale/et_EE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/et_EE/hammer-cli-katello.po +87 -71
- data/locale/fr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/fr/hammer-cli-katello.po +235 -204
- data/locale/gl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gl/hammer-cli-katello.po +88 -72
- data/locale/gu/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/gu/hammer-cli-katello.po +88 -72
- data/locale/he_IL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/he_IL/hammer-cli-katello.po +92 -76
- data/locale/hi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/hi/hammer-cli-katello.po +88 -72
- data/locale/id/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/id/hammer-cli-katello.po +97 -77
- data/locale/it/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/it/hammer-cli-katello.po +102 -86
- data/locale/ja/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ja/hammer-cli-katello.po +179 -139
- data/locale/ka/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ka/hammer-cli-katello.po +357 -287
- data/locale/kn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/kn/hammer-cli-katello.po +88 -72
- data/locale/ko/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ko/hammer-cli-katello.po +115 -99
- data/locale/ml_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ml_IN/hammer-cli-katello.po +87 -71
- data/locale/mr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/mr/hammer-cli-katello.po +88 -72
- data/locale/nl_NL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/nl_NL/hammer-cli-katello.po +92 -77
- data/locale/or/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/or/hammer-cli-katello.po +88 -72
- data/locale/pa/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pa/hammer-cli-katello.po +90 -74
- data/locale/pl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl/hammer-cli-katello.po +91 -75
- data/locale/pl_PL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pl_PL/hammer-cli-katello.po +90 -74
- data/locale/pt/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt/hammer-cli-katello.po +87 -71
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/pt_BR/hammer-cli-katello.po +172 -142
- data/locale/ro/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro/hammer-cli-katello.po +87 -71
- data/locale/ro_RO/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ro_RO/hammer-cli-katello.po +89 -73
- data/locale/ru/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ru/hammer-cli-katello.po +104 -88
- data/locale/sl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sl/hammer-cli-katello.po +91 -75
- data/locale/sv_SE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/sv_SE/hammer-cli-katello.po +90 -74
- data/locale/ta/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta/hammer-cli-katello.po +85 -69
- data/locale/ta_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/ta_IN/hammer-cli-katello.po +90 -74
- data/locale/te/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/te/hammer-cli-katello.po +88 -72
- data/locale/tr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/tr/hammer-cli-katello.po +88 -72
- data/locale/vi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi/hammer-cli-katello.po +85 -69
- data/locale/vi_VN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/vi_VN/hammer-cli-katello.po +87 -71
- data/locale/zh/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh/hammer-cli-katello.po +85 -69
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_CN/hammer-cli-katello.po +143 -119
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-katello.mo +0 -0
- data/locale/zh_TW/hammer-cli-katello.po +103 -87
- 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 +5 -5
- data/test/functional/content_view/component/remove_test.rb +9 -9
- data/test/functional/content_view/component/update_test.rb +9 -9
- 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/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 +24 -135
- 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: a7536aa9077d22fd3ed9c677b0d8c15509ee0076d7aba70dbbc6422be6434a7f
|
4
|
+
data.tar.gz: a0cfb58ff5e1b4fa732e4d57bfb5393a5f145e9a173044597e2f337c6fe545da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a0bd15aa2bc96d97ab6ec79686b38449566a9d7c85dc15a3b3751c873e2a336f05b79e3c3cd147fbf54ffcb54ffec5c187eb087aae3725fd9f89be797a3b432
|
7
|
+
data.tar.gz: bdfa75b6d35e99f0590a7df20e8024b02756b86ec7701455ff8030671a0cd07ca698af12740be55cead555eda6163a32910eae5c1725c91c8175501d37095444
|
@@ -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"
|
@@ -100,9 +100,12 @@ module HammerCLIKatello
|
|
100
100
|
field :published, _("Published"), Fields::Date
|
101
101
|
end
|
102
102
|
|
103
|
-
collection :
|
103
|
+
collection :cv_components, _("Components"), hide_blank: true, hide_empty: true do
|
104
104
|
field :id, _("Id")
|
105
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
|
106
109
|
end
|
107
110
|
|
108
111
|
collection :activation_keys, _("Activation Keys"), hide_blank: true, hide_empty: true do
|
@@ -117,6 +120,18 @@ module HammerCLIKatello
|
|
117
120
|
end
|
118
121
|
end
|
119
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
|
120
135
|
data
|
121
136
|
end
|
122
137
|
|
@@ -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
|
@@ -22,16 +22,27 @@ module HammerCLIKatello
|
|
22
22
|
validate_options :before, 'IdResolution' do
|
23
23
|
organization_options = [:option_organization_id, :option_organization_name, \
|
24
24
|
:option_organization_label]
|
25
|
+
content_view_options = [:option_content_view_id, :option_content_view_name]
|
25
26
|
|
26
|
-
if option(:option_product_name).exist?
|
27
|
+
if option(:option_product_name).exist? || option(:option_content_view_name).exist?
|
27
28
|
any(*organization_options).required
|
28
29
|
end
|
30
|
+
|
31
|
+
if option(:option_content_view_version_version).exist?
|
32
|
+
any(*content_view_options).required
|
33
|
+
end
|
34
|
+
|
35
|
+
if any(*content_view_options).exist?
|
36
|
+
any(:option_content_view_version_id,
|
37
|
+
:option_content_view_version_version,
|
38
|
+
:option_environment_id,
|
39
|
+
:option_environment_name).required
|
40
|
+
end
|
29
41
|
end
|
30
42
|
|
31
43
|
build_options do |o|
|
32
44
|
o.expand.including(:products, :organizations, :content_views)
|
33
45
|
end
|
34
|
-
|
35
46
|
extend_with(HammerCLIKatello::CommandExtensions::LifecycleEnvironment.new)
|
36
47
|
end
|
37
48
|
|
@@ -119,6 +119,9 @@ module HammerCLIKatello
|
|
119
119
|
end
|
120
120
|
|
121
121
|
# rubocop:disable Style/EmptyElse
|
122
|
+
# rubocop:disable Metrics/AbcSize
|
123
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
124
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
122
125
|
def content_view_version_id(options)
|
123
126
|
key_id = HammerCLI.option_accessor_name("id")
|
124
127
|
key_content_view_id = HammerCLI.option_accessor_name("content_view_id")
|
@@ -128,7 +131,16 @@ module HammerCLIKatello
|
|
128
131
|
|
129
132
|
options[key_content_view_id] ||= search_and_rescue(:content_view_id, "content_view", options)
|
130
133
|
|
134
|
+
if options[key_content_view_id] && options['option_environment_name'] &&
|
135
|
+
options['option_environment_id'].nil?
|
136
|
+
lifecycle_environment_resource_name = (HammerCLIForeman.param_to_resource('environment') ||
|
137
|
+
HammerCLIForeman.param_to_resource('lifecycle_environment')).singular_name
|
138
|
+
options['option_environment_id'] = lifecycle_environment_id(
|
139
|
+
scoped_options(lifecycle_environment_resource_name, options, :single))
|
140
|
+
end
|
141
|
+
|
131
142
|
results = find_resources(:content_view_versions, options)
|
143
|
+
|
132
144
|
options[from_environment_id] ||= from_lifecycle_environment_id(options)
|
133
145
|
|
134
146
|
return pick_result(results, @api.resource(:content_view_versions))['id'] if results.size == 1
|
@@ -145,6 +157,9 @@ module HammerCLIKatello
|
|
145
157
|
end
|
146
158
|
end
|
147
159
|
# rubocop:enable Style/EmptyElse
|
160
|
+
# rubocop:enable Metrics/AbcSize
|
161
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
162
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
148
163
|
|
149
164
|
private
|
150
165
|
|
@@ -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
|
@@ -156,6 +161,7 @@ module HammerCLIKatello
|
|
156
161
|
data["gpg_key_name"] = data["gpg_key"]["name"]
|
157
162
|
end
|
158
163
|
|
164
|
+
setup_arch_and_os(data)
|
159
165
|
setup_sync_state(data)
|
160
166
|
setup_booleans(data)
|
161
167
|
setup_mirroring_policy(data)
|
@@ -163,6 +169,14 @@ module HammerCLIKatello
|
|
163
169
|
data
|
164
170
|
end
|
165
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
|
+
|
166
180
|
def setup_booleans(data)
|
167
181
|
data["_redhat_repo"] = data.dig("product", "redhat") ? _("yes") : _("no")
|
168
182
|
data["_publish_via_http"] = data["unprotected"] ? _("yes") : _("no")
|
@@ -564,7 +578,6 @@ module HammerCLIKatello
|
|
564
578
|
load_task(task_id)
|
565
579
|
end
|
566
580
|
|
567
|
-
# rubocop:disable CyclomaticComplexity
|
568
581
|
# rubocop:disable PerceivedComplexity
|
569
582
|
def print_results(name, results, async)
|
570
583
|
if !%w(error warning).include?(results) && !async # task successful && no async flag used
|
@@ -589,7 +602,6 @@ module HammerCLIKatello
|
|
589
602
|
print_message _("Could not upload the content.")
|
590
603
|
end
|
591
604
|
end
|
592
|
-
# rubocop:enable CyclomaticComplexity
|
593
605
|
# rubocop:enable PerceivedComplexity
|
594
606
|
|
595
607
|
def silence_warnings
|
@@ -662,6 +674,32 @@ module HammerCLIKatello
|
|
662
674
|
end
|
663
675
|
end
|
664
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
|
+
|
665
703
|
class ReclaimSpaceCommand < HammerCLIKatello::SingleResourceCommand
|
666
704
|
extend RepositoryScopedToProduct
|
667
705
|
include HammerCLIForemanTasks::Async
|
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
|