Class: Actions::Pulp3::Repository::Create

Inherits:
Abstract
  • Object
show all
Defined in:
app/lib/actions/pulp3/repository/create.rb

Instance Method Summary collapse

Methods inherited from Abstract

#smart_proxy

Instance Method Details

#plan(repository, smart_proxy, force = false) ⇒ Object



5
6
7
# File 'app/lib/actions/pulp3/repository/create.rb', line 5

def plan(repository, smart_proxy, force = false)
  plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :force => force)
end

#runObject



9
10
11
12
13
# File 'app/lib/actions/pulp3/repository/create.rb', line 9

def run
  repo = ::Katello::Repository.find(input[:repository_id])
  force = input[:force] || false
  output[:response] = repo.backend_service(smart_proxy).with_mirror_adapter.create(force)
end