Class: Actions::Candlepin::Product::ContentAdd

Inherits:
Abstract
  • Object
show all
Defined in:
app/lib/actions/candlepin/product/content_add.rb

Constant Summary collapse

DEFAULT_ENABLEMENT =
false

Instance Method Summary collapse

Instance Method Details

#humanized_inputObject

results in correct grammar on Tasks page, e.g. “Import manifest for organization Default Organization”



24
25
26
# File 'app/lib/actions/candlepin/product/content_add.rb', line 24

def humanized_input
  "for Candlepin product #{input[:product_id]}"
end

#humanized_nameObject



18
19
20
# File 'app/lib/actions/candlepin/product/content_add.rb', line 18

def humanized_name
  _("Add content")
end

#runObject



13
14
15
16
# File 'app/lib/actions/candlepin/product/content_add.rb', line 13

def run
  output[:response] = ::Katello::Resources::Candlepin::Product.
      add_content(input[:owner], input[:product_id], input[:content_id], DEFAULT_ENABLEMENT)
end