Project

Profile

Help

Issue #1035

closed

Remove an Individual Orphaned Content Unit does not return 404

Added by ipanova@redhat.com almost 9 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.7.0 Beta
Platform Release:
2.7.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Remove an Individual Orphaned Content Unit does not return 404 in case content unit or content type do not exist

$ curl -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X DELETE -k -u admin:admin 'https://localhost/pulp/api/v2/content/orphans/rpm/123/'| python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   172  100   172    0     0    304      0 --:--:-- --:--:-- --:--:--   304
{
    "error": null,
    "result": null,
    "spawned_tasks": [
        {
            "_href": "/pulp/api/v2/tasks/e56dd67c-5560-4a75-a9ca-53de559af67a/",
            "task_id": "e56dd67c-5560-4a75-a9ca-53de559af67a"
        }
    ]
}
$ curl -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X DELETE -k -u admin:admin 'https://localhost/pulp/api/v2/content/orphans/foo/123/'| python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   172  100   172    0     0    337      0 --:--:-- --:--:-- --:--:--   337
{
    "error": null,
    "result": null,
    "spawned_tasks": [
        {
            "_href": "/pulp/api/v2/tasks/0f0460d3-ef76-4140-9ead-46a4685243b4/",
            "task_id": "0f0460d3-ef76-4140-9ead-46a4685243b4"
        }
    ]
}
Actions #1

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
  • Severity changed from 2. Medium to 1. Low
  • Version set to 2.7.0 Beta
  • Platform Release set to 2.7.0
Actions #2

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from ASSIGNED to POST

Added by ipanova@redhat.com almost 9 years ago

Revision 81c4a401 | View on GitHub

Fixing behaviour of individual orphan removal and orphan removal by type

closes #667 closes #1035 https://pulp.plan.io/issues/667 https://pulp.plan.io/issues/1035

Added by ipanova@redhat.com almost 9 years ago

Revision 81c4a401 | View on GitHub

Fixing behaviour of individual orphan removal and orphan removal by type

closes #667 closes #1035 https://pulp.plan.io/issues/667 https://pulp.plan.io/issues/1035

Actions #3

Updated by ipanova@redhat.com almost 9 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #4

Updated by mhrivnak almost 9 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #6

Updated by igulina@redhat.com almost 9 years ago

  • Status changed from 5 to 6
rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el7.noarch

>> curl -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X DELETE -k -u admin:admin 'https://localhost/pulp/api/v2/content/orphans/rpm/321/'| python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   471  100   471    0     0    919      0 --:--:-- --:--:-- --:--:--   921
{
    "_href": "/pulp/api/v2/content/orphans/rpm/321/",
    "error": {
        "code": "PLP0009",
        "data": {
            "resources": {
                "content_type": "rpm",
                "content_unit": "321"
            }
        },
        "description": "Missing resource(s): content_unit=321, content_type=rpm",
        "sub_errors": []
    },
    "error_message": "Missing resource(s): content_unit=321, content_type=rpm",
    "exception": null,
    "http_request_method": "DELETE",
    "http_status": 404,
    "resources": {
        "content_type": "rpm",
        "content_unit": "321"
    },
    "traceback": null
}

>> curl -i -H "Accept: application/json" -H "WebFrameworkSwitch: django" -X DELETE -k -u admin:admin 'https://localhost/pulp/api/v2/content/orphans/foo/123/'
HTTP/1.1 404 NOT FOUND
Date: Fri, 26 Jun 2015 19:42:42 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Content-Encoding: utf-8
Content-Length: 471
Content-Type: application/json

{"http_request_method": "DELETE", "exception": null, "error_message": "Missing resource(s): content_unit=123, content_type=foo", "_href": "/pulp/api/v2/content/orphans/foo/123/", "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"content_unit": "123", "content_type": "foo"}}, "description": "Missing resource(s): content_unit=123, content_type=foo", "sub_errors": []}, "traceback": null, "resources": {"content_unit": "123", "content_type": "foo"}}
Actions #7

Updated by amacdona@redhat.com over 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #9

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF