Class: Actions::Katello::Provider::ManifestImport

Inherits:
AbstractAsyncTask show all
Defined in:
app/lib/actions/katello/provider/manifest_import.rb

Instance Method Summary collapse

Methods inherited from AbstractAsyncTask

#humanized_output, #rescue_strategy

Instance Method Details

#humanized_nameObject



22
23
24
# File 'app/lib/actions/katello/provider/manifest_import.rb', line 22

def humanized_name
  _("Import Manifest")
end

#plan(provider, path, force) ⇒ Object



7
8
9
10
11
12
# File 'app/lib/actions/katello/provider/manifest_import.rb', line 7

def plan(provider, path, force)
  # TODO: extract the REST calls from Provider#import_manifest
  # and construct proper execution plan
  action_subject provider
  plan_self path: path, force: force
end

#runObject



26
27
28
29
30
# File 'app/lib/actions/katello/provider/manifest_import.rb', line 26

def run
  provider = ::Katello::Provider.find(input[:provider][:id])
  provider.import_manifest(input[:path],
                           force:  input[:force])
end