Sha256: cf2c37d8d73eca2f3d8f917cb354e5e8ca5e385c7c34a0e925cf2e3a9a51c285
Contents?: true
Size: 873 Bytes
Versions: 25
Compression:
Stored size: 873 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 e.try(:http_body) ? error_message(e.http_body) || e : 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
25 entries across 25 versions & 1 rubygems