app/lib/actions/katello/system/create.rb in katello-2.4.0.rc2 vs app/lib/actions/katello/system/create.rb in katello-2.4.0.rc3
- old
+ new
@@ -3,12 +3,10 @@
module System
class Create < Actions::EntryAction
middleware.use ::Actions::Middleware::RemoteAction
def plan(system, activation_keys = [])
- system.disable_auto_reindex!
-
unless activation_keys.empty?
activation_key_plan = plan_action(Katello::System::ActivationKeys, system, activation_keys)
return if activation_key_plan.error
end
@@ -29,28 +27,28 @@
guest_ids: system.guestIds,
activation_keys: activation_keys.map(&:cp_name) }
system.save!
action_subject system
+ system.update_foreman_facts
+
connect_to_smart_proxy(system)
cp_create = plan_action(Candlepin::Consumer::Create, consumer_create_input)
return if cp_create.error
plan_self(uuid: cp_create.output[:response][:uuid])
plan_action(Pulp::Consumer::Create,
uuid: cp_create.output[:response][:uuid],
name: system.name)
- plan_action ElasticSearch::Reindex, system
end
def humanized_name
_("Create")
end
def finalize
system = ::Katello::System.find(input[:system][:id])
- system.disable_auto_reindex!
system.uuid = input[:uuid]
system.save!
end
def connect_to_smart_proxy(system)