Sha256: aa7b9fe39f1e20aad99490bfd8802863b764b2c254f23e2315e57fdfb0c66924
Contents?: true
Size: 882 Bytes
Versions: 46
Compression:
Stored size: 882 Bytes
Contents
module Actions module Pulp module Repository class CreateInPlan < Create alias_method :perform_run, :run def plan(input) plan_self(input) pulp_extensions.repository.create_with_importer_and_distributors(input[:pulp_id], importer, distributors, display_name: input[:name]) rescue => e raise error_message(e.http_body) || e end def error_message(body) JSON.parse(body)['error_message'] rescue JSON::ParserError nil end def run self.output = input end end end end end
Version data entries
46 entries across 46 versions & 1 rubygems