Project

Profile

Help

Issue #1576

content type mongo id searches not working

Added by semyers almost 5 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Master
Platform Release:
2.8.3
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

In vagrant:

Get the zoo5 repo from -> https://github.com/Katello/runcible/tree/master/test/fixtures/repositories/zoo5
Steps below will assume file:///var/www/repositories/zoo5 is the destination

$ pulp-admin rpm repo create --repo-id=ideate --feed=file:///var/www/repositories/zoo5
$ pulp-admin rpm repo sync run --repo-id=ideate
$ phttp POST https://localhost/pulp/api/v2/content/units/rpm/search/ <<< '{"criteria":{"filters":{"_id":{"$in":["0d871a45-ac63-4fca-a059-a79a61386d61","296c7bab-6823-422a-8a3c-622589debaa3","5a0aeee4-1957-4f15-ad18-e79012575906"]}}}, "include_repos":true}'

Those IDs are specific to that sync of the repo, so some poking around in mongo might be needed to find ids for the search.

Another partha blocker related to serialization of pymongo "objects". :)

pulp-2.7.1-rpm-unit.txt (3.01 KB) pulp-2.7.1-rpm-unit.txt this is how pulp 2.7.1 stored an rpm in mongo mhrivnak, 01/24/2016 01:45 AM

History

#1 Updated by mhrivnak almost 5 years ago

I'm attaching a file that shows how rpms were stored in pulp 2.7.1. Note that the _id appears to be a UUID. There is no ObjectId.

#2 Updated by paji@redhat.com almost 5 years ago

  • Version set to Master

So I applied
https://github.com/pulp/pulp/pull/2354
https://github.com/pulp/pulp_rpm/pull/780/
https://github.com/pulp/pulp/pull/2355
In that order

Now I get a different issue. Its kinda related because my test that was preparing params for the above test failed.

the following call

path = /pulp/api/v2/content/units/rpm/search/
 args = post,{"criteria":{}},{"content_type"=>"application/json", "accept"=>"application/json"}

Returned

[
{....
 "_id": {"$oid"=>"56a421cad01ec048d1e820d1"}
 ...
}
]

instead of

[
{....
 "_id": "56a421cad01ec048d1e820d1"
 ...
}
]

So my code fails making sense of {"$oid"=>"56a421cad01ec048d1e820d1"} where it used to expect a string before

#3 Updated by mhrivnak almost 5 years ago

Confirmed that this call on 2.7.1 returns a simple string for the "_id" attribute. Excerpt from the same call:

 {
        "_content_type_id": "rpm",
        "_href": "/pulp/api/v2/content/units/rpm/89fe8800-73cb-4da5-a9f8-5bb6405b75bb/",
        "_id": "89fe8800-73cb-4da5-a9f8-5bb6405b75bb",
        "_last_updated": "2016-01-21T04:26:45Z",

#4 Updated by mhrivnak almost 5 years ago

I tried this on master plus the patch from https://github.com/pulp/pulp/pull/2355

It appears to be handling the _id correctly now.

curl -k -E /home/vagrant/.pulp/user-cert.pem -d '{"criteria":{}}' https://localhost/pulp/api/v2/content/units/rpm/search/ | python -m json.tool

    {
        "_content_type_id": "rpm",
        "_href": "/pulp/api/v2/content/units/rpm/14e70bb8-fcf2-425b-a26e-a94da6c7162e/",
        "_id": "14e70bb8-fcf2-425b-a26e-a94da6c7162e",
        "_last_updated": "2016-01-24T19:54:10Z",
        "_storage_path": "/var/lib/pulp/content/units/rpm/14e7/14e70bb8-fcf2-425b-a26e-a94da6c7162e/kangaroo-0.2-1.noarch.rpm",

#5 Updated by paji@redhat.com almost 5 years ago

Ok sounds like I applied 1 PR too many .. But even on master with https://github.com/pulp/pulp/pull/2355 on a clean install I cant get these to work

POST request to /pulp/api/v2/content/units/erratum/search/   with params {"criteria":{"filters":{"_id":{"$in":["..value of _id.."]}}},"include_repos":true}

POST request to /pulp/api/v2/content/units/package_category/search/   with params {"criteria":{"filters":{"_id":{"$in":["..value of _id.."]}}},"include_repos":true}

POST request to /pulp/api/v2/content/units/package_group/search/   with params {"criteria":{"filters":{"_id":{"$in":["..value of _id.."]}}},"include_repos":true}

POST request to /pulp/api/v2/content/units/distribution/search/   with params {"criteria":{"filters":{"_id":{"$in":["..value of _id.."]}}},"include_repos":true}

All return blank

#6 Updated by amacdona@redhat.com almost 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to amacdona@redhat.com

#7 Updated by amacdona@redhat.com almost 5 years ago

  • Status changed from ASSIGNED to MODIFIED

#8 Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from MODIFIED to 5

#9 Updated by placko almost 5 years ago

  • Status changed from 5 to 6
$ pulp-admin status
+----------------------------------------------------------------------+
                          Status of the server
+----------------------------------------------------------------------+

Api Version:           2
Database Connection:
  Connected: True
Known Workers:
  _id:            scheduler@host.internal
  _ns:            workers
  Last Heartbeat: 2016-03-03T10:34:24Z
  _id:            reserved_resource_worker-0@host.internal
  _ns:            workers
  Last Heartbeat: 2016-03-03T10:34:56Z
  _id:            reserved_resource_worker-1@host.internal
  _ns:            workers
  Last Heartbeat: 2016-03-03T10:34:58Z
  _id:            resource_manager@host.internal
  _ns:            workers
  Last Heartbeat: 2016-03-03T10:34:58Z
Messaging Connection:
  Connected: True
Versions:
  Platform Version: 2.8.0b6

$ pulp-admin rpm repo create --repo-id=ideate --feed=file:///var/www/repositories/zoo5
Successfully created repository [ideate]

$ pulp-admin rpm repo sync run --repo-id=ideate
+----------------------------------------------------------------------+
                   Synchronizing Repository [ideate]
+----------------------------------------------------------------------+

====================================== Snip ============================================
========================================================================================

Task Succeeded

$ http POST https://host/pulp/api/v2/content/units/rpm/search/ --verify=cert.crt --auth=admin:admin <<< '{"criteria":{"filters":{"_id":{"$in":["63e93aaf-d8e1-4ca5-9499-97c440fd1ee5","0e1ab835-3d09-446b-8ed3-c7f92f0e5caf","0241a85d-282d-4fc4-bf53-ceda8a2c58d3"]}}}, "include_repos":true}'
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 8985
Content-Type: application/json; charset=utf-8
Date: Thu, 03 Mar 2016 10:05:21 GMT
Keep-Alive: timeout=5, max=10000
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5

[
    {
        "_content_type_id": "rpm",
        "_href": "/pulp/api/v2/content/units/rpm/0241a85d-282d-4fc4-bf53-ceda8a2c58d3/",
        "_id": "0241a85d-282d-4fc4-bf53-ceda8a2c58d3",
        "_last_updated": "2016-03-03T09:32:30Z",
        "_storage_path": "/var/lib/pulp/content/units/rpm/23/484b63d28afad70475a287d01996eb07f6ef26db4eff8d0e3fc9d7ba614102/cheetah-0.3-0.8.noarch.rpm",
        "arch": "noarch",
        "build_time": 1308257472,
        "buildhost": "dhcp-26-118.brq.redhat.com",
        "changelog": [],
        "checksum": "422d0baa0cd9d7713ae796e886a23e17f578f924f74880debdbb7d65fb368dae",
        "checksumtype": "sha256",
        "children": {},
        "description": "A dummy package of cheetah",
        "downloaded": true,
        "epoch": "0",
        "filename": "cheetah-0.3-0.8.noarch.rpm",
        "files": {
            "dir": [],
            "file": [
                "//cheetah.txt"
            ]
        },
        "group": "Internet/Applications",
        "header_range": {
            "end": 2016,
            "start": 280
        },
        "license": "GPLv2",
        "name": "cheetah",
        "provides": [
            {
                "epoch": "0",
                "flags": "EQ",
                "name": "cheetah",
                "release": "0.8",
                "version": "0.3"
            }
        ],
        "pulp_user_metadata": {},
        "relativepath": "cheetah-0.3-0.8.noarch.rpm",
        "release": "0.8",
        "release_sort_index": "01-0.01-8",
        "repodata": {
            "filelists": "<package arch=\"noarch\" name=\"cheetah\" pkgid=\"422d0baa0cd9d7713ae796e886a23e17f578f924f74880debdbb7d65fb368dae\">\n    <version epoch=\"0\" rel=\"0.8\" ver=\"0.3\" />\n\n    <file>//cheetah.txt</file>\n</package>\n\n",
            "other": "<package arch=\"noarch\" name=\"cheetah\" pkgid=\"422d0baa0cd9d7713ae796e886a23e17f578f924f74880debdbb7d65fb368dae\">\n    <version epoch=\"0\" rel=\"0.8\" ver=\"0.3\" />\n\n</package>\n\n",
            "primary": "<package type=\"rpm\">\n  <name>cheetah</name>\n  <arch>noarch</arch>\n  <version epoch=\"0\" rel=\"0.8\" ver=\"0.3\" />\n  <checksum pkgid=\"YES\" type=\"sha256\">422d0baa0cd9d7713ae796e886a23e17f578f924f74880debdbb7d65fb368dae</checksum>\n  <summary>A dummy package of cheetah</summary>\n  <description>A dummy package of cheetah</description>\n  <packager />\n  <url>http://tstrachota.fedorapeople.org</url>\n  <time build=\"1308257472\" file=\"1321891028\" />\n  <size archive=\"292\" installed=\"42\" package=\"2232\" />\n<location href=\"cheetah-0.3-0.8.noarch.rpm\"/>\n  <format>\n    <rpm:license>GPLv2</rpm:license>\n    <rpm:vendor />\n    <rpm:group>Internet/Applications</rpm:group>\n    <rpm:buildhost>dhcp-26-118.brq.redhat.com</rpm:buildhost>\n    <rpm:sourcerpm>cheetah-0.3-0.8.src.rpm</rpm:sourcerpm>\n    <rpm:header-range end=\"2016\" start=\"280\" />\n    <rpm:provides>\n      <rpm:entry epoch=\"0\" flags=\"EQ\" name=\"cheetah\" rel=\"0.8\" ver=\"0.3\" />\n    </rpm:provides>\n    <rpm:requires>\n      <rpm:entry name=\"/bin/sh\" pre=\"1\" />\n    </rpm:requires>\n  </format>\n</package>\n"
        },
        "repository_memberships": [
            "ideate"
        ],
        "requires": [
            {
                "epoch": null,
                "flags": null,
                "name": "/bin/sh",
                "release": null,
                "version": null
            }
        ],
        "size": 2232,
        "sourcerpm": "cheetah-0.3-0.8.src.rpm",
        "summary": "A dummy package of cheetah",
        "time": 1321891028,
        "url": "http://tstrachota.fedorapeople.org",
        "version": "0.3",
        "version_sort_index": "01-0.01-3"
    },
    ====================================== Snip ============================================
    ========================================================================================
]

$ http POST https://host/pulp/api/v2/content/units/erratum/search/ --verify=cert.crt --auth=admin:admin <<< '{"criteria":{"filters":{"_id":{"$in":["f10afe0e-26c5-47c1-a3b1-e9040391624f"]}}}, "include_repos":true}'       HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 655
Content-Type: application/json; charset=utf-8
Date: Thu, 03 Mar 2016 10:13:42 GMT
Keep-Alive: timeout=5, max=10000
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5

[
    {
        "_content_type_id": "erratum",
        "_href": "/pulp/api/v2/content/units/erratum/f10afe0e-26c5-47c1-a3b1-e9040391624f/",
        "_id": "f10afe0e-26c5-47c1-a3b1-e9040391624f",
        "_last_updated": "2016-03-03T09:32:30Z",
        "children": {},
        "description": "Empty errata",
        "from": "lzap+pub@redhat.com",
        "id": "RHEA-2010:0001",
        "issued": "2010-01-01 01:01:01",
        "pkglist": [],
        "pulp_user_metadata": {},
        "pushcount": "",
        "reboot_suggested": false,
        "references": [],
        "release": "1",
        "repository_memberships": [
            "ideate"
        ],
        "rights": "",
        "severity": "",
        "solution": "",
        "status": "stable",
        "summary": "",
        "title": "Empty errata",
        "type": "security",
        "updated": "",
        "version": "1"
    }
]

$ http POST https://host/pulp/api/v2/content/units/distribution/search/ --verify=cert.crt --auth=admin:admin <<< '{"criteria":{"filters":{"_id":{"$in":["658aa557-694f-498f-ad10-ad9f62de6d6f"]}}}, "include_repos":true}'
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 1088
Content-Type: application/json; charset=utf-8
Date: Thu, 03 Mar 2016 10:14:23 GMT
Keep-Alive: timeout=5, max=10000
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5

[
    {
        "_content_type_id": "distribution",
        "_href": "/pulp/api/v2/content/units/distribution/658aa557-694f-498f-ad10-ad9f62de6d6f/",
        "_id": "658aa557-694f-498f-ad10-ad9f62de6d6f",
        "_last_updated": "2016-03-03T09:32:30Z",
        "_storage_path": "/var/lib/pulp/content/units/distribution/9b/831256a124718bf39166b564d8e689954ff0a8f0f479ba24cfa26350109bc5",
        "arch": "x86_64",
        "children": {},
        "downloaded": true,
        "family": "Test Family",
        "files": [
            {
                "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "checksumtype": "sha256",
                "relativepath": "images/test2.img"
            },
            {
                "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "checksumtype": "sha256",
                "relativepath": "empty.iso"
            },
            {
                "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "checksumtype": "sha256",
                "relativepath": "images/test1.img"
            }
        ],
        "id": "ks-Test Family-TestVariant-16-x86_64",
        "packagedir": "",
        "pulp_user_metadata": {},
        "repository_memberships": [
            "ideate"
        ],
        "timestamp": 1323112153.09,
        "variant": "TestVariant",
        "version": "16",
        "version_sort_index": "02-16"
    }
]

$ http POST https://host/pulp/api/v2/content/units/package_group/search/ --verify=cert.crt --auth=admin:admin <<< '{"criteria":{"filters":{"_id":{"$in":["eed163a9-c442-4bcf-b95f-48610fd4bece"]}}}, "include_repos":true}'
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 596
Content-Type: application/json; charset=utf-8
Date: Thu, 03 Mar 2016 10:15:56 GMT
Keep-Alive: timeout=5, max=10000
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5

[
    {
        "_content_type_id": "package_group",
        "_href": "/pulp/api/v2/content/units/package_group/eed163a9-c442-4bcf-b95f-48610fd4bece/",
        "_id": "eed163a9-c442-4bcf-b95f-48610fd4bece",
        "_last_updated": "2016-03-03T09:32:30Z",
        "children": {},
        "conditional_package_names": [],
        "default": true,
        "default_package_names": [],
        "display_order": 1024,
        "id": "bird",
        "mandatory_package_names": [
            "penguin"
        ],
        "name": "bird",
        "optional_package_names": [],
        "pulp_user_metadata": {},
        "repo_id": "ideate",
        "repository_memberships": [
            "ideate"
        ],
        "translated_description": {},
        "translated_name": {},
        "user_visible": true
    }
]

$ http POST https://host/pulp/api/v2/content/units/package_category/search/ --verify=cert.crt --auth=admin:admin <<< '{"criteria":{"filters":{"_id":{"$in":["b40b5011-5894-4372-9472-4c0fb3310d0f"]}}}, "include_repos":true}'
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 466
Content-Type: application/json; charset=utf-8
Date: Thu, 03 Mar 2016 10:17:50 GMT
Keep-Alive: timeout=5, max=10000
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5

[
    {
        "_content_type_id": "package_category",
        "_href": "/pulp/api/v2/content/units/package_category/b40b5011-5894-4372-9472-4c0fb3310d0f/",
        "_id": "b40b5011-5894-4372-9472-4c0fb3310d0f",
        "_last_updated": "2016-03-03T09:32:30Z",
        "children": {},
        "display_order": 99,
        "id": "all",
        "name": "all",
        "packagegroupids": [
            "mammal",
            "bird"
        ],
        "pulp_user_metadata": {},
        "repo_id": "ideate",
        "repository_memberships": [
            "ideate"
        ],
        "translated_description": {},
        "translated_name": {}
    }
]

id's are spcific to the repo and were taken from mongo

#10 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#11 Updated by amacdona@redhat.com over 4 years ago

  • Status changed from CLOSED - CURRENTRELEASE to MODIFIED
  • Platform Release changed from 2.8.0 to 2.8.3

A tweak(https://github.com/pulp/pulp/pull/2500) caused this bug to be reintroduced. refixed here: https://github.com/pulp/pulp/pull/2514

#12 Updated by pthomas@redhat.com over 4 years ago

Verified

[root@mgmt5 .pulp]# rpm -qa pulp-server
pulp-server-2.8.3-0.1.beta.git.68.46caf15.el7.noarch
[root@mgmt5 .pulp]# 
[root@mgmt5 .pulp]# 
[root@mgmt5 .pulp]# curl -k -E /root/.pulp/user-cert.pem -d '{"criteria":{"filters":{"_id":{"$in":["1f06125b-4a05-46f7-8e6d-ac4a3765d132"]}}},"include_repos":true}' https://localhost/pulp/api/v2/content/units/rpm/search/ | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3097  100  2995  100   102  12088    411 --:--:-- --:--:-- --:--:-- 12076
[
    {
        "_content_type_id": "rpm",
        "_href": "/pulp/api/v2/content/units/rpm/1f06125b-4a05-46f7-8e6d-ac4a3765d132/",
        "_id": "1f06125b-4a05-46f7-8e6d-ac4a3765d132",
        "_last_updated": "2016-04-20T13:20:28Z",
        "_storage_path": "/var/lib/pulp/content/units/rpm/0a/5665b30e45aac9965694b41cb70a603004ab0a19be67dbc480f51607526a60/monkey-0.3-0.8.noarch.rpm",
        "arch": "noarch",
        "build_time": 1308257260,
        "buildhost": "dhcp-26-118.brq.redhat.com",
        "changelog": [],
        "checksum": "0e8fa50d0128fbabc7ccc5632e3fa25d39b0280169f6166cb8e2c84de8501db1",
        "checksumtype": "sha256",
        "children": {},
        "description": "A dummy package of monkey",
        "downloaded": true,
        "epoch": "0",
        "filename": "monkey-0.3-0.8.noarch.rpm",
        "files": {
            "dir": [],
            "file": [
                "//monkey.txt"
            ]
        },
        "group": "Internet/Applications",
        "header_range": {
            "end": 2016,
            "start": 280
        },
        "license": "GPLv2",
        "name": "monkey",
        "provides": [
            {
                "epoch": "0",
                "flags": "EQ",
                "name": "monkey",
                "release": "0.8",
                "version": "0.3"
            }
        ],
        "pulp_user_metadata": {},
        "relativepath": "monkey-0.3-0.8.noarch.rpm",
        "release": "0.8",
        "release_sort_index": "01-0.01-8",
        "repodata": {
            "filelists": "<package arch=\"noarch\" name=\"monkey\" pkgid=\"0e8fa50d0128fbabc7ccc5632e3fa25d39b0280169f6166cb8e2c84de8501db1\">\n    <version epoch=\"0\" rel=\"0.8\" ver=\"0.3\" />\n\n    <file>//monkey.txt</file>\n</package>\n\n",
            "other": "<package arch=\"noarch\" name=\"monkey\" pkgid=\"0e8fa50d0128fbabc7ccc5632e3fa25d39b0280169f6166cb8e2c84de8501db1\">\n    <version epoch=\"0\" rel=\"0.8\" ver=\"0.3\" />\n\n</package>\n\n",
            "primary": "<package type=\"rpm\">\n  <name>monkey</name>\n  <arch>noarch</arch>\n  <version epoch=\"0\" rel=\"0.8\" ver=\"0.3\" />\n  <checksum pkgid=\"YES\" type=\"sha256\">0e8fa50d0128fbabc7ccc5632e3fa25d39b0280169f6166cb8e2c84de8501db1</checksum>\n  <summary>A dummy package of monkey</summary>\n  <description>A dummy package of monkey</description>\n  <packager />\n  <url>http://tstrachota.fedorapeople.org</url>\n  <time build=\"1308257260\" file=\"1321891029\" />\n  <size archive=\"292\" installed=\"42\" package=\"2232\" />\n<location href=\"monkey-0.3-0.8.noarch.rpm\"/>\n  <format>\n    <rpm:license>GPLv2</rpm:license>\n    <rpm:vendor />\n    <rpm:group>Internet/Applications</rpm:group>\n    <rpm:buildhost>dhcp-26-118.brq.redhat.com</rpm:buildhost>\n    <rpm:sourcerpm>monkey-0.3-0.8.src.rpm</rpm:sourcerpm>\n    <rpm:header-range end=\"2016\" start=\"280\" />\n    <rpm:provides>\n      <rpm:entry epoch=\"0\" flags=\"EQ\" name=\"monkey\" rel=\"0.8\" ver=\"0.3\" />\n    </rpm:provides>\n    <rpm:requires>\n      <rpm:entry name=\"/bin/sh\" pre=\"1\" />\n    </rpm:requires>\n  </format>\n</package>\n"
        },
        "repository_memberships": [
            "ideate"
        ],
        "requires": [
            {
                "epoch": null,
                "flags": null,
                "name": "/bin/sh",
                "release": null,
                "version": null
            }
        ],
        "size": 2232,
        "sourcerpm": "monkey-0.3-0.8.src.rpm",
        "summary": "A dummy package of monkey",
        "time": 1321891029,
        "url": "http://tstrachota.fedorapeople.org",
        "version": "0.3",
        "version_sort_index": "01-0.01-3"
    }
]
[root@mgmt5 .pulp]# curl -k -E /root/.pulp/user-cert.pem -d '{"criteria":{"filters":{"_id":{"$in":["23eac662-c7ef-4d4d-b5d7-b0df255271e1"]}}},"include_repos":true}' https://localhost/pulp/api/v2/content/units/erratum/search/ | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   995  100   893  100   102   3468    396 --:--:-- --:--:-- --:--:--  3461
[
    {
        "_content_type_id": "erratum",
        "_href": "/pulp/api/v2/content/units/erratum/23eac662-c7ef-4d4d-b5d7-b0df255271e1/",
        "_id": "23eac662-c7ef-4d4d-b5d7-b0df255271e1",
        "_last_updated": "2016-04-20T13:20:32Z",
        "children": {},
        "description": "One package errata",
        "from": "lzap+pub@redhat.com",
        "id": "RHEA-2010:0002",
        "issued": "2010-01-01 01:01:01",
        "pkglist": [
            {
                "name": "1",
                "packages": [
                    {
                        "arch": "noarch",
                        "epoch": null,
                        "filename": "elephant-0.3-0.8.noarch.rpm",
                        "name": "elephant",
                        "release": "0.8",
                        "src": "http://www.fedoraproject.org",
                        "sum": null,
                        "version": "0.3"
                    }
                ],
                "short": ""
            }
        ],
        "pulp_user_metadata": {},
        "pushcount": "",
        "reboot_suggested": false,
        "references": [],
        "release": "1",
        "repository_memberships": [
            "ideate"
        ],
        "rights": "",
        "severity": "",
        "solution": "",
        "status": "stable",
        "summary": "",
        "title": "One package errata",
        "type": "security",
        "updated": "",
        "version": "1"
    }
]
[root@mgmt5 .pulp]# curl -k -E /root/.pulp/user-cert.pem -d '{"criteria":{"filters":{"_id":{"$in":["2901187a-aae4-4c2c-b718-7258d8ada16e"]}}},"include_repos":true}' https://localhost/pulp/api/v2/content/units/package_group/search/ | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   766  100   664  100   102   2660    408 --:--:-- --:--:-- --:--:--  2666
[
    {
        "_content_type_id": "package_group",
        "_href": "/pulp/api/v2/content/units/package_group/2901187a-aae4-4c2c-b718-7258d8ada16e/",
        "_id": "2901187a-aae4-4c2c-b718-7258d8ada16e",
        "_last_updated": "2016-04-20T13:20:32Z",
        "children": {},
        "conditional_package_names": [],
        "default": true,
        "default_package_names": [],
        "display_order": 1024,
        "id": "mammal",
        "mandatory_package_names": [
            "elephant,giraffe,cheetah,lion,monkey,penguin,squirrel,walrus",
            "penguin"
        ],
        "name": "mammal",
        "optional_package_names": [],
        "pulp_user_metadata": {},
        "repo_id": "ideate",
        "repository_memberships": [
            "ideate"
        ],
        "translated_description": {},
        "translated_name": {},
        "user_visible": true
    }
]
[root@mgmt5 .pulp]# curl -k -E /root/.pulp/user-cert.pem -d '{"criteria":{}}' https://localhost/pulp/api/v2/content/units/package_category/search/ | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   443  100   428  100    15   1732     60 --:--:-- --:--:-- --:--:--  1732
[
    {
        "_content_type_id": "package_category",
        "_href": "/pulp/api/v2/content/units/package_category/39307d12-9ac5-4876-bbef-b92e70222239/",
        "_id": "39307d12-9ac5-4876-bbef-b92e70222239",
        "_last_updated": "2016-04-20T13:20:32Z",
        "children": {},
        "display_order": 99,
        "id": "all",
        "name": "all",
        "packagegroupids": [
            "mammal",
            "bird"
        ],
        "pulp_user_metadata": {},
        "repo_id": "ideate",
        "translated_description": {},
        "translated_name": {}
    }
]
[root@mgmt5 .pulp]# curl -k -E /root/.pulp/user-cert.pem -d '{"criteria":{}}' https://localhost/pulp/api/v2/content/units/distribution/search/ | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1065  100  1050  100    15   4236     60 --:--:-- --:--:-- --:--:--  4251
[
    {
        "_content_type_id": "distribution",
        "_href": "/pulp/api/v2/content/units/distribution/128de34e-8dc0-424c-acd0-5c79e3fbc908/",
        "_id": "128de34e-8dc0-424c-acd0-5c79e3fbc908",
        "_last_updated": "2016-04-20T13:20:31Z",
        "_storage_path": "/var/lib/pulp/content/units/distribution/9b/831256a124718bf39166b564d8e689954ff0a8f0f479ba24cfa26350109bc5",
        "arch": "x86_64",
        "children": {},
        "downloaded": true,
        "family": "Test Family",
        "files": [
            {
                "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "checksumtype": "sha256",
                "relativepath": "images/test2.img"
            },
            {
                "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "checksumtype": "sha256",
                "relativepath": "empty.iso"
            },
            {
                "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "checksumtype": "sha256",
                "relativepath": "images/test1.img"
            }
        ],
        "id": "ks-Test Family-TestVariant-16-x86_64",
        "packagedir": "",
        "pulp_user_metadata": {},
        "timestamp": 1323112153.09,
        "variant": "TestVariant",
        "version": "16",
        "version_sort_index": "02-16"
    }
]
[root@mgmt5 .pulp]# 

#13 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#14 Updated by pthomas@redhat.com over 4 years ago

  • Status changed from 5 to 6

#15 Updated by semyers over 4 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#17 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF