Sha256: ee69cc3fd847684124336b7274d1d016d05974677071862c9326941752303c4f
Contents?: true
Size: 1008 Bytes
Versions: 18
Compression:
Stored size: 1008 Bytes
Contents
module Actions module Candlepin module Consumer class Create < Candlepin::Abstract input_format do param :cp_environment_id param :consumer_parameters param :activation_keys end # 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 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 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 end end end end
Version data entries
18 entries across 18 versions & 1 rubygems