Class: Actions::Candlepin::Consumer::Create
- Defined in:
- app/lib/actions/candlepin/consumer/create.rb
Instance Method Summary collapse
-
#plan(input) ⇒ Object
We need to call this in plan phase as this can lean to error responses when the activation key fails to subscribe to the products.
- #run ⇒ Object
Instance Method Details
#plan(input) ⇒ Object
We need to call this in plan phase as this can lean to error responses when the activation key fails to subscribe to the products
13 14 15 16 17 |
# File 'app/lib/actions/candlepin/consumer/create.rb', line 13 def plan(input) response = ::Katello::Resources::Candlepin::Consumer.create(input[:cp_environment_id], input[:consumer_parameters], input[:activation_keys]) plan_self(input.merge(response: response.slice(:uuid, :name))) end |
#run ⇒ Object
19 20 21 22 23 24 |
# File 'app/lib/actions/candlepin/consumer/create.rb', line 19 def run # we still keep the output interface the same for case there is other # way how to check the ability to subscribe the system with the actiovation key # or we have better support for rolling back in Dynflow output[:response] = input[:response] end |