Skip to content

Commit

Permalink
Container Template: Parse object_labels
Browse files Browse the repository at this point in the history
  • Loading branch information
zakiva committed Jun 21, 2017
1 parent 7ff46d3 commit 8e79a30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def parse_template(template)
new_result[:container_template_parameters] = parse_template_parameters(template.parameters)
new_result[:labels] = parse_labels(template)
new_result[:objects] = template.objects.to_a.collect(&:to_h)
new_result[:object_labels] = template.labels.to_h
new_result[:container_project] = @data_index.fetch_path(path_for_entity("project"), :by_name, new_result[:namespace])
new_result
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ def parse_single_openshift_image_with_registry
'required' => true
}
],
:objects => []
:objects => [],
:labels => {
:source => 'openshift',
:type => 'created-from-template'
}
))).to eq(:name => 'example-template',
:ems_ref => '22309c35-8f70-11e5-a806-001a4a231290',
:namespace => 'test-namespace',
Expand All @@ -346,6 +350,10 @@ def parse_single_openshift_image_with_registry
:labels => [],
:objects => [],
:container_project => nil,
:object_labels => {
:source => 'openshift',
:type => 'created-from-template'
},
:container_template_parameters => [
{:name => 'IMAGE_VERSION',
:display_name => 'Image Version',
Expand Down Expand Up @@ -378,6 +386,7 @@ def parse_single_openshift_image_with_registry
:labels => [],
:objects => [],
:container_project => nil,
:object_labels => {},
:container_template_parameters => [])
end
end
Expand Down

0 comments on commit 8e79a30

Please sign in to comment.