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.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hammer_cli_katello/capsule.rb +48 -14
  3. data/lib/hammer_cli_katello/command_extensions/kickstart_repository.rb +1 -1
  4. data/lib/hammer_cli_katello/content_view.rb +56 -9
  5. data/lib/hammer_cli_katello/content_view_version.rb +13 -0
  6. data/lib/hammer_cli_katello/host_extensions.rb +6 -2
  7. data/lib/hammer_cli_katello/organization.rb +0 -23
  8. data/lib/hammer_cli_katello/product.rb +17 -0
  9. data/lib/hammer_cli_katello/repository.rb +70 -15
  10. data/lib/hammer_cli_katello/subscription.rb +2 -2
  11. data/lib/hammer_cli_katello/version.rb +1 -1
  12. data/lib/hammer_cli_katello.rb +0 -6
  13. data/locale/bn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  14. data/locale/bn/hammer-cli-katello.edit.po +3255 -0
  15. data/locale/bn/hammer-cli-katello.po +1 -94
  16. data/locale/bn/hammer-cli-katello.po.time_stamp +0 -0
  17. data/locale/bn_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  18. data/locale/bn_IN/hammer-cli-katello.edit.po +3255 -0
  19. data/locale/bn_IN/hammer-cli-katello.po +1 -94
  20. data/locale/bn_IN/hammer-cli-katello.po.time_stamp +0 -0
  21. data/locale/bqi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  22. data/locale/bqi/hammer-cli-katello.edit.po +3251 -0
  23. data/locale/bqi/hammer-cli-katello.po +2133 -0
  24. data/locale/bqi/hammer-cli-katello.po.time_stamp +0 -0
  25. data/locale/ca/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  26. data/locale/ca/hammer-cli-katello.edit.po +3255 -0
  27. data/locale/ca/hammer-cli-katello.po +1 -94
  28. data/locale/ca/hammer-cli-katello.po.time_stamp +0 -0
  29. data/locale/cs_CZ/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  30. data/locale/cs_CZ/hammer-cli-katello.edit.po +3256 -0
  31. data/locale/cs_CZ/hammer-cli-katello.po +1 -94
  32. data/locale/cs_CZ/hammer-cli-katello.po.time_stamp +0 -0
  33. data/locale/de/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  34. data/locale/de/hammer-cli-katello.edit.po +3329 -0
  35. data/locale/de/hammer-cli-katello.po +1 -94
  36. data/locale/de/hammer-cli-katello.po.time_stamp +0 -0
  37. data/locale/de_AT/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  38. data/locale/de_AT/hammer-cli-katello.edit.po +3251 -0
  39. data/locale/de_AT/hammer-cli-katello.po +1 -94
  40. data/locale/de_AT/hammer-cli-katello.po.time_stamp +0 -0
  41. data/locale/de_DE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  42. data/locale/de_DE/hammer-cli-katello.edit.po +3257 -0
  43. data/locale/de_DE/hammer-cli-katello.po +1 -94
  44. data/locale/de_DE/hammer-cli-katello.po.time_stamp +0 -0
  45. data/locale/el/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  46. data/locale/el/hammer-cli-katello.edit.po +3255 -0
  47. data/locale/el/hammer-cli-katello.po +1 -94
  48. data/locale/el/hammer-cli-katello.po.time_stamp +0 -0
  49. data/locale/en/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  50. data/locale/en/hammer-cli-katello.edit.po +2745 -0
  51. data/locale/en/hammer-cli-katello.po +134 -125
  52. data/locale/en/hammer-cli-katello.po.time_stamp +0 -0
  53. data/locale/en_GB/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  54. data/locale/en_GB/hammer-cli-katello.edit.po +3256 -0
  55. data/locale/en_GB/hammer-cli-katello.po +1 -94
  56. data/locale/en_GB/hammer-cli-katello.po.time_stamp +0 -0
  57. data/locale/en_US/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  58. data/locale/en_US/hammer-cli-katello.edit.po +3251 -0
  59. data/locale/en_US/hammer-cli-katello.po +1 -94
  60. data/locale/en_US/hammer-cli-katello.po.time_stamp +0 -0
  61. data/locale/es/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  62. data/locale/es/hammer-cli-katello.edit.po +3323 -0
  63. data/locale/es/hammer-cli-katello.po +5 -96
  64. data/locale/es/hammer-cli-katello.po.time_stamp +0 -0
  65. data/locale/et_EE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  66. data/locale/et_EE/hammer-cli-katello.edit.po +3251 -0
  67. data/locale/et_EE/hammer-cli-katello.po +1 -94
  68. data/locale/et_EE/hammer-cli-katello.po.time_stamp +0 -0
  69. data/locale/fr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  70. data/locale/fr/hammer-cli-katello.edit.po +3347 -0
  71. data/locale/fr/hammer-cli-katello.po +12 -106
  72. data/locale/fr/hammer-cli-katello.po.time_stamp +0 -0
  73. data/locale/gl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  74. data/locale/gl/hammer-cli-katello.edit.po +3255 -0
  75. data/locale/gl/hammer-cli-katello.po +1 -94
  76. data/locale/gl/hammer-cli-katello.po.time_stamp +0 -0
  77. data/locale/gu/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  78. data/locale/gu/hammer-cli-katello.edit.po +3255 -0
  79. data/locale/gu/hammer-cli-katello.po +1 -94
  80. data/locale/gu/hammer-cli-katello.po.time_stamp +0 -0
  81. data/locale/hammer-cli-katello.pot +304 -312
  82. data/locale/he_IL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  83. data/locale/he_IL/hammer-cli-katello.edit.po +3255 -0
  84. data/locale/he_IL/hammer-cli-katello.po +3 -96
  85. data/locale/he_IL/hammer-cli-katello.po.time_stamp +0 -0
  86. data/locale/hi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  87. data/locale/hi/hammer-cli-katello.edit.po +3255 -0
  88. data/locale/hi/hammer-cli-katello.po +1 -94
  89. data/locale/hi/hammer-cli-katello.po.time_stamp +0 -0
  90. data/locale/id/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  91. data/locale/id/hammer-cli-katello.edit.po +3255 -0
  92. data/locale/id/hammer-cli-katello.po +13 -102
  93. data/locale/id/hammer-cli-katello.po.time_stamp +0 -0
  94. data/locale/it/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  95. data/locale/it/hammer-cli-katello.edit.po +3261 -0
  96. data/locale/it/hammer-cli-katello.po +1 -94
  97. data/locale/it/hammer-cli-katello.po.time_stamp +0 -0
  98. data/locale/ja/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  99. data/locale/ja/hammer-cli-katello.edit.po +3273 -0
  100. data/locale/ja/hammer-cli-katello.po +4 -97
  101. data/locale/ja/hammer-cli-katello.po.time_stamp +0 -0
  102. data/locale/ka/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  103. data/locale/ka/hammer-cli-katello.edit.po +3351 -0
  104. data/locale/ka/hammer-cli-katello.po +1 -94
  105. data/locale/ka/hammer-cli-katello.po.time_stamp +0 -0
  106. data/locale/kn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  107. data/locale/kn/hammer-cli-katello.edit.po +3255 -0
  108. data/locale/kn/hammer-cli-katello.po +1 -94
  109. data/locale/kn/hammer-cli-katello.po.time_stamp +0 -0
  110. data/locale/ko/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  111. data/locale/ko/hammer-cli-katello.edit.po +3258 -0
  112. data/locale/ko/hammer-cli-katello.po +1 -94
  113. data/locale/ko/hammer-cli-katello.po.time_stamp +0 -0
  114. data/locale/ml_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  115. data/locale/ml_IN/hammer-cli-katello.edit.po +3251 -0
  116. data/locale/ml_IN/hammer-cli-katello.po +1 -94
  117. data/locale/ml_IN/hammer-cli-katello.po.time_stamp +0 -0
  118. data/locale/mr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  119. data/locale/mr/hammer-cli-katello.edit.po +3255 -0
  120. data/locale/mr/hammer-cli-katello.po +1 -94
  121. data/locale/mr/hammer-cli-katello.po.time_stamp +0 -0
  122. data/locale/nl_NL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  123. data/locale/nl_NL/hammer-cli-katello.edit.po +3259 -0
  124. data/locale/nl_NL/hammer-cli-katello.po +1 -94
  125. data/locale/nl_NL/hammer-cli-katello.po.time_stamp +0 -0
  126. data/locale/or/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  127. data/locale/or/hammer-cli-katello.edit.po +3255 -0
  128. data/locale/or/hammer-cli-katello.po +1 -94
  129. data/locale/or/hammer-cli-katello.po.time_stamp +0 -0
  130. data/locale/pa/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  131. data/locale/pa/hammer-cli-katello.edit.po +3255 -0
  132. data/locale/pa/hammer-cli-katello.po +1 -94
  133. data/locale/pa/hammer-cli-katello.po.time_stamp +0 -0
  134. data/locale/pl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  135. data/locale/pl/hammer-cli-katello.edit.po +3256 -0
  136. data/locale/pl/hammer-cli-katello.po +1 -94
  137. data/locale/pl/hammer-cli-katello.po.time_stamp +0 -0
  138. data/locale/pl_PL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  139. data/locale/pl_PL/hammer-cli-katello.edit.po +3251 -0
  140. data/locale/pl_PL/hammer-cli-katello.po +1 -94
  141. data/locale/pl_PL/hammer-cli-katello.po.time_stamp +0 -0
  142. data/locale/pt/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  143. data/locale/pt/hammer-cli-katello.edit.po +3255 -0
  144. data/locale/pt/hammer-cli-katello.po +1 -94
  145. data/locale/pt/hammer-cli-katello.po.time_stamp +0 -0
  146. data/locale/pt_BR/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  147. data/locale/pt_BR/hammer-cli-katello.edit.po +3315 -0
  148. data/locale/pt_BR/hammer-cli-katello.po +5 -96
  149. data/locale/pt_BR/hammer-cli-katello.po.time_stamp +0 -0
  150. data/locale/ro/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  151. data/locale/ro/hammer-cli-katello.edit.po +3251 -0
  152. data/locale/ro/hammer-cli-katello.po +1 -94
  153. data/locale/ro/hammer-cli-katello.po.time_stamp +0 -0
  154. data/locale/ro_RO/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  155. data/locale/ro_RO/hammer-cli-katello.edit.po +3251 -0
  156. data/locale/ro_RO/hammer-cli-katello.po +1 -94
  157. data/locale/ro_RO/hammer-cli-katello.po.time_stamp +0 -0
  158. data/locale/ru/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  159. data/locale/ru/hammer-cli-katello.edit.po +3260 -0
  160. data/locale/ru/hammer-cli-katello.po +1 -94
  161. data/locale/ru/hammer-cli-katello.po.time_stamp +0 -0
  162. data/locale/sl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  163. data/locale/sl/hammer-cli-katello.edit.po +3255 -0
  164. data/locale/sl/hammer-cli-katello.po +1 -94
  165. data/locale/sl/hammer-cli-katello.po.time_stamp +0 -0
  166. data/locale/sv_SE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  167. data/locale/sv_SE/hammer-cli-katello.edit.po +3256 -0
  168. data/locale/sv_SE/hammer-cli-katello.po +1 -94
  169. data/locale/sv_SE/hammer-cli-katello.po.time_stamp +0 -0
  170. data/locale/ta/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  171. data/locale/ta/hammer-cli-katello.edit.po +3255 -0
  172. data/locale/ta/hammer-cli-katello.po +1 -94
  173. data/locale/ta/hammer-cli-katello.po.time_stamp +0 -0
  174. data/locale/ta_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  175. data/locale/ta_IN/hammer-cli-katello.edit.po +3255 -0
  176. data/locale/ta_IN/hammer-cli-katello.po +1 -94
  177. data/locale/ta_IN/hammer-cli-katello.po.time_stamp +0 -0
  178. data/locale/te/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  179. data/locale/te/hammer-cli-katello.edit.po +3255 -0
  180. data/locale/te/hammer-cli-katello.po +1 -94
  181. data/locale/te/hammer-cli-katello.po.time_stamp +0 -0
  182. data/locale/tr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  183. data/locale/tr/hammer-cli-katello.edit.po +3255 -0
  184. data/locale/tr/hammer-cli-katello.po +1 -94
  185. data/locale/tr/hammer-cli-katello.po.time_stamp +0 -0
  186. data/locale/vi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  187. data/locale/vi/hammer-cli-katello.edit.po +3251 -0
  188. data/locale/vi/hammer-cli-katello.po +1 -94
  189. data/locale/vi/hammer-cli-katello.po.time_stamp +0 -0
  190. data/locale/vi_VN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  191. data/locale/vi_VN/hammer-cli-katello.edit.po +3251 -0
  192. data/locale/vi_VN/hammer-cli-katello.po +1 -94
  193. data/locale/vi_VN/hammer-cli-katello.po.time_stamp +0 -0
  194. data/locale/zh/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  195. data/locale/zh/hammer-cli-katello.edit.po +3251 -0
  196. data/locale/zh/hammer-cli-katello.po +1 -94
  197. data/locale/zh/hammer-cli-katello.po.time_stamp +0 -0
  198. data/locale/zh_CN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  199. data/locale/zh_CN/hammer-cli-katello.edit.po +3268 -0
  200. data/locale/zh_CN/hammer-cli-katello.po +4 -97
  201. data/locale/zh_CN/hammer-cli-katello.po.time_stamp +0 -0
  202. data/locale/zh_TW/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  203. data/locale/zh_TW/hammer-cli-katello.edit.po +3257 -0
  204. data/locale/zh_TW/hammer-cli-katello.po +1 -94
  205. data/locale/zh_TW/hammer-cli-katello.po.time_stamp +0 -0
  206. data/test/functional/acs/create_test.rb +3 -3
  207. data/test/functional/content_credentials/create_test.rb +2 -2
  208. data/test/functional/content_export/complete/repository_test.rb +7 -7
  209. data/test/functional/content_export/incremental/repository_test.rb +6 -6
  210. data/test/functional/content_import/library_test.rb +5 -3
  211. data/test/functional/content_import/version_test.rb +5 -3
  212. data/test/functional/content_view/component/add_test.rb +4 -4
  213. data/test/functional/content_view/component/remove_test.rb +6 -6
  214. data/test/functional/content_view/component/update_test.rb +5 -5
  215. data/test/functional/content_view/create_test.rb +3 -3
  216. data/test/functional/organization/info_test.rb +0 -14
  217. data/test/functional/product/{update_proxy.rb → update_proxy_test.rb} +8 -14
  218. data/test/functional/product/verify_checksum_test.rb +31 -0
  219. data/test/functional/repository/create_test.rb +3 -3
  220. data/test/functional/repository/info_test.rb +2 -2
  221. data/test/functional/repository/verify_checksum_test.rb +105 -0
  222. data/test/functional/sync_plan/create_test.rb +9 -9
  223. data/test/functional/sync_plan/delete_test.rb +3 -3
  224. data/test/functional/sync_plan/update_test.rb +5 -5
  225. data/test/test_helper.rb +1 -0
  226. metadata +118 -146
  227. data/lib/hammer_cli_katello/simple_content_access.rb +0 -59
  228. data/test/functional/simple_content_access/disable_test.rb +0 -48
  229. data/test/functional/simple_content_access/enable_test.rb +0 -46
  230. 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: 2a0bb232e9b8a0584ba860f898664e6a36817703793cd4fabe1538c06e899efc
4
- data.tar.gz: fbade16a47cee20fa65a9abbcfefb77b8811e0d091547d366bfe8a027531c819
3
+ metadata.gz: 259eec49a3c0e1fb35c8ac5333ef563235d500363c6502c3b1cba8b93a011a95
4
+ data.tar.gz: 982937c903bed8199e89f4e4375c0411dfbd67d36d677104737fab8b44cc2621
5
5
  SHA512:
6
- metadata.gz: 6b535f374bfecfa675fe4dad827fc395eae0c013c829b1106b92776f71284cf06db6f5160330fe49e29345939670552b54de67c3ee2d481aa063c436a952d373
7
- data.tar.gz: 42efbf0e089b7b1dad5b4d48104a0aa081c9afb731f8e34875262d3f6eabb57b90480ffbb106526a39a6d901d41631635b4f15521bfc54262e84edbf287eb364
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
- field :rpm, _('Packages')
196
- field :srpm, _('SRPMs')
197
- field :module_stream, _('Module Streams')
198
- field :package_group, _('Package Groups')
199
- field :erratum, _('Errata')
200
- field :deb, _('Debian Packages')
201
- field :docker_tag, _('Container Tags')
202
- field :docker_manifest, _('Container Manifests')
203
- field :docker_manifest_list, _('Container Manifest Lists')
204
- field :file, _('Files')
205
- field :ansible_collection, _('Ansible Collections')
206
- field :ostree_ref, _('OSTree Refs')
207
- field :python_package, _('Python Packages')
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 :_docker_repositories, _("Container Image Repositories") do
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 :_ostree_repositories, _("OSTree Repositories") do
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 :components, _("Components") do
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
- field :content_view_name, _('Content View')
30
- field :lifecycle_environment_name, _('Lifecycle Environment')
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
- field :package_total, _("Packages"), Fields::Field, :hide_blank => true
120
- field :srpm_total, _("Source RPMS"), Fields::Field, :hide_blank => true
121
- field :package_group_total, _("Package Groups"), Fields::Field, :hide_blank => true
122
- field :errata_total, _("Errata"), Fields::Field, :hide_blank => true
123
- field :docker_manifest_list_total, _("Container Image Manifest Lists"),
124
- Fields::Field, :hide_blank => true
125
- field :docker_manifest_total, _("Container Image Manifests"), Fields::Field,
126
- :hide_blank => true
127
- field :docker_tag_total, _("Container Image Tags"), Fields::Field, :hide_blank => true
128
- field :file_total, _("Files"), Fields::Field, :hide_blank => true
129
- field :module_stream_total, _("Module Streams"), Fields::Field, :hide_blank => true
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
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('1.11.2')
3
+ @version ||= Gem::Version.new('1.13.0')
4
4
  end
5
5
  end
@@ -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'