katello 4.0.0.rc1 → 4.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/katello/katello.scss +0 -72
  3. data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
  4. data/app/controllers/katello/api/v2/host_packages_controller.rb +6 -6
  5. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
  6. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
  7. data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +64 -0
  8. data/app/lib/actions/katello/agent_action.rb +107 -0
  9. data/app/lib/actions/katello/bulk_agent_action.rb +21 -0
  10. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
  11. data/app/lib/actions/katello/host/erratum/install.rb +8 -26
  12. data/app/lib/actions/katello/host/package/install.rb +8 -21
  13. data/app/lib/actions/katello/host/package/remove.rb +8 -20
  14. data/app/lib/actions/katello/host/package/update.rb +9 -22
  15. data/app/lib/actions/katello/host/package_group/install.rb +8 -21
  16. data/app/lib/actions/katello/host/package_group/remove.rb +8 -20
  17. data/app/lib/actions/pulp/consumer.rb +0 -11
  18. data/app/lib/katello/agent/base_message.rb +38 -0
  19. data/app/lib/katello/agent/client_message_handler.rb +60 -0
  20. data/app/lib/katello/agent/connection.rb +24 -0
  21. data/app/lib/katello/agent/install_errata_message.rb +25 -0
  22. data/app/lib/katello/agent/install_package_group_message.rb +25 -0
  23. data/app/lib/katello/agent/install_package_message.rb +28 -0
  24. data/app/lib/katello/agent/remove_package_group_message.rb +25 -0
  25. data/app/lib/katello/agent/remove_package_message.rb +28 -0
  26. data/app/lib/katello/agent/update_package_message.rb +25 -0
  27. data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +62 -0
  28. data/app/lib/katello/messaging/received_message.rb +1 -1
  29. data/app/lib/katello/qpid/connection.rb +130 -0
  30. data/app/models/katello/agent/dispatch_history.rb +17 -0
  31. data/app/models/katello/concerns/host_managed_extensions.rb +3 -0
  32. data/app/models/katello/events/delete_host_agent_queue.rb +19 -0
  33. data/app/models/katello/ping.rb +9 -1
  34. data/app/models/setting/content.rb +0 -2
  35. data/app/services/katello/agent/dispatcher.rb +66 -0
  36. data/app/services/katello/candlepin_event_listener.rb +1 -0
  37. data/app/services/katello/event_monitor/poller_thread.rb +1 -0
  38. data/app/services/katello/registration_manager.rb +10 -0
  39. data/app/views/katello/sync_management/_products.html.erb +1 -1
  40. data/db/migrate/20210122200618_create_katello_agent_dispatch_history.rb +11 -0
  41. data/db/migrate/20210125161911_delete_erratum_install_batch_size_setting.rb +5 -0
  42. data/db/migrate/20210208213920_add_available_module_stream_context.rb +8 -0
  43. data/engines/bastion/app/assets/javascripts/bastion/auth/authorization.service.js +1 -1
  44. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-start-date.directive.js +21 -0
  45. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-type.directive.js +16 -0
  46. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +2 -0
  47. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html +18 -0
  48. data/lib/katello/engine.rb +7 -0
  49. data/lib/katello/plugin.rb +1 -0
  50. data/lib/katello/tasks/reset.rake +0 -15
  51. data/lib/katello/version.rb +1 -1
  52. data/locale/bn/katello.edit.po +8538 -0
  53. data/locale/bn/katello.po.time_stamp +0 -0
  54. data/locale/cs/katello.edit.po +8440 -0
  55. data/locale/cs/katello.po.time_stamp +0 -0
  56. data/locale/de/katello.edit.po +8344 -0
  57. data/locale/de/katello.po.time_stamp +0 -0
  58. data/locale/en/katello.edit.po +8161 -0
  59. data/locale/en/katello.po.time_stamp +0 -0
  60. data/locale/es/katello.edit.po +8306 -0
  61. data/locale/es/katello.po.time_stamp +0 -0
  62. data/locale/fr/katello.edit.po +8356 -0
  63. data/locale/fr/katello.po.time_stamp +0 -0
  64. data/locale/gu/katello.edit.po +8540 -0
  65. data/locale/gu/katello.po.time_stamp +0 -0
  66. data/locale/hi/katello.edit.po +8537 -0
  67. data/locale/hi/katello.po.time_stamp +0 -0
  68. data/locale/it/katello.edit.po +8293 -0
  69. data/locale/it/katello.po.time_stamp +0 -0
  70. data/locale/ja/katello.edit.po +8322 -0
  71. data/locale/ja/katello.po.time_stamp +0 -0
  72. data/locale/kn/katello.edit.po +8538 -0
  73. data/locale/kn/katello.po.time_stamp +0 -0
  74. data/locale/ko/katello.edit.po +8289 -0
  75. data/locale/ko/katello.po.time_stamp +0 -0
  76. data/locale/mr/katello.edit.po +8502 -0
  77. data/locale/mr/katello.po.time_stamp +0 -0
  78. data/locale/or/katello.edit.po +8538 -0
  79. data/locale/or/katello.po.time_stamp +0 -0
  80. data/locale/pa/katello.edit.po +8524 -0
  81. data/locale/pa/katello.po.time_stamp +0 -0
  82. data/locale/pt/katello.edit.po +8255 -0
  83. data/locale/pt/katello.po.time_stamp +0 -0
  84. data/locale/pt_BR/katello.edit.po +8289 -0
  85. data/locale/pt_BR/katello.po.time_stamp +0 -0
  86. data/locale/ru/katello.edit.po +8309 -0
  87. data/locale/ru/katello.po.time_stamp +0 -0
  88. data/locale/ta/katello.edit.po +8536 -0
  89. data/locale/ta/katello.po.time_stamp +0 -0
  90. data/locale/te/katello.edit.po +8536 -0
  91. data/locale/te/katello.po.time_stamp +0 -0
  92. data/locale/zh_CN/katello.edit.po +8288 -0
  93. data/locale/zh_CN/katello.po.time_stamp +0 -0
  94. data/locale/zh_TW/katello.edit.po +8420 -0
  95. data/locale/zh_TW/katello.po.time_stamp +0 -0
  96. metadata +62 -12
  97. data/app/lib/actions/pulp/consumer/abstract_content_action.rb +0 -71
  98. data/app/lib/actions/pulp/consumer/content_install.rb +0 -43
  99. data/app/lib/actions/pulp/consumer/content_uninstall.rb +0 -26
  100. data/app/lib/actions/pulp/consumer/content_update.rb +0 -32
  101. data/db/functions/empty_v01.sql +0 -7
  102. data/db/functions/evr_trigger_v01.sql +0 -9
  103. data/db/functions/isalpha_v01.sql +0 -11
  104. data/db/functions/isalphanum_v01.sql +0 -12
  105. data/db/functions/isdigit_v01.sql +0 -10
  106. data/db/functions/rpmver_array_v01.sql +0 -60
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc1
4
+ version: 4.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-09 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: qpid_proton
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: stomp
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -851,9 +865,12 @@ files:
851
865
  - app/lib/actions/katello/activation_key/destroy.rb
852
866
  - app/lib/actions/katello/activation_key/reassign.rb
853
867
  - app/lib/actions/katello/activation_key/update.rb
868
+ - app/lib/actions/katello/agent/dispatch_history_presenter.rb
869
+ - app/lib/actions/katello/agent_action.rb
854
870
  - app/lib/actions/katello/applicability/host/generate.rb
855
871
  - app/lib/actions/katello/applicability/hosts/bulk_generate.rb
856
872
  - app/lib/actions/katello/applicability/repository/regenerate.rb
873
+ - app/lib/actions/katello/bulk_agent_action.rb
857
874
  - app/lib/actions/katello/capsule_content/refresh_repos.rb
858
875
  - app/lib/actions/katello/capsule_content/sync.rb
859
876
  - app/lib/actions/katello/capsule_content/sync_capsule.rb
@@ -1009,10 +1026,6 @@ files:
1009
1026
  - app/lib/actions/pulp/abstract_async_task.rb
1010
1027
  - app/lib/actions/pulp/abstract_async_task_group.rb
1011
1028
  - app/lib/actions/pulp/consumer.rb
1012
- - app/lib/actions/pulp/consumer/abstract_content_action.rb
1013
- - app/lib/actions/pulp/consumer/content_install.rb
1014
- - app/lib/actions/pulp/consumer/content_uninstall.rb
1015
- - app/lib/actions/pulp/consumer/content_update.rb
1016
1029
  - app/lib/actions/pulp/consumer/create.rb
1017
1030
  - app/lib/actions/pulp/consumer/destroy.rb
1018
1031
  - app/lib/actions/pulp/consumer/generate_applicability.rb
@@ -1137,6 +1150,15 @@ files:
1137
1150
  - app/lib/actions/pulp3/repository/upload_file.rb
1138
1151
  - app/lib/actions/pulp3/repository/upload_tag.rb
1139
1152
  - app/lib/katello/README
1153
+ - app/lib/katello/agent/base_message.rb
1154
+ - app/lib/katello/agent/client_message_handler.rb
1155
+ - app/lib/katello/agent/connection.rb
1156
+ - app/lib/katello/agent/install_errata_message.rb
1157
+ - app/lib/katello/agent/install_package_group_message.rb
1158
+ - app/lib/katello/agent/install_package_message.rb
1159
+ - app/lib/katello/agent/remove_package_group_message.rb
1160
+ - app/lib/katello/agent/remove_package_message.rb
1161
+ - app/lib/katello/agent/update_package_message.rb
1140
1162
  - app/lib/katello/api/constraints/activation_key_constraint.rb
1141
1163
  - app/lib/katello/api/mapper_extensions.rb
1142
1164
  - app/lib/katello/api/v2/error_handling.rb
@@ -1149,6 +1171,7 @@ files:
1149
1171
  - app/lib/katello/errors.rb
1150
1172
  - app/lib/katello/event_daemon/monitor.rb
1151
1173
  - app/lib/katello/event_daemon/runner.rb
1174
+ - app/lib/katello/event_daemon/services/agent_event_receiver.rb
1152
1175
  - app/lib/katello/foreman.rb
1153
1176
  - app/lib/katello/http_resource.rb
1154
1177
  - app/lib/katello/lazy_accessor.rb
@@ -1157,6 +1180,7 @@ files:
1157
1180
  - app/lib/katello/messaging/connection.rb
1158
1181
  - app/lib/katello/messaging/received_message.rb
1159
1182
  - app/lib/katello/messaging/stomp_connection.rb
1183
+ - app/lib/katello/qpid/connection.rb
1160
1184
  - app/lib/katello/repo_discovery.rb
1161
1185
  - app/lib/katello/resources/candlepin.rb
1162
1186
  - app/lib/katello/resources/candlepin/activation_key.rb
@@ -1227,6 +1251,7 @@ files:
1227
1251
  - app/mailers/katello/subscription_mailer.rb
1228
1252
  - app/models/katello/activation_key.rb
1229
1253
  - app/models/katello/activation_key_purpose_addon.rb
1254
+ - app/models/katello/agent/dispatch_history.rb
1230
1255
  - app/models/katello/ansible_collection.rb
1231
1256
  - app/models/katello/ansible_collection_tag.rb
1232
1257
  - app/models/katello/ansible_tag.rb
@@ -1317,6 +1342,7 @@ files:
1317
1342
  - app/models/katello/erratum_package.rb
1318
1343
  - app/models/katello/event.rb
1319
1344
  - app/models/katello/events/auto_publish_composite_view.rb
1345
+ - app/models/katello/events/delete_host_agent_queue.rb
1320
1346
  - app/models/katello/events/generate_host_applicability.rb
1321
1347
  - app/models/katello/events/import_host_applicability.rb
1322
1348
  - app/models/katello/events/import_pool.rb
@@ -1437,6 +1463,7 @@ files:
1437
1463
  - app/services/cert/certs.rb
1438
1464
  - app/services/cert/rhsm_client.rb
1439
1465
  - app/services/katello/abstract/pulp/content.rb
1466
+ - app/services/katello/agent/dispatcher.rb
1440
1467
  - app/services/katello/applicability/applicable_content_helper.rb
1441
1468
  - app/services/katello/applicable_content_helper.rb
1442
1469
  - app/services/katello/applicable_host_queue.rb
@@ -1870,12 +1897,6 @@ files:
1870
1897
  - config/routes/api/v2.rb
1871
1898
  - config/routes/mount_engine.rb
1872
1899
  - config/routes/overrides.rb
1873
- - db/functions/empty_v01.sql
1874
- - db/functions/evr_trigger_v01.sql
1875
- - db/functions/isalpha_v01.sql
1876
- - db/functions/isalphanum_v01.sql
1877
- - db/functions/isdigit_v01.sql
1878
- - db/functions/rpmver_array_v01.sql
1879
1900
  - db/migrate/20131014135042_katello_tables.rb
1880
1901
  - db/migrate/20131014225132_add_users_fields.rb
1881
1902
  - db/migrate/20131016124255_add_foreign_keys_engine.rb
@@ -2142,8 +2163,11 @@ files:
2142
2163
  - db/migrate/20201021150008_add_import_only_to_katello_content_view.rb
2143
2164
  - db/migrate/20201119211133_pulp3_migration_progress.rb
2144
2165
  - db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb
2166
+ - db/migrate/20210122200618_create_katello_agent_dispatch_history.rb
2167
+ - db/migrate/20210125161911_delete_erratum_install_batch_size_setting.rb
2145
2168
  - db/migrate/20210128231228_add_type_and_from_cvv_to_cvv_export_history.rb
2146
2169
  - db/migrate/20210201163238_migrate_background_download_policy_to_migrate.rb
2170
+ - db/migrate/20210208213920_add_available_module_stream_context.rb
2147
2171
  - db/seeds.d/101-locations.rb
2148
2172
  - db/seeds.d/102-organizations.rb
2149
2173
  - db/seeds.d/104-proxy.rb
@@ -4417,11 +4441,15 @@ files:
4417
4441
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/setting.factory.js
4418
4442
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/settings.module.js
4419
4443
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/content-access-mode-banner.directive.js
4444
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-start-date.directive.js
4445
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-type.directive.js
4420
4446
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptionConsumed.filter.js
4421
4447
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions-helper.service.js
4422
4448
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.factory.js
4423
4449
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.module.js
4424
4450
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html
4451
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html
4452
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html
4425
4453
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-add-products.controller.js
4426
4454
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js
4427
4455
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
@@ -4540,51 +4568,73 @@ files:
4540
4568
  - locale/action_names.rb
4541
4569
  - locale/bn/katello.edit.po
4542
4570
  - locale/bn/katello.po
4571
+ - locale/bn/katello.po.time_stamp
4543
4572
  - locale/cs/katello.edit.po
4544
4573
  - locale/cs/katello.po
4574
+ - locale/cs/katello.po.time_stamp
4545
4575
  - locale/de/katello.edit.po
4546
4576
  - locale/de/katello.po
4577
+ - locale/de/katello.po.time_stamp
4547
4578
  - locale/en/katello.edit.po
4548
4579
  - locale/en/katello.po
4580
+ - locale/en/katello.po.time_stamp
4549
4581
  - locale/es/katello.edit.po
4550
4582
  - locale/es/katello.po
4583
+ - locale/es/katello.po.time_stamp
4551
4584
  - locale/fr/katello.edit.po
4552
4585
  - locale/fr/katello.po
4586
+ - locale/fr/katello.po.time_stamp
4553
4587
  - locale/gu/katello.edit.po
4554
4588
  - locale/gu/katello.po
4589
+ - locale/gu/katello.po.time_stamp
4555
4590
  - locale/hi/katello.edit.po
4556
4591
  - locale/hi/katello.po
4592
+ - locale/hi/katello.po.time_stamp
4557
4593
  - locale/it/katello.edit.po
4558
4594
  - locale/it/katello.po
4595
+ - locale/it/katello.po.time_stamp
4559
4596
  - locale/ja/katello.edit.po
4560
4597
  - locale/ja/katello.po
4598
+ - locale/ja/katello.po.time_stamp
4561
4599
  - locale/katello.pot
4562
4600
  - locale/kn/katello.edit.po
4563
4601
  - locale/kn/katello.po
4602
+ - locale/kn/katello.po.time_stamp
4564
4603
  - locale/ko/katello.edit.po
4565
4604
  - locale/ko/katello.po
4605
+ - locale/ko/katello.po.time_stamp
4566
4606
  - locale/mr/katello.edit.po
4567
4607
  - locale/mr/katello.po
4608
+ - locale/mr/katello.po.time_stamp
4568
4609
  - locale/or/katello.edit.po
4569
4610
  - locale/or/katello.po
4611
+ - locale/or/katello.po.time_stamp
4570
4612
  - locale/pa/katello.edit.po
4571
4613
  - locale/pa/katello.po
4614
+ - locale/pa/katello.po.time_stamp
4572
4615
  - locale/pt/katello.edit.po
4573
4616
  - locale/pt/katello.po
4617
+ - locale/pt/katello.po.time_stamp
4574
4618
  - locale/pt_BR/katello.edit.po
4575
4619
  - locale/pt_BR/katello.po
4620
+ - locale/pt_BR/katello.po.time_stamp
4576
4621
  - locale/ru/katello.edit.po
4577
4622
  - locale/ru/katello.po
4623
+ - locale/ru/katello.po.time_stamp
4578
4624
  - locale/ta/katello.edit.po
4579
4625
  - locale/ta/katello.po
4626
+ - locale/ta/katello.po.time_stamp
4580
4627
  - locale/te/katello.edit.po
4581
4628
  - locale/te/katello.po
4629
+ - locale/te/katello.po.time_stamp
4582
4630
  - locale/update-i18n
4583
4631
  - locale/zanata.xml
4584
4632
  - locale/zh_CN/katello.edit.po
4585
4633
  - locale/zh_CN/katello.po
4634
+ - locale/zh_CN/katello.po.time_stamp
4586
4635
  - locale/zh_TW/katello.edit.po
4587
4636
  - locale/zh_TW/katello.po
4637
+ - locale/zh_TW/katello.po.time_stamp
4588
4638
  - package.json
4589
4639
  - vendor/assets/images/katello/add2.png
4590
4640
  - vendor/assets/images/katello/addhost.png
@@ -1,71 +0,0 @@
1
- module Actions
2
- module Pulp
3
- module Consumer
4
- class AbstractContentAction < Pulp::AbstractAsyncTask
5
- include Helpers::Presenter
6
- include Actions::Pulp::ExpectOneTask
7
-
8
- def external_task=(external_task_data)
9
- super(external_task_data)
10
- task_errors = find_errors(output[:pulp_tasks])
11
- if task_errors.any?
12
- fail ::Katello::Errors::PulpError, task_errors.join("\n")
13
- end
14
- end
15
-
16
- def process_timeout
17
- accept_timeout = Setting['content_action_accept_timeout']
18
- finish_timeout = Setting['content_action_finish_timeout']
19
- pulp_state = output[:pulp_tasks][0][:state]
20
-
21
- if pulp_state == 'waiting'
22
- cancel
23
- fail _("Host did not respond within %s seconds. The task has been cancelled. Is katello-agent installed and goferd running on the Host?") % accept_timeout
24
- elsif output[:client_accepted].nil?
25
- output[:client_accepted] = Time.now.to_s
26
- schedule_timeout(finish_timeout)
27
- elsif pulp_state == 'running'
28
- cancel
29
- fail _("Host did not finish content action in %s seconds. The task has been cancelled.") % finish_timeout
30
- end
31
- end
32
-
33
- def find_errors(tasks)
34
- messages = []
35
- tasks.each do |pulp_task|
36
- if pulp_task[:result] && pulp_task[:result][:details]
37
- pulp_task[:result][:details].each_value do |result|
38
- unless result[:succeeded]
39
- messages << result[:details][:message]
40
- end
41
- end
42
- end
43
- end
44
- messages
45
- end
46
-
47
- # by default runcible puts whatever we pass into a hash under the 'name' key
48
- # here we can make the unit hash more precise
49
- def parse_units_for_type
50
- return unless input[:args]
51
-
52
- if input[:type] == 'rpm'
53
- input[:args].collect do |unit|
54
- ::Katello::Util::Package.parse_nvrea_nvre(unit) || unit
55
- end
56
- else
57
- input[:args]
58
- end
59
- end
60
-
61
- def presenter
62
- Consumer::ContentPresenter.new(self)
63
- end
64
-
65
- def rescue_strategy
66
- Dynflow::Action::Rescue::Skip
67
- end
68
- end
69
- end
70
- end
71
- end
@@ -1,43 +0,0 @@
1
- module Actions
2
- module Pulp
3
- module Consumer
4
- class ContentInstall < AbstractContentAction
5
- include Helpers::Presenter
6
- include Actions::Pulp::ExpectOneTask
7
-
8
- input_format do
9
- param :consumer_uuid, String
10
- param :type, %w(rpm package_group erratum)
11
- param :args, array_of(String)
12
- end
13
-
14
- def invoke_external_task
15
- task = pulp_extensions.consumer.install_content(input[:consumer_uuid],
16
- input[:type],
17
- parse_units_for_type,
18
- "importkeys" => true)
19
- schedule_timeout(Setting['content_action_accept_timeout'])
20
- task
21
- end
22
-
23
- def finalize
24
- check_error_details
25
- end
26
-
27
- def check_error_details
28
- output[:pulp_tasks].each do |pulp_task|
29
- error_details = pulp_task.try(:[], "result").try(:[], "details").try(:[], "rpm").try(:[], "details").try(:[], "trace")
30
- error_message = pulp_task.try(:[], "result").try(:[], "details").try(:[], "rpm").try(:[], "details").try(:[], "message")
31
- if error_details&.include?("YumDownloadError") && error_message
32
- fail _("An error occurred during the sync \n%{error_message}") % {:error_message => error_details}
33
- end
34
- end
35
- end
36
-
37
- def presenter
38
- Consumer::ContentPresenter.new(self)
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,26 +0,0 @@
1
- module Actions
2
- module Pulp
3
- module Consumer
4
- class ContentUninstall < AbstractContentAction
5
- include Helpers::Presenter
6
- include Actions::Pulp::ExpectOneTask
7
-
8
- input_format do
9
- param :consumer_uuid, String
10
- param :type, %w(rpm package_group)
11
- param :args, array_of(String)
12
- end
13
-
14
- def invoke_external_task
15
- pulp_extensions.consumer.uninstall_content(input[:consumer_uuid],
16
- input[:type],
17
- parse_units_for_type)
18
- end
19
-
20
- def presenter
21
- Consumer::ContentPresenter.new(self)
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,32 +0,0 @@
1
- module Actions
2
- module Pulp
3
- module Consumer
4
- class ContentUpdate < AbstractContentAction
5
- include Helpers::Presenter
6
- include Actions::Pulp::ExpectOneTask
7
-
8
- input_format do
9
- param :consumer_uuid, String
10
- param :type, %w(rpm)
11
- param :args, array_of(String)
12
- end
13
-
14
- def invoke_external_task
15
- options = { "importkeys" => true }
16
- options[:all] = true if input[:args].blank?
17
-
18
- task = pulp_extensions.consumer.update_content(input[:consumer_uuid],
19
- input[:type],
20
- parse_units_for_type,
21
- options)
22
- schedule_timeout(Setting['content_action_accept_timeout'])
23
- task
24
- end
25
-
26
- def presenter
27
- Consumer::ContentPresenter.new(self)
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,7 +0,0 @@
1
- create or replace FUNCTION empty(t TEXT)
2
- RETURNS BOOLEAN as $$
3
- BEGIN
4
- return t ~ '^[[:space:]]*$';
5
- END;
6
- $$ language 'plpgsql';
7
-
@@ -1,9 +0,0 @@
1
- CREATE FUNCTION evr_trigger() RETURNS trigger AS $$
2
- BEGIN
3
- NEW.evr = (select ROW(coalesce(NEW.epoch::numeric,0),
4
- rpmver_array(coalesce(NEW.version,'empty'))::evr_array_item[],
5
- rpmver_array(coalesce(NEW.release,'empty'))::evr_array_item[])::evr_t);
6
- RETURN NEW;
7
- END;
8
- $$ language 'plpgsql';
9
-
@@ -1,11 +0,0 @@
1
- create or replace FUNCTION isalpha(ch CHAR)
2
- RETURNS BOOLEAN as $$
3
- BEGIN
4
- if ascii(ch) between ascii('a') and ascii('z') or
5
- ascii(ch) between ascii('A') and ascii('Z')
6
- then
7
- return TRUE;
8
- end if;
9
- return FALSE;
10
- END;
11
- $$ language 'plpgsql';
@@ -1,12 +0,0 @@
1
- create or replace FUNCTION isalphanum(ch CHAR)
2
- RETURNS BOOLEAN as $$
3
- BEGIN
4
- if ascii(ch) between ascii('a') and ascii('z') or
5
- ascii(ch) between ascii('A') and ascii('Z') or
6
- ascii(ch) between ascii('0') and ascii('9')
7
- then
8
- return TRUE;
9
- end if;
10
- return FALSE;
11
- END;
12
- $$ language 'plpgsql';