Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Document URL:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html/api_guide/chap-red_hat_satellite-api_guide-using_the_red_hat_satellite_api#sect-API_Guide-Uploading_Content_to_the_Satellite_Server
Section Number and Name:
5.3. Uploading Content to the Satellite Server
Describe the issue:
The suggested steps on how to upload content to Satellite via API do not work anymore.
Parameter 'version=2' doesn't seem to be valid anymore:
~~~
Mime::Type::InvalidMimeType ("version=2" is not a valid MIME type):
~~~
Parameter 'upload_ids' doesn't seem to exist anymore:
~~~
'No uploads param specified. An array of uploads to import is required.'
~~~
Suggestions for improvement:
This works on Satellite 6.9 (importing 2 RPMs at time):
- Upload request for 1st package:
# curl --header "Accept:application/json" --header "Content-Type:application/json" --request POST --user admin:redhat --data "{}" https://`hostname -f`/katello/api/repositories/1741/content_uploads
~~~
{"upload_id":"cf51a39d-fd13-4c61-8c81-df26dbca33e3","_href":"/pulp/api/v2/content/uploads/cf51a39d-fd13-4c61-8c81-df26dbca33e3/"}
~~~
- Upload of 1st package:
# curl --header "Accept:application/json" --header "Content-Type:multipart/form-data" --request PUT --user "admin:redhat" --data-urlencode "content@/root/jsenkyri/tcpdump-4.9.2-3.el7.x86_64.rpm" --data-urlencode offset=0 https://`hostname -f`/katello/api/repositories/1741/content_uploads/cf51a39d-fd13-4c61-8c81-df26dbca33e3
- Upload request for 2nd package:
# curl --header "Accept:application/json" --header "Content-Type:application/json" --request POST --user admin:redhat --data "{}" https://`hostname -f`/katello/api/repositories/1741/content_uploads
~~~
{"upload_id":"5594c4cf-d0e5-458c-be61-42ec801c426e","_href":"/pulp/api/v2/content/uploads/5594c4cf-d0e5-458c-be61-42ec801c426e/"}
~~~
- Upload of 2nd package:
# curl --header "Accept:application/json" --header "Content-Type:multipart/form-data" --request PUT --user "admin:redhat" --data-urlencode "content@/root/jsenkyri/candlepin-selinux-2.9.26-1.el7sat.noarch.rpm" --data-urlencode offset=0 https://`hostname -f`/katello/api/repositories/1741/content_uploads/5594c4cf-d0e5-458c-be61-42ec801c426e
- Import both uploads:
# curl --header "Accept:application/json" --header "Content-Type:application/json" --request PUT --user "admin:redhat" --data "{\"uploads\" : [ {\"id\" : \"cf51a39d-fd13-4c61-8c81-df26dbca33e3\" }, {\"id\" : \"5594c4cf-d0e5-458c-be61-42ec801c426e\"} ]}" https://`hostname -f`/katello/api/repositories/1741/import_uploads
Kind regards,
Jan