[Pulp-list] Method \"DELETE\" not allowed on content/rpm/packages/

David Davis daviddavis at redhat.com
Thu May 16 14:17:16 UTC 2019


Juan,

We have removed the ability to remove a single content unit (for now)
because it could potentially interfere with other tasks like sync. We may
try to bring it back after 3.0. For now, you should use orphan cleanup:

http DELETE http://localhost:24817/pulp/api/v3/orphans/

There's no docs on this though which is why it isn't obvious so I filed an
issue to add documentation[1].

[0] https://pulp.plan.io/issues/3445
[1] https://pulp.plan.io/issues/4831

David


On Thu, May 16, 2019 at 9:35 AM Juan Cabrera <juan.cabrera at unamur.be> wrote:

> Hi pulp people,
>
> I'm learning how to create and add rpm package in a own local repo with
> pulp3.
>
> Doing my test, I realize that I can not delete a content and therefore I
> can not delete the corresponding artifact.
>
> I do not know if this is what is expected.
>
> I have those rpm packages
>
> [vagrant at dev-pulp-master ~]$ http $PORT/pulp/api/v3/content/rpm/packages/
> | jq -r '.results[] | .location_href,._href,._artifact'
> apr-1.4.8-3.el7_4.1.x86_64.rpm
> /pulp/api/v3/content/rpm/packages/fb79efc3-c9c1-4567-9fba-a06465124a9a/
> /pulp/api/v3/artifacts/08f6465b-8f4f-4ce8-9a24-a1c2ed873fa8/
> apr-util-1.5.2-6.el7.x86_64.rpm
> /pulp/api/v3/content/rpm/packages/81b92d30-44a2-4c25-8e9c-be2c5681f2a4/
> /pulp/api/v3/artifacts/733e8371-2448-4a4b-849c-fb842dcd933b/
> centos-logos-70.0.6-3.el7.centos.noarch.rpm
> /pulp/api/v3/content/rpm/packages/e1ea2982-207f-4ed1-addb-02bafd5b702a/
> /pulp/api/v3/artifacts/48245c81-6ce2-411e-a3a7-485df9c5ed43/
> httpd-2.4.6-89.el7.centos.x86_64.rpm
> /pulp/api/v3/content/rpm/packages/fbd746b3-1f0f-49e2-8031-9350bb757c1b/
> /pulp/api/v3/artifacts/e61468d5-0a61-4d18-8769-b36a82ea635b/
> httpd-tools-2.4.6-89.el7.centos.x86_64.rpm
> /pulp/api/v3/content/rpm/packages/15e680a8-e551-40e2-a016-df21f6eba022/
> /pulp/api/v3/artifacts/2332b7d5-c74b-4167-954a-47f9641e53a3/
> mailcap-2.1.41-2.el7.noarch.rpm
> /pulp/api/v3/content/rpm/packages/4ade7580-2bbb-456c-ae06-c13a654e9205/
> /pulp/api/v3/artifacts/80a46015-845f-49b1-a213-7a90000de5cb/
>
> If I want to remove one of them:
>
> [vagrant at dev-pulp-master ~]$ http DELETE
> $PORT/pulp/api/v3/content/rpm/packages/fb79efc3-c9c1-4567-9fba-a06465124a9a/
> HTTP/1.1 405 Method Not Allowed
> Allow: GET, HEAD, OPTIONS
> Connection: close
> Content-Length: 43
> Content-Type: application/json
> Date: Thu, 16 May 2019 13:30:25 GMT
> Server: gunicorn/19.9.0
> Vary: Accept, Cookie
> X-Frame-Options: SAMEORIGIN
>
> {
>     "detail": "Method \"DELETE\" not allowed."
> }
>
> And for the corresponding artifact I get:
>
> [vagrant at dev-pulp-master ~]$ http DELETE
> $PORT/pulp/api/v3/artifacts/08f6465b-8f4f-4ce8-9a24-a1c2ed873fa8/
> HTTP/1.1 409 Conflict
> Allow: GET, DELETE, HEAD, OPTIONS
> Connection: close
> Content-Length: 82
> Content-Type: application/json
> Date: Thu, 16 May 2019 13:31:13 GMT
> Server: gunicorn/19.9.0
> Vary: Accept, Cookie
> X-Frame-Options: SAMEORIGIN
>
> {
>     "detail": "The Artifact cannot be deleted because it is associated
> with Content."
> }
>
> It could be interesting to have the possibility to remove a wrong content
> isn't it ?
>
> Sincerely
>
> Juan Cabrera
> --
>
> Juan CABRERA
> Correspondant informatique
> Département de Mathématiques
>
> T. 081724919
> juan.cabrera at unamur.be
> http://staff.unamur.be/jbcabrer
>
> Université de Namur ASBL
> Rue de Bruxelles 61 - 5000 Namur
> Belgique
>
> Let’s respect the environment together.
> Only print this message if necessary!
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190516/76271f4b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipfocmkmpnocnaon.png
Type: image/png
Size: 9356 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190516/76271f4b/attachment.png>


More information about the Pulp-list mailing list