foreman_scc_manager 2.0.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/app/controllers/api/v2/scc_accounts_controller.rb +8 -0
  4. data/app/controllers/scc_accounts_controller.rb +2 -0
  5. data/app/lib/actions/scc_manager/subscribe_product.rb +5 -7
  6. data/app/models/scc_account.rb +29 -0
  7. data/app/models/scc_product.rb +2 -5
  8. data/app/views/api/v2/scc_accounts/main.json.rabl +1 -1
  9. data/app/views/scc_accounts/_form.html.erb +8 -4
  10. data/db/migrate/20210713092440_add_permissions.rb +2 -2
  11. data/db/migrate/20221013214310_add_sync_options_to_scc_account.rb +11 -0
  12. data/lib/foreman_scc_manager/version.rb +1 -1
  13. data/locale/Makefile +9 -4
  14. data/locale/action_names.rb +87 -4
  15. data/locale/de/LC_MESSAGES/foreman_scc_manager.mo +0 -0
  16. data/locale/de/foreman_scc_manager.po +398 -12
  17. data/locale/el/LC_MESSAGES/foreman_scc_manager.mo +0 -0
  18. data/locale/el/foreman_scc_manager.po +595 -0
  19. data/locale/en/LC_MESSAGES/foreman_scc_manager.mo +0 -0
  20. data/locale/en/foreman_scc_manager.po +394 -8
  21. data/locale/foreman_scc_manager.pot +603 -47
  22. data/locale/ja/LC_MESSAGES/foreman_scc_manager.mo +0 -0
  23. data/locale/ja/foreman_scc_manager.po +598 -0
  24. data/locale/ka/LC_MESSAGES/foreman_scc_manager.mo +0 -0
  25. data/locale/ka/foreman_scc_manager.po +595 -0
  26. data/locale/zh_CN/LC_MESSAGES/foreman_scc_manager.mo +0 -0
  27. data/locale/zh_CN/foreman_scc_manager.po +598 -0
  28. data/test/controllers/scc_accounts_controller_test.rb +1 -1
  29. data/test/fixtures/models/katello_root_repositories.yml +0 -12
  30. data/test/test_plugin_helper.rb +0 -6
  31. metadata +26 -31
@@ -0,0 +1,598 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the foreman_scc_manager package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ # Translators:
7
+ # Bryan Kearney <bryan.kearney@gmail.com>, 2019
8
+ # tim123, 2019
9
+ # Amit Upadhye <aupadhye@redhat.com>, 2022
10
+ #
11
+ msgid ""
12
+ msgstr ""
13
+ "Project-Id-Version: foreman_scc_manager 1.0.0\n"
14
+ "Report-Msgid-Bugs-To: \n"
15
+ "PO-Revision-Date: 2019-10-17 13:28+0000\n"
16
+ "Last-Translator: Amit Upadhye <aupadhye@redhat.com>, 2022\n"
17
+ "Language-Team: Chinese (China) (https://www.transifex.com/foreman/teams/114/zh"
18
+ "_CN/)\n"
19
+ "MIME-Version: 1.0\n"
20
+ "Content-Type: text/plain; charset=UTF-8\n"
21
+ "Content-Transfer-Encoding: 8bit\n"
22
+ "Language: zh_CN\n"
23
+ "Plural-Forms: nplurals=1; plural=0;\n"
24
+
25
+ msgid " -- Select Architecture --"
26
+ msgstr ""
27
+
28
+ msgid " -- Select Product --"
29
+ msgstr ""
30
+
31
+ msgid " -- Select Version --"
32
+ msgstr ""
33
+
34
+ msgid " has started successfully."
35
+ msgstr ""
36
+
37
+ msgid "%s/%s"
38
+ msgstr ""
39
+
40
+ msgid "Abstract"
41
+ msgstr ""
42
+
43
+ msgid "Abstract async task"
44
+ msgstr ""
45
+
46
+ msgid "Action with sub plans"
47
+ msgstr ""
48
+
49
+ msgid "Actions"
50
+ msgstr "操作"
51
+
52
+ msgid "Add SCC account"
53
+ msgstr "添加 SCC 帐户"
54
+
55
+ msgid "Add SUSE Customer Center Account"
56
+ msgstr "添加 SUSE 客户中心帐户"
57
+
58
+ msgid "Add more sub products to Product tree"
59
+ msgstr ""
60
+
61
+ msgid "Add product(s)"
62
+ msgstr ""
63
+
64
+ msgid "Additive"
65
+ msgstr ""
66
+
67
+ msgid "Agent action"
68
+ msgstr ""
69
+
70
+ msgid "Associated GPG key of scc_account"
71
+ msgstr "scc_account 的关联 GPG 密钥"
72
+
73
+ msgid "Attach subscriptions"
74
+ msgstr ""
75
+
76
+ msgid "Auto attach subscriptions"
77
+ msgstr ""
78
+
79
+ msgid "Base URL"
80
+ msgstr "基本 URL"
81
+
82
+ msgid "Bulk generate applicability for hosts"
83
+ msgstr ""
84
+
85
+ msgid "Bulk subscription of scc_products for scc_account"
86
+ msgstr "scc_account 的批量 scc_products 订阅"
87
+
88
+ msgid "Bulk subscription of scc_products with individual repository selection for scc_account."
89
+ msgstr ""
90
+
91
+ msgid "Collapse products"
92
+ msgstr ""
93
+
94
+ msgid "Collapse/Expand"
95
+ msgstr ""
96
+
97
+ msgid "Combined Profile Update"
98
+ msgstr ""
99
+
100
+ msgid "Content Only"
101
+ msgstr ""
102
+
103
+ msgid "Copy version units to library"
104
+ msgstr ""
105
+
106
+ msgid "Create"
107
+ msgstr ""
108
+
109
+ msgid "Create Alternate Content Source"
110
+ msgstr ""
111
+
112
+ msgid "Create Export History"
113
+ msgstr ""
114
+
115
+ msgid "Create Import History"
116
+ msgstr ""
117
+
118
+ msgid "Create Package Group"
119
+ msgstr ""
120
+
121
+ msgid "Create Syncable Export History"
122
+ msgstr ""
123
+
124
+ msgid "Create an scc_account"
125
+ msgstr "创建 scc_account"
126
+
127
+ msgid "Cron expression is not valid!"
128
+ msgstr "Cron 表达式无效!"
129
+
130
+ msgid "Date and time relative to which the sync interval is run"
131
+ msgstr "运行同步间隔的日期和时间"
132
+
133
+ msgid "Delete"
134
+ msgstr ""
135
+
136
+ msgid "Delete Activation Key"
137
+ msgstr ""
138
+
139
+ msgid "Delete Lifecycle Environment"
140
+ msgstr ""
141
+
142
+ msgid "Delete Package Group"
143
+ msgstr ""
144
+
145
+ msgid "Delete Product"
146
+ msgstr ""
147
+
148
+ msgid "Delete scc_account"
149
+ msgstr "删除 scc_account"
150
+
151
+ msgid "Destroy"
152
+ msgstr ""
153
+
154
+ msgid "Destroy Alternate Content Source"
155
+ msgstr ""
156
+
157
+ msgid "Destroy Content Host"
158
+ msgstr ""
159
+
160
+ msgid "Disable"
161
+ msgstr ""
162
+
163
+ msgid "Discover"
164
+ msgstr ""
165
+
166
+ msgid "Download Policy"
167
+ msgstr ""
168
+
169
+ msgid "Edit %s"
170
+ msgstr "编辑 %s"
171
+
172
+ msgid "Enable"
173
+ msgstr ""
174
+
175
+ msgid "Errata mail"
176
+ msgstr ""
177
+
178
+ msgid "Expand products"
179
+ msgstr ""
180
+
181
+ msgid "Export"
182
+ msgstr ""
183
+
184
+ msgid "Export Library"
185
+ msgstr ""
186
+
187
+ msgid "Export Repository"
188
+ msgstr ""
189
+
190
+ msgid "Failed to add task to queue."
191
+ msgstr ""
192
+
193
+ msgid "Failed to add task to queue: %s"
194
+ msgstr "向队列添加任务失败:%s"
195
+
196
+ msgid "Fetch pxe files"
197
+ msgstr ""
198
+
199
+ msgid "Filter repositories"
200
+ msgstr ""
201
+
202
+ msgid "Filtered index content"
203
+ msgstr ""
204
+
205
+ msgid "Foreman plugin to sync SUSE Customer Center products and repositories into Katello."
206
+ msgstr "Foreman 插件,将 SUSE 客户中心产品和存储库同步到 Katello。"
207
+
208
+ msgid "Generate host applicability"
209
+ msgstr ""
210
+
211
+ msgid "Generate repository applicability"
212
+ msgstr ""
213
+
214
+ msgid "Go to Product page"
215
+ msgstr ""
216
+
217
+ msgid "Go to Repository page"
218
+ msgstr ""
219
+
220
+ msgid "Hypervisors"
221
+ msgstr ""
222
+
223
+ msgid "Hypervisors update"
224
+ msgstr ""
225
+
226
+ msgid "If this option is enabled, debug and source pool repositories are automatically selected if you select a product. This option is disabled by default. It applies for unselected products, only. Already selected products are not filtered."
227
+ msgstr ""
228
+
229
+ msgid "Immediate"
230
+ msgstr ""
231
+
232
+ msgid "Import"
233
+ msgstr ""
234
+
235
+ msgid "Import Content View Version"
236
+ msgstr ""
237
+
238
+ msgid "Import Default Content View"
239
+ msgstr ""
240
+
241
+ msgid "Import Puppet classes"
242
+ msgstr ""
243
+
244
+ msgid "Import Repository"
245
+ msgstr ""
246
+
247
+ msgid "Import facts"
248
+ msgstr ""
249
+
250
+ msgid "Include Debug and Source Pool repositories"
251
+ msgstr ""
252
+
253
+ msgid "Incremental Update"
254
+ msgstr ""
255
+
256
+ msgid "Incremental Update of Content View Version(s) "
257
+ msgstr ""
258
+
259
+ msgid "Index content"
260
+ msgstr ""
261
+
262
+ msgid "Index errata"
263
+ msgstr ""
264
+
265
+ msgid "Index module streams"
266
+ msgstr ""
267
+
268
+ msgid "Index package groups"
269
+ msgstr ""
270
+
271
+ msgid "Install Applicable Errata"
272
+ msgstr ""
273
+
274
+ msgid "Instance update"
275
+ msgstr ""
276
+
277
+ msgid "Interval cannot be nil"
278
+ msgstr "间隔不能为零"
279
+
280
+ msgid "Interval for syncing scc_account"
281
+ msgstr "同步 scc_account 的时间间隔"
282
+
283
+ msgid "Interval not set correctly"
284
+ msgstr "间隔设置不正确"
285
+
286
+ msgid "Last synced"
287
+ msgstr "最后同步的"
288
+
289
+ msgid "List all scc_accounts"
290
+ msgstr "列出所有 scc_accounts"
291
+
292
+ msgid "List products for an scc_account"
293
+ msgstr ""
294
+
295
+ msgid "Lock on SCC account already taken: %s"
296
+ msgstr "锁定 SCC 帐户已采用:%s"
297
+
298
+ msgid "Login id of scc_account"
299
+ msgstr "scc_account 的登录 ID"
300
+
301
+ msgid "Mirroring Policy"
302
+ msgstr ""
303
+
304
+ msgid "Name of the scc_account"
305
+ msgstr "scc_account 的名称"
306
+
307
+ msgid "No products selected."
308
+ msgstr "没有选择产品."
309
+
310
+ msgid "None"
311
+ msgstr "没有"
312
+
313
+ msgid "On Demand"
314
+ msgstr ""
315
+
316
+ msgid "Package Profile Update"
317
+ msgstr ""
318
+
319
+ msgid "Password of scc_account"
320
+ msgstr "scc_account 的密码"
321
+
322
+ msgid "Please check your SUSE subscription"
323
+ msgstr ""
324
+
325
+ msgid "Please synchronize your SUSE account before you can subscribe to SUSE products."
326
+ msgstr ""
327
+
328
+ msgid "Product Create"
329
+ msgstr ""
330
+
331
+ msgid "Product Selection for Account %s"
332
+ msgstr "为帐户 %s 选择产品"
333
+
334
+ msgid "Products"
335
+ msgstr "产品"
336
+
337
+ msgid "Promote"
338
+ msgstr ""
339
+
340
+ msgid "Promotion to Environment"
341
+ msgstr ""
342
+
343
+ msgid "Publish"
344
+ msgstr ""
345
+
346
+ msgid "Publish Lifecycle Environment Repositories"
347
+ msgstr ""
348
+
349
+ msgid "Refresh Alternate Content Source"
350
+ msgstr ""
351
+
352
+ msgid "Reindex subscriptions"
353
+ msgstr ""
354
+
355
+ msgid "Remove Content"
356
+ msgstr ""
357
+
358
+ msgid "Remove Version"
359
+ msgstr ""
360
+
361
+ msgid "Remove Versions and Associations"
362
+ msgstr ""
363
+
364
+ msgid "Remove from Environment"
365
+ msgstr ""
366
+
367
+ msgid "Remove subscriptions"
368
+ msgstr ""
369
+
370
+ msgid "Repositories (%s/%s)"
371
+ msgstr ""
372
+
373
+ msgid "Repository not imported"
374
+ msgstr ""
375
+
376
+ msgid "Republish Version Repositories"
377
+ msgstr ""
378
+
379
+ msgid "Reset Selection"
380
+ msgstr ""
381
+
382
+ msgid "Run Sync Plan:"
383
+ msgstr ""
384
+
385
+ msgid "SUSE Customer Center"
386
+ msgstr "SUSE 客户中心"
387
+
388
+ msgid "SUSE Customer Center account"
389
+ msgstr "SUSE 客户中心帐户"
390
+
391
+ msgid "SUSE Subscription"
392
+ msgstr "SUSE 订阅"
393
+
394
+ msgid "SUSE Subscription: "
395
+ msgstr "SUSE 订阅:"
396
+
397
+ msgid "SUSE Subscriptions"
398
+ msgstr "SUSE 订阅"
399
+
400
+ msgid "SUSE subscriptions"
401
+ msgstr "SUSE 订阅"
402
+
403
+ msgid "Search"
404
+ msgstr ""
405
+
406
+ msgid "Select SUSE products"
407
+ msgstr ""
408
+
409
+ msgid "Select products"
410
+ msgstr "选择产品"
411
+
412
+ msgid "Selected SUSE Products"
413
+ msgstr ""
414
+
415
+ msgid "Show all products"
416
+ msgstr ""
417
+
418
+ msgid "Show all subscription tasks"
419
+ msgstr ""
420
+
421
+ msgid "Show an scc_account product"
422
+ msgstr "显示 scc_account 产品"
423
+
424
+ msgid "Show currently added repositories"
425
+ msgstr ""
426
+
427
+ msgid "Show last product subscription task"
428
+ msgstr ""
429
+
430
+ msgid "Show only subscribed products"
431
+ msgstr ""
432
+
433
+ msgid "Show scc_account"
434
+ msgstr "显示 scc_account"
435
+
436
+ msgid "Show subscribed products only"
437
+ msgstr ""
438
+
439
+ msgid "Show/Hide unsubscribed"
440
+ msgstr ""
441
+
442
+ msgid "Starting the subscription task failed."
443
+ msgstr ""
444
+
445
+ msgid "Subscribe SCC Product"
446
+ msgstr "订阅 SCC 产品"
447
+
448
+ msgid "Subscribe product"
449
+ msgstr "订阅产品"
450
+
451
+ msgid "Summary of SCC product subscription"
452
+ msgstr ""
453
+
454
+ msgid "Sync"
455
+ msgstr "同步"
456
+
457
+ msgid "Sync Date"
458
+ msgstr "同步日期"
459
+
460
+ msgid "Sync SUSE subscriptions"
461
+ msgstr "同步 SUSE 订阅"
462
+
463
+ msgid "Sync SUSE subscriptions (Products)"
464
+ msgstr "同步 SUSE 订阅(产品)"
465
+
466
+ msgid "Sync SUSE subscriptions (Repositories)"
467
+ msgstr "同步 SUSE 订阅(仓库)"
468
+
469
+ msgid "Sync capsule"
470
+ msgstr ""
471
+
472
+ msgid "Sync interval"
473
+ msgstr "同步间隔"
474
+
475
+ msgid "Sync scc_account"
476
+ msgstr "同步 scc_account"
477
+
478
+ msgid "Sync task started."
479
+ msgstr "同步任务已启动。"
480
+
481
+ msgid "Syncable export"
482
+ msgstr ""
483
+
484
+ msgid "Synchronize"
485
+ msgstr ""
486
+
487
+ msgid "Synchronize SUSE Account"
488
+ msgstr ""
489
+
490
+ msgid "Synchronize smart proxy"
491
+ msgstr ""
492
+
493
+ msgid "Task to subscribe products started."
494
+ msgstr "订阅产品的任务已开始。"
495
+
496
+ msgid "Test Connection"
497
+ msgstr "测试连接"
498
+
499
+ msgid "Test connection for scc_account"
500
+ msgstr "测试 scc_account 的连接"
501
+
502
+ msgid "The default download policy for repositories which were created using this SCC Account."
503
+ msgstr ""
504
+
505
+ msgid "The default mirroring policy for repositories which were created using this SCC Account."
506
+ msgstr ""
507
+
508
+ msgid "The following products will be imported:"
509
+ msgstr ""
510
+
511
+ msgid "The selected products cannot be found for this SCC account."
512
+ msgstr ""
513
+
514
+ msgid "The subscription task has been started successfully"
515
+ msgstr ""
516
+
517
+ msgid "The subscription task with id "
518
+ msgstr ""
519
+
520
+ msgid "The sync interval is used to periodically update the SCC authentication tokens of any imported products."
521
+ msgstr "同步间隔用于定期更新任何导入产品的 SCC 身份验证令牌。"
522
+
523
+ msgid "URL of SUSE for scc_account"
524
+ msgstr "scc_account 的 SUSE URL"
525
+
526
+ msgid "Unknown"
527
+ msgstr "未知"
528
+
529
+ msgid "Update"
530
+ msgstr ""
531
+
532
+ msgid "Update Alternate Content Source"
533
+ msgstr ""
534
+
535
+ msgid "Update CDN Configuration"
536
+ msgstr ""
537
+
538
+ msgid "Update Content Overrides"
539
+ msgstr ""
540
+
541
+ msgid "Update SUSE repositories"
542
+ msgstr "创建 SUSE 仓库"
543
+
544
+ msgid "Update SUSE repositories %s"
545
+ msgstr "更新 SUSE 仓库 %s"
546
+
547
+ msgid "Update content urls"
548
+ msgstr ""
549
+
550
+ msgid "Update for host"
551
+ msgstr ""
552
+
553
+ msgid "Update http proxy"
554
+ msgstr ""
555
+
556
+ msgid "Update http proxy details"
557
+ msgstr ""
558
+
559
+ msgid "Update redhat repository"
560
+ msgstr ""
561
+
562
+ msgid "Update release version for host"
563
+ msgstr ""
564
+
565
+ msgid "Update scc_account"
566
+ msgstr "更新 scc_account"
567
+
568
+ msgid "Updating System Purpose for host"
569
+ msgstr ""
570
+
571
+ msgid "Upload into"
572
+ msgstr ""
573
+
574
+ msgid "Use GPG key for SUSE products"
575
+ msgstr "将 GPG 密钥用于 SUSE 产品"
576
+
577
+ msgid "Use this setting if you want to automatically add a GPG key to your SUSE products upon subscription. You can change this setting in the 'Content' > 'Products' menu, later."
578
+ msgstr "如果要在订阅时自动在 SUSE 产品中添加 GPG 密钥,请使用这个设置。稍后,您可以在 'Content' > 'Products' 菜单中更改此设置。"
579
+
580
+ msgid "Use your 'Organization credentials' obtained from the SUSE Customer Center."
581
+ msgstr "使用从 SUSE 客户中心获取的\"组织凭据\"。"
582
+
583
+ msgid "Verify checksum"
584
+ msgstr ""
585
+
586
+ msgid ""
587
+ "WARNING: If you want to switch SCC accounts and retain the synchronized content, DO NOT delete your old SCC account, even if it is expired. Please change the login and password of your SCC account, instead.\n"
588
+ "\n"
589
+ "If you delete your old SCC account, you CANNOT reuse existing repositories, products, content views, and composite content views.\n"
590
+ "\n"
591
+ "Really delete SCC account %s?"
592
+ msgstr ""
593
+
594
+ msgid "You currently have no SUSE products selected. Search and add SUSE products in the section below."
595
+ msgstr ""
596
+
597
+ msgid "never synced"
598
+ msgstr "从未同步"
@@ -19,7 +19,7 @@ class SccAccountsControllerTest < ActionController::TestCase
19
19
  'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
20
20
  'Authorization' => auth,
21
21
  'Host' => host,
22
- 'User-Agent' => "rest-client/2.1.0 (linux-gnu x86_64) ruby/#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
22
+ 'User-Agent' => "rest-client/2.1.0 (linux x86_64) ruby/#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}"
23
23
  }
24
24
  )
25
25
  .to_return(status: 200, body: '', headers: {})
@@ -5,11 +5,7 @@ sles12_sp4_updates:
5
5
  product_id: <%= ActiveRecord::FixtureSet.identify(:suse) %>
6
6
  url: www.not-valid.com
7
7
  download_policy: immediate
8
- <% if ActiveRecord::Base.connection.column_exists? :katello_root_repositories, :mirroring_policy %>
9
8
  mirroring_policy: "mirror_content_only"
10
- <% else %>
11
- mirror_on_sync: "true"
12
- <% end %>
13
9
  created_at: <%= Time.now %>
14
10
  updated_at: <%= Time.now %>
15
11
 
@@ -20,11 +16,7 @@ sles12_sp4_installer_updates:
20
16
  product_id: <%= ActiveRecord::FixtureSet.identify(:suse) %>
21
17
  url: www.not-valid.com
22
18
  download_policy: on_demand
23
- <% if ActiveRecord::Base.connection.column_exists? :katello_root_repositories, :mirroring_policy %>
24
19
  mirroring_policy: "mirror_content_only"
25
- <% else %>
26
- mirror_on_sync: "true"
27
- <% end %>
28
20
  created_at: <%= Time.now %>
29
21
  updated_at: <%= Time.now %>
30
22
 
@@ -35,10 +27,6 @@ sles12_sp4_installer_updates_2:
35
27
  product_id: <%= ActiveRecord::FixtureSet.identify(:suse) %>
36
28
  url: www.not-valid.com
37
29
  download_policy: on_demand
38
- <% if ActiveRecord::Base.connection.column_exists? :katello_root_repositories, :mirroring_policy %>
39
30
  mirroring_policy: "mirror_content_only"
40
- <% else %>
41
- mirror_on_sync: "true"
42
- <% end %>
43
31
  created_at: <%= Time.now %>
44
32
  updated_at: <%= Time.now %>
@@ -29,8 +29,6 @@ module FixtureTestCase
29
29
  fixtures(:all)
30
30
  FIXTURES = load_fixtures(ActiveRecord::Base)
31
31
 
32
- Setting::Content.load_defaults
33
-
34
32
  User.current = ::User.unscoped.find(FIXTURES['users']['admin']['id'])
35
33
  end
36
34
  end
@@ -41,10 +39,6 @@ class ActiveSupport::TestCase
41
39
  include FixtureTestCase
42
40
  include ForemanTasks::TestHelpers::WithInThreadExecutor
43
41
 
44
- before do
45
- Setting::Content.load_defaults
46
- end
47
-
48
42
  def get_organization(org = nil)
49
43
  saved_user = User.current
50
44
  User.current = User.unscoped.find(users(:admin).id)