Bug 765849

Summary: RFE: Include repo ids in errata & package objects
Product: [Retired] Pulp Reporter: Justin Sherrill <jsherril>
Component: user-experienceAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: skarmark
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Justin Sherrill 2011-12-09 14:54:41 UTC
Description of problem:

When requesting packages from pulp's api the list of repos the package is in is included in the package json object returned.  For errata this is not the case.  By adding it, it would help us do searching much more easily.


Package example:

{
 "epoch"=>"0", 
 "name"=>"spacewalk-admin", 
 "arch"=>"noarch", 
 "_id"=>"7a236dfe-907c-4825-bac2-ea63dd9b10a2", 
 "repos"=>["ACME_Corporation-TestProduct-Spacewalk"], 
 "id"=>"7a236dfe-907c-4825-bac2-ea63dd9b10a2", 
 "checksum"=>{"sha"=>"47330723658eb7c440ec444436e64bf6da67fd02"},  
 "version"=>"1.4.2", 
 "filename"=>"spacewalk-admin-1.4.2-1.el6.noarch.rpm", "release"=>"1.el6"}


Errata example:
{"title"=>"Empty errata", "_id"=>"RHEA-2010:0001", "id"=>"RHEA-2010:0001", "type"=>"security", "severity"=>""}

Ideally the errata would be something like:
{"title"=>"Empty errata", "_id"=>"RHEA-2010:0001", "id"=>"RHEA-2010:0001", "type"=>"security", "severity"=>"",  "repos"=> ["repo1", "repo2"]}

Comment 1 Justin Sherrill 2011-12-09 20:18:25 UTC
Actually,  even Packages don't have the repos  entry unless we're searching.  Could we make sure that we get the "repos"   for packages and errata no matter how we're finding them?


I.e.  it shouldn't matter if its via:

- All Packages(/packages/)
- Repository Packages (/repositories/<id>/packages/ )

- All Errata 
- Repository Errata (/repositories/<id>/errata/)


Although for us, Repository Package & repository Errata are most important.

Thanks

Comment 3 Jeff Ortel 2012-01-04 21:48:46 UTC
build: 0.256

Comment 4 Preethi Thomas 2012-01-05 15:15:00 UTC
[][root@preethi ~]# rpm -q pulp
pulp-0.0.256-1.fc15.noarch
[root@preethi ~]# 


[root@preethi ~]# curl -k -u admin:admin -X GET https://localhost/pulp/api/repositories/f15/packages/ |json_reformat |more
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0[
  {
    "license": "GPLv2",
    "vendor": "Fedora Project",
    "name": "git",
    "repo_defined": true,
    "checksum": {
      "sha256": "bab42afa6adbc564421d8004c824ec64478dffdd6a7e9c96441648bd5b08151
e"
    },
    "description": "Git is a fast, scalable, distributed revision control system
 with an\nunusually rich command set that provides both high-level operations\na
nd full access to internals.\n\nThe git rpm installs the core tools with minimal
 dependencies.  To\ninstall all git packages, including tools for integrating wi
th other\nSCMs, install the git-all meta-package.",
    "filename": "git-1.7.5.1-1.fc15.x86_64.rpm",
    "download_url": "https://preethi.usersys.redhat.com//pulp/repos/released/F-1
5/GOLD/Fedora/x86_64/os/git-1.7.5.1-1.fc15.x86_64.rpm",
    "buildhost": "x86-17.phx2.fedoraproject.org",
    "repoids": [
      "f15",
      "abc"
    ],
    "epoch": "0",
    "version": "1.7.5.1",
--More--



[root@preethi ~]# curl -k -u admin:admin -X GET https://localhost/pulp/api/repositories/f15/errata/
[][root@preethi ~]#

Comment 5 Preethi Thomas 2012-02-24 20:19:03 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 6 Preethi Thomas 2012-02-24 20:19:46 UTC
Pulp v1.0 is released.