hammer_cli_katello 1.10.1 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hammer_cli_katello/capsule.rb +63 -9
  3. data/lib/hammer_cli_katello/option_sources/lifecycle_environment_params.rb +6 -0
  4. data/lib/hammer_cli_katello/organization.rb +3 -0
  5. data/lib/hammer_cli_katello/simple_content_access.rb +5 -0
  6. data/lib/hammer_cli_katello/version.rb +1 -1
  7. data/locale/bn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  8. data/locale/bn/hammer-cli-katello.edit.po +3255 -0
  9. data/locale/bn/hammer-cli-katello.po +178 -69
  10. data/locale/bn/hammer-cli-katello.po.time_stamp +0 -0
  11. data/locale/bn_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  12. data/locale/bn_IN/hammer-cli-katello.edit.po +3255 -0
  13. data/locale/bn_IN/hammer-cli-katello.po +183 -74
  14. data/locale/bn_IN/hammer-cli-katello.po.time_stamp +0 -0
  15. data/locale/ca/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  16. data/locale/ca/hammer-cli-katello.edit.po +3255 -0
  17. data/locale/ca/hammer-cli-katello.po +183 -74
  18. data/locale/ca/hammer-cli-katello.po.time_stamp +0 -0
  19. data/locale/cs_CZ/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  20. data/locale/cs_CZ/hammer-cli-katello.edit.po +3256 -0
  21. data/locale/cs_CZ/hammer-cli-katello.po +199 -90
  22. data/locale/cs_CZ/hammer-cli-katello.po.time_stamp +0 -0
  23. data/locale/de/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  24. data/locale/de/hammer-cli-katello.edit.po +3329 -0
  25. data/locale/de/hammer-cli-katello.po +282 -155
  26. data/locale/de/hammer-cli-katello.po.time_stamp +0 -0
  27. data/locale/de_AT/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  28. data/locale/de_AT/hammer-cli-katello.edit.po +3251 -0
  29. data/locale/de_AT/hammer-cli-katello.po +180 -71
  30. data/locale/de_AT/hammer-cli-katello.po.time_stamp +0 -0
  31. data/locale/de_DE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  32. data/locale/de_DE/hammer-cli-katello.edit.po +3257 -0
  33. data/locale/de_DE/hammer-cli-katello.po +183 -74
  34. data/locale/de_DE/hammer-cli-katello.po.time_stamp +0 -0
  35. data/locale/el/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  36. data/locale/el/hammer-cli-katello.edit.po +3255 -0
  37. data/locale/el/hammer-cli-katello.po +189 -80
  38. data/locale/el/hammer-cli-katello.po.time_stamp +0 -0
  39. data/locale/en/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  40. data/locale/en/hammer-cli-katello.edit.po +2737 -0
  41. data/locale/en/hammer-cli-katello.po +201 -195
  42. data/locale/en/hammer-cli-katello.po.time_stamp +0 -0
  43. data/locale/en_GB/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  44. data/locale/en_GB/hammer-cli-katello.edit.po +3256 -0
  45. data/locale/en_GB/hammer-cli-katello.po +181 -72
  46. data/locale/en_GB/hammer-cli-katello.po.time_stamp +0 -0
  47. data/locale/en_US/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  48. data/locale/en_US/hammer-cli-katello.edit.po +3251 -0
  49. data/locale/en_US/hammer-cli-katello.po +180 -71
  50. data/locale/en_US/hammer-cli-katello.po.time_stamp +0 -0
  51. data/locale/es/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  52. data/locale/es/hammer-cli-katello.edit.po +3322 -0
  53. data/locale/es/hammer-cli-katello.po +266 -149
  54. data/locale/es/hammer-cli-katello.po.time_stamp +0 -0
  55. data/locale/et_EE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  56. data/locale/et_EE/hammer-cli-katello.edit.po +3251 -0
  57. data/locale/et_EE/hammer-cli-katello.po +180 -71
  58. data/locale/et_EE/hammer-cli-katello.po.time_stamp +0 -0
  59. data/locale/fr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  60. data/locale/fr/hammer-cli-katello.edit.po +3347 -0
  61. data/locale/fr/hammer-cli-katello.po +320 -195
  62. data/locale/fr/hammer-cli-katello.po.time_stamp +0 -0
  63. data/locale/gl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  64. data/locale/gl/hammer-cli-katello.edit.po +3255 -0
  65. data/locale/gl/hammer-cli-katello.po +181 -72
  66. data/locale/gl/hammer-cli-katello.po.time_stamp +0 -0
  67. data/locale/gu/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  68. data/locale/gu/hammer-cli-katello.edit.po +3255 -0
  69. data/locale/gu/hammer-cli-katello.po +181 -72
  70. data/locale/gu/hammer-cli-katello.po.time_stamp +0 -0
  71. data/locale/hammer-cli-katello.pot +312 -304
  72. data/locale/he_IL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  73. data/locale/he_IL/hammer-cli-katello.edit.po +3255 -0
  74. data/locale/he_IL/hammer-cli-katello.po +185 -76
  75. data/locale/he_IL/hammer-cli-katello.po.time_stamp +0 -0
  76. data/locale/hi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  77. data/locale/hi/hammer-cli-katello.edit.po +3255 -0
  78. data/locale/hi/hammer-cli-katello.po +181 -72
  79. data/locale/hi/hammer-cli-katello.po.time_stamp +0 -0
  80. data/locale/id/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  81. data/locale/id/hammer-cli-katello.edit.po +3251 -0
  82. data/locale/id/hammer-cli-katello.po +178 -69
  83. data/locale/id/hammer-cli-katello.po.time_stamp +0 -0
  84. data/locale/it/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  85. data/locale/it/hammer-cli-katello.edit.po +3261 -0
  86. data/locale/it/hammer-cli-katello.po +195 -86
  87. data/locale/it/hammer-cli-katello.po.time_stamp +0 -0
  88. data/locale/ja/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  89. data/locale/ja/hammer-cli-katello.edit.po +3273 -0
  90. data/locale/ja/hammer-cli-katello.po +271 -138
  91. data/locale/ja/hammer-cli-katello.po.time_stamp +0 -0
  92. data/locale/ka/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  93. data/locale/ka/hammer-cli-katello.edit.po +3351 -0
  94. data/locale/ka/hammer-cli-katello.po +450 -287
  95. data/locale/ka/hammer-cli-katello.po.time_stamp +0 -0
  96. data/locale/kn/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  97. data/locale/kn/hammer-cli-katello.edit.po +3255 -0
  98. data/locale/kn/hammer-cli-katello.po +181 -72
  99. data/locale/kn/hammer-cli-katello.po.time_stamp +0 -0
  100. data/locale/ko/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  101. data/locale/ko/hammer-cli-katello.edit.po +3258 -0
  102. data/locale/ko/hammer-cli-katello.po +208 -99
  103. data/locale/ko/hammer-cli-katello.po.time_stamp +0 -0
  104. data/locale/ml_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  105. data/locale/ml_IN/hammer-cli-katello.edit.po +3251 -0
  106. data/locale/ml_IN/hammer-cli-katello.po +180 -71
  107. data/locale/ml_IN/hammer-cli-katello.po.time_stamp +0 -0
  108. data/locale/mr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  109. data/locale/mr/hammer-cli-katello.edit.po +3255 -0
  110. data/locale/mr/hammer-cli-katello.po +181 -72
  111. data/locale/mr/hammer-cli-katello.po.time_stamp +0 -0
  112. data/locale/nl_NL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  113. data/locale/nl_NL/hammer-cli-katello.edit.po +3259 -0
  114. data/locale/nl_NL/hammer-cli-katello.po +185 -77
  115. data/locale/nl_NL/hammer-cli-katello.po.time_stamp +0 -0
  116. data/locale/or/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  117. data/locale/or/hammer-cli-katello.edit.po +3255 -0
  118. data/locale/or/hammer-cli-katello.po +181 -72
  119. data/locale/or/hammer-cli-katello.po.time_stamp +0 -0
  120. data/locale/pa/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  121. data/locale/pa/hammer-cli-katello.edit.po +3255 -0
  122. data/locale/pa/hammer-cli-katello.po +183 -74
  123. data/locale/pa/hammer-cli-katello.po.time_stamp +0 -0
  124. data/locale/pl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  125. data/locale/pl/hammer-cli-katello.edit.po +3256 -0
  126. data/locale/pl/hammer-cli-katello.po +184 -75
  127. data/locale/pl/hammer-cli-katello.po.time_stamp +0 -0
  128. data/locale/pl_PL/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  129. data/locale/pl_PL/hammer-cli-katello.edit.po +3251 -0
  130. data/locale/pl_PL/hammer-cli-katello.po +183 -74
  131. data/locale/pl_PL/hammer-cli-katello.po.time_stamp +0 -0
  132. data/locale/pt/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  133. data/locale/pt/hammer-cli-katello.edit.po +3255 -0
  134. data/locale/pt/hammer-cli-katello.po +180 -71
  135. data/locale/pt/hammer-cli-katello.po.time_stamp +0 -0
  136. data/locale/pt_BR/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  137. data/locale/pt_BR/hammer-cli-katello.edit.po +3314 -0
  138. data/locale/pt_BR/hammer-cli-katello.po +262 -141
  139. data/locale/pt_BR/hammer-cli-katello.po.time_stamp +0 -0
  140. data/locale/ro/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  141. data/locale/ro/hammer-cli-katello.edit.po +3251 -0
  142. data/locale/ro/hammer-cli-katello.po +180 -71
  143. data/locale/ro/hammer-cli-katello.po.time_stamp +0 -0
  144. data/locale/ro_RO/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  145. data/locale/ro_RO/hammer-cli-katello.edit.po +3251 -0
  146. data/locale/ro_RO/hammer-cli-katello.po +182 -73
  147. data/locale/ro_RO/hammer-cli-katello.po.time_stamp +0 -0
  148. data/locale/ru/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  149. data/locale/ru/hammer-cli-katello.edit.po +3260 -0
  150. data/locale/ru/hammer-cli-katello.po +197 -88
  151. data/locale/ru/hammer-cli-katello.po.time_stamp +0 -0
  152. data/locale/sl/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  153. data/locale/sl/hammer-cli-katello.edit.po +3255 -0
  154. data/locale/sl/hammer-cli-katello.po +184 -75
  155. data/locale/sl/hammer-cli-katello.po.time_stamp +0 -0
  156. data/locale/sv_SE/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  157. data/locale/sv_SE/hammer-cli-katello.edit.po +3256 -0
  158. data/locale/sv_SE/hammer-cli-katello.po +183 -74
  159. data/locale/sv_SE/hammer-cli-katello.po.time_stamp +0 -0
  160. data/locale/ta/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  161. data/locale/ta/hammer-cli-katello.edit.po +3255 -0
  162. data/locale/ta/hammer-cli-katello.po +178 -69
  163. data/locale/ta/hammer-cli-katello.po.time_stamp +0 -0
  164. data/locale/ta_IN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  165. data/locale/ta_IN/hammer-cli-katello.edit.po +3255 -0
  166. data/locale/ta_IN/hammer-cli-katello.po +183 -74
  167. data/locale/ta_IN/hammer-cli-katello.po.time_stamp +0 -0
  168. data/locale/te/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  169. data/locale/te/hammer-cli-katello.edit.po +3255 -0
  170. data/locale/te/hammer-cli-katello.po +181 -72
  171. data/locale/te/hammer-cli-katello.po.time_stamp +0 -0
  172. data/locale/tr/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  173. data/locale/tr/hammer-cli-katello.edit.po +3255 -0
  174. data/locale/tr/hammer-cli-katello.po +181 -72
  175. data/locale/tr/hammer-cli-katello.po.time_stamp +0 -0
  176. data/locale/vi/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  177. data/locale/vi/hammer-cli-katello.edit.po +3251 -0
  178. data/locale/vi/hammer-cli-katello.po +178 -69
  179. data/locale/vi/hammer-cli-katello.po.time_stamp +0 -0
  180. data/locale/vi_VN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  181. data/locale/vi_VN/hammer-cli-katello.edit.po +3251 -0
  182. data/locale/vi_VN/hammer-cli-katello.po +180 -71
  183. data/locale/vi_VN/hammer-cli-katello.po.time_stamp +0 -0
  184. data/locale/zh/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  185. data/locale/zh/hammer-cli-katello.edit.po +3251 -0
  186. data/locale/zh/hammer-cli-katello.po +178 -69
  187. data/locale/zh/hammer-cli-katello.po.time_stamp +0 -0
  188. data/locale/zh_CN/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  189. data/locale/zh_CN/hammer-cli-katello.edit.po +3268 -0
  190. data/locale/zh_CN/hammer-cli-katello.po +235 -118
  191. data/locale/zh_CN/hammer-cli-katello.po.time_stamp +0 -0
  192. data/locale/zh_TW/LC_MESSAGES/hammer-cli-katello.mo +0 -0
  193. data/locale/zh_TW/hammer-cli-katello.edit.po +3257 -0
  194. data/locale/zh_TW/hammer-cli-katello.po +196 -87
  195. data/locale/zh_TW/hammer-cli-katello.po.time_stamp +0 -0
  196. data/test/functional/capsule/content/data/library_env.json +25 -41
  197. data/test/functional/capsule/content/data/sync_status.json +5 -1
  198. data/test/functional/capsule/content/data/unsynced_env.json +31 -0
  199. data/test/functional/capsule/content/info_test.rb +21 -11
  200. metadata +102 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c4a0b5242f1d0f3e87e8571ebe1c94b82bd6372cce01872180ae287f1ebf486
4
- data.tar.gz: 47a56afed02b55e7dead1cbcadb47afcdfa6dc1715bf86d9b86c55d28674bd6f
3
+ metadata.gz: 7eb373245d3f5729658982b7aefecc00f6fb1637f708ce9d696473d9d351fef7
4
+ data.tar.gz: 0c783d65abf303cfde9283a7bc464ae4e238402630b9373e1e44e7bf342924b1
5
5
  SHA512:
6
- metadata.gz: f1e2109e465aaf6099bd7913bf2efb54d74e26bc4926796b0e232dbcb811e1169d16f40009394ede76e409c52c05607c2a77836ed512f98597e9949c32cdbf6f
7
- data.tar.gz: 624c661b09f3ecbd747d13b35ea7caf3b5084ab9092ae771cdf15a3029419c23af6bd92ed2609d89ea57b60e52dd26c6e34c55b2e666a3717df571f4470abd97
6
+ metadata.gz: 8316c8d2380d4cfee7b8dd8a25ea3f4ae56924da1741a179eb43a677af6a81397be3c608abeb6528dda6f81839d3c6749e2500d153518a062e643150d58020a0
7
+ data.tar.gz: 3497638100e1d86f6ef7a758a7bfef2bf06569c76e804b0736f7eaca1e853c7a0d608082749348f5d91677cfc71b7db0f26e548fd641957c97b4fffc73e5c703
@@ -105,6 +105,22 @@ module HammerCLIKatello
105
105
  extend_with(HammerCLIKatello::CommandExtensions::LifecycleEnvironment.new)
106
106
  end
107
107
 
108
+ class UpdateCountsCommand < HammerCLIKatello::SingleResourceCommand
109
+ include HammerCLIForemanTasks::Async
110
+
111
+ resource :capsule_content, :update_counts
112
+ command_name "update-counts"
113
+
114
+ success_message _("Capsule content counts are being updated in task %{id}.")
115
+ failure_message _("Could not update capsule content counts")
116
+
117
+ option "--organization-id", "ID", _("Organization ID"),
118
+ :attribute_name => :option_organization_id
119
+ option "--organization", "NAME", _("Organization name"),
120
+ :attribute_name => :option_organization_name
121
+ build_options
122
+ end
123
+
108
124
  class SyncStatusCommand < HammerCLIKatello::InfoCommand
109
125
  resource :capsule_content, :sync_status
110
126
  command_name "synchronization-status"
@@ -170,21 +186,59 @@ module HammerCLIKatello
170
186
  field nil, _("Name"), Fields::Reference
171
187
  field :composite, _('Composite'), Fields::Boolean
172
188
  field :last_published, _('Last Published'), Fields::Date
173
- label _('Content') do
174
- from :counts do
175
- field :content_hosts, _('Hosts')
176
- field :products, _('Products')
177
- field :yum_repositories, _('Yum repos')
178
- field :docker_repositories, _('Container Image repos')
179
- field :packages, _('Packages')
180
- field :package_groups, _('Package groups')
181
- field :errata, _('Errata')
189
+ collection :repositories, _('Repositories') do
190
+ field :id, _("Repository ID")
191
+ field :name, _("Repository Name")
192
+ label _('Content Counts') do
193
+ 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')
208
+ end
182
209
  end
183
210
  end
184
211
  end
185
212
  end
186
213
  end
187
214
 
215
+ private
216
+
217
+ def extend_data(data)
218
+ data["lifecycle_environments"].each do |lce|
219
+ lce["content_views"].each do |cv|
220
+ cv["repositories"].each do |repo|
221
+ if cv["up_to_date"]
222
+ cvv_count_repos = data.dig("content_counts", "content_view_versions",
223
+ cv["cvv_id"].to_s, "repositories")
224
+ cvv_count_repos.each do |_repo_id, counts_and_metadata|
225
+ if counts_and_metadata.
226
+ dig("metadata", "library_instance_id") == repo["library_id"] &&
227
+ counts_and_metadata.dig("metadata", "env_id") == lce["id"]
228
+ repo["_content_counts"] = counts_and_metadata["counts"]
229
+ end
230
+ end
231
+ else
232
+ repo["_content_counts"] = {}
233
+ repo["_content_counts"]["warning"] =
234
+ _("Content view must be synced to see content counts")
235
+ end
236
+ end
237
+ end
238
+ end
239
+ data
240
+ end
241
+
188
242
  build_options
189
243
  end
190
244
 
@@ -25,6 +25,9 @@ module HammerCLIKatello
25
25
  result['option_environment_id'] = @command.resolver.lifecycle_environment_id(
26
26
  @command.resolver.scoped_options(lifecycle_environment_resource_name, result, :single))
27
27
  end
28
+ if result['option_lifecycle_environment_id'] && result['option_environment_id'].nil?
29
+ result['option_environment_id'] = result['option_lifecycle_environment_id']
30
+ end
28
31
  end
29
32
 
30
33
  def legacy_option_ids(result)
@@ -32,6 +35,9 @@ module HammerCLIKatello
32
35
  result['option_environment_ids'] = @command.resolver.lifecycle_environment_ids(
33
36
  @command.resolver.scoped_options(lifecycle_environment_resource_name, result, :multi))
34
37
  end
38
+ if result['option_lifecycle_environment_ids'] && result['option_environment_ids'].nil?
39
+ result['option_environment_ids'] = result['option_lifecycle_environment_ids']
40
+ end
35
41
  end
36
42
 
37
43
  def ensure_option_id(result)
@@ -76,6 +76,9 @@ module HammerCLIKatello
76
76
  if params.key?('simple_content_access')
77
77
  params["organization"] = params.fetch('organization', {}).merge(
78
78
  "_simple_content_access" => params['simple_content_access'])
79
+ unless params['simple_content_access']
80
+ warn "Simple Content Access will be required for all organizations in Katello 4.12."
81
+ end
79
82
  end
80
83
  params
81
84
  end
@@ -45,6 +45,11 @@ module HammerCLIKatello
45
45
  failure_message _("Could not disable Simple Content Access for this organization")
46
46
 
47
47
  build_options
48
+
49
+ def execute
50
+ warn "Simple Content Access will be required for all organizations in Katello 4.12."
51
+ super
52
+ end
48
53
  end
49
54
 
50
55
  autoload_subcommands
@@ -1,5 +1,5 @@
1
1
  module HammerCLIKatello
2
2
  def self.version
3
- @version ||= Gem::Version.new('1.10.1')
3
+ @version ||= Gem::Version.new('1.11.0')
4
4
  end
5
5
  end