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

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

Instance Method Summary collapse

Methods inherited from Abstract

#smart_proxy

Instance Method Details

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



6
7
8
9
10
11
12
13
14
15
# File 'app/lib/actions/pulp3/orchestration/repository/create.rb', line 6

def plan(repository, smart_proxy, force = false)
  sequence do
    create_action = plan_action(Actions::Pulp3::Repository::Create, repository, smart_proxy, force)
    plan_action(Actions::Pulp3::Repository::SaveVersion, repository, repository_details: create_action.output[:response])

    if repository.content_view.default? || !smart_proxy.pulp_primary?
      plan_action(Actions::Pulp3::Repository::CreateRemote, repository, smart_proxy)
    end
  end
end