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
@@ -0,0 +1,50 @@
|
|
1
|
+
module Katello
|
2
|
+
class Deb < Katello::Model
|
3
|
+
include Concerns::PulpDatabaseUnit
|
4
|
+
|
5
|
+
CONTENT_TYPE = Pulp::Deb::CONTENT_TYPE
|
6
|
+
|
7
|
+
has_many :repositories, :through => :repository_debs, :class_name => "Katello::Repository"
|
8
|
+
has_many :repository_debs, :class_name => "Katello::RepositoryDeb", :dependent => :destroy, :inverse_of => :deb
|
9
|
+
|
10
|
+
scoped_search :on => :name, :complete_value => true
|
11
|
+
scoped_search :on => :version, :complete_value => true
|
12
|
+
scoped_search :on => :architecture, :complete_value => true
|
13
|
+
scoped_search :on => :filename, :complete_value => true
|
14
|
+
scoped_search :on => :checksum
|
15
|
+
|
16
|
+
before_save lambda { |deb| deb.description = deb.description.truncate(255) unless deb.description.blank? }
|
17
|
+
|
18
|
+
def self.default_sort
|
19
|
+
order(:name).order(:version).order(:architecture)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.repository_association_class
|
23
|
+
RepositoryDeb
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.search_version_range(min = nil, max = nil)
|
27
|
+
query = self.all
|
28
|
+
query = Katello::Util::PackageFilter.new(query, min, Katello::Util::PackageFilter::GREATER_THAN).results if min
|
29
|
+
query = Katello::Util::PackageFilter.new(query, max, Katello::Util::PackageFilter::LESS_THAN).results if max
|
30
|
+
query
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.search_version_equal(version)
|
34
|
+
Katello::Util::PackageFilter.new(self, version, Katello::Util::PackageFilter::EQUAL).results
|
35
|
+
end
|
36
|
+
|
37
|
+
def update_from_json(json)
|
38
|
+
keys = Pulp::Deb::PULP_INDEXED_FIELDS - ['_id']
|
39
|
+
custom_json = json.slice(*keys)
|
40
|
+
if custom_json.any? { |name, value| self.send(name) != value }
|
41
|
+
self.assign_attributes(custom_json)
|
42
|
+
self.save!
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.total_for_repositories(repos)
|
47
|
+
self.in_repositories(repos).count
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -1,31 +1,37 @@
|
|
1
1
|
module Katello
|
2
2
|
class DockerManifest < Katello::Model
|
3
3
|
include Concerns::PulpDatabaseUnit
|
4
|
-
|
5
|
-
has_many :
|
6
|
-
has_many :repository_docker_manifests, :dependent => :destroy
|
4
|
+
has_many :docker_tags, :as => :docker_taggable, :class_name => "Katello::DockerTag", :dependent => :destroy
|
5
|
+
has_many :repository_docker_manifests, :dependent => :destroy, :inverse_of => :docker_manifest
|
7
6
|
has_many :repositories, :through => :repository_docker_manifests, :inverse_of => :docker_manifests
|
8
7
|
|
8
|
+
has_many :docker_manifest_list_manifests, :class_name => "Katello::DockerManifestListManifest",
|
9
|
+
:dependent => :delete_all, :inverse_of => :docker_manifest
|
10
|
+
has_many :docker_manifest_lists, :through => :docker_manifest_list_manifests, :inverse_of => :docker_manifests
|
11
|
+
|
9
12
|
CONTENT_TYPE = Pulp::DockerManifest::CONTENT_TYPE
|
10
|
-
scoped_search :on => :name, :complete_value => true
|
11
|
-
scoped_search :relation => :docker_tags, :on => :name, :rename => :tag, :complete_value => true, :only_explicit => true
|
13
|
+
scoped_search :relation => :docker_tags, :on => :name, :rename => :tag, :complete_value => true
|
12
14
|
scoped_search :on => :digest, :rename => :digest, :complete_value => true, :only_explicit => true
|
13
15
|
scoped_search :on => :schema_version, :rename => :schema_version, :complete_value => true, :only_explicit => true
|
16
|
+
scoped_search :relation => :docker_manifest_lists, :on => :digest, :rename => :manifest_list_digest, :complete_value => true, :only_explicit => true
|
14
17
|
|
15
18
|
def self.repository_association_class
|
16
19
|
RepositoryDockerManifest
|
17
20
|
end
|
18
21
|
|
19
22
|
def update_from_json(json)
|
20
|
-
update_attributes(:
|
21
|
-
:schema_version => json[:schema_version],
|
23
|
+
update_attributes(:schema_version => json[:schema_version],
|
22
24
|
:digest => json[:digest],
|
23
25
|
:downloaded => json[:downloaded]
|
24
26
|
)
|
25
27
|
end
|
26
28
|
|
27
29
|
def self.default_sort
|
28
|
-
order(:
|
30
|
+
order(:schema_version)
|
31
|
+
end
|
32
|
+
|
33
|
+
def manifest_type
|
34
|
+
"image"
|
29
35
|
end
|
30
36
|
end
|
31
37
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Katello
|
2
|
+
class DockerManifestList < Katello::Model
|
3
|
+
include Concerns::PulpDatabaseUnit
|
4
|
+
|
5
|
+
has_many :docker_tags, :as => :docker_taggable, :class_name => "Katello::DockerTag", :dependent => :destroy
|
6
|
+
has_many :repository_docker_manifest_lists, :dependent => :destroy, :inverse_of => :docker_manifest_list
|
7
|
+
has_many :repositories, :through => :repository_docker_manifest_lists, :inverse_of => :docker_manifest_lists
|
8
|
+
|
9
|
+
has_many :docker_manifest_list_manifests, :class_name => "Katello::DockerManifestListManifest",
|
10
|
+
:dependent => :delete_all, :inverse_of => :docker_manifest_list
|
11
|
+
has_many :docker_manifests, :through => :docker_manifest_list_manifests, :inverse_of => :docker_manifest_lists
|
12
|
+
|
13
|
+
CONTENT_TYPE = Pulp::DockerManifestList::CONTENT_TYPE
|
14
|
+
|
15
|
+
scoped_search :relation => :docker_tags, :on => :name, :rename => :tag, :complete_value => true
|
16
|
+
scoped_search :on => :digest, :rename => :digest, :complete_value => true, :only_explicit => true
|
17
|
+
scoped_search :on => :schema_version, :rename => :schema_version, :complete_value => true, :only_explicit => true
|
18
|
+
|
19
|
+
def self.repository_association_class
|
20
|
+
RepositoryDockerManifestList
|
21
|
+
end
|
22
|
+
|
23
|
+
def update_from_json(json)
|
24
|
+
update_attributes(:schema_version => json[:schema_version],
|
25
|
+
:digest => json[:digest],
|
26
|
+
:downloaded => json[:downloaded],
|
27
|
+
:docker_manifests => ::Katello::DockerManifest.where(:digest => json[:manifests])
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.default_sort
|
32
|
+
order(:schema_version)
|
33
|
+
end
|
34
|
+
|
35
|
+
def manifest_type
|
36
|
+
"list"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
module Katello
|
2
|
+
class DockerManifestListManifest < Katello::Model
|
3
|
+
belongs_to :docker_manifest, :inverse_of => :docker_manifest_list_manifests, :class_name => 'Katello::DockerManifest'
|
4
|
+
belongs_to :docker_manifest_list, :inverse_of => :docker_manifest_list_manifests, :class_name => 'Katello::DockerManifestList'
|
5
|
+
end
|
6
|
+
end
|
@@ -46,7 +46,7 @@ module Katello
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
delegate_to_tags :
|
49
|
+
delegate_to_tags :docker_manifest
|
50
50
|
delegate_to_tags :product, :environment, :content_view_version
|
51
51
|
|
52
52
|
def repositories
|
@@ -71,11 +71,11 @@ module Katello
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def schema1_manifest
|
74
|
-
schema1.try(:
|
74
|
+
schema1.try(:docker_taggable)
|
75
75
|
end
|
76
76
|
|
77
77
|
def schema2_manifest
|
78
|
-
schema2.try(:
|
78
|
+
schema2.try(:docker_taggable)
|
79
79
|
end
|
80
80
|
|
81
81
|
def self.with_uuid(ids)
|
@@ -2,7 +2,7 @@ module Katello
|
|
2
2
|
class DockerTag < Katello::Model
|
3
3
|
include Concerns::PulpDatabaseUnit
|
4
4
|
include ScopedSearchExtensions
|
5
|
-
belongs_to :
|
5
|
+
belongs_to :docker_taggable, :polymorphic => true, :inverse_of => :docker_tags
|
6
6
|
belongs_to :repository, :inverse_of => :docker_tags, :class_name => "Katello::Repository"
|
7
7
|
|
8
8
|
has_one :schema1_meta_tag, :class_name => "Katello::DockerMetaTag", :foreign_key => "schema1_id",
|
@@ -22,32 +22,56 @@ module Katello
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def associated_meta_tag_identifier
|
25
|
-
associated_meta_tag.id
|
25
|
+
associated_meta_tag.try(:id)
|
26
|
+
end
|
27
|
+
|
28
|
+
def docker_manifest
|
29
|
+
docker_taggable
|
30
|
+
end
|
31
|
+
|
32
|
+
def docker_manifest_id
|
33
|
+
docker_taggable_id
|
34
|
+
end
|
35
|
+
|
36
|
+
def docker_manifest_list
|
37
|
+
docker_taggable
|
38
|
+
end
|
39
|
+
|
40
|
+
def docker_manifest_list_id
|
41
|
+
docker_taggable_id
|
26
42
|
end
|
27
43
|
|
28
44
|
def self.grouped
|
29
45
|
grouped_fields = "#{table_name}.name, #{Repository.table_name}.name, #{Product.table_name}.name"
|
30
|
-
ids =
|
46
|
+
ids = distinct.select("ON (#{grouped_fields}) #{table_name}.id").joins(:repository => :product)
|
31
47
|
where(:id => ids)
|
32
48
|
end
|
33
49
|
|
34
50
|
def update_from_json(json)
|
35
|
-
|
36
|
-
self.
|
51
|
+
taggable_class = json['manifest_type'] == "list" ? ::Katello::DockerManifestList : ::Katello::DockerManifest
|
52
|
+
self.docker_taggable = taggable_class.find_by(:digest => json['manifest_digest'])
|
53
|
+
self.repository_id = ::Katello::Repository.find_by(:pulp_id => json['repo_id']).try(:id)
|
37
54
|
self.name = json['name']
|
38
55
|
self.save!
|
39
56
|
end
|
40
57
|
|
41
58
|
def self.import_all(uuids = nil, options = {})
|
59
|
+
::Katello::DockerTag.destroy_all if uuids.blank?
|
42
60
|
super
|
61
|
+
::Katello::DockerTag.where(:repository_id => nil).destroy_all
|
43
62
|
if uuids
|
44
|
-
repos = ::Katello::Repository.joins(:docker_tags).where("katello_docker_tags.uuid" => uuids).
|
63
|
+
repos = ::Katello::Repository.joins(:docker_tags).where("katello_docker_tags.uuid" => uuids).distinct
|
45
64
|
::Katello::DockerMetaTag.import_meta_tags(repos)
|
46
65
|
else
|
47
66
|
::Katello::DockerMetaTag.import_meta_tags(::Katello::Repository.docker_type)
|
48
67
|
end
|
49
68
|
end
|
50
69
|
|
70
|
+
def self.import_for_repository(repository)
|
71
|
+
::Katello::DockerTag.where(:repository_id => repository).destroy_all
|
72
|
+
super(repository, true)
|
73
|
+
end
|
74
|
+
|
51
75
|
def self.manage_repository_association
|
52
76
|
false
|
53
77
|
end
|
@@ -57,10 +81,6 @@ module Katello
|
|
57
81
|
[repository]
|
58
82
|
end
|
59
83
|
|
60
|
-
def full_name
|
61
|
-
"#{docker_manifest.name}:#{name}"
|
62
|
-
end
|
63
|
-
|
64
84
|
def related_tags
|
65
85
|
# tags in the same repo group with the same name
|
66
86
|
self.class.where(:repository_id => repository.group, :name => name)
|
@@ -19,7 +19,7 @@ module Katello
|
|
19
19
|
when UP_TO_DATE
|
20
20
|
N_("All errata applied")
|
21
21
|
when UNKNOWN
|
22
|
-
N_("Could not calculate errata status, ensure host is registered and katello-
|
22
|
+
N_("Could not calculate errata status, ensure host is registered and the katello-host-tools package is installed")
|
23
23
|
else
|
24
24
|
N_("Unknown errata status")
|
25
25
|
end
|
@@ -9,12 +9,12 @@ module Katello
|
|
9
9
|
TYPES = [SECURITY, BUGZILLA, ENHANCEMENT].freeze
|
10
10
|
CONTENT_TYPE = Pulp::Erratum::CONTENT_TYPE
|
11
11
|
|
12
|
-
has_many :content_facets, :through => :content_facet_errata, :class_name => "Katello::Host::ContentFacet", :source => :content_facet
|
13
12
|
has_many :content_facet_errata, :class_name => "Katello::ContentFacetErratum", :dependent => :destroy, :inverse_of => :content_facet
|
13
|
+
has_many :content_facets, :through => :content_facet_errata, :class_name => "Katello::Host::ContentFacet", :source => :content_facet
|
14
14
|
has_many :content_facets_applicable, :through => :content_facet_errata, :class_name => "Katello::Host::ContentFacet", :source => :content_facet
|
15
15
|
|
16
|
-
has_many :repositories, :through => :repository_errata, :class_name => "Katello::Repository"
|
17
16
|
has_many :repository_errata, :class_name => "Katello::RepositoryErratum", :dependent => :destroy, :inverse_of => :erratum
|
17
|
+
has_many :repositories, :through => :repository_errata, :class_name => "Katello::Repository"
|
18
18
|
|
19
19
|
has_many :bugzillas, :class_name => "Katello::ErratumBugzilla", :dependent => :destroy, :inverse_of => :erratum
|
20
20
|
has_many :cves, :class_name => "Katello::ErratumCve", :dependent => :destroy, :inverse_of => :erratum
|
@@ -56,8 +56,7 @@ module Katello
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.applicable_to_hosts_dashboard(hosts)
|
59
|
-
applicable_to_hosts(hosts).
|
60
|
-
select("DISTINCT ON (#{self.table_name}.updated, #{self.table_name}.id) #{self.table_name}.*").
|
59
|
+
Erratum.where(:id => applicable_to_hosts(hosts)).
|
61
60
|
order("#{self.table_name}.updated desc").limit(6)
|
62
61
|
end
|
63
62
|
|
@@ -6,8 +6,8 @@ module Katello
|
|
6
6
|
|
7
7
|
CONTENT_TYPE = Pulp::FileUnit::CONTENT_TYPE
|
8
8
|
|
9
|
-
has_many :repositories, :through => :repository_files, :class_name => "Katello::Repository"
|
10
9
|
has_many :repository_files, :class_name => "Katello::RepositoryFile", :dependent => :destroy, :inverse_of => :file, :foreign_key => :file_id
|
10
|
+
has_many :repositories, :through => :repository_files, :class_name => "Katello::Repository"
|
11
11
|
|
12
12
|
scoped_search :on => :name, :complete_value => true
|
13
13
|
scoped_search :on => :path, :complete_value => true
|
@@ -35,7 +35,7 @@ module Katello
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def self.total_for_repositories(repos)
|
38
|
-
self.in_repositories(repos).
|
38
|
+
self.in_repositories(repos).count
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -1,40 +1,15 @@
|
|
1
1
|
module Katello
|
2
|
-
module Glue
|
3
|
-
|
4
|
-
|
2
|
+
module Glue
|
3
|
+
module Candlepin
|
4
|
+
module Content
|
5
|
+
extend ActiveSupport::Concern
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
module InstanceMethods
|
13
|
-
def content
|
14
|
-
return @content unless @content.nil?
|
15
|
-
unless self.content_id.nil?
|
16
|
-
@content = Katello::Candlepin::Content.find(self.organization.label, self.content_id)
|
7
|
+
def modified_product_ids(org)
|
8
|
+
@modified_product_cache ||= {}
|
9
|
+
return @modified_product_cache[org.label] if @modified_product_cache[org.label]
|
10
|
+
result = Resources::Candlepin::Content.get(org.label, self.cp_content_id)
|
11
|
+
@modified_product_cache[org.label] = result['modifiedProductIds']
|
17
12
|
end
|
18
|
-
@content
|
19
|
-
rescue RestClient::ResourceNotFound, RestClient::BadRequest
|
20
|
-
nil
|
21
|
-
end
|
22
|
-
|
23
|
-
def should_update_content?
|
24
|
-
(self.gpg_key_id_was.nil? && !self.gpg_key_id.nil? && self.content.gpgUrl == '') ||
|
25
|
-
(!self.gpg_key_id_was.nil? && self.gpg_key_id.nil? && self.content.gpgUrl != '')
|
26
|
-
end
|
27
|
-
|
28
|
-
def yum_gpg_key_url
|
29
|
-
# if the repo has a gpg key return a url to access it
|
30
|
-
if (gpg_key && gpg_key.content.present?)
|
31
|
-
host = Facter.value(:fqdn) || SETTINGS[:fqdn]
|
32
|
-
gpg_key_content_api_repository_url(self, :host => host + "/katello", :protocol => 'https')
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def custom_content_label
|
37
|
-
"#{organization.label} #{product.label} #{label}".gsub(/\s/, "_")
|
38
13
|
end
|
39
14
|
end
|
40
15
|
end
|
@@ -38,38 +38,6 @@ module Katello
|
|
38
38
|
self.owner_details['contentAccessMode']
|
39
39
|
end
|
40
40
|
|
41
|
-
def enabled_product_content_for(repositories)
|
42
|
-
return [] if repositories.blank?
|
43
|
-
content_ids = repositories.pluck(:content_id)
|
44
|
-
|
45
|
-
filtered_product_content do |pc|
|
46
|
-
content_ids.include?(pc.content.id) && pc.product.enabled?
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def enabled_product_content
|
51
|
-
filtered_product_content do |pc|
|
52
|
-
pc.product.enabled? && pc.product.redhat?
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def filtered_product_content
|
57
|
-
cp_products = Katello::Resources::Candlepin::Product.all(self.label, ['id', 'productContent.enabled', 'productContent.content.name', 'productContent.content.id',
|
58
|
-
'productContent.content.type', 'productContent.content.contentUrl', 'productContent.content.label'])
|
59
|
-
to_return = []
|
60
|
-
|
61
|
-
cp_products.each do |product_hash|
|
62
|
-
product = ::Katello::Product.find_by(:organization_id => self.id, :cp_id => product_hash['id'])
|
63
|
-
if product
|
64
|
-
product_hash['productContent'].each do |pc_hash|
|
65
|
-
pc = Katello::Candlepin::ProductContent.new(pc_hash, product.id)
|
66
|
-
to_return << pc if !block_given? || yield(pc)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
to_return.sort_by { |pc| pc.content.name.downcase }
|
71
|
-
end
|
72
|
-
|
73
41
|
def pools(consumer_uuid = nil)
|
74
42
|
if consumer_uuid
|
75
43
|
Resources::Candlepin::Owner.pools self.label, :consumer => consumer_uuid
|
@@ -113,11 +113,11 @@ module Katello
|
|
113
113
|
pool_attributes[:pool_type] = pool_json["type"] if pool_json.key?("type")
|
114
114
|
|
115
115
|
if pool_attributes.key?(:multi_entitlement)
|
116
|
-
pool_attributes[:multi_entitlement] = pool_attributes[:multi_entitlement] == "yes"
|
116
|
+
pool_attributes[:multi_entitlement] = pool_attributes[:multi_entitlement] == "yes"
|
117
117
|
end
|
118
118
|
|
119
119
|
if pool_attributes.key?(:virtual)
|
120
|
-
pool_attributes[:virt_only] = pool_attributes["virtual"] == 'true'
|
120
|
+
pool_attributes[:virt_only] = pool_attributes["virtual"] == 'true'
|
121
121
|
end
|
122
122
|
|
123
123
|
if pool_attributes.key?("requires_host")
|
@@ -141,7 +141,6 @@ module Katello
|
|
141
141
|
self.create_activation_key_associations
|
142
142
|
self.import_hosts if index_hosts
|
143
143
|
end
|
144
|
-
# rubocop:enable MethodLength
|
145
144
|
|
146
145
|
def import_hosts
|
147
146
|
entitlements = Resources::Candlepin::Pool.entitlements(self.cp_id, ["consumer.uuid"])
|
@@ -1,19 +1,13 @@
|
|
1
1
|
module Katello
|
2
2
|
module Glue::Candlepin::Product
|
3
|
-
PRODUCT_ATTRS = %w(name attributes.name attributes.value
|
4
|
-
productContent.content.contentUrl
|
5
|
-
productContent.content.label
|
6
|
-
productContent.content.modifiedProductIds
|
7
|
-
productContent.content.type
|
8
|
-
productContent.content.id
|
9
|
-
productContent.content.name).freeze
|
3
|
+
PRODUCT_ATTRS = %w(name attributes.name attributes.value).freeze
|
10
4
|
|
11
5
|
def self.included(base)
|
12
6
|
base.send :include, LazyAccessor
|
13
7
|
base.send :include, InstanceMethods
|
14
8
|
|
15
9
|
base.class_eval do
|
16
|
-
lazy_accessor :
|
10
|
+
lazy_accessor :multiplier, :href, :attrs,
|
17
11
|
:initializer => (lambda do |_s|
|
18
12
|
convert_from_cp_fields(
|
19
13
|
Resources::Candlepin::Product.get(self.organization.label, cp_id, PRODUCT_ATTRS)[0]
|
@@ -46,9 +40,7 @@ module Katello
|
|
46
40
|
|
47
41
|
product = Product.new(attrs, &block)
|
48
42
|
product.save!
|
49
|
-
product
|
50
|
-
product.productContent = product.build_product_content(product_content_attrs)
|
51
|
-
product.save!
|
43
|
+
import_product_content(product, product_content_attrs)
|
52
44
|
rescue => e
|
53
45
|
[Rails.logger, import_logger].each do |logger|
|
54
46
|
logger.error "Failed to create product #{attrs['name']}: #{e}" if logger
|
@@ -56,6 +48,37 @@ module Katello
|
|
56
48
|
raise e
|
57
49
|
end
|
58
50
|
|
51
|
+
def self.import_product_content(product, content_attrs)
|
52
|
+
content_attrs.each do |attrs|
|
53
|
+
params = attrs.with_indifferent_access
|
54
|
+
pc = params[:content]
|
55
|
+
|
56
|
+
content_attrs = {
|
57
|
+
cp_content_id: pc[:id],
|
58
|
+
name: pc[:name],
|
59
|
+
label: pc[:label],
|
60
|
+
content_type: pc[:type],
|
61
|
+
vendor: pc[:vendor],
|
62
|
+
gpg_url: pc[:gpgUrl],
|
63
|
+
content_url: pc[:contentUrl]
|
64
|
+
}
|
65
|
+
|
66
|
+
# current product has this content - update it
|
67
|
+
# otherwise create a reference to existing content OR new content altogether
|
68
|
+
if (existing = product.product_content_by_id(pc[:id]))
|
69
|
+
existing.content.update_attributes!(content_attrs)
|
70
|
+
existing.update_attributes(enabled: params['enabled'])
|
71
|
+
else
|
72
|
+
content = ::Katello::Content.find_by_cp_content_id(pc[:id])
|
73
|
+
content ||= ::Katello::Content.create!(content_attrs)
|
74
|
+
|
75
|
+
::Katello::ProductContent.create!(enabled: params[:enabled],
|
76
|
+
product_id: product.id,
|
77
|
+
content: content)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
59
82
|
module InstanceMethods
|
60
83
|
def initialize(attribs = nil)
|
61
84
|
unless attribs.nil?
|
@@ -65,8 +88,6 @@ module Katello
|
|
65
88
|
attribs.delete(attributes_key)
|
66
89
|
end
|
67
90
|
|
68
|
-
@productContent = [] unless attribs.key?(:productContent)
|
69
|
-
|
70
91
|
# ugh. hack-ish. otherwise we have to modify code every time things change on cp side
|
71
92
|
attribs = attribs.reject do |k, _v|
|
72
93
|
!self.class.column_defaults.keys.member?(k.to_s) && (!respond_to?(:"#{k.to_s}=") rescue true)
|
@@ -76,18 +97,10 @@ module Katello
|
|
76
97
|
super
|
77
98
|
end
|
78
99
|
|
79
|
-
def displayable_product_contents
|
80
|
-
self.productContent.select(&:displayable?)
|
81
|
-
end
|
82
|
-
|
83
100
|
def orphaned?
|
84
101
|
self.provider.redhat_provider? && self.certificate.nil?
|
85
102
|
end
|
86
103
|
|
87
|
-
def build_product_content(attrs)
|
88
|
-
@productContent = attrs.collect { |pc| Katello::Candlepin::ProductContent.new pc }
|
89
|
-
end
|
90
|
-
|
91
104
|
def support_level
|
92
105
|
return _attr(:support_level)
|
93
106
|
end
|
@@ -119,7 +132,6 @@ module Katello
|
|
119
132
|
|
120
133
|
def convert_from_cp_fields(cp_json)
|
121
134
|
ar_safe_json = cp_json.key?(:attributes) ? cp_json.merge(:attrs => cp_json.delete(:attributes)) : cp_json
|
122
|
-
ar_safe_json[:productContent] = ar_safe_json[:productContent].collect { |pc| ::Katello::Candlepin::ProductContent.new(pc, self.id) }
|
123
135
|
ar_safe_json[:attrs] = remove_hibernate_fields(cp_json[:attrs]) if ar_safe_json.key?(:attrs)
|
124
136
|
ar_safe_json[:attrs] ||= []
|
125
137
|
ar_safe_json.except('id')
|
@@ -137,14 +149,6 @@ module Katello
|
|
137
149
|
self.productContent << content
|
138
150
|
end
|
139
151
|
|
140
|
-
def product_content_by_id(content_id)
|
141
|
-
self.productContent.find { |pc| pc.content.id == content_id }
|
142
|
-
end
|
143
|
-
|
144
|
-
def product_content_by_name(content_name)
|
145
|
-
self.productContent.find { |pc| pc.content.name == content_name }
|
146
|
-
end
|
147
|
-
|
148
152
|
def import_subscription(subscription_id)
|
149
153
|
sub = nil
|
150
154
|
::Katello::Util::Support.active_record_retry do
|
@@ -154,28 +158,6 @@ module Katello
|
|
154
158
|
pools = ::Katello::Resources::Candlepin::Product.pools(self.organization.label, self.cp_id)
|
155
159
|
pools.each { |pool_json| ::Katello::Pool.import_pool(pool_json['id']) }
|
156
160
|
end
|
157
|
-
|
158
|
-
protected
|
159
|
-
|
160
|
-
def added_content
|
161
|
-
old_content_ids = productContent_change[0].nil? ? [] : productContent_change[0].map { |pc| pc.content.label }
|
162
|
-
new_content_ids = productContent_change[1].map { |pc| pc.content.label }
|
163
|
-
|
164
|
-
added_content_ids = new_content_ids - old_content_ids
|
165
|
-
|
166
|
-
added_content = productContent_change[1].select { |pc| added_content_ids.include?(pc.content.label) }
|
167
|
-
added_content
|
168
|
-
end
|
169
|
-
|
170
|
-
def deleted_content
|
171
|
-
old_content_ids = productContent_change[0].nil? ? [] : productContent_change[0].map { |pc| pc.content.label }
|
172
|
-
new_content_ids = productContent_change[1].map { |pc| pc.content.label }
|
173
|
-
|
174
|
-
deleted_content_ids = old_content_ids - new_content_ids
|
175
|
-
|
176
|
-
deleted_content = productContent_change[0].select { |pc| deleted_content_ids.include?(pc.content.label) }
|
177
|
-
deleted_content
|
178
|
-
end
|
179
161
|
end
|
180
162
|
end
|
181
163
|
end
|