diff --git a/definitions/procedures/pulpcore/container_handle_image_data.rb b/definitions/procedures/pulpcore/container_handle_image_data.rb new file mode 100644 index 000000000..624adaa91 --- /dev/null +++ b/definitions/procedures/pulpcore/container_handle_image_data.rb @@ -0,0 +1,22 @@ +module Procedures::Pulpcore + class ContainerHandleImageMetadata < ForemanMaintain::Procedure + include ForemanMaintain::Concerns::SystemService + include ForemanMaintain::Concerns::PulpCommon + + metadata do + description 'Initialize and expose container image metadata in the pulpcore db' + for_feature :pulpcore + end + + def run + with_spinner('Initialize and expose container image metadata in the pulpcore db') do |spinner| + necessary_services = feature(:pulpcore_database).services + + feature(:service).handle_services(spinner, 'start', :only => necessary_services) + + spinner.update('Adding image metadata to pulp') + execute!(pulpcore_manager('container-handle-image-data')) + end + end + end +end diff --git a/definitions/scenarios/upgrade_to_capsule_6_16.rb b/definitions/scenarios/upgrade_to_capsule_6_16.rb index 7add0ebcb..cc590b39c 100644 --- a/definitions/scenarios/upgrade_to_capsule_6_16.rb +++ b/definitions/scenarios/upgrade_to_capsule_6_16.rb @@ -80,6 +80,7 @@ class PostMigrations < Abstract def compose add_step(Procedures::RefreshFeatures) add_step(Procedures::Service::Start.new) + add_step(Procedures::Pulpcore::ContainerHandleImageData) add_steps(find_procedures(:post_migrations)) end end diff --git a/definitions/scenarios/upgrade_to_katello_nightly.rb b/definitions/scenarios/upgrade_to_katello_nightly.rb index 4f7fd5631..cc63f9a57 100644 --- a/definitions/scenarios/upgrade_to_katello_nightly.rb +++ b/definitions/scenarios/upgrade_to_katello_nightly.rb @@ -77,6 +77,7 @@ class PostMigrations < Abstract def compose add_step(Procedures::RefreshFeatures) add_step(Procedures::Service::Start.new) + add_step(Procedures::Pulpcore::ContainerHandleImageData) add_steps(find_procedures(:post_migrations)) end end diff --git a/definitions/scenarios/upgrade_to_satellite_6_16.rb b/definitions/scenarios/upgrade_to_satellite_6_16.rb index a74674b2c..040815909 100644 --- a/definitions/scenarios/upgrade_to_satellite_6_16.rb +++ b/definitions/scenarios/upgrade_to_satellite_6_16.rb @@ -83,6 +83,7 @@ class PostMigrations < Abstract def compose add_step(Procedures::RefreshFeatures) add_step(Procedures::Service::Start.new) + add_step(Procedures::Pulpcore::ContainerHandleImageData) add_steps(find_procedures(:post_migrations)) end end