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