19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'app/controllers/katello/concerns/containers/steps_controller_extensions.rb', line 19
def build_state_with_katello
if step == :image && params.key?(:katello)
repo = nil
tag = nil
capsule_id = nil
if params[:repository] && params[:repository][:id]
repo = Repository.where(:id => params[:repository][:id]).first
end
if params[:tag] && params[:tag][:id]
tag = DockerTag.where(:id => params[:tag][:id]).first
end
if params[:capsule] && params[:capsule][:id]
capsule_id = params[:capsule][:id]
end
@docker_container_wizard_states_image = @state.build_image(:repository_name => repo.try(:pulp_id),
:tag => tag.try(:name),
:capsule_id => capsule_id,
:katello => true)
else
build_state_without_katello
end
end
|