katello 3.5.2 → 3.6.0.rc1
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/assets/javascripts/katello/sync_management/sync_management.js +5 -2
- data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +2 -0
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +35 -16
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -3
- data/app/controllers/katello/api/v2/debs_controller.rb +19 -0
- data/app/controllers/katello/api/v2/docker_manifest_lists_controller.rb +20 -0
- data/app/controllers/katello/api/v2/environments_controller.rb +1 -1
- data/app/controllers/katello/api/v2/errata_controller.rb +24 -0
- data/app/controllers/katello/api/v2/file_units_controller.rb +4 -1
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +10 -4
- data/app/controllers/katello/api/v2/host_autocomplete_controller.rb +0 -1
- data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +13 -5
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/package_groups_controller.rb +3 -2
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/products_controller.rb +3 -3
- data/app/controllers/katello/api/v2/repositories_controller.rb +28 -12
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +21 -13
- data/app/controllers/katello/api/v2/root_controller.rb +0 -1
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -19
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +1 -1
- data/app/controllers/katello/application_controller.rb +0 -18
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +12 -13
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +17 -13
- data/app/controllers/katello/concerns/containers/steps_controller_extensions.rb +39 -37
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +14 -14
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +34 -33
- data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +18 -17
- data/app/controllers/katello/products_controller.rb +1 -1
- data/app/controllers/katello/providers_controller.rb +11 -0
- data/app/controllers/katello/react_controller.rb +9 -0
- data/app/controllers/katello/sync_management_controller.rb +1 -1
- data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +10 -9
- data/app/helpers/katello/concerns/settings_helper_extensions.rb +42 -33
- data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +1 -1
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +1 -3
- data/app/helpers/katello/providers_helper.rb +2 -5
- data/app/lib/actions/candlepin/listen_on_candlepin_events.rb +5 -15
- data/app/lib/actions/katello/capsule_content/sync.rb +8 -0
- data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +2 -2
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +2 -5
- data/app/lib/actions/katello/event_queue/monitor.rb +10 -11
- data/app/lib/actions/katello/event_queue/suspended_action.rb +1 -1
- data/app/lib/actions/katello/host/register.rb +1 -1
- data/app/lib/actions/katello/host/update.rb +1 -3
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -5
- data/app/lib/actions/katello/product/content_create.rb +11 -1
- data/app/lib/actions/katello/product/content_destroy.rb +8 -0
- data/app/lib/actions/katello/product/destroy.rb +2 -2
- data/app/lib/actions/katello/product/update.rb +0 -3
- data/app/lib/actions/katello/repository/bulk_metadata_generate.rb +15 -0
- data/app/lib/actions/katello/repository/check_matching_content.rb +10 -3
- data/app/lib/actions/katello/repository/clear.rb +4 -1
- data/app/lib/actions/katello/repository/clone_deb_content.rb +70 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +4 -1
- data/app/lib/actions/katello/repository/clone_to_version.rb +19 -10
- data/app/lib/actions/katello/repository/clone_yum_content.rb +2 -0
- data/app/lib/actions/katello/repository/clone_yum_metadata.rb +1 -2
- data/app/lib/actions/katello/repository/create.rb +6 -2
- data/app/lib/actions/katello/repository/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/export.rb +15 -0
- data/app/lib/actions/katello/repository/fetch_pxe_files.rb +49 -0
- data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -0
- data/app/lib/actions/katello/repository/metadata_generate.rb +5 -1
- data/app/lib/actions/katello/repository/remove_content.rb +2 -0
- data/app/lib/actions/katello/repository/sync.rb +5 -6
- data/app/lib/actions/katello/repository/update.rb +14 -4
- data/app/lib/actions/katello/repository/upload_package_group.rb +0 -1
- data/app/lib/actions/katello/repository_set/disable_repository.rb +7 -7
- data/app/lib/actions/katello/repository_set/enable_repository.rb +17 -7
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +8 -10
- data/app/lib/actions/pulp/consumer/abstract_content_action.rb +1 -1
- data/app/lib/actions/pulp/repository/copy_deb.rb +15 -0
- data/app/lib/actions/pulp/repository/copy_deb_component.rb +11 -0
- data/app/lib/actions/pulp/repository/copy_deb_release.rb +11 -0
- data/app/lib/actions/pulp/repository/copy_srpm.rb +16 -0
- data/app/lib/actions/pulp/repository/create.rb +38 -3
- data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +101 -0
- data/app/lib/actions/pulp/repository/remove_deb.rb +15 -0
- data/app/lib/actions/pulp/repository/remove_docker_blob.rb +11 -0
- data/app/lib/actions/pulp/repository/remove_docker_manifest_list.rb +11 -0
- data/app/lib/actions/pulp/repository/remove_docker_tag.rb +11 -0
- data/app/lib/actions/pulp/repository/sync.rb +2 -0
- data/app/lib/katello/api/v2/error_handling.rb +1 -1
- data/app/lib/katello/capsule_content.rb +1 -1
- data/app/lib/katello/concerns/renderer_extensions.rb +12 -10
- data/app/lib/katello/errors.rb +0 -4
- data/app/lib/katello/resources/candlepin.rb +2 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +2 -2
- data/app/lib/katello/util/docker_manifest_clause_generator.rb +1 -1
- data/app/lib/katello/util/package_clause_generator.rb +1 -1
- data/app/lib/katello/util/support.rb +1 -1
- data/app/models/katello/activation_key.rb +1 -1
- data/app/models/katello/authorization/content_view_history.rb +1 -0
- data/app/models/katello/authorization/content_view_version.rb +1 -1
- data/app/models/katello/authorization/pool.rb +2 -0
- data/app/models/katello/authorization/repository.rb +2 -0
- data/app/models/katello/candlepin/docker_repository_mapper.rb +77 -0
- data/app/models/katello/candlepin/repository_mapper.rb +143 -0
- data/app/models/katello/concerns/container_extensions.rb +14 -12
- data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -2
- data/app/models/katello/concerns/docker_container_wizard_state_extensions.rb +6 -4
- data/app/models/katello/concerns/docker_container_wizard_state_image_extensions.rb +8 -6
- data/app/models/katello/concerns/host_managed_extensions.rb +2 -13
- data/app/models/katello/concerns/location_extensions.rb +5 -1
- data/app/models/katello/concerns/organization_extensions.rb +22 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +26 -5
- data/app/models/katello/concerns/redhat_extensions.rb +22 -21
- data/app/models/katello/concerns/smart_proxy_extensions.rb +11 -9
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +8 -7
- data/app/models/katello/content.rb +26 -0
- data/app/models/katello/content_view.rb +18 -5
- data/app/models/katello/content_view_component.rb +1 -1
- data/app/models/katello/content_view_docker_filter.rb +15 -6
- data/app/models/katello/content_view_filter.rb +8 -2
- data/app/models/katello/content_view_puppet_environment.rb +12 -0
- data/app/models/katello/content_view_repository.rb +2 -1
- data/app/models/katello/content_view_version.rb +57 -15
- data/app/models/katello/deb.rb +50 -0
- data/app/models/katello/docker_manifest.rb +14 -8
- data/app/models/katello/docker_manifest_list.rb +39 -0
- data/app/models/katello/docker_manifest_list_manifest.rb +6 -0
- data/app/models/katello/docker_meta_tag.rb +3 -3
- data/app/models/katello/docker_tag.rb +30 -10
- data/app/models/katello/errata_status.rb +1 -1
- data/app/models/katello/erratum.rb +3 -4
- data/app/models/katello/file_unit.rb +2 -2
- data/app/models/katello/glue/candlepin/activation_key.rb +1 -1
- data/app/models/katello/glue/candlepin/content.rb +9 -34
- data/app/models/katello/glue/candlepin/owner.rb +0 -32
- data/app/models/katello/glue/candlepin/pool.rb +2 -3
- data/app/models/katello/glue/candlepin/product.rb +34 -52
- data/app/models/katello/glue/candlepin/repository.rb +31 -0
- data/app/models/katello/glue/provider.rb +16 -19
- data/app/models/katello/glue/pulp/repo.rb +89 -16
- data/app/models/katello/host/content_facet.rb +6 -6
- data/app/models/katello/host/info_provider.rb +2 -2
- data/app/models/katello/host/subscription_facet.rb +4 -4
- data/app/models/katello/kt_environment.rb +6 -2
- data/app/models/katello/package_group.rb +1 -1
- data/app/models/katello/pool.rb +13 -12
- data/app/models/katello/product.rb +12 -6
- data/app/models/katello/product_content.rb +36 -0
- data/app/models/katello/provider.rb +1 -1
- data/app/models/katello/puppet_module.rb +5 -5
- data/app/models/katello/repository.rb +103 -11
- data/app/models/katello/repository_deb.rb +7 -0
- data/app/models/katello/repository_docker_manifest_list.rb +7 -0
- data/app/models/katello/repository_srpm.rb +7 -0
- data/app/models/katello/rhsm_fact_importer.rb +2 -2
- data/app/models/katello/rhsm_fact_parser.rb +1 -1
- data/app/models/katello/rpm.rb +5 -5
- data/app/models/katello/srpm.rb +40 -0
- data/app/models/katello/subscription.rb +3 -2
- data/app/models/katello/sync_plan.rb +8 -5
- data/app/models/setting/content.rb +5 -3
- data/app/services/katello/product_content_finder.rb +1 -1
- data/app/services/katello/pulp/deb.rb +46 -0
- data/app/services/katello/pulp/docker_manifest_list.rb +7 -0
- data/app/services/katello/pulp/server.rb +4 -12
- data/app/services/katello/pulp/srpm.rb +17 -0
- data/app/views/foreman/unattended/finish-katello.erb +4 -4
- data/app/views/foreman/unattended/kickstart-katello-atomic.erb +3 -3
- data/app/views/foreman/unattended/kickstart-katello.erb +5 -9
- data/app/views/foreman/unattended/snippets/_subscription_manager_registration.erb +3 -3
- data/app/views/foreman/unattended/userdata-katello.erb +8 -8
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +1 -2
- data/app/views/katello/api/v2/content_facet/base.json.rabl +6 -1
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +3 -0
- data/app/views/katello/api/v2/content_views/show.json.rabl +12 -0
- data/app/views/katello/api/v2/debs/base.json.rabl +10 -0
- data/app/views/katello/api/v2/debs/index.json.rabl +7 -0
- data/app/views/katello/api/v2/debs/show.json.rabl +3 -0
- data/app/views/katello/api/v2/docker_manifest_lists/index.json.rabl +7 -0
- data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +12 -0
- data/app/views/katello/api/v2/docker_manifests/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/docker_manifests/show.json.rabl +5 -1
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +4 -4
- data/app/views/katello/api/v2/docker_tags/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/docker_tags/show.json.rabl +1 -1
- data/app/views/katello/api/v2/errata/_counts.json.rabl +1 -0
- data/app/views/katello/api/v2/errata/available_errata.rabl +7 -0
- data/app/views/katello/api/v2/file_units/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl +1 -2
- data/app/views/katello/api/v2/hostgroups_extensions/show.json.rabl +2 -1
- data/app/views/katello/api/v2/hosts_bulk_actions/applicable_errata.json.rabl +7 -0
- data/app/views/katello/api/v2/layouts/resource.json.erb +1 -1
- data/app/views/katello/api/v2/ostree_branches/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/package_groups/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/packages/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/products/_product_content.json.rabl +9 -0
- data/app/views/katello/api/v2/products/base.json.rabl +3 -1
- data/app/views/katello/api/v2/products/show.json.rabl +6 -2
- data/app/views/katello/api/v2/puppet_modules/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +5 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +2 -0
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +15 -3
- data/app/views/katello/layouts/react.html.erb +15 -0
- data/app/views/katello/providers/redhat/_repo_sets.html.erb +5 -5
- data/app/views/katello/sync_management/index.html.erb +4 -0
- data/app/views/smart_proxies/pulp_status.html.erb +6 -6
- data/config/katello.yaml.example +0 -4
- data/config/routes.rb +3 -0
- data/config/routes/api/v2.rb +30 -3
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20131014135042_katello_tables.rb +1 -1
- data/db/migrate/20131014225132_add_users_fields.rb +1 -1
- data/db/migrate/20131016124255_add_foreign_keys_engine.rb +1 -1
- data/db/migrate/20131120225132_add_organization_fields.rb +1 -1
- data/db/migrate/20131216212502_add_quantity_to_katello_key_pools.rb +1 -1
- data/db/migrate/20131216212621_add_cp_id_to_katello_activation_keys.rb +1 -1
- data/db/migrate/20131218174203_drop_katello_key_pools_table.rb +1 -1
- data/db/migrate/20140110000001_update_environments_add_katello_id.rb +1 -1
- data/db/migrate/20140117160939_refactor_content_views.rb +1 -1
- data/db/migrate/20140206200439_create_content_view_puppet_modules.rb +1 -1
- data/db/migrate/20140212131812_create_content_view_package_filter_rules.rb +1 -1
- data/db/migrate/20140212143454_create_content_view_package_group_filter_rules.rb +1 -1
- data/db/migrate/20140212143642_create_content_view_erratum_filter_rules.rb +1 -1
- data/db/migrate/20140217145303_remove_changeset.rb +1 -1
- data/db/migrate/20140217160132_create_content_view_history.rb +1 -1
- data/db/migrate/20140222022712_remove_provider_discovery.rb +1 -1
- data/db/migrate/20140305101813_allow_null_for_repository_content_id.rb +1 -1
- data/db/migrate/20140306132108_create_content_view_puppet_environments.rb +1 -1
- data/db/migrate/20140310102051_repository_add_checksum_type.rb +1 -1
- data/db/migrate/20140318174203_drop_cdn_import_success_column.rb +1 -1
- data/db/migrate/20140325185413_create_content_view_foreign_keys.rb +1 -1
- data/db/migrate/20140404122011_drop_repositories_enabled_column.rb +1 -1
- data/db/migrate/20140411134235_update_content_view_description_type.rb +1 -1
- data/db/migrate/20140414214152_allow_null_content_view_to_activation_key.rb +1 -1
- data/db/migrate/20140418124032_add_next_version_to_katello_content_views.rb +1 -1
- data/db/migrate/20140422000001_update_products_add_organization.rb +1 -1
- data/db/migrate/20140423191446_add_anonymous_providers_to_orgs.rb +1 -1
- data/db/migrate/20140425155126_add_host_id_to_system.rb +1 -1
- data/db/migrate/20140429193743_add_release_version_to_activation_keys.rb +1 -1
- data/db/migrate/20140502164009_rename_system_groups_to_host_collections.rb +1 -1
- data/db/migrate/20140502174412_update_host_collections_foreign_keys.rb +1 -1
- data/db/migrate/20140514165842_create_capsule_lifecycle_environments.rb +1 -1
- data/db/migrate/20140531160506_package_filter_add_original_packages.rb +1 -1
- data/db/migrate/20140610083129_add_pulp_proxy_to_host.rb +1 -1
- data/db/migrate/20140610154745_content_view_puppet_environment_id.rb +1 -1
- data/db/migrate/20140610170142_add_uuid_to_content_view_package_group_filter_rule.rb +1 -1
- data/db/migrate/20140617100300_add_description_to_content_view_filter_rules.rb +1 -1
- data/db/migrate/20140623103442_drop_taxonomies_owner_auto_attach_all_systems_task_id_column.rb +1 -1
- data/db/migrate/20140624183938_add_foreign_keys_for_organizations.rb +1 -1
- data/db/migrate/20140624184401_remove_label_from_activation_key.rb +1 -1
- data/db/migrate/20140626055258_add_missing_foreign_keys.rb +1 -1
- data/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb +1 -1
- data/db/migrate/20140626204902_add_unlimited_to_host_collection.rb +1 -1
- data/db/migrate/20140707203534_location_add_katello_default.rb +1 -1
- data/db/migrate/20140709150428_remove_deletion_task_id_from_taxonomies.rb +1 -1
- data/db/migrate/20140716211853_repo_rename_feed_to_url.rb +1 -1
- data/db/migrate/20140807175457_remove_hidden_column_from_user.rb +1 -1
- data/db/migrate/20140811141742_remove_delayed_jobs.rb +1 -1
- data/db/migrate/20140821084214_add_sync_plan_enabled_to_sync_plan.rb +1 -1
- data/db/migrate/20140928210618_add_description_to_content_view_versions.rb +1 -1
- data/db/migrate/20140930170628_add_errata.rb +1 -1
- data/db/migrate/20141001170628_add_system_repository.rb +1 -1
- data/db/migrate/20141003210742_add_docker_container_registry_url_to_providers.rb +1 -1
- data/db/migrate/20141015173220_add_docker_image_fields.rb +1 -1
- data/db/migrate/20141031150814_add_tag_repository_id_index.rb +1 -1
- data/db/migrate/20141112180709_add_auto_attach_to_activation_keys.rb +1 -1
- data/db/migrate/20141124182205_content_view_version_add_minor.rb +1 -1
- data/db/migrate/20141203123206_add_timestamps_to_repository_join_tables.rb +1 -1
- data/db/migrate/20141204203609_add_default_value_to_auto_attach.rb +1 -1
- data/db/migrate/20141209103005_disown_foreman_templates.rb +1 -1
- data/db/migrate/20141210173220_create_docker_tables.rb +1 -1
- data/db/migrate/20141215213720_track_version_components.rb +1 -1
- data/db/migrate/20141222151001_add_host_content_view_environment.rb +1 -1
- data/db/migrate/20150109012657_add_capsule_id_to_container.rb +1 -1
- data/db/migrate/20150114225023_add_upstream_name_to_repository.rb +1 -1
- data/db/migrate/20150119153452_update_promote_errata_email_description.rb +1 -1
- data/db/migrate/20150224083608_remove_docker_registry_url.rb +1 -1
- data/db/migrate/20150227213850_change_descriptions_to_text_fields.rb +1 -1
- data/db/migrate/20150423134004_add_content_host_id_to_smart_proxy.rb +1 -1
- data/db/migrate/20150505180030_change_errata_timestamps_to_dates.rb +1 -1
- data/db/migrate/20150507131145_update_composite_default_for_content_view.rb +1 -1
- data/db/migrate/20150513034751_add_ostree_branches.rb +1 -1
- data/db/migrate/20150602153753_remove_help_tips.rb +1 -1
- data/db/migrate/20150602153754_remove_search_histories.rb +1 -1
- data/db/migrate/20150602153755_remove_search_favorites.rb +1 -1
- data/db/migrate/20150602153756_remove_user_notices.rb +1 -1
- data/db/migrate/20150602153757_remove_notices.rb +1 -1
- data/db/migrate/20150603045418_remove_user_fields.rb +1 -1
- data/db/migrate/20150606021722_create_puppet_modules.rb +1 -1
- data/db/migrate/20150611140455_remove_default_and_custom_info.rb +1 -1
- data/db/migrate/20150613134559_add_rpm.rb +1 -1
- data/db/migrate/20150623135424_create_package_groups.rb +1 -1
- data/db/migrate/20150715142649_assign_content_host_to_smart_proxies.rb +1 -1
- data/db/migrate/20150717142559_add_distributions_to_repository.rb +1 -1
- data/db/migrate/20150813185339_create_subscriptions.rb +1 -1
- data/db/migrate/20150826165942_add_subscription_facet.rb +1 -1
- data/db/migrate/20150826170004_add_content_facet.rb +1 -1
- data/db/migrate/20150901213759_remove_distributors.rb +1 -1
- data/db/migrate/20150902164543_remove_apply_info_task_id_from_taxonomies.rb +1 -1
- data/db/migrate/20150908222711_drop_marketing_engineering_products.rb +1 -1
- data/db/migrate/20150928221648_update_location_katello_default.rb +1 -1
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20151014144004_host_collection_to_hosts.rb +1 -1
- data/db/migrate/20151015152947_add_virt_only_to_katello_pools.rb +1 -1
- data/db/migrate/20151203230940_add_date_type_to_content_view_erratum_filter_rules.rb +1 -1
- data/db/migrate/20151219152536_rename_index_repository_errata.rb +1 -1
- data/db/migrate/20151219203225_rename_index_repository_puppet_module.rb +1 -1
- data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -1
- data/db/migrate/20160129192548_add_docker_v2_schema.rb +1 -1
- data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -1
- data/db/migrate/20160203195736_remove_docker_image_schema.rb +1 -1
- data/db/migrate/20160211134035_remove_system_errata.rb +1 -1
- data/db/migrate/20160222143432_move_system_description_to_host.rb +1 -1
- data/db/migrate/20160224155909_add_registered_at_to_subscription_facet.rb +1 -1
- data/db/migrate/20160301070319_add_version_ostree_branches.rb +1 -1
- data/db/migrate/20160317171813_change_activation_key_column_names.rb +1 -1
- data/db/migrate/20160323065901_increase_cdn_length.rb +1 -1
- data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +1 -1
- data/db/migrate/20160413230128_add_kickstart_repository_to_hosts_and_hostgroups.rb +1 -1
- data/db/migrate/20160426145517_move_host_description_to_host_comment.rb +1 -1
- data/db/migrate/20160505181337_rename_katello_settings.rb +1 -1
- data/db/migrate/20160520175340_add_host_applicable_package.rb +1 -1
- data/db/migrate/20160530184400_add_repo_id_indexes.rb +1 -1
- data/db/migrate/20160605160933_remove_jobs.rb +1 -1
- data/db/migrate/20160605162929_remove_system_smart_proxy.rb +1 -1
- data/db/migrate/20160613150922_add_event_queue.rb +1 -1
- data/db/migrate/20160617124149_remove_duplicate_view_filters.rb +1 -1
- data/db/migrate/20160619223332_fix_viewer_role.rb +1 -1
- data/db/migrate/20160627125310_delete_system.rb +1 -1
- data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +1 -1
- data/db/migrate/20160722193256_add_verify_ssl_on_sync_to_repository.rb +1 -1
- data/db/migrate/20160727144242_add_registered_through_to_katello_subscription_facets.rb +1 -1
- data/db/migrate/20160728005028_add_latest_version_to_content_view_component.rb +1 -1
- data/db/migrate/20160808002834_add_files.rb +1 -1
- data/db/migrate/20160906181923_add_puppet_path_to_smart_proxy.rb +1 -1
- data/db/migrate/20160907231049_add_username_password_to_repository.rb +1 -1
- data/db/migrate/20160908234510_add_rpm_nvra.rb +1 -1
- data/db/migrate/20160923143611_add_action_to_content_view_histories.rb +1 -1
- data/db/migrate/20160924213020_change_katello_widget_names.rb +1 -1
- data/db/migrate/20160930121245_content_view_force_puppet_env.rb +1 -1
- data/db/migrate/20160930150810_add_smart_proxy_download_policy.rb +1 -1
- data/db/migrate/20161003130853_add_architecture_to_katello_content_view_package_filter_rule.rb +1 -1
- data/db/migrate/20161003204325_add_user_to_katello_subscription_facets.rb +1 -1
- data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +2 -4
- data/db/migrate/20161021072346_fix_subscription_permissions.rb +1 -1
- data/db/migrate/20161026191118_fix_invalid_interfaces.rb +1 -1
- data/db/migrate/20161028153131_sub_facet_user_index_not_uniq.rb +1 -1
- data/db/migrate/20161031204903_add_tracer_support.rb +1 -1
- data/db/migrate/20161102194100_create_content_view_docker_filter_rules.rb +1 -1
- data/db/migrate/20161209162947_add_virt_who_to_katello_pools.rb +1 -1
- data/db/migrate/20161214151548_move_content_source_id_to_content_facets.rb +1 -1
- data/db/migrate/20170114051758_add_depth_to_repositories.rb +1 -1
- data/db/migrate/20170122204325_add_hypervisor_to_subscription_facets.rb +1 -1
- data/db/migrate/20170125152421_move_default_location_to_settings.rb +1 -1
- data/db/migrate/20170208215148_add_docker_repo_name.rb +1 -1
- data/db/migrate/20170220679403_remove_system_permissions.rb +1 -1
- data/db/migrate/20170222131211_change_pool_columns_to_dates.rb +1 -1
- data/db/migrate/20170321012632_fill_in_content_view_components.rb +1 -1
- data/db/migrate/20170523182831_create_docker_meta_tag.rb +1 -1
- data/db/migrate/20170714144125_add_deb.rb +34 -0
- data/db/migrate/20170718142148_create_katello_subscription_facet_pools.rb +1 -1
- data/db/migrate/20170720142145_add_deb_release_parameters_to_repositories.rb +7 -0
- data/db/migrate/20170821170915_add_index_to_installed_packages.rb +1 -1
- data/db/migrate/20170821170916_add_nvra_index_to_installed_packages.rb +1 -1
- data/db/migrate/20170822104447_add_katello_content_to_image.rb +1 -1
- data/db/migrate/20170913183848_add_errata_counts.rb +1 -1
- data/db/migrate/20171010170443_add_index_to_katello_content_facet_errata.rb +1 -1
- data/db/migrate/20171010172724_add_docker_manifest_list.rb +67 -0
- data/db/migrate/20171011175510_add_srpm.rb +38 -0
- data/db/migrate/20171014051810_remove_docker_manifest_name.rb +9 -0
- data/db/migrate/20171025163149_remove_use_pulp_oauth_setting.rb +5 -0
- data/db/migrate/20171112174357_create_katello_content.rb +13 -0
- data/db/migrate/20171112174358_create_katello_product_content.rb +16 -0
- data/db/migrate/20171114150937_cleanup_installed_packages.rb +1 -1
- data/db/migrate/20171114183353_add_hypervisor_id_to_katello_pools.rb +1 -1
- data/db/migrate/20171120144843_add_repository_ignore_proxy.rb +5 -0
- data/db/migrate/20171211124439_add_uuid_index_to_katello_subscription_facets.rb +1 -1
- data/db/migrate/20180103230812_set_errata_updated_date.rb +7 -0
- data/db/seeds.d/101-locations.rb +6 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +1 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +8 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +5 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +13 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +44 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-deb-repositories.controller.js +48 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-deb-repositories-list.controller.js +46 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +11 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/date-type-errata-filter.controller.js +4 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-repositories.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-deb-repositories.html +87 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +12 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +10 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +13 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-apt.html +25 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-deb.html +19 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-yum.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +16 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/deb.factory.js +28 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.controller.js +34 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.module.js +20 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.routes.js +71 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-content-views.controller.js +44 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-repositories.controller.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb.controller.js +34 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-content-views.html +41 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +21 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-repositories.html +52 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb.html +37 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/views/debs.html +43 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifest-lists/docker-manifest-list.factory.js +26 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifest-lists/docker-manifest-lists.module.js +19 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-details.controller.js +17 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-environments.controller.js +2 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-info.html +7 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/views/docker-tags.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-content-hosts.controller.js +11 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/incremental-update.service.js +2 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +6 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/file.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization-selector.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +17 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +69 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-debs.html +68 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifest-lists.html +44 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifests.html +13 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +42 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.module.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +18 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +21 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/new-sync-plan.controller.js +1 -0
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +1 -0
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/docker.scss +16 -0
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -0
- data/lib/katello/engine.rb +4 -6
- data/lib/katello/permission_creator.rb +14 -12
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +83 -54
- data/lib/katello/prevent_json_parsing.rb +15 -0
- data/lib/katello/repository_types/deb.rb +1 -0
- data/lib/katello/tasks/clean_old_file_repos.rake +33 -0
- data/lib/katello/tasks/clean_published_repo_directories.rake +4 -4
- data/lib/katello/tasks/reimport.rake +8 -1
- data/lib/katello/tasks/repository.rake +3 -3
- data/lib/katello/tasks/rubocop.rake +1 -1
- data/lib/katello/tasks/test.rake +1 -0
- data/lib/katello/tasks/upgrades/3.6/import_product_content.rake +12 -0
- data/lib/katello/tasks/upgrades/3.6/republish_file_repos.rake +16 -0
- data/lib/katello/tasks/virt_who_report.rake +2 -2
- data/lib/katello/version.rb +1 -1
- data/locale/README +1 -0
- metadata +121 -30
- data/app/lib/actions/candlepin/owner/upstream_regenerate_certificates.rb +0 -17
- data/app/lib/actions/candlepin/product/update.rb +0 -32
- data/app/lib/actions/katello/event_queue/run_once_coordinator_lock.rb +0 -12
- data/app/models/katello/candlepin/content.rb +0 -252
- data/app/models/katello/candlepin/product_content.rb +0 -48
- data/lib/katello/params_parser_wrapper.rb +0 -16
@@ -24,6 +24,10 @@ module Katello
|
|
24
24
|
repository_association_class.name.demodulize.pluralize.underscore
|
25
25
|
end
|
26
26
|
|
27
|
+
def immutable_unit_types
|
28
|
+
[Katello::Rpm, Katello::Srpm]
|
29
|
+
end
|
30
|
+
|
27
31
|
def with_identifiers(ids)
|
28
32
|
ids = [ids] unless ids.is_a?(Array)
|
29
33
|
ids.map!(&:to_s)
|
@@ -72,21 +76,38 @@ module Katello
|
|
72
76
|
# Rpms cannot change in Pulp so we do not index them if they are already present
|
73
77
|
# in our database. Errata and Package Groups can change in Pulp, so we index
|
74
78
|
# all of them in the repository on each sync.
|
75
|
-
if self
|
79
|
+
if immutable_unit_types.include?(self) && !force
|
76
80
|
ids_to_import = ids - repository.rpms.map(&:uuid)
|
77
81
|
else
|
78
82
|
ids_to_import = ids
|
79
83
|
end
|
80
84
|
self.import_all(ids_to_import, :index_repository_association => false) if repository.content_view.default? || force
|
81
|
-
self.sync_repository_associations(repository, ids) if self.manage_repository_association
|
85
|
+
self.sync_repository_associations(repository, :uuids => ids) if self.manage_repository_association
|
82
86
|
end
|
83
87
|
|
84
88
|
def unit_id_field
|
85
89
|
"#{self.name.demodulize.underscore}_id"
|
86
90
|
end
|
87
91
|
|
88
|
-
def
|
89
|
-
|
92
|
+
def copy_repository_associations(source_repo, dest_repo)
|
93
|
+
delete_query = "delete from #{repository_association_class.table_name} where repository_id = #{dest_repo.id} and
|
94
|
+
#{unit_id_field} not in (select #{unit_id_field} from #{repository_association_class.table_name} where repository_id = #{source_repo.id})"
|
95
|
+
ActiveRecord::Base.connection.execute(delete_query)
|
96
|
+
|
97
|
+
insert_query = "insert into #{repository_association_class.table_name} (repository_id, #{unit_id_field})
|
98
|
+
select #{dest_repo.id} as repository_id, #{unit_id_field} from #{repository_association_class.table_name}
|
99
|
+
where repository_id = #{source_repo.id} and #{unit_id_field} not in (select #{unit_id_field}
|
100
|
+
from #{repository_association_class.table_name} where repository_id = #{dest_repo.id})"
|
101
|
+
ActiveRecord::Base.connection.execute(insert_query)
|
102
|
+
end
|
103
|
+
|
104
|
+
def sync_repository_associations(repository, options = {})
|
105
|
+
additive = options.fetch(:additive, false)
|
106
|
+
associated_ids = options.fetch(:ids, nil)
|
107
|
+
uuids = options.fetch(:uuids) if associated_ids.nil?
|
108
|
+
|
109
|
+
associated_ids = with_uuid(uuids).pluck(:id) if uuids
|
110
|
+
|
90
111
|
table_name = self.repository_association_class.table_name
|
91
112
|
attribute_name = unit_id_field
|
92
113
|
|
@@ -132,7 +153,7 @@ module Katello
|
|
132
153
|
end
|
133
154
|
|
134
155
|
repo_unit_id.each do |repo_pulp_id, unit_uuids|
|
135
|
-
sync_repository_associations(Repository.find_by(:pulp_id => repo_pulp_id), unit_uuids, additive)
|
156
|
+
sync_repository_associations(Repository.find_by(:pulp_id => repo_pulp_id), :uuids => unit_uuids, :additive => additive)
|
136
157
|
end
|
137
158
|
end
|
138
159
|
end
|
@@ -3,9 +3,29 @@ module Katello
|
|
3
3
|
module RedhatExtensions
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
+
module Overrides
|
7
|
+
def medium_uri(host, url = nil)
|
8
|
+
kickstart_repo = host.try(:content_facet).try(:kickstart_repository) || host.try(:kickstart_repository)
|
9
|
+
|
10
|
+
if host.try(:content_source) && kickstart_repo.present?
|
11
|
+
return URI.parse(kickstart_repo.full_path(host.content_source))
|
12
|
+
else
|
13
|
+
super(host, url)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# overwrite foreman method in operatingsystem.rb
|
18
|
+
def boot_files_uri(medium, architecture, host = nil)
|
19
|
+
return super(medium, architecture, host) unless host.try(:content_source)
|
20
|
+
family_class = self.family.constantize
|
21
|
+
family_class::PXEFILES.values.collect do |img|
|
22
|
+
"#{medium_uri(host)}/#{pxedir}/#{img}"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
6
27
|
included do
|
7
|
-
|
8
|
-
alias_method_chain :boot_files_uri, :content
|
28
|
+
prepend Overrides
|
9
29
|
end
|
10
30
|
|
11
31
|
module ClassMethods
|
@@ -45,16 +65,6 @@ module Katello
|
|
45
65
|
end
|
46
66
|
end
|
47
67
|
|
48
|
-
def medium_uri_with_content_uri(host, url = nil)
|
49
|
-
kickstart_repo = host.try(:content_facet).try(:kickstart_repository) || host.try(:kickstart_repository)
|
50
|
-
|
51
|
-
if host.try(:content_source) && kickstart_repo.present?
|
52
|
-
return URI.parse(kickstart_repo.full_path(host.content_source))
|
53
|
-
else
|
54
|
-
medium_uri_without_content_uri(host, url)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
68
|
def kickstart_repos(host)
|
59
69
|
distros = distribution_repositories(host)
|
60
70
|
if distros && host.content_source
|
@@ -79,15 +89,6 @@ module Katello
|
|
79
89
|
[]
|
80
90
|
end
|
81
91
|
end
|
82
|
-
|
83
|
-
# overwrite foreman method in operatingsystem.rb
|
84
|
-
def boot_files_uri_with_content(medium, architecture, host = nil)
|
85
|
-
return boot_files_uri_without_content(medium, architecture, host) unless host.try(:content_source)
|
86
|
-
family_class = self.family.constantize
|
87
|
-
family_class::PXEFILES.values.collect do |img|
|
88
|
-
"#{medium_uri(host)}/#{pxedir}/#{img}"
|
89
|
-
end
|
90
|
-
end
|
91
92
|
end
|
92
93
|
end
|
93
94
|
end
|
@@ -6,6 +6,14 @@ module Katello
|
|
6
6
|
module SmartProxyExtensions
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
|
+
module Overrides
|
10
|
+
def refresh
|
11
|
+
errors = super
|
12
|
+
update_puppet_path
|
13
|
+
errors
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
9
17
|
PULP_FEATURE = "Pulp".freeze
|
10
18
|
PULP_NODE_FEATURE = "Pulp Node".freeze
|
11
19
|
|
@@ -16,7 +24,7 @@ module Katello
|
|
16
24
|
include ForemanTasks::Concerns::ActionSubject
|
17
25
|
include LazyAccessor
|
18
26
|
|
19
|
-
|
27
|
+
prepend Overrides
|
20
28
|
|
21
29
|
before_create :associate_organizations
|
22
30
|
before_create :associate_default_locations
|
@@ -43,10 +51,10 @@ module Katello
|
|
43
51
|
:source => :lifecycle_environment
|
44
52
|
|
45
53
|
has_many :content_facets, :class_name => "::Katello::Host::ContentFacet", :foreign_key => :content_source_id,
|
46
|
-
:inverse_of => :content_source
|
54
|
+
:inverse_of => :content_source, :dependent => :nullify
|
47
55
|
|
48
56
|
has_many :hostgroups, :class_name => "::Hostgroup", :foreign_key => :content_source_id,
|
49
|
-
:inverse_of => :content_source
|
57
|
+
:inverse_of => :content_source, :dependent => :nullify
|
50
58
|
|
51
59
|
validates :download_policy, inclusion: {
|
52
60
|
:in => DOWNLOAD_POLICIES,
|
@@ -79,12 +87,6 @@ module Katello
|
|
79
87
|
path
|
80
88
|
end
|
81
89
|
|
82
|
-
def refresh_with_puppet_path
|
83
|
-
errors = refresh_without_puppet_path
|
84
|
-
update_puppet_path
|
85
|
-
errors
|
86
|
-
end
|
87
|
-
|
88
90
|
def pulp_node
|
89
91
|
@pulp_node ||= Katello::Pulp::Server.config(pulp_url, User.remote_user)
|
90
92
|
end
|
@@ -2,7 +2,6 @@ module Katello
|
|
2
2
|
module Concerns
|
3
3
|
module SubscriptionFacetHostExtensions
|
4
4
|
extend ActiveSupport::Concern
|
5
|
-
include ForemanTasks::Concerns::ActionTriggering
|
6
5
|
|
7
6
|
included do
|
8
7
|
SUBSCRIPTION_STATUS_MAP = {
|
@@ -13,24 +12,26 @@ module Katello
|
|
13
12
|
:unsubscribed_hypervisor => Katello::SubscriptionStatus::UNSUBSCRIBED_HYPERVISOR
|
14
13
|
}.freeze
|
15
14
|
|
15
|
+
prepend ForemanTasks::Concerns::ActionTriggering
|
16
|
+
|
16
17
|
accepts_nested_attributes_for :subscription_facet, :update_only => true, :reject_if => lambda { |attrs| attrs.values.compact.empty? }
|
17
18
|
|
18
19
|
has_many :activation_keys, :through => :subscription_facet
|
19
20
|
has_many :pools, :through => :subscription_facet
|
20
21
|
has_many :subscriptions, :through => :pools
|
21
|
-
has_one :subscription_status_object, :class_name => 'Katello::SubscriptionStatus', :foreign_key => 'host_id'
|
22
|
+
has_one :subscription_status_object, :class_name => 'Katello::SubscriptionStatus', :foreign_key => 'host_id', :dependent => :destroy
|
22
23
|
has_one :hypervisor_host, :through => :subscription_facet
|
23
24
|
|
24
25
|
scoped_search :on => :status, :relation => :subscription_status_object, :rename => :subscription_status,
|
25
26
|
:complete_value => SUBSCRIPTION_STATUS_MAP
|
26
27
|
|
27
|
-
scoped_search :on => :release_version, :relation => :subscription_facet, :complete_value => true
|
28
|
-
scoped_search :on => :autoheal, :relation => :subscription_facet, :complete_value => true
|
29
|
-
scoped_search :on => :service_level, :relation => :subscription_facet, :complete_value => true
|
28
|
+
scoped_search :on => :release_version, :relation => :subscription_facet, :complete_value => true, :only_explicit => true
|
29
|
+
scoped_search :on => :autoheal, :relation => :subscription_facet, :complete_value => true, :only_explicit => true
|
30
|
+
scoped_search :on => :service_level, :relation => :subscription_facet, :complete_value => true, :only_explicit => true
|
30
31
|
scoped_search :on => :last_checkin, :relation => :subscription_facet, :complete_value => true, :only_explicit => true
|
31
|
-
scoped_search :on => :registered_through, :relation => :subscription_facet, :complete_value => true
|
32
|
+
scoped_search :on => :registered_through, :relation => :subscription_facet, :complete_value => true, :only_explicit => true
|
32
33
|
scoped_search :on => :registered_at, :relation => :subscription_facet, :rename => :registered_at, :only_explicit => true
|
33
|
-
scoped_search :on => :uuid, :relation => :subscription_facet, :rename => :subscription_uuid
|
34
|
+
scoped_search :on => :uuid, :relation => :subscription_facet, :rename => :subscription_uuid, :only_explicit => true
|
34
35
|
scoped_search :relation => :activation_keys, :on => :name, :rename => :activation_key, :complete_value => true, :ext_method => :find_by_activation_key
|
35
36
|
scoped_search :relation => :activation_keys, :on => :id, :rename => :activation_key_id, :complete_value => true, :ext_method => :find_by_activation_key_id,
|
36
37
|
:only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Katello
|
2
|
+
class Content < Katello::Model
|
3
|
+
include Katello::Glue::Candlepin::Content
|
4
|
+
has_many :product_contents, :class_name => 'Katello::ProductContent', :dependent => :destroy
|
5
|
+
has_many :products, :through => :product_contents
|
6
|
+
|
7
|
+
validates :label, :uniqueness => true
|
8
|
+
validates :cp_content_id, :uniqueness => true
|
9
|
+
|
10
|
+
def self.import_all
|
11
|
+
Organization.all.each do |org|
|
12
|
+
org.products.each do |product|
|
13
|
+
begin
|
14
|
+
product_json = Katello::Resources::Candlepin::Product.get(org.label,
|
15
|
+
product.cp_id,
|
16
|
+
%w(productContent)).first
|
17
|
+
product_content_attrs = product_json['productContent']
|
18
|
+
Katello::Glue::Candlepin::Product.import_product_content(product, product_content_attrs)
|
19
|
+
rescue RestClient::NotFound
|
20
|
+
Rails.logger.warn _("Product with ID %s not found in Candlepin. Skipping content import for it.") % product.cp_id
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -65,6 +65,7 @@ module Katello
|
|
65
65
|
|
66
66
|
scoped_search :on => :name, :complete_value => true
|
67
67
|
scoped_search :on => :organization_id, :complete_value => true, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
68
|
+
scoped_search :on => :label, :complete_value => true
|
68
69
|
scoped_search :on => :composite, :complete_value => {true: true, false: false}
|
69
70
|
|
70
71
|
def self.in_environment(env)
|
@@ -168,7 +169,7 @@ module Katello
|
|
168
169
|
|
169
170
|
def promoted?
|
170
171
|
# if the view exists in more than 1 environment, it has been promoted
|
171
|
-
self.environments.
|
172
|
+
self.environments.many?
|
172
173
|
end
|
173
174
|
|
174
175
|
#NOTE: this function will most likely become obsolete once we drop api v1
|
@@ -196,6 +197,10 @@ module Katello
|
|
196
197
|
Katello::Rpm.in_repositories(self.repos(env)).count
|
197
198
|
end
|
198
199
|
|
200
|
+
def total_deb_package_count(env)
|
201
|
+
Katello::Deb.in_repositories(self.repos(env)).count
|
202
|
+
end
|
203
|
+
|
199
204
|
def total_puppet_module_count(env)
|
200
205
|
repoids = self.repos(env).collect { |r| r.pulp_id }
|
201
206
|
result = Katello::PuppetModule.legacy_search('*', :page_size => 1, :repoids => repoids)
|
@@ -287,12 +292,20 @@ module Katello
|
|
287
292
|
# is the library instance id, and the value is an array
|
288
293
|
# of the repositories for that instance.
|
289
294
|
repositories_to_publish.inject({}) do |result, repo|
|
290
|
-
result[repo.
|
291
|
-
result[repo.
|
295
|
+
result[repo.library_instance] ||= []
|
296
|
+
result[repo.library_instance] << repo
|
292
297
|
result
|
293
298
|
end
|
294
299
|
end
|
295
300
|
|
301
|
+
def duplicate_repositories_to_publish
|
302
|
+
repositories_to_publish_by_library_instance.select { |_key, val| val.count > 1 }.keys
|
303
|
+
end
|
304
|
+
|
305
|
+
def components_with_repo(library_instance)
|
306
|
+
components.select { |component| component.repositories.where(:library_instance => library_instance).any? }
|
307
|
+
end
|
308
|
+
|
296
309
|
def publish_repositories
|
297
310
|
repositories = composite? ? repositories_to_publish_by_library_instance.values : repositories_to_publish
|
298
311
|
repositories.each do |repos|
|
@@ -510,7 +523,7 @@ module Katello
|
|
510
523
|
end
|
511
524
|
end
|
512
525
|
|
513
|
-
puppet_modules = PuppetModule.where(:uuid => uuids) if uuids.present?
|
526
|
+
puppet_modules = PuppetModule.where(:uuid => uuids).to_a if uuids.present?
|
514
527
|
|
515
528
|
if names_and_authors.present?
|
516
529
|
names_and_authors.each do |name_and_author|
|
@@ -524,7 +537,7 @@ module Katello
|
|
524
537
|
end
|
525
538
|
|
526
539
|
# In order to minimize the number of copy requests, organize the data by repoid.
|
527
|
-
PuppetModule.group_by_repoid(puppet_modules)
|
540
|
+
PuppetModule.group_by_repoid(puppet_modules.flatten)
|
528
541
|
end
|
529
542
|
|
530
543
|
def check_ready_to_publish!
|
@@ -18,20 +18,29 @@ module Katello
|
|
18
18
|
manifest_tags.concat(query_manifests(repo, rule))
|
19
19
|
end
|
20
20
|
|
21
|
-
{ "
|
21
|
+
{ "_id" => { "$in" => manifest_tags } } unless manifest_tags.empty?
|
22
22
|
end
|
23
23
|
|
24
24
|
protected
|
25
25
|
|
26
|
-
def
|
26
|
+
def fetch_tag_uuids(repo, rule, manifest_klass = DockerManifest)
|
27
27
|
query_name = rule.name.tr("*", "%")
|
28
|
-
|
28
|
+
tags_query = ::Katello::DockerTag.where(:repository => repo).
|
29
|
+
where(:docker_taggable_type => manifest_klass.name).
|
30
|
+
where("name ilike ?", query_name).
|
31
|
+
select(:docker_taggable_id)
|
32
|
+
|
33
|
+
query = manifest_klass.in_repositories(repo).where("id in (#{tags_query.to_sql})")
|
29
34
|
names = query.all.collect do |manifest|
|
30
|
-
manifest.docker_tags.all.collect do |tag|
|
31
|
-
tag.
|
35
|
+
manifest.docker_tags.where(:repository => repo).all.collect do |tag|
|
36
|
+
tag.uuid
|
32
37
|
end
|
33
38
|
end
|
34
|
-
names.flatten
|
39
|
+
names.flatten.uniq
|
40
|
+
end
|
41
|
+
|
42
|
+
def query_manifests(repo, rule)
|
43
|
+
(fetch_tag_uuids(repo, rule, DockerManifest) + fetch_tag_uuids(repo, rule, DockerManifestList)).flatten.uniq
|
35
44
|
end
|
36
45
|
end
|
37
46
|
end
|
@@ -4,8 +4,9 @@ module Katello
|
|
4
4
|
RPM = Rpm::CONTENT_TYPE
|
5
5
|
PACKAGE_GROUP = PackageGroup::CONTENT_TYPE
|
6
6
|
ERRATA = Erratum::CONTENT_TYPE
|
7
|
-
|
8
|
-
|
7
|
+
DEB = Deb::CONTENT_TYPE
|
8
|
+
CONTENT_TYPES = [RPM, PACKAGE_GROUP, ERRATA, DOCKER, DEB].freeze
|
9
|
+
CONTENT_OPTIONS = { _('Packages') => RPM, _('Package Groups') => PACKAGE_GROUP, _('Errata') => ERRATA, _('Docker') => DOCKER, _('deb Packages') => DEB }.freeze
|
9
10
|
|
10
11
|
belongs_to :content_view,
|
11
12
|
:class_name => "Katello::ContentView",
|
@@ -42,6 +43,11 @@ module Katello
|
|
42
43
|
::Katello::ContentViewPackageFilter.name])
|
43
44
|
end
|
44
45
|
|
46
|
+
def self.deb
|
47
|
+
# TODO
|
48
|
+
[]
|
49
|
+
end
|
50
|
+
|
45
51
|
def self.docker
|
46
52
|
where(:type => [::Katello::ContentViewDockerFilter.name])
|
47
53
|
end
|
@@ -42,6 +42,14 @@ module Katello
|
|
42
42
|
true
|
43
43
|
end
|
44
44
|
|
45
|
+
def link?
|
46
|
+
false
|
47
|
+
end
|
48
|
+
|
49
|
+
def master
|
50
|
+
true
|
51
|
+
end
|
52
|
+
|
45
53
|
def node_syncable?
|
46
54
|
environment
|
47
55
|
end
|
@@ -88,6 +96,10 @@ module Katello
|
|
88
96
|
end
|
89
97
|
end
|
90
98
|
|
99
|
+
def ignore_global_proxy
|
100
|
+
false
|
101
|
+
end
|
102
|
+
|
91
103
|
def set_pulp_id
|
92
104
|
if self.environment
|
93
105
|
label = "#{self.content_view.label}-#{self.environment.label}-puppet-#{SecureRandom.uuid}"
|
@@ -3,7 +3,8 @@ module Katello
|
|
3
3
|
ALLOWED_REPOSITORY_TYPES = [Repository::YUM_TYPE,
|
4
4
|
Repository::DOCKER_TYPE,
|
5
5
|
Repository::OSTREE_TYPE,
|
6
|
-
Repository::FILE_TYPE
|
6
|
+
Repository::FILE_TYPE,
|
7
|
+
Repository::DEB_TYPE
|
7
8
|
].freeze
|
8
9
|
|
9
10
|
belongs_to :content_view, :inverse_of => :content_view_repositories,
|
@@ -115,6 +115,10 @@ module Katello
|
|
115
115
|
composite_content_views.any?
|
116
116
|
end
|
117
117
|
|
118
|
+
def published_in_composite?
|
119
|
+
content_view_version_composites.any?
|
120
|
+
end
|
121
|
+
|
118
122
|
def in_environment?
|
119
123
|
environments.any?
|
120
124
|
end
|
@@ -151,6 +155,10 @@ module Katello
|
|
151
155
|
self.repositories.non_archived
|
152
156
|
end
|
153
157
|
|
158
|
+
def library_repos
|
159
|
+
archived_repos.includes(:library_instance).map(&:library_instance)
|
160
|
+
end
|
161
|
+
|
154
162
|
def products(env = nil)
|
155
163
|
if env
|
156
164
|
repos(env).map(&:product).uniq(&:id)
|
@@ -218,7 +226,11 @@ module Katello
|
|
218
226
|
end
|
219
227
|
|
220
228
|
def packages
|
221
|
-
Rpm.in_repositories(archived_repos)
|
229
|
+
Rpm.in_repositories(archived_repos)
|
230
|
+
end
|
231
|
+
|
232
|
+
def srpm_count
|
233
|
+
Katello::Srpm.in_repositories(self.repositories.archived).count
|
222
234
|
end
|
223
235
|
|
224
236
|
def puppet_module_count
|
@@ -237,40 +249,62 @@ module Katello
|
|
237
249
|
ostree_branches.count
|
238
250
|
end
|
239
251
|
|
240
|
-
def
|
241
|
-
|
242
|
-
repo.
|
252
|
+
def docker_manifest_list_count
|
253
|
+
repositories.archived.docker_type.inject(0) do |sum, repo|
|
254
|
+
sum + repo.docker_manifest_lists.count
|
243
255
|
end
|
244
|
-
manifest_counts.sum
|
245
256
|
end
|
246
257
|
|
247
|
-
def
|
248
|
-
|
258
|
+
def docker_manifest_count
|
259
|
+
repositories.archived.docker_type.inject(0) do |sum, repo|
|
260
|
+
sum + repo.docker_manifests.count
|
261
|
+
end
|
249
262
|
end
|
250
263
|
|
251
264
|
def docker_tag_count
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
265
|
+
::Katello::DockerMetaTag.where(:repository_id => repositories.archived.docker_type).count
|
266
|
+
end
|
267
|
+
|
268
|
+
def debs
|
269
|
+
Katello::Deb.in_repositories(self.repositories.archived)
|
270
|
+
end
|
271
|
+
|
272
|
+
def deb_count
|
273
|
+
debs.count
|
256
274
|
end
|
257
275
|
|
258
276
|
def errata(errata_type = nil)
|
259
|
-
errata = Erratum.in_repositories(archived_repos)
|
277
|
+
errata = Erratum.in_repositories(archived_repos)
|
260
278
|
errata = errata.of_type(errata_type) if errata_type
|
261
279
|
errata
|
262
280
|
end
|
263
281
|
|
282
|
+
def library_errata
|
283
|
+
Erratum.in_repositories(library_repos)
|
284
|
+
end
|
285
|
+
|
286
|
+
def available_errata
|
287
|
+
library_errata.where.not(:id => errata)
|
288
|
+
end
|
289
|
+
|
290
|
+
def file_units
|
291
|
+
FileUnit.in_repositories(archived_repos)
|
292
|
+
end
|
293
|
+
|
264
294
|
def ostree_branches
|
265
|
-
OstreeBranch.in_repositories(archived_repos)
|
295
|
+
OstreeBranch.in_repositories(archived_repos)
|
266
296
|
end
|
267
297
|
|
268
298
|
def docker_manifests
|
269
|
-
DockerManifest.in_repositories(archived_repos)
|
299
|
+
DockerManifest.in_repositories(archived_repos)
|
300
|
+
end
|
301
|
+
|
302
|
+
def docker_manifest_lists
|
303
|
+
DockerManifestList.in_repositories(archived_repos)
|
270
304
|
end
|
271
305
|
|
272
306
|
def package_groups
|
273
|
-
PackageGroup.in_repositories(archived_repos)
|
307
|
+
PackageGroup.in_repositories(archived_repos)
|
274
308
|
end
|
275
309
|
|
276
310
|
def package_group_count
|
@@ -293,6 +327,14 @@ module Katello
|
|
293
327
|
fail _("Cannot delete version while it is in use by composite content views: %s") %
|
294
328
|
composite_content_views.map(&:name).join(",")
|
295
329
|
end
|
330
|
+
|
331
|
+
if published_in_composite?
|
332
|
+
list = composites.map do |version|
|
333
|
+
"#{version.content_view.name} Version #{version.version}"
|
334
|
+
end
|
335
|
+
fail _("Cannot delete version while it is in use by composite content views: %s") %
|
336
|
+
list.join(",")
|
337
|
+
end
|
296
338
|
end
|
297
339
|
true
|
298
340
|
end
|