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
data/app/models/katello/pool.rb
CHANGED
@@ -3,11 +3,11 @@ module Katello
|
|
3
3
|
include Katello::Authorization::Pool
|
4
4
|
belongs_to :subscription, :inverse_of => :pools, :class_name => "Katello::Subscription"
|
5
5
|
|
6
|
-
has_many :activation_keys, :through => :pool_activation_keys, :class_name => "Katello::ActivationKey"
|
7
6
|
has_many :pool_activation_keys, :class_name => "Katello::PoolActivationKey", :dependent => :destroy, :inverse_of => :pool
|
7
|
+
has_many :activation_keys, :through => :pool_activation_keys, :class_name => "Katello::ActivationKey"
|
8
8
|
|
9
|
-
has_many :subscription_facets, :through => :subscription_facet_pools
|
10
9
|
has_many :subscription_facet_pools, :class_name => "Katello::SubscriptionFacetPool", :dependent => :destroy
|
10
|
+
has_many :subscription_facets, :through => :subscription_facet_pools
|
11
11
|
|
12
12
|
scope :in_organization, ->(org_id) { joins(:subscription).where("#{Katello::Subscription.table_name}.organization_id = ?", org_id) }
|
13
13
|
scope :for_activation_key, ->(ak) { joins(:activation_keys).where("#{Katello::ActivationKey.table_name}.id" => ak.id) }
|
@@ -16,22 +16,23 @@ module Katello
|
|
16
16
|
include Glue::Candlepin::CandlepinObject
|
17
17
|
|
18
18
|
scoped_search :on => :cp_id, :complete_value => true, :rename => :id, :only_explicit => true
|
19
|
-
scoped_search :on => :quantity, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER
|
20
|
-
scoped_search :on => :start_date, :complete_value => true, :rename => :starts
|
21
|
-
scoped_search :on => :end_date, :complete_value => true, :rename => :expires
|
22
|
-
scoped_search :on => :ram, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER
|
19
|
+
scoped_search :on => :quantity, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER, :only_explicit => true
|
20
|
+
scoped_search :on => :start_date, :complete_value => true, :rename => :starts, :only_explicit => true
|
21
|
+
scoped_search :on => :end_date, :complete_value => true, :rename => :expires, :only_explicit => true
|
22
|
+
scoped_search :on => :ram, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER, :only_explicit => true
|
23
23
|
scoped_search :on => :multi_entitlement, :complete_value => true
|
24
|
-
scoped_search :on => :consumed, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER
|
24
|
+
scoped_search :on => :consumed, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER, :only_explicit => true
|
25
25
|
scoped_search :on => :account_number, :complete_value => true, :rename => :account, :validator => ScopedSearch::Validators::INTEGER
|
26
26
|
scoped_search :on => :contract_number, :complete_value => true, :rename => :contract, :validator => ScopedSearch::Validators::INTEGER
|
27
27
|
scoped_search :on => :virt_who, :complete_value => true, :only_explicit => true
|
28
28
|
scoped_search :on => :name, :relation => :subscription, :complete_value => true, :rename => :name
|
29
29
|
scoped_search :on => :support_level, :relation => :subscription, :complete_value => true
|
30
|
-
scoped_search :on => :sockets, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER
|
31
|
-
scoped_search :on => :cores, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER
|
32
|
-
scoped_search :on => :product_id, :relation => :subscription, :complete_value => true
|
33
|
-
scoped_search :on => :stacking_id, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER
|
34
|
-
scoped_search :on => :instance_multiplier, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER
|
30
|
+
scoped_search :on => :sockets, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER, :only_explicit => true
|
31
|
+
scoped_search :on => :cores, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER, :only_explicit => true
|
32
|
+
scoped_search :on => :product_id, :relation => :subscription, :complete_value => true, :only_explicit => true
|
33
|
+
scoped_search :on => :stacking_id, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER, :only_explicit => true
|
34
|
+
scoped_search :on => :instance_multiplier, :relation => :subscription, :complete_value => true, :validator => ScopedSearch::Validators::INTEGER, :only_explicit => true
|
35
|
+
scoped_search :on => :pool_type, :complete_value => true, :rename => :type
|
35
36
|
|
36
37
|
validates_lengths_from_database
|
37
38
|
|
@@ -13,6 +13,8 @@ module Katello
|
|
13
13
|
belongs_to :provider, :inverse_of => :products
|
14
14
|
belongs_to :sync_plan, :inverse_of => :products, :class_name => 'Katello::SyncPlan'
|
15
15
|
belongs_to :gpg_key, :inverse_of => :products
|
16
|
+
has_many :product_contents, :foreign_key => 'product_id', :class_name => "Katello::ProductContent", :dependent => :destroy
|
17
|
+
has_many :displayable_product_contents, -> { displayable }, :foreign_key => 'product_id', :class_name => "Katello::ProductContent", :dependent => :destroy
|
16
18
|
has_many :repositories, :class_name => "Katello::Repository", :dependent => :restrict_with_exception
|
17
19
|
|
18
20
|
has_many :subscription_products, :class_name => "Katello::SubscriptionProduct", :dependent => :destroy
|
@@ -51,9 +53,10 @@ module Katello
|
|
51
53
|
where(:organization_id => organizations)
|
52
54
|
end
|
53
55
|
|
54
|
-
scope :syncable_content, -> {
|
56
|
+
scope :syncable_content, -> { distinct.where(Katello::Repository.arel_table[:url].not_eq(nil)).joins(:repositories) }
|
55
57
|
scope :redhat, -> { joins(:provider).where("#{Provider.table_name}.provider_type" => Provider::REDHAT) }
|
56
58
|
scope :custom, -> { joins(:provider).where("#{Provider.table_name}.provider_type" => [Provider::CUSTOM, Provider::ANONYMOUS]) }
|
59
|
+
scope :with_contents, -> { includes(:product_contents) }
|
57
60
|
|
58
61
|
def self.subscribable
|
59
62
|
joins("LEFT OUTER JOIN #{Katello::Repository.table_name} repo ON repo.product_id = #{self.table_name}.id")
|
@@ -63,7 +66,7 @@ module Katello
|
|
63
66
|
|
64
67
|
def self.enabled
|
65
68
|
self.where("#{Product.table_name}.id in (?) or #{Product.table_name}.id in (?)",
|
66
|
-
Product.redhat.joins(:repositories).
|
69
|
+
Product.redhat.joins(:repositories).distinct.pluck(:id), Product.custom.pluck(:id))
|
67
70
|
end
|
68
71
|
|
69
72
|
before_create :assign_unique_label
|
@@ -125,8 +128,7 @@ module Katello
|
|
125
128
|
options = {} if options.nil?
|
126
129
|
|
127
130
|
hash = super(options.merge(:except => [:cp_id, :id]))
|
128
|
-
hash = hash.merge(:
|
129
|
-
:multiplier => self.multiplier,
|
131
|
+
hash = hash.merge(:multiplier => self.multiplier,
|
130
132
|
:attributes => self.attrs,
|
131
133
|
:id => self.cp_id,
|
132
134
|
:sync_plan_name => self.sync_plan ? self.sync_plan.name : nil,
|
@@ -212,9 +214,13 @@ module Katello
|
|
212
214
|
repositories.any?(&:url?)
|
213
215
|
end
|
214
216
|
|
217
|
+
def product_content_by_id(content_id)
|
218
|
+
product_contents.joins(:content).where("#{Katello::Content.table_name}.cp_content_id = ?", content_id).first
|
219
|
+
end
|
220
|
+
|
215
221
|
def available_content(content_view_version_id = nil)
|
216
|
-
|
217
|
-
repos = self.repositories.subscribable.where(content_id:
|
222
|
+
product_contents.select do |product_content|
|
223
|
+
repos = self.repositories.subscribable.where(content_id: product_content.content.cp_content_id)
|
218
224
|
repos.exists? && (content_view_version_id.nil? || repos.where(content_view_version_id: content_view_version_id.to_i).count > 0)
|
219
225
|
end
|
220
226
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Katello
|
2
|
+
class ProductContent < Katello::Model
|
3
|
+
belongs_to :product, :class_name => 'Katello::Product', :foreign_key => 'product_id', :inverse_of => :product_contents
|
4
|
+
belongs_to :content, :class_name => 'Katello::Content', :foreign_key => 'content_id', :inverse_of => :product_contents
|
5
|
+
|
6
|
+
default_scope { includes(:content) }
|
7
|
+
|
8
|
+
validates :content_id, :presence => true, :uniqueness => { :scope => :product_id }
|
9
|
+
validates :product_id, :presence => true
|
10
|
+
|
11
|
+
delegate :content_type, to: :content
|
12
|
+
|
13
|
+
scope :displayable, -> {
|
14
|
+
joins(:content).where.not("#{content_table_name}.content_type IN (?)", Katello::Repository.undisplayable_types)
|
15
|
+
.order("LOWER(#{content_table_name}.name) ASC")
|
16
|
+
}
|
17
|
+
|
18
|
+
scoped_search :on => :name, :relation => :content
|
19
|
+
scoped_search :on => :content_type, :relation => :content
|
20
|
+
scoped_search :on => :label, :relation => :content
|
21
|
+
scoped_search :on => :name, :relation => :product, :rename => :product_name
|
22
|
+
|
23
|
+
def self.content_table_name
|
24
|
+
Katello::Content.table_name
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.enabled(organization)
|
28
|
+
joins(:content).where("#{self.content_table_name}.cp_content_id" => Katello::Repository.in_organization(organization).select(:content_id))
|
29
|
+
end
|
30
|
+
|
31
|
+
# used by Katello::Api::V2::RepositorySetsController#index
|
32
|
+
def repositories
|
33
|
+
product.repositories.in_default_view.has_url.where(:content_id => content.cp_content_id)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -47,7 +47,7 @@ module Katello
|
|
47
47
|
def prevent_redhat_deletion
|
48
48
|
if !being_deleted? && redhat_provider?
|
49
49
|
Rails.logger.error _("Red Hat provider can not be deleted")
|
50
|
-
|
50
|
+
throw :abort
|
51
51
|
else
|
52
52
|
# organization that is being deleted via background destroyer can delete rh provider
|
53
53
|
true
|
@@ -7,16 +7,16 @@ module Katello
|
|
7
7
|
|
8
8
|
CONTENT_TYPE = Pulp::PuppetModule::CONTENT_TYPE
|
9
9
|
|
10
|
-
has_many :repositories, :through => :repository_puppet_modules, :class_name => "Katello::Repository"
|
11
10
|
has_many :repository_puppet_modules, :class_name => "Katello::RepositoryPuppetModule", :dependent => :destroy, :inverse_of => :puppet_module
|
11
|
+
has_many :repositories, :through => :repository_puppet_modules, :class_name => "Katello::Repository"
|
12
12
|
|
13
|
-
has_many :content_view_puppet_environments,
|
14
|
-
:through => :content_view_puppet_environment_puppet_modules,
|
15
|
-
:class_name => "Katello::ContentViewPuppetEnvironment"
|
16
13
|
has_many :content_view_puppet_environment_puppet_modules,
|
17
14
|
:class_name => "Katello::ContentViewPuppetEnvironmentPuppetModule",
|
18
15
|
:dependent => :destroy,
|
19
16
|
:inverse_of => :puppet_module
|
17
|
+
has_many :content_view_puppet_environments,
|
18
|
+
:through => :content_view_puppet_environment_puppet_modules,
|
19
|
+
:class_name => "Katello::ContentViewPuppetEnvironment"
|
20
20
|
|
21
21
|
scoped_search :on => :name, :complete_value => true
|
22
22
|
scoped_search :on => :author, :complete_value => true
|
@@ -60,7 +60,7 @@ module Katello
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def self.group_by_repoid(puppet_modules)
|
63
|
-
puppet_modules.
|
63
|
+
puppet_modules.each_with_object({}) do |puppet_module, result|
|
64
64
|
repo = puppet_module.repositories.first
|
65
65
|
|
66
66
|
if repo
|
@@ -10,7 +10,7 @@ module Katello
|
|
10
10
|
before_validation :update_ostree_upstream_sync_policy
|
11
11
|
|
12
12
|
include ForemanTasks::Concerns::ActionSubject
|
13
|
-
include Glue::Candlepin::
|
13
|
+
include Glue::Candlepin::Repository
|
14
14
|
include Glue::Pulp::Repo if SETTINGS[:katello][:use_pulp]
|
15
15
|
|
16
16
|
include Glue if (SETTINGS[:katello][:use_cp] || SETTINGS[:katello][:use_pulp])
|
@@ -19,6 +19,7 @@ module Katello
|
|
19
19
|
include Ext::LabelFromName
|
20
20
|
include Katello::Engine.routes.url_helpers
|
21
21
|
|
22
|
+
DEB_TYPE = 'deb'.freeze
|
22
23
|
YUM_TYPE = 'yum'.freeze
|
23
24
|
FILE_TYPE = 'file'.freeze
|
24
25
|
PUPPET_TYPE = 'puppet'.freeze
|
@@ -26,7 +27,7 @@ module Katello
|
|
26
27
|
OSTREE_TYPE = 'ostree'.freeze
|
27
28
|
|
28
29
|
CHECKSUM_TYPES = %w(sha1 sha256).freeze
|
29
|
-
SUBSCRIBABLE_TYPES = [YUM_TYPE, OSTREE_TYPE].freeze
|
30
|
+
SUBSCRIBABLE_TYPES = [YUM_TYPE, OSTREE_TYPE, DEB_TYPE].freeze
|
30
31
|
|
31
32
|
OSTREE_UPSTREAM_SYNC_POLICY_LATEST = "latest".freeze
|
32
33
|
OSTREE_UPSTREAM_SYNC_POLICY_ALL = "all".freeze
|
@@ -51,6 +52,9 @@ module Katello
|
|
51
52
|
has_many :repository_rpms, :class_name => "Katello::RepositoryRpm", :dependent => :delete_all
|
52
53
|
has_many :rpms, :through => :repository_rpms
|
53
54
|
|
55
|
+
has_many :repository_srpms, :class_name => "Katello::RepositorySrpm", :dependent => :delete_all
|
56
|
+
has_many :srpms, :through => :repository_srpms
|
57
|
+
|
54
58
|
has_many :repository_files, :class_name => "Katello::RepositoryFile", :dependent => :destroy
|
55
59
|
has_many :files, :through => :repository_files
|
56
60
|
|
@@ -60,6 +64,9 @@ module Katello
|
|
60
64
|
has_many :repository_docker_manifests, :class_name => "Katello::RepositoryDockerManifest", :dependent => :delete_all
|
61
65
|
has_many :docker_manifests, :through => :repository_docker_manifests
|
62
66
|
|
67
|
+
has_many :repository_docker_manifest_lists, :class_name => "Katello::RepositoryDockerManifestList", :dependent => :delete_all
|
68
|
+
has_many :docker_manifest_lists, :through => :repository_docker_manifest_lists
|
69
|
+
|
63
70
|
has_many :docker_tags, :dependent => :destroy, :class_name => "Katello::DockerTag"
|
64
71
|
|
65
72
|
has_many :docker_meta_tags, :dependent => :destroy, :class_name => "Katello::DockerMetaTag"
|
@@ -67,6 +74,9 @@ module Katello
|
|
67
74
|
has_many :repository_ostree_branches, :class_name => "Katello::RepositoryOstreeBranch", :dependent => :delete_all
|
68
75
|
has_many :ostree_branches, :through => :repository_ostree_branches
|
69
76
|
|
77
|
+
has_many :repository_debs, :class_name => "Katello::RepositoryDeb", :dependent => :delete_all
|
78
|
+
has_many :debs, :through => :repository_debs
|
79
|
+
|
70
80
|
has_many :content_facet_repositories, :class_name => "Katello::ContentFacetRepository", :dependent => :destroy
|
71
81
|
has_many :content_facets, :through => :content_facet_repositories
|
72
82
|
|
@@ -126,7 +136,8 @@ module Katello
|
|
126
136
|
|
127
137
|
scope :has_url, -> { where('url IS NOT NULL') }
|
128
138
|
scope :in_default_view, -> { joins(:content_view_version => :content_view).where("#{Katello::ContentView.table_name}.default" => true) }
|
129
|
-
|
139
|
+
scope :in_non_default_view, -> { joins(:content_view_version => :content_view).where("#{Katello::ContentView.table_name}.default" => false) }
|
140
|
+
scope :deb_type, -> { where(:content_type => DEB_TYPE) }
|
130
141
|
scope :yum_type, -> { where(:content_type => YUM_TYPE) }
|
131
142
|
scope :file_type, -> { where(:content_type => FILE_TYPE) }
|
132
143
|
scope :puppet_type, -> { where(:content_type => PUPPET_TYPE) }
|
@@ -136,6 +147,7 @@ module Katello
|
|
136
147
|
scope :non_archived, -> { where('environment_id is not NULL') }
|
137
148
|
scope :archived, -> { where('environment_id is NULL') }
|
138
149
|
scope :subscribable, -> { where(content_type: SUBSCRIBABLE_TYPES) }
|
150
|
+
scope :in_published_environments, -> { in_content_views(Katello::ContentView.non_default).where.not(:environment_id => nil) }
|
139
151
|
|
140
152
|
scoped_search :on => :name, :complete_value => true
|
141
153
|
scoped_search :rename => :product, :on => :name, :relation => :product, :complete_value => true
|
@@ -149,6 +161,7 @@ module Katello
|
|
149
161
|
scoped_search :on => :distribution_variant, :complete_value => true
|
150
162
|
scoped_search :on => :distribution_bootable, :complete_value => true
|
151
163
|
scoped_search :on => :distribution_uuid, :complete_value => true
|
164
|
+
scoped_search :on => :ignore_global_proxy, :complete_value => true
|
152
165
|
|
153
166
|
def organization
|
154
167
|
if self.environment
|
@@ -190,6 +203,16 @@ module Katello
|
|
190
203
|
self.content_view_version.content_view
|
191
204
|
end
|
192
205
|
|
206
|
+
def self.undisplayable_types
|
207
|
+
ret = [::Katello::Repository::CANDLEPIN_DOCKER_TYPE]
|
208
|
+
|
209
|
+
unless ::Katello::RepositoryTypeManager.enabled?(Repository::OSTREE_TYPE)
|
210
|
+
ret << ::Katello::Repository::CANDLEPIN_OSTREE_TYPE
|
211
|
+
end
|
212
|
+
|
213
|
+
ret
|
214
|
+
end
|
215
|
+
|
193
216
|
def self.in_organization(org)
|
194
217
|
where("#{Repository.table_name}.environment_id" => org.kt_environments.pluck("#{KTEnvironment.table_name}.id"))
|
195
218
|
end
|
@@ -287,7 +310,7 @@ module Katello
|
|
287
310
|
|
288
311
|
def group
|
289
312
|
library_repo = library_instance? ? self : library_instance
|
290
|
-
clones << library_repo
|
313
|
+
clones.to_a << library_repo
|
291
314
|
end
|
292
315
|
|
293
316
|
#is the repo cloned in the specified environment
|
@@ -490,6 +513,18 @@ module Katello
|
|
490
513
|
search.in_content_views([view])
|
491
514
|
end
|
492
515
|
|
516
|
+
def archived_instance
|
517
|
+
if self.environment_id.nil? || self.library_instance_id.nil?
|
518
|
+
self
|
519
|
+
else
|
520
|
+
self.content_view_version.archived_repos.where(:library_instance_id => self.library_instance_id).first
|
521
|
+
end
|
522
|
+
end
|
523
|
+
|
524
|
+
def requires_yum_clone_distributor?
|
525
|
+
self.yum? && self.environment_id && !self.in_default_view?
|
526
|
+
end
|
527
|
+
|
493
528
|
def url?
|
494
529
|
url.present?
|
495
530
|
end
|
@@ -620,12 +655,15 @@ module Katello
|
|
620
655
|
self.ostree_branches -= units
|
621
656
|
elsif file?
|
622
657
|
self.files -= units
|
658
|
+
elsif deb?
|
659
|
+
self.debs -= units
|
623
660
|
elsif docker?
|
624
661
|
remove_docker_content(units)
|
625
662
|
end
|
626
663
|
end
|
627
664
|
|
628
|
-
|
665
|
+
# deleteable? is already taken by the authorization mixin
|
666
|
+
def destroyable?
|
629
667
|
if self.environment.try(:library?) && self.content_view.default?
|
630
668
|
if self.environment.organization.being_deleted?
|
631
669
|
return true
|
@@ -640,6 +678,11 @@ module Katello
|
|
640
678
|
return false
|
641
679
|
end
|
642
680
|
end
|
681
|
+
return true
|
682
|
+
end
|
683
|
+
|
684
|
+
def assert_deletable
|
685
|
+
throw :abort unless destroyable?
|
643
686
|
end
|
644
687
|
|
645
688
|
def hosts_with_applicability
|
@@ -650,6 +693,52 @@ module Katello
|
|
650
693
|
DockerMetaTag.in_repositories(self.id).count
|
651
694
|
end
|
652
695
|
|
696
|
+
# a master repository actually has content (rpms, errata, etc) in the pulp repository. For these repositories, we can use the YumDistributor
|
697
|
+
# to generate metadata and can index the content from pulp, or for the case of content view archives without filters, can also use the YumCloneDistributor
|
698
|
+
#
|
699
|
+
def master?
|
700
|
+
!self.yum? || # non-yum repos
|
701
|
+
self.in_default_view? || # default content view repos
|
702
|
+
(self.archive? && !self.content_view.composite) || # non-composite content view archive repos
|
703
|
+
(self.content_view.composite? && self.component_source_repositories.count > 1) # composite archive repo with more than 1 source repository
|
704
|
+
end
|
705
|
+
|
706
|
+
# a link repository has no content in the pulp repository and serves as a shell. It will always be empty. Only the YumCloneDistributor can be used
|
707
|
+
# to publish yum metadata, and it cannot be indexed from pulp, but must have its indexed associations copied from another repository (its target).
|
708
|
+
def link?
|
709
|
+
!master?
|
710
|
+
end
|
711
|
+
|
712
|
+
# A link (empty repo) points to a target (a repository that actually has units in pulp). Target repos are always archive repos of a content view version (a repo with no environment)
|
713
|
+
# But for composite view versions, an archive repo, usually won't be a master (but might be if multple components contain the same repo)
|
714
|
+
def target_repository
|
715
|
+
fail _("This is not a linked repository") if master?
|
716
|
+
return nil if self.archived_instance.nil?
|
717
|
+
|
718
|
+
#this is an environment repo, and the archived_instance is a master (not always true with composite)
|
719
|
+
if self.environment_id? && self.archived_instance.master?
|
720
|
+
self.archived_instance
|
721
|
+
elsif self.environment_id #this is an environment repo, but a composite who's archived_instance isn't a master
|
722
|
+
self.archived_instance.target_repository || self.archived_instance #to archived_instance if nil
|
723
|
+
else #must be a composite archive repo, with only one component repo
|
724
|
+
self.component_source_repositories.first
|
725
|
+
end
|
726
|
+
end
|
727
|
+
|
728
|
+
def component_source_repositories
|
729
|
+
#find other copies of this repositories, in the CV version's components, that are in the 'archive'
|
730
|
+
Katello::Repository.where(:content_view_version_id => self.content_view_version.components, :environment_id => nil,
|
731
|
+
:library_instance_id => self.library_instance_id)
|
732
|
+
end
|
733
|
+
|
734
|
+
def self.linked_repositories
|
735
|
+
to_return = []
|
736
|
+
Katello::Repository.yum_type.in_non_default_view.find_each do |repo|
|
737
|
+
to_return << repo if repo.link?
|
738
|
+
end
|
739
|
+
to_return
|
740
|
+
end
|
741
|
+
|
653
742
|
protected
|
654
743
|
|
655
744
|
def removable_unit_association
|
@@ -663,6 +752,8 @@ module Katello
|
|
663
752
|
self.ostree_branches
|
664
753
|
elsif file?
|
665
754
|
self.files
|
755
|
+
elsif deb?
|
756
|
+
self.debs
|
666
757
|
else
|
667
758
|
fail "Content type not supported for removal"
|
668
759
|
end
|
@@ -707,14 +798,15 @@ module Katello
|
|
707
798
|
end
|
708
799
|
|
709
800
|
def remove_docker_content(manifests)
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
801
|
+
destroyable_manifests = manifests.select do |manifest|
|
802
|
+
manifest.repositories.empty? || manifest.docker_manifest_lists.empty?
|
803
|
+
end
|
714
804
|
# destroy any orphan docker manifests
|
715
|
-
|
716
|
-
|
805
|
+
destroyable_manifests.each do |manifest|
|
806
|
+
self.docker_manifests.delete(manifest)
|
807
|
+
manifest.destroy
|
717
808
|
end
|
809
|
+
DockerMetaTag.cleanup_tags
|
718
810
|
end
|
719
811
|
|
720
812
|
def update_ostree_upstream_sync_policy
|
@@ -0,0 +1,7 @@
|
|
1
|
+
module Katello
|
2
|
+
class RepositoryDeb < Katello::Model
|
3
|
+
# Do not use active record callbacks in this join model. Direct INSERTs and DELETEs are done
|
4
|
+
belongs_to :repository, :inverse_of => :repository_debs, :class_name => 'Katello::Repository'
|
5
|
+
belongs_to :deb, :inverse_of => :repository_debs, :class_name => 'Katello::Deb'
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
module Katello
|
2
|
+
class RepositoryDockerManifestList < Katello::Model
|
3
|
+
# Do not use active record callbacks in this join model. Direct INSERTs and DELETEs are done
|
4
|
+
belongs_to :repository, :inverse_of => :repository_docker_manifest_lists, :class_name => 'Katello::Repository'
|
5
|
+
belongs_to :docker_manifest_list, :inverse_of => :repository_docker_manifest_lists
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
module Katello
|
2
|
+
class RepositorySrpm < Katello::Model
|
3
|
+
# Do not use active record callbacks in this join model. Direct INSERTs and DELETEs are done
|
4
|
+
belongs_to :repository, :inverse_of => :repository_srpms, :class_name => 'Katello::Repository'
|
5
|
+
belongs_to :srpm, :inverse_of => :repository_srpms, :class_name => 'Katello::Srpm'
|
6
|
+
end
|
7
|
+
end
|
@@ -4,7 +4,7 @@ module Katello
|
|
4
4
|
Katello::RhsmFactName
|
5
5
|
end
|
6
6
|
|
7
|
-
def normalize(
|
7
|
+
def normalize(_facts)
|
8
8
|
facts = super
|
9
9
|
facts = change_separator(facts)
|
10
10
|
add_compose_facts(facts)
|
@@ -12,7 +12,7 @@ module Katello
|
|
12
12
|
|
13
13
|
def add_compose_facts(facts)
|
14
14
|
additional_keys = []
|
15
|
-
facts.
|
15
|
+
facts.each_key do |fact_name|
|
16
16
|
parts = fact_name.split(RhsmFactName::SEPARATOR)
|
17
17
|
additional_keys += parts[0..-2].reduce([]) { |memo, part| memo << [memo.last, part].compact.join(RhsmFactName::SEPARATOR) }
|
18
18
|
end
|