Skip to content

Commit

Permalink
refs #11968: add content name to repository information returned
Browse files Browse the repository at this point in the history
Currently, when a user invokes the API (or CLI) for 'available-repositories'
the repo_name returned is similar to:
   Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server

The above includes the architecture and release version; however, that
information is also returned as separate attributes.  Since the name
can be used for operations such as enable, disable, info, it would
be better to return the name similar to the following:
  Red Hat Enterprise Linux 6 Server (RPMs)

This commit adds a 'name' to the information returned.
  • Loading branch information
bbuckingham committed Sep 25, 2015
1 parent 98c7b7d commit 9217a2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/lib/actions/katello/repository_set/scan_cdn.rb
Expand Up @@ -73,6 +73,7 @@ def prepare_result(substitutions, _path)
{ substitutions: substitutions,
path: mapper.path,
repo_name: mapper.name,
name: mapper.content.name,
pulp_id: mapper.pulp_id,
enabled: !repo.nil?,
promoted: (!repo.nil? && repo.promoted?)
Expand Down
1 change: 1 addition & 0 deletions test/actions/katello/repository_set_test.rb
Expand Up @@ -107,6 +107,7 @@ class ScanCdnTest < TestBase
[{"substitutions" => {"basearch" => "x86_64", "releasever" => "6Server"},
"path" => "/product/x86_64/6Server",
"repo_name" => "Content 123 x86_64 6Server",
"name" => "Content 123",
"pulp_id" => "Empty_Organization-redhat_label-Content_123_x86_64_6Server",
"enabled" => false,
"promoted" => false}])
Expand Down

0 comments on commit 9217a2b

Please sign in to comment.