katello 4.1.0.rc2.2 → 4.1.0
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.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_imports_controller.rb +2 -2
- data/app/controllers/katello/api/v2/errata_controller.rb +2 -23
- data/app/controllers/katello/api/v2/host_errata_controller.rb +5 -32
- data/app/controllers/katello/api/v2/host_packages_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +0 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/host_errata_extensions.rb +41 -0
- data/app/controllers/katello/remote_execution_controller.rb +5 -9
- data/app/lib/actions/candlepin/abstract_async_task.rb +9 -1
- data/app/lib/actions/katello/agent_action.rb +2 -0
- data/app/lib/actions/katello/applicability/repository/regenerate.rb +10 -10
- data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
- data/app/lib/actions/katello/host/upload_package_profile.rb +1 -6
- data/app/lib/actions/katello/host/upload_profiles.rb +2 -41
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +2 -2
- data/app/lib/actions/katello/repository/check_matching_content.rb +13 -14
- data/app/lib/actions/katello/repository/sync.rb +3 -14
- data/app/lib/actions/katello/repository/verify_checksum.rb +1 -1
- data/app/lib/actions/katello/sync_plan/run.rb +7 -2
- data/app/lib/actions/pulp3/content_guard/refresh.rb +6 -10
- data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_version.rb +1 -0
- data/app/lib/katello/errors.rb +1 -1
- data/app/lib/katello/event_daemon/monitor.rb +1 -0
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +6 -10
- data/app/lib/katello/util/hostgroup_facets_helper.rb +126 -0
- data/app/models/katello/authorization/content_view.rb +5 -9
- data/app/models/katello/authorization/organization.rb +4 -4
- data/app/models/katello/concerns/hostgroup_extensions.rb +3 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +42 -0
- data/app/models/katello/concerns/redhat_extensions.rb +18 -10
- data/app/models/katello/erratum.rb +0 -4
- data/app/models/katello/glue/pulp/repo.rb +0 -19
- data/app/models/katello/host/content_facet.rb +11 -20
- data/app/models/katello/host_available_module_stream.rb +4 -4
- data/app/models/katello/module_stream.rb +0 -4
- data/app/models/katello/ping.rb +2 -9
- data/app/models/katello/repository.rb +14 -4
- data/app/models/katello/root_repository.rb +4 -0
- data/app/models/katello/rpm.rb +0 -4
- data/app/services/cert/certs.rb +4 -0
- data/app/services/katello/applicable_host_queue.rb +2 -2
- data/app/services/katello/pulp/yum_metadata_file.rb +6 -2
- data/app/services/katello/pulp3/api/content_guard.rb +39 -5
- data/app/services/katello/pulp3/repository/ansible_collection.rb +1 -1
- data/app/services/katello/pulp3/repository/yum.rb +1 -0
- data/app/services/katello/registration_manager.rb +4 -24
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +1 -0
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +9 -5
- data/config/katello.yaml.example +0 -13
- data/config/routes/api/v2.rb +0 -1
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +15 -1
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +18 -22
- data/db/migrate/20210512170039_add_repo_timestamps.rb +6 -0
- data/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +26 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +1 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-module-streams.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +5 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +3 -5
- data/lib/katello.rb +1 -1
- data/lib/katello/engine.rb +0 -2
- data/lib/katello/permission_creator.rb +7 -14
- data/lib/katello/plugin.rb +9 -0
- data/lib/katello/tasks/fix_hostgroup_facets.rake +8 -0
- data/lib/katello/tasks/upgrades/4.1/update_content_import_export_perms.rake +33 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +39 -39
- data/locale/bn/katello.edit.po +114 -107
- data/locale/bn/katello.po +12 -6
- data/locale/cs/katello.edit.po +118 -115
- data/locale/cs/katello.po +12 -6
- data/locale/de/katello.edit.po +126 -136
- data/locale/de/katello.po +12 -6
- data/locale/en/katello.edit.po +114 -106
- data/locale/en/katello.po +12 -6
- data/locale/es/katello.edit.po +129 -165
- data/locale/es/katello.po +12 -6
- data/locale/fr/katello.edit.po +143 -247
- data/locale/fr/katello.po +13 -9
- data/locale/gu/katello.edit.po +114 -107
- data/locale/gu/katello.po +12 -6
- data/locale/hi/katello.edit.po +114 -107
- data/locale/hi/katello.po +12 -6
- data/locale/it/katello.edit.po +121 -131
- data/locale/it/katello.po +12 -6
- data/locale/ja/katello.edit.po +141 -229
- data/locale/ja/katello.po +13 -9
- data/locale/katello.pot +124 -114
- data/locale/kn/katello.edit.po +114 -107
- data/locale/kn/katello.po +12 -6
- data/locale/ko/katello.edit.po +126 -136
- data/locale/ko/katello.po +12 -6
- data/locale/mr/katello.edit.po +114 -107
- data/locale/mr/katello.po +12 -6
- data/locale/or/katello.edit.po +114 -107
- data/locale/or/katello.po +12 -6
- data/locale/pa/katello.edit.po +114 -107
- data/locale/pa/katello.po +12 -6
- data/locale/pt/katello.edit.po +114 -107
- data/locale/pt/katello.po +12 -6
- data/locale/pt_BR/katello.edit.po +129 -165
- data/locale/pt_BR/katello.po +12 -6
- data/locale/ru/katello.edit.po +126 -136
- data/locale/ru/katello.po +12 -6
- data/locale/ta/katello.edit.po +114 -107
- data/locale/ta/katello.po +12 -6
- data/locale/te/katello.edit.po +114 -107
- data/locale/te/katello.po +12 -6
- data/locale/zh_CN/katello.edit.po +140 -229
- data/locale/zh_CN/katello.po +13 -9
- data/locale/zh_TW/katello.edit.po +127 -153
- data/locale/zh_TW/katello.po +12 -6
- data/webpack/components/react-bootstrap-select/index.js +1 -1
- metadata +26 -18
- data/app/lib/actions/katello/host/generate_applicability.rb +0 -41
- data/app/lib/actions/katello/repository/import_applicability.rb +0 -25
- data/app/lib/actions/pulp/consumer.rb +0 -100
- data/app/lib/actions/pulp/consumer/create.rb +0 -19
- data/app/lib/actions/pulp/consumer/destroy.rb +0 -17
- data/app/lib/actions/pulp/consumer/generate_applicability.rb +0 -24
- data/app/lib/actions/pulp/consumer/update.rb +0 -20
- data/app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb +0 -17
- data/app/models/katello/events/import_host_applicability.rb +0 -16
- data/app/services/katello/applicable_content_helper.rb +0 -111
- data/app/services/katello/pulp/consumer.rb +0 -83
- data/app/services/katello/pulp/consumer_group.rb +0 -95
data/locale/zh_TW/katello.po
CHANGED
@@ -3137,6 +3137,9 @@ msgstr ""
|
|
3137
3137
|
msgid "No manifest file uploaded"
|
3138
3138
|
msgstr "未上傳清單檔案"
|
3139
3139
|
|
3140
|
+
msgid "No manifest found. Import a manifest with the appropriate subscriptions before importing content."
|
3141
|
+
msgstr ""
|
3142
|
+
|
3140
3143
|
msgid "No matching content views found"
|
3141
3144
|
msgstr ""
|
3142
3145
|
|
@@ -4408,10 +4411,13 @@ msgstr ""
|
|
4408
4411
|
msgid "Source RPM"
|
4409
4412
|
msgstr "來源 RPM"
|
4410
4413
|
|
4414
|
+
msgid "Specify an export chunk size less than 1_000_000 GB"
|
4415
|
+
msgstr ""
|
4416
|
+
|
4411
4417
|
msgid "Specify the list of units in each repo"
|
4412
4418
|
msgstr ""
|
4413
4419
|
|
4414
|
-
msgid "Split the exported content into archives no greater than the specified size in
|
4420
|
+
msgid "Split the exported content into archives no greater than the specified size in gigabytes."
|
4415
4421
|
msgstr ""
|
4416
4422
|
|
4417
4423
|
msgid "Stacking ID"
|
@@ -4741,11 +4747,6 @@ msgstr ""
|
|
4741
4747
|
msgid "The following hosts have errata that apply to them: "
|
4742
4748
|
msgstr "下列主機含有套用至它們的勘誤:"
|
4743
4749
|
|
4744
|
-
msgid ""
|
4745
|
-
"The following repositories provided in the import metadata are either not available in the Library or are of incorrect Respository Type. Please add or enable the repositories before importing\n"
|
4746
|
-
" %{repos}"
|
4747
|
-
msgstr ""
|
4748
|
-
|
4749
4750
|
msgid ""
|
4750
4751
|
"The following repositories provided in the import metadata have an incorrect content type or provider type. Make sure the export and import repositories are of the same type before importing\n"
|
4751
4752
|
" %{repos}"
|
@@ -4772,6 +4773,11 @@ msgstr "檔案中之位移值,位於內容開始之處"
|
|
4772
4773
|
msgid "The order to sort the results in. ['asc', 'desc'] Defaults to 'desc'."
|
4773
4774
|
msgstr ""
|
4774
4775
|
|
4776
|
+
msgid ""
|
4777
|
+
"The organization's manifest does not contain the subscriptions required to enable the following repositories.\n"
|
4778
|
+
" %{repos}"
|
4779
|
+
msgstr ""
|
4780
|
+
|
4775
4781
|
msgid "The page you are attempting to access requires selecting a specific organization."
|
4776
4782
|
msgstr "您嘗試存取的網頁需要選擇特定組織。"
|
4777
4783
|
|
@@ -62,7 +62,7 @@ class BootstrapSelect extends React.Component {
|
|
62
62
|
data-count-selected-text={__('{0} items selected')}
|
63
63
|
defaultValue={initialValue}
|
64
64
|
componentClass="select"
|
65
|
-
className="without_select2 without_jquery_multiselect"
|
65
|
+
className="btn-group without_select2 without_jquery_multiselect"
|
66
66
|
/>;
|
67
67
|
}
|
68
68
|
}
|
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.1.0
|
4
|
+
version: 4.1.0
|
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-06-
|
11
|
+
date: 2021-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -84,16 +84,30 @@ dependencies:
|
|
84
84
|
name: foreman-tasks
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '4.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '4.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: foreman-tasks-core
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "<="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.3.5
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "<="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.3.5
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: foreman_remote_execution
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -760,6 +774,7 @@ files:
|
|
760
774
|
- app/controllers/katello/concerns/api/v2/authorization.rb
|
761
775
|
- app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb
|
762
776
|
- app/controllers/katello/concerns/api/v2/content_overrides_controller.rb
|
777
|
+
- app/controllers/katello/concerns/api/v2/host_errata_extensions.rb
|
763
778
|
- app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb
|
764
779
|
- app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb
|
765
780
|
- app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb
|
@@ -886,7 +901,6 @@ files:
|
|
886
901
|
- app/lib/actions/katello/host/destroy.rb
|
887
902
|
- app/lib/actions/katello/host/erratum/applicable_errata_install.rb
|
888
903
|
- app/lib/actions/katello/host/erratum/install.rb
|
889
|
-
- app/lib/actions/katello/host/generate_applicability.rb
|
890
904
|
- app/lib/actions/katello/host/hypervisors.rb
|
891
905
|
- app/lib/actions/katello/host/hypervisors_update.rb
|
892
906
|
- app/lib/actions/katello/host/package/install.rb
|
@@ -942,7 +956,6 @@ files:
|
|
942
956
|
- app/lib/actions/katello/repository/fetch_pxe_files.rb
|
943
957
|
- app/lib/actions/katello/repository/filtered_index_content.rb
|
944
958
|
- app/lib/actions/katello/repository/finish_upload.rb
|
945
|
-
- app/lib/actions/katello/repository/import_applicability.rb
|
946
959
|
- app/lib/actions/katello/repository/import_upload.rb
|
947
960
|
- app/lib/actions/katello/repository/index_content.rb
|
948
961
|
- app/lib/actions/katello/repository/index_errata.rb
|
@@ -993,13 +1006,8 @@ files:
|
|
993
1006
|
- app/lib/actions/pulp/abstract.rb
|
994
1007
|
- app/lib/actions/pulp/abstract_async_task.rb
|
995
1008
|
- app/lib/actions/pulp/abstract_async_task_group.rb
|
996
|
-
- app/lib/actions/pulp/consumer.rb
|
997
|
-
- app/lib/actions/pulp/consumer/create.rb
|
998
|
-
- app/lib/actions/pulp/consumer/destroy.rb
|
999
|
-
- app/lib/actions/pulp/consumer/generate_applicability.rb
|
1000
1009
|
- app/lib/actions/pulp/consumer/sync_capsule.rb
|
1001
1010
|
- app/lib/actions/pulp/consumer/unassociate_units.rb
|
1002
|
-
- app/lib/actions/pulp/consumer/update.rb
|
1003
1011
|
- app/lib/actions/pulp/expect_one_task.rb
|
1004
1012
|
- app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb
|
1005
1013
|
- app/lib/actions/pulp/orchestration/repository/copy_all_units.rb
|
@@ -1044,7 +1052,6 @@ files:
|
|
1044
1052
|
- app/lib/actions/pulp3/abstract.rb
|
1045
1053
|
- app/lib/actions/pulp3/abstract_async_task.rb
|
1046
1054
|
- app/lib/actions/pulp3/capsule_content/generate_metadata.rb
|
1047
|
-
- app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb
|
1048
1055
|
- app/lib/actions/pulp3/capsule_content/refresh_distribution.rb
|
1049
1056
|
- app/lib/actions/pulp3/capsule_content/sync.rb
|
1050
1057
|
- app/lib/actions/pulp3/content_guard/refresh.rb
|
@@ -1172,6 +1179,7 @@ files:
|
|
1172
1179
|
- app/lib/katello/util/docker_manifest_clause_generator.rb
|
1173
1180
|
- app/lib/katello/util/errata.rb
|
1174
1181
|
- app/lib/katello/util/filter_clause_generator.rb
|
1182
|
+
- app/lib/katello/util/hostgroup_facets_helper.rb
|
1175
1183
|
- app/lib/katello/util/http_proxy.rb
|
1176
1184
|
- app/lib/katello/util/model.rb
|
1177
1185
|
- app/lib/katello/util/module_stream_clause_generator.rb
|
@@ -1306,7 +1314,6 @@ files:
|
|
1306
1314
|
- app/models/katello/events/delete_host_agent_queue.rb
|
1307
1315
|
- app/models/katello/events/delete_pool.rb
|
1308
1316
|
- app/models/katello/events/generate_host_applicability.rb
|
1309
|
-
- app/models/katello/events/import_host_applicability.rb
|
1310
1317
|
- app/models/katello/events/import_pool.rb
|
1311
1318
|
- app/models/katello/ext/label_from_name.rb
|
1312
1319
|
- app/models/katello/file_unit.rb
|
@@ -1425,7 +1432,6 @@ files:
|
|
1425
1432
|
- app/services/katello/abstract/pulp/content.rb
|
1426
1433
|
- app/services/katello/agent/dispatcher.rb
|
1427
1434
|
- app/services/katello/applicability/applicable_content_helper.rb
|
1428
|
-
- app/services/katello/applicable_content_helper.rb
|
1429
1435
|
- app/services/katello/applicable_host_queue.rb
|
1430
1436
|
- app/services/katello/authentication/client_authentication.rb
|
1431
1437
|
- app/services/katello/candlepin/consumer.rb
|
@@ -1446,8 +1452,6 @@ files:
|
|
1446
1452
|
- app/services/katello/product_content_importer.rb
|
1447
1453
|
- app/services/katello/proxy_status/pulp.rb
|
1448
1454
|
- app/services/katello/proxy_status/pulp_node.rb
|
1449
|
-
- app/services/katello/pulp/consumer.rb
|
1450
|
-
- app/services/katello/pulp/consumer_group.rb
|
1451
1455
|
- app/services/katello/pulp/content.rb
|
1452
1456
|
- app/services/katello/pulp/deb.rb
|
1453
1457
|
- app/services/katello/pulp/distribution.rb
|
@@ -2125,6 +2129,8 @@ files:
|
|
2125
2129
|
- db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb
|
2126
2130
|
- db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb
|
2127
2131
|
- db/migrate/20210409033915_add_created_in_katello_to_taxonomy.rb
|
2132
|
+
- db/migrate/20210512170039_add_repo_timestamps.rb
|
2133
|
+
- db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
|
2128
2134
|
- db/seeds.d/101-locations.rb
|
2129
2135
|
- db/seeds.d/102-organizations.rb
|
2130
2136
|
- db/seeds.d/104-proxy.rb
|
@@ -4439,6 +4445,7 @@ files:
|
|
4439
4445
|
- lib/katello/tasks/clean_old_file_repos.rake
|
4440
4446
|
- lib/katello/tasks/clean_published_repo_directories.rake
|
4441
4447
|
- lib/katello/tasks/delete_orphaned_content.rake
|
4448
|
+
- lib/katello/tasks/fix_hostgroup_facets.rake
|
4442
4449
|
- lib/katello/tasks/import_applicability.rake
|
4443
4450
|
- lib/katello/tasks/import_subscriptions.rake
|
4444
4451
|
- lib/katello/tasks/jenkins.rake
|
@@ -4457,6 +4464,7 @@ files:
|
|
4457
4464
|
- lib/katello/tasks/upgrades/4.0/remove_ostree_puppet_content.rake
|
4458
4465
|
- lib/katello/tasks/upgrades/4.1/fix_invalid_pools.rake
|
4459
4466
|
- lib/katello/tasks/upgrades/4.1/sync_noarch_content.rake
|
4467
|
+
- lib/katello/tasks/upgrades/4.1/update_content_import_export_perms.rake
|
4460
4468
|
- lib/katello/tasks/virt_who_report.rake
|
4461
4469
|
- lib/katello/url_constrained_cookie_store.rb
|
4462
4470
|
- lib/katello/version.rb
|
@@ -5131,9 +5139,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
5131
5139
|
version: '2.5'
|
5132
5140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
5133
5141
|
requirements:
|
5134
|
-
- - "
|
5142
|
+
- - ">="
|
5135
5143
|
- !ruby/object:Gem::Version
|
5136
|
-
version:
|
5144
|
+
version: '0'
|
5137
5145
|
requirements: []
|
5138
5146
|
rubygems_version: 3.1.2
|
5139
5147
|
signing_key:
|
@@ -1,41 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Katello
|
3
|
-
module Host
|
4
|
-
class GenerateApplicability < Actions::Base
|
5
|
-
def queue
|
6
|
-
::Katello::HOST_TASKS_QUEUE
|
7
|
-
end
|
8
|
-
|
9
|
-
def plan(hosts, use_queue = true)
|
10
|
-
if SETTINGS[:katello][:katello_applicability]
|
11
|
-
plan_self(:host_ids => hosts.map(&:id))
|
12
|
-
else
|
13
|
-
uuids = hosts.map { |host| host.content_facet.try(:uuid) }.compact
|
14
|
-
unless uuids.empty?
|
15
|
-
plan_action(Pulp::Consumer::GenerateApplicability, :uuids => uuids)
|
16
|
-
plan_self(:host_ids => hosts.map(&:id), :use_queue => use_queue)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def finalize
|
22
|
-
if SETTINGS[:katello][:katello_applicability]
|
23
|
-
input[:host_ids].each do |host_id|
|
24
|
-
::Katello::ApplicableHostQueue.push_host(host_id)
|
25
|
-
end
|
26
|
-
::Katello::EventQueue.push_event(::Katello::Events::GenerateHostApplicability::EVENT_TYPE, 0)
|
27
|
-
else
|
28
|
-
input[:host_ids].each do |host_id|
|
29
|
-
if input[:use_queue]
|
30
|
-
::Katello::EventQueue.push_event(::Katello::Events::ImportHostApplicability::EVENT_TYPE, host_id)
|
31
|
-
else
|
32
|
-
host = ::Host.find(host_id)
|
33
|
-
host.content_facet.try(:import_applicability, true) if host
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Katello
|
3
|
-
module Repository
|
4
|
-
class ImportApplicability < Actions::Base
|
5
|
-
middleware.use Actions::Middleware::ExecuteIfContentsChanged
|
6
|
-
|
7
|
-
input_format do
|
8
|
-
param :repo_id
|
9
|
-
param :contents_changed
|
10
|
-
end
|
11
|
-
|
12
|
-
def run
|
13
|
-
repo = ::Katello::Repository.find(input[:repo_id])
|
14
|
-
repo.hosts_with_applicability.each do |host|
|
15
|
-
::Katello::EventQueue.push_event(::Katello::Events::ImportHostApplicability::EVENT_TYPE, host.id)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def rescue_strategy_for_self
|
20
|
-
Dynflow::Action::Rescue::Skip
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,100 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Consumer
|
4
|
-
class ContentPresenter < Helpers::Presenter::Base
|
5
|
-
def humanized_output
|
6
|
-
if task_result_packages
|
7
|
-
ret = []
|
8
|
-
if task_result_packages.is_a?(String)
|
9
|
-
ret << task_result_packages
|
10
|
-
elsif task_result_packages.any?
|
11
|
-
ret.concat(task_result_packages.map { |package| package[:qname] })
|
12
|
-
end
|
13
|
-
if humanized_errors
|
14
|
-
ret.concat(humanized_errors)
|
15
|
-
end
|
16
|
-
return ret.sort.join("\n")
|
17
|
-
else
|
18
|
-
humanized_errors #show any errors if no packages were updated
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
def task_result
|
25
|
-
action.external_task && action.external_task[0][:result]
|
26
|
-
end
|
27
|
-
|
28
|
-
def task_result_details
|
29
|
-
task_result && task_result[:details]
|
30
|
-
end
|
31
|
-
|
32
|
-
def task_erratum_details
|
33
|
-
task_result_details &&
|
34
|
-
task_result_details[:erratum] &&
|
35
|
-
task_result_details[:erratum][:details]
|
36
|
-
end
|
37
|
-
|
38
|
-
def task_rpm_details
|
39
|
-
task_result_details &&
|
40
|
-
task_result_details[:rpm] &&
|
41
|
-
task_result_details[:rpm][:details]
|
42
|
-
end
|
43
|
-
|
44
|
-
def task_package_group_details
|
45
|
-
task_result_details &&
|
46
|
-
task_result_details[:package_group] &&
|
47
|
-
task_result_details[:package_group][:details]
|
48
|
-
end
|
49
|
-
|
50
|
-
def task_erratum_succeeded?
|
51
|
-
task_result_details &&
|
52
|
-
task_result_details[:erratum] &&
|
53
|
-
task_result_details[:erratum][:succeeded] == true
|
54
|
-
end
|
55
|
-
|
56
|
-
def task_rpm_succeeded?
|
57
|
-
task_result_details &&
|
58
|
-
task_result_details[:rpm] &&
|
59
|
-
task_result_details[:rpm][:succeeded] == true
|
60
|
-
end
|
61
|
-
|
62
|
-
def task_package_group_succeeded?
|
63
|
-
task_result_details &&
|
64
|
-
task_result_details[:package_group] &&
|
65
|
-
task_result_details[:package_group][:succeeded] == true
|
66
|
-
end
|
67
|
-
|
68
|
-
def task_errors
|
69
|
-
task_rpm_details && task_rpm_details[:errors]
|
70
|
-
end
|
71
|
-
|
72
|
-
def task_result_packages
|
73
|
-
if task_rpm_details
|
74
|
-
if task_rpm_succeeded?
|
75
|
-
task_rpm_details[:resolved] + task_rpm_details[:deps]
|
76
|
-
else
|
77
|
-
task_rpm_details[:message]
|
78
|
-
end
|
79
|
-
elsif task_package_group_details
|
80
|
-
if task_package_group_succeeded?
|
81
|
-
task_package_group_details[:resolved] + task_package_group_details[:deps]
|
82
|
-
else
|
83
|
-
task_package_group_details[:message]
|
84
|
-
end
|
85
|
-
elsif task_erratum_details
|
86
|
-
if task_erratum_succeeded?
|
87
|
-
task_erratum_details[:resolved] + task_erratum_details[:deps]
|
88
|
-
else
|
89
|
-
task_erratum_details[:message]
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
def humanized_errors
|
95
|
-
task_errors&.map { |k, v| "#{k}: #{v}" }
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Consumer
|
4
|
-
class Create < Pulp::Abstract
|
5
|
-
include Helpers::Presenter
|
6
|
-
|
7
|
-
input_format do
|
8
|
-
param :uuid, String
|
9
|
-
param :name, String
|
10
|
-
end
|
11
|
-
|
12
|
-
def run
|
13
|
-
response = pulp_extensions.consumer.create(input[:uuid], display_name: input[:name])
|
14
|
-
output[:response] = response.slice(:uuid, :name)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Consumer
|
4
|
-
class Destroy < Pulp::Abstract
|
5
|
-
input_format do
|
6
|
-
param :uuid, String
|
7
|
-
end
|
8
|
-
|
9
|
-
def run
|
10
|
-
pulp_extensions.consumer.delete(self.input[:uuid])
|
11
|
-
rescue RestClient::ResourceNotFound
|
12
|
-
Rails.logger.error(_("Pulp Consumer %s has already been removed") % input[:uuid])
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Consumer
|
4
|
-
class GenerateApplicability < Pulp::AbstractAsyncTask
|
5
|
-
input_format do
|
6
|
-
param :uuids, Array
|
7
|
-
end
|
8
|
-
|
9
|
-
def invoke_external_task
|
10
|
-
if input[:uuids].length == 1
|
11
|
-
begin
|
12
|
-
pulp_resources.consumer.regenerate_applicability_by_id(input[:uuids].first)
|
13
|
-
rescue RestClient::ResourceNotFound
|
14
|
-
Rails.logger.warn("Pulp consumer %s not found." % input[:uuids].first)
|
15
|
-
nil
|
16
|
-
end
|
17
|
-
else
|
18
|
-
pulp_extensions.consumer.regenerate_applicability_by_ids(input[:uuids])
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|