[Pulp-list] how to get the rpm publication HREF
Juan Cabrera
juan.cabrera at unamur.be
Fri May 24 22:43:54 UTC 2019
Hi,
I have problems getting the HREF of a rpm publication to create the
distribution.
in
https://pulp-rpm.readthedocs.io/en/latest/workflows/create_sync_publish.html#create-a-publication
the command
$ http POST :24817/pulp/api/v3/publications/rpm/rpm/ repository=$REPO_HREF
Do not return the _href as in the example. It only gives the task, so I
can not get the HREF at this moment.
The next command
|$ export PUBLICATION_HREF=$(http
:24817/pulp/api/v3/publications/rpm/rpm/ | jq -r '.results[] | ._href')|
only works when there is only one publication. When there is more than
one it gives
[vagrant at dev-pulp-server ~]$ http
$PORT/pulp/api/v3/publications/rpm/rpm/ | jq -r '.results[] | ._href'
/pulp/api/v3/publications/rpm/rpm/2e145f16-95a8-4a35-b1e4-ecdb5c4c08d9/
/pulp/api/v3/publications/rpm/rpm/fa835dfb-4c33-4d7c-a74b-b0065b43ca97/
/pulp/api/v3/publications/rpm/rpm/d4cd0d2a-9979-43af-8bcb-e4d24f8f6ebd/
/pulp/api/v3/publications/rpm/rpm/c81bf7e3-8ba4-4642-a64f-fae6a73bc9ed/
In previous release the selection was done with the publisher href
|$ export PUBLICATION_HREF=$(http
:24817/pulp/api/v3/publications/rpm/rpm/ | jq -r '.results[] | ._href')|
It will be interesting to have a query parameter that allow to select a
publication based, for example, on the repository.
https://pulp-rpm.readthedocs.io/en/latest/restapi.html#operation/publications_rpm_rpm_list
Also, to get the href at the creation of the publication will help and
reduce the number of task.
Is there any solution I did not see?
Juan
--
Juan CABRERA
Correspondant informatique
Département de Mathématiques
T. 081724919
juan.cabrera at unamur.be <mailto: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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190525/c6d7faed/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ceabgghlbkmffbfa.png
Type: image/png
Size: 9356 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190525/c6d7faed/attachment.png>
More information about the Pulp-list
mailing list