katello 3.15.0.rc1.1 → 3.15.0.rc1.2
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/hosts/activation_key_edit.js +32 -54
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +11 -4
- data/app/controllers/katello/api/v2/repositories_controller.rb +7 -3
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +2 -3
- data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +6 -2
- data/app/lib/actions/pulp3/content_migration.rb +5 -5
- data/app/lib/actions/pulp3/import_migration.rb +3 -3
- data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +1 -1
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +1 -1
- data/app/models/katello/authorization/pool.rb +5 -1
- data/app/models/katello/authorization/subscription.rb +3 -1
- data/app/models/katello/candlepin/repository_mapper.rb +5 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +17 -8
- data/app/models/katello/concerns/pulp_database_unit.rb +1 -1
- data/app/models/katello/content_view.rb +4 -0
- data/app/models/katello/glue/candlepin/candlepin_object.rb +0 -6
- data/app/models/katello/glue/candlepin/owner.rb +1 -1
- data/app/models/katello/glue/candlepin/repository.rb +0 -8
- data/app/models/katello/glue/pulp/repos.rb +41 -1
- data/app/models/katello/installed_package.rb +5 -4
- data/app/models/katello/pool.rb +1 -1
- data/app/services/katello/pulp/repository/docker.rb +12 -2
- data/app/services/katello/pulp/simple_package.rb +6 -2
- data/app/services/katello/pulp3/erratum.rb +4 -0
- data/app/services/katello/pulp3/migration.rb +61 -8
- data/app/services/katello/pulp3/migration_plan.rb +79 -5
- data/app/views/dashboard/_subscription_widget.html.erb +1 -1
- data/app/views/katello/api/v2/organizations/show.json.rabl +3 -0
- data/app/views/katello/api/v2/packages/backend.json.rabl +4 -0
- data/app/views/katello/api/v2/products/show.json.rabl +2 -0
- data/app/views/overrides/activation_keys/_host_tab_pane.html.erb +10 -2
- data/app/views/smart_proxies/plugins/{_pulp3.html.erb → _pulpcore.html.erb} +0 -0
- data/config/katello.yaml.example +0 -6
- data/db/migrate/20200121213430_katello_repository_rpms_id_big_int.rb +5 -0
- data/db/migrate/20200129172534_add_epoch_version_release_arch_to_katello_installed_packages.rb +40 -0
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +15 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/content-access-mode-banner.directive.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
- data/lib/katello/tasks/pulp3_migration.rake +1 -1
- data/lib/katello/tasks/pulp3_post_migration_check.rake +32 -0
- data/lib/katello/tasks/repository.rake +10 -7
- data/lib/katello/version.rb +1 -1
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalSelectors.js +2 -0
- data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +4 -0
- data/webpack/scenes/Organizations/OrganizationSelectors.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/DeleteManifestModalText.js +14 -9
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +183 -169
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +12 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +5 -3
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +130 -181
- data/webpack/scenes/Subscriptions/Manifest/index.js +10 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +4 -9
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +0 -3
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +3 -11
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +33 -13
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +2 -5
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +0 -7
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +5 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +0 -12
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +0 -3
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +0 -12
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -3
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +0 -73
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +0 -3
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +0 -4
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +13 -22
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +10 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +2 -1
- data/webpack/scenes/Subscriptions/index.js +4 -3
- data/webpack/scenes/Tasks/TaskConstants.js +1 -0
- metadata +41 -18
- data/app/assets/javascripts/katello/widgets/auto_complete.js +0 -183
- data/db/seeds.d/115-http_proxy.rb +0 -25
- data/vendor/assets/stylesheets/katello/jquery.jnotify.css +0 -98
@@ -13,14 +13,6 @@ module Katello
|
|
13
13
|
def content
|
14
14
|
Katello::Content.find_by(:cp_content_id => self.content_id, :organization_id => self.product.organization_id)
|
15
15
|
end
|
16
|
-
|
17
|
-
def yum_gpg_key_url
|
18
|
-
# if the repo has a gpg key return a url to access it
|
19
|
-
if (gpg_key && gpg_key.content.present?)
|
20
|
-
host = SETTINGS[:fqdn]
|
21
|
-
gpg_key_content_api_repository_url(self, :host => host + "/katello", :protocol => 'https')
|
22
|
-
end
|
23
|
-
end
|
24
16
|
end
|
25
17
|
end
|
26
18
|
end
|
@@ -69,7 +69,7 @@ module Katello
|
|
69
69
|
|
70
70
|
def sync_summary
|
71
71
|
summary = {}
|
72
|
-
|
72
|
+
last_repo_sync_task_by_repoid.values.each do |task|
|
73
73
|
summary[task.result] ||= 0
|
74
74
|
summary[task.result] += 1
|
75
75
|
end
|
@@ -106,6 +106,46 @@ module Katello
|
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
109
|
+
def last_repo_sync_task_by_repoid
|
110
|
+
all_repos = repos(self.library, nil, false)
|
111
|
+
base_combined_table = ForemanTasks::Task::DynflowTask
|
112
|
+
.where(:label => ::Actions::Katello::Repository::Sync.name)
|
113
|
+
.joins(:locks)
|
114
|
+
.where("foreman_tasks_locks.resource_id in (?) and foreman_tasks_locks.resource_type = ?", all_repos.pluck(:id), ::Katello::Repository.name)
|
115
|
+
|
116
|
+
max_per_repoid = ForemanTasks::Task::DynflowTask
|
117
|
+
.joins(:locks)
|
118
|
+
.select("#{ForemanTasks::Task::DynflowTask.table_name}.*, inner_select.resource_id")
|
119
|
+
.joins(
|
120
|
+
"INNER JOIN (#{base_combined_table
|
121
|
+
.select("MAX(foreman_tasks_tasks.started_at) AS started_at", "foreman_tasks_locks.resource_id AS resource_id")
|
122
|
+
.group("foreman_tasks_locks.resource_id")
|
123
|
+
.to_sql}) inner_select
|
124
|
+
ON inner_select.started_at = #{ForemanTasks::Task::DynflowTask.table_name}.started_at
|
125
|
+
AND inner_select.resource_id = locks_foreman_tasks_tasks.resource_id")
|
126
|
+
.distinct
|
127
|
+
|
128
|
+
max_per_repoid.map { |x| [x.resource_id, x] }.to_h
|
129
|
+
end
|
130
|
+
|
131
|
+
def sync_state_aggregated
|
132
|
+
presented = last_repo_sync_task_by_repoid.transform_values { |v| ::Katello::SyncStatusPresenter.new(Katello::Repository.find(v.input["repository"]["id"]), v) }
|
133
|
+
worst = nil
|
134
|
+
scale = [
|
135
|
+
:never_synced,
|
136
|
+
:stopped,
|
137
|
+
:canceled,
|
138
|
+
:error,
|
139
|
+
:paused,
|
140
|
+
:running
|
141
|
+
]
|
142
|
+
|
143
|
+
presented.each do |_repoid, task|
|
144
|
+
worst = task if worst.nil? || worst.sync_progress[:state].nil? || scale.index(worst.sync_progress[:raw_state].to_sym) < scale.index(task.sync_progress[:raw_state].to_sym)
|
145
|
+
end
|
146
|
+
worst&.sync_progress&.fetch(:state, nil)
|
147
|
+
end
|
148
|
+
|
109
149
|
def sync_state
|
110
150
|
self.sync_status[:state]
|
111
151
|
end
|
@@ -8,10 +8,11 @@ module Katello
|
|
8
8
|
has_many :host_installed_packages, :class_name => "Katello::HostInstalledPackage", :dependent => :destroy, :inverse_of => :installed_package
|
9
9
|
|
10
10
|
scoped_search :on => :name, :complete_value => true
|
11
|
+
scoped_search :on => :nvrea
|
11
12
|
scoped_search :on => :nvra
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
scoped_search :on => :epoch
|
14
|
+
scoped_search :on => :version
|
15
|
+
scoped_search :on => :release
|
16
|
+
scoped_search :on => :arch
|
16
17
|
end
|
17
18
|
end
|
data/app/models/katello/pool.rb
CHANGED
@@ -101,7 +101,7 @@ module Katello
|
|
101
101
|
end
|
102
102
|
|
103
103
|
class Jail < ::Safemode::Jail
|
104
|
-
allow :id, :name, :available, :quantity, :product_id, :contract_number, :type, :account_number, :start_date, :end_date, :organization
|
104
|
+
allow :id, :name, :available, :quantity, :product_id, :contract_number, :type, :account_number, :start_date, :end_date, :organization, :consumed
|
105
105
|
end
|
106
106
|
end
|
107
107
|
end
|
@@ -24,10 +24,20 @@ module Katello
|
|
24
24
|
importer_class.new(config.merge(master_importer_connection_options))
|
25
25
|
end
|
26
26
|
|
27
|
+
#what foreman proxies w/ content pull docker content from
|
28
|
+
def docker_registry_host
|
29
|
+
if SmartProxy.pulp_master.pulp3_repository_type_support?(Katello::Repository::DOCKER_TYPE)
|
30
|
+
foreman_url = URI.parse(Setting[:foreman_url]).host.downcase
|
31
|
+
"https://#{foreman_url}"
|
32
|
+
else
|
33
|
+
pulp_uri = URI.parse(SmartProxy.pulp_master.pulp_url)
|
34
|
+
"https://#{pulp_uri.host.downcase}:#{Setting['pulp_docker_registry_port']}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
27
38
|
def generate_mirror_importer
|
28
|
-
pulp_uri = URI.parse(SmartProxy.pulp_master.pulp_url)
|
29
39
|
config = {
|
30
|
-
feed:
|
40
|
+
feed: docker_registry_host,
|
31
41
|
upstream_name: repo.container_repository_name,
|
32
42
|
enable_v1: false
|
33
43
|
}
|
@@ -9,11 +9,15 @@ module Katello
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def nvra
|
12
|
-
|
12
|
+
"#{@name}-#{@version}-#{@release}.#{@arch}"
|
13
13
|
end
|
14
14
|
|
15
15
|
def nvrea
|
16
|
-
"
|
16
|
+
if epoch == "0"
|
17
|
+
@nvra
|
18
|
+
else
|
19
|
+
"#{@name}-#{@epoch}:#{@version}-#{@release}.#{@arch}"
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
@@ -7,6 +7,10 @@ module Katello
|
|
7
7
|
PulpRpmClient::ContentAdvisoriesApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_master!).api_client)
|
8
8
|
end
|
9
9
|
|
10
|
+
def self.unit_identifier
|
11
|
+
"id"
|
12
|
+
end
|
13
|
+
|
10
14
|
def self.ids_for_repository(repo_id)
|
11
15
|
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.pulp_master)
|
12
16
|
repo_content_list = repo.content_list
|
@@ -11,9 +11,9 @@ module Katello
|
|
11
11
|
Katello::Repository::DOCKER_TYPE
|
12
12
|
].freeze
|
13
13
|
|
14
|
-
def initialize(smart_proxy,
|
14
|
+
def initialize(smart_proxy, repository_types = REPOSITORY_TYPES)
|
15
15
|
@smart_proxy = smart_proxy
|
16
|
-
@
|
16
|
+
@repository_types = repository_types
|
17
17
|
end
|
18
18
|
|
19
19
|
def api_client
|
@@ -28,8 +28,12 @@ module Katello
|
|
28
28
|
Pulp2to3MigrationClient::Pulp2contentApi.new(api_client)
|
29
29
|
end
|
30
30
|
|
31
|
-
def
|
32
|
-
|
31
|
+
def pulp2_repositories_api
|
32
|
+
Pulp2to3MigrationClient::Pulp2repositoriesApi.new(api_client)
|
33
|
+
end
|
34
|
+
|
35
|
+
def create_and_run_migrations
|
36
|
+
create_migrations.map { |href| start_migration(href) }
|
33
37
|
end
|
34
38
|
|
35
39
|
def self.content_types_for_migration
|
@@ -41,22 +45,71 @@ module Katello
|
|
41
45
|
end
|
42
46
|
|
43
47
|
def import_pulp3_content
|
44
|
-
@
|
48
|
+
@repository_types.each do |repository_type_label|
|
45
49
|
Katello::RepositoryTypeManager.repository_types[repository_type_label].content_types_to_index.each do |content_type|
|
46
50
|
import_content_type(content_type)
|
47
51
|
end
|
52
|
+
import_repositories(repository_type_label)
|
48
53
|
end
|
49
54
|
end
|
50
55
|
|
51
|
-
def
|
52
|
-
|
53
|
-
migration_plan_api.create(plan:
|
56
|
+
def create_migrations
|
57
|
+
migration_plans = @repository_types.map { |label| Katello::Pulp3::MigrationPlan.new(label) }
|
58
|
+
migration_plans.map { |plan| migration_plan_api.create(plan: plan.generate.as_json).pulp_href }
|
54
59
|
end
|
55
60
|
|
56
61
|
def start_migration(plan_href)
|
57
62
|
migration_plan_api.run(plan_href, dry_run: false)
|
58
63
|
end
|
59
64
|
|
65
|
+
def import_repositories(repository_type_label)
|
66
|
+
imported = Katello::Pulp3::Api::Core.fetch_from_list { |opts| pulp2_repositories_api.list(opts) }
|
67
|
+
imported = imported.select { |migrated| !migrated.not_in_plan }
|
68
|
+
|
69
|
+
Katello::Repository.with_type(repository_type_label).each do |repo|
|
70
|
+
found = imported.find { |migrated_repo| migrated_repo.pulp2_repo_id == repo.pulp_id }
|
71
|
+
import_repo(repo, found) if found
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def api_for_repository(katello_repo)
|
76
|
+
katello_repo.repository_type.pulp3_api_class
|
77
|
+
end
|
78
|
+
|
79
|
+
def import_repo(katello_repo, migrated_repo)
|
80
|
+
pulp3_api = api_for_repository(katello_repo).new(SmartProxy.pulp_master)
|
81
|
+
katello_repo.remote_href = migrated_repo.pulp3_remote_href
|
82
|
+
katello_repo.publication_href = migrated_repo.pulp3_publication_href
|
83
|
+
katello_repo.version_href = migrated_repo.pulp3_repository_version
|
84
|
+
katello_repo.save!
|
85
|
+
|
86
|
+
if katello_repo.environment_id.nil? #a cv archive repo
|
87
|
+
environment_instances = Katello::Repository.where(library_instance_id: katello_repo.library_instance_id,
|
88
|
+
content_view_version_id: katello_repo.content_view_version_id)
|
89
|
+
environment_instances.update_all(publication_href: migrated_repo.pulp3_publication_href, version_href: migrated_repo.pulp3_repository_version)
|
90
|
+
end
|
91
|
+
|
92
|
+
repo_ref = Katello::Pulp3::RepositoryReference.find_or_initialize_by(:root_repository_id => katello_repo.root_id, :content_view_id => katello_repo.content_view.id)
|
93
|
+
repo_ref.repository_href = migrated_repo.pulp3_repository_href
|
94
|
+
repo_ref.save!
|
95
|
+
|
96
|
+
process_distributions(pulp3_api, migrated_repo.pulp3_distribution_hrefs)
|
97
|
+
end
|
98
|
+
|
99
|
+
def process_distributions(pulp3_api, dist_hrefs_list)
|
100
|
+
#distribution_path_hash(pulp3_api, dist_hrefs_list).each do |relative_path, href|
|
101
|
+
dist_hrefs_list.each do |href|
|
102
|
+
relative_path = pulp3_api.distributions_api.read(href).base_path
|
103
|
+
|
104
|
+
dist_ref = Katello::Pulp3::DistributionReference.find_or_initialize_by(:path => relative_path)
|
105
|
+
if (distribution_repo = Katello::Repository.find_by(:relative_path => relative_path))
|
106
|
+
dist_ref.href = href
|
107
|
+
dist_ref.repository_id = distribution_repo.id
|
108
|
+
dist_ref.save!
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
60
113
|
def import_content_type(content_type)
|
61
114
|
content_type.model_class.where(:migrated_pulp3_href => nil).select(:id, :pulp_id).find_in_batches(batch_size: GET_QUERY_ID_LENGTH) do |needing_hrefs|
|
62
115
|
migrated_units = pulp2_content_api.list(pulp2_id__in: needing_hrefs.map { |unit| unit.pulp_id }.join(','))
|
@@ -1,27 +1,101 @@
|
|
1
1
|
module Katello
|
2
2
|
module Pulp3
|
3
3
|
class MigrationPlan
|
4
|
-
def initialize(
|
5
|
-
@
|
4
|
+
def initialize(repository_type_label)
|
5
|
+
@repository_type = repository_type_label
|
6
|
+
end
|
7
|
+
|
8
|
+
def master_proxy
|
9
|
+
SmartProxy.pulp_master!
|
6
10
|
end
|
7
11
|
|
8
12
|
def generate
|
9
13
|
plan = {}
|
10
14
|
plan[:plugins] = generate_plugins
|
15
|
+
Rails.logger.error("Migration Plan: #{plan.to_json}")
|
11
16
|
plan
|
12
17
|
end
|
13
18
|
|
14
19
|
def generate_plugins
|
15
|
-
|
20
|
+
[
|
16
21
|
{
|
17
|
-
type: pulp2_repository_type(repository_type)
|
22
|
+
type: pulp2_repository_type(@repository_type),
|
23
|
+
repositories: repository_migrations(@repository_type)
|
18
24
|
}
|
19
|
-
|
25
|
+
]
|
20
26
|
end
|
21
27
|
|
22
28
|
def pulp2_repository_type(repository_type)
|
23
29
|
Katello::RepositoryTypeManager.repository_types[repository_type].service_class::REPOSITORY_TYPE
|
24
30
|
end
|
31
|
+
|
32
|
+
def repository_migrations(repo_type)
|
33
|
+
roots = Katello::RootRepository.where(:content_type => repo_type)
|
34
|
+
plans = []
|
35
|
+
roots.each do |root|
|
36
|
+
plans << library_migration_for(root)
|
37
|
+
plans += content_view_migrations_for(root)
|
38
|
+
end
|
39
|
+
plans
|
40
|
+
end
|
41
|
+
|
42
|
+
# plugins: [
|
43
|
+
# type: TYPE
|
44
|
+
# repositories: [
|
45
|
+
# {
|
46
|
+
# name: FOO,
|
47
|
+
# pulp2_importer_repository_id: STRING,
|
48
|
+
# repository_versions: [
|
49
|
+
# {
|
50
|
+
# pulp2_repository_id: STRING
|
51
|
+
# pulp2_distributor_repository_ids: [STRING, STRING]
|
52
|
+
# }
|
53
|
+
# ]
|
54
|
+
# }
|
55
|
+
# ]
|
56
|
+
# ]
|
57
|
+
|
58
|
+
def library_migration_for(root)
|
59
|
+
repo = root.library_instance
|
60
|
+
|
61
|
+
migration = {
|
62
|
+
name: repo.pulp_id,
|
63
|
+
repository_versions: [
|
64
|
+
{
|
65
|
+
pulp2_repository_id: repo.pulp_id,
|
66
|
+
pulp2_distributor_repository_ids: [repo.pulp_id]
|
67
|
+
}
|
68
|
+
]
|
69
|
+
}
|
70
|
+
migration[:pulp2_importer_repository_id] = repo.pulp_id
|
71
|
+
migration
|
72
|
+
end
|
73
|
+
|
74
|
+
def content_view_migrations_for(root)
|
75
|
+
plans = []
|
76
|
+
ContentView.non_default.published_with_repositories(root).each do |cv|
|
77
|
+
plans << content_view_migration(cv, root)
|
78
|
+
end
|
79
|
+
plans
|
80
|
+
end
|
81
|
+
|
82
|
+
def content_view_migration(content_view, root)
|
83
|
+
plan = {
|
84
|
+
name: "#{content_view.name}-#{root.id}-#{content_view.id}",
|
85
|
+
repository_versions: []
|
86
|
+
}
|
87
|
+
library_instance = root.library_instance
|
88
|
+
content_view.versions.with_library_repo(library_instance).uniq.each do |version|
|
89
|
+
repo = version.archived_repos.find_by(:library_instance_id => library_instance.id)
|
90
|
+
env_repos = version.repositories.where(:library_instance_id => library_instance.id).where.not(:environment_id => nil)
|
91
|
+
plan[:repository_versions] << {
|
92
|
+
pulp2_repository_id: repo.pulp_id,
|
93
|
+
pulp2_distributor_repository_ids: env_repos.map(&:pulp_id)
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
plan
|
98
|
+
end
|
25
99
|
end
|
26
100
|
end
|
27
101
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% if Organization.current.blank? %>
|
6
6
|
<p class="ca"><%= _("Please select an organization to view subscription status.") %></p>
|
7
|
-
<% elsif Organization.current.
|
7
|
+
<% elsif Organization.current.simple_content_access?%>
|
8
8
|
<div class="bastion alert alert-info">
|
9
9
|
<span translate>This organization has Simple Content Access enabled. Hosts can consume from all repositories in their Content View regardless of subscription status.
|
10
10
|
</span>
|
@@ -7,6 +7,9 @@ attributes :task_id, :label, :owner_details, :redhat_repository_url
|
|
7
7
|
if ::SETTINGS[:katello][:use_cp]
|
8
8
|
attributes :system_purposes, :system_purposes
|
9
9
|
attributes :service_levels, :service_level
|
10
|
+
node :simple_content_access do |org|
|
11
|
+
org.simple_content_access?
|
12
|
+
end
|
10
13
|
end
|
11
14
|
|
12
15
|
node :default_content_view_id do |org|
|
@@ -5,3 +5,7 @@ attributes :children, :checksumtype, :size, :url, :build_time, :summary, :group,
|
|
5
5
|
node :human_readable_size do |package|
|
6
6
|
number_to_human_size(package.size) if package.size
|
7
7
|
end
|
8
|
+
|
9
|
+
node :build_time_utc do |package|
|
10
|
+
Time.at(package.build_time).to_datetime if package.build_time
|
11
|
+
end
|
@@ -3,11 +3,19 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
<div class="tab-pane" id="activation_keys">
|
6
|
+
<div id="ak-load-error" class="alert alert-danger" style="display: none;">
|
7
|
+
<%= _("There was a problem retrieving Activation Key data from the server.") %>
|
8
|
+
</div>
|
9
|
+
|
6
10
|
<%= field(f, _("Activation Keys"),
|
7
|
-
:help_inline => _("
|
8
|
-
|
11
|
+
:help_inline => _("The value will be available in templates as @host.params['#{kt_ak_label}']")) do
|
12
|
+
tag.div id: :kt_activation_keys
|
9
13
|
end %>
|
10
14
|
|
15
|
+
<%= mount_react_component('TypeAheadSelect', '#kt_activation_keys',
|
16
|
+
{id: 'kt_activation_keys', multiple: true, allowNew: true}.to_json,
|
17
|
+
{ flatten_data: true }) %>
|
18
|
+
|
11
19
|
<div class="alert alert-info">
|
12
20
|
<p><b><%= _('Subscriptions information based on selected activation keys:') %></b></p>
|
13
21
|
<ul id="ak-subscriptions-info"></ul>
|
File without changes
|
data/config/katello.yaml.example
CHANGED
@@ -64,12 +64,6 @@
|
|
64
64
|
:url: amqp:ssl:katello-devel.example.com:5671
|
65
65
|
:subscriptions_queue_address: katello_event_queue
|
66
66
|
|
67
|
-
:cdn_proxy:
|
68
|
-
# :host: localhost
|
69
|
-
# :port: 3128
|
70
|
-
# :user: login
|
71
|
-
# :password: password
|
72
|
-
|
73
67
|
# Internal configuration for communication from server to pulp crane service.
|
74
68
|
:container_image_registry:
|
75
69
|
:crane_url: https://localhost:5000
|