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.
Description of problem:
Listing of Report Templates per location/organization through the API mentioned at-
https://<satellite-fqdn>/apidoc/v2/report_templates/index.html
is not working, it returns below error-
The page you were looking for doesn't exist (404)
Version-Release number of selected component (if applicable):
Satellite 6.5.0
RHEL7.5
How reproducible:
Always
Steps to Reproduce:
1. Create a new Report Template, associate it to a specific Organization and Location
2. Using the assigned Location id, fire the below API request-
$ curl -u admin:<pwd> -k -X GET https://<sat-fqdn>/api/organization/10/report_templates -H 'content-type: application/json'
$ curl -u admin:<pwd> -k -X GET https://<sat-fqdn>/api/location/03/report_templates -H 'content-type: application/json'
Both requests, shows the error page with below title-
The page you were looking for doesn't exist (404)
3.
Actual results:
API for listing report template per location/organization returns 404 error
Expected results:
Should list the requested report.
Additional info:
1- Proper Organization and Location is assigned to the Report Template, e.g.-
$ curl -u admin:<pwd> -k -X GET https://<sat-fqdn>/api/report_templates/154 -H 'content-type: application/json' | grep organization
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1295 0 1295 0 0 10489 0 --:--:-- --:--:-- --:--:-- 10528
{"template":"<%#\nname: Registered hosts\nsnippet: false\ntemplate_inputs:\n- name: Hosts filter\n required: false\n input_type: user\n description: Limit the report only on hosts found by this search query. Keep empty\n for report on all available hosts.\n advanced: false\nmodel: ReportTemplate\nrequire:\n- plugin: katello\n version: 3.9.0\n-%>\n<%- load_hosts(search: input('Hosts filter'), includes: [:operatingsystem, :subscriptions, :kernel_release, :interfaces, :owner, :applicable_errata, :applicable_rpms]).each_record do |host| -%>\n<%- report_row(\n 'Name': host.name,\n 'Ip': host.ip,\n 'Operating System': host.operatingsystem,\n 'Subscriptions': host_subscriptions(host),\n 'Applicable Errata': host_applicable_errata_ids(host),\n 'Owner': host.owner,\n 'Kernel': host_kernel_release(host),\n 'Latest kernel available': host_latest_applicable_rpm_version(host, 'kernel')\n ) -%>\n<%- end -%>\n<%= report_render -%>\n","default":true,"created_at":"2019-02-25 10:08:59 UTC","updated_at":"2019-02-25 10:09:04 UTC","name":"Registered hosts clone","id":154,"locations":[{"id":3,"name":"Pune","title":"Pune","description":""}],"organizations":[{"id":10,"name":"RedHat","title":"RedHat","description":""}]}
2- webUI shows Report Template properly when selecting the specific Organization & Location.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:4366
Description of problem: Listing of Report Templates per location/organization through the API mentioned at- https://<satellite-fqdn>/apidoc/v2/report_templates/index.html is not working, it returns below error- The page you were looking for doesn't exist (404) Version-Release number of selected component (if applicable): Satellite 6.5.0 RHEL7.5 How reproducible: Always Steps to Reproduce: 1. Create a new Report Template, associate it to a specific Organization and Location 2. Using the assigned Location id, fire the below API request- $ curl -u admin:<pwd> -k -X GET https://<sat-fqdn>/api/organization/10/report_templates -H 'content-type: application/json' $ curl -u admin:<pwd> -k -X GET https://<sat-fqdn>/api/location/03/report_templates -H 'content-type: application/json' Both requests, shows the error page with below title- The page you were looking for doesn't exist (404) 3. Actual results: API for listing report template per location/organization returns 404 error Expected results: Should list the requested report. Additional info: 1- Proper Organization and Location is assigned to the Report Template, e.g.- $ curl -u admin:<pwd> -k -X GET https://<sat-fqdn>/api/report_templates/154 -H 'content-type: application/json' | grep organization % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1295 0 1295 0 0 10489 0 --:--:-- --:--:-- --:--:-- 10528 {"template":"<%#\nname: Registered hosts\nsnippet: false\ntemplate_inputs:\n- name: Hosts filter\n required: false\n input_type: user\n description: Limit the report only on hosts found by this search query. Keep empty\n for report on all available hosts.\n advanced: false\nmodel: ReportTemplate\nrequire:\n- plugin: katello\n version: 3.9.0\n-%>\n<%- load_hosts(search: input('Hosts filter'), includes: [:operatingsystem, :subscriptions, :kernel_release, :interfaces, :owner, :applicable_errata, :applicable_rpms]).each_record do |host| -%>\n<%- report_row(\n 'Name': host.name,\n 'Ip': host.ip,\n 'Operating System': host.operatingsystem,\n 'Subscriptions': host_subscriptions(host),\n 'Applicable Errata': host_applicable_errata_ids(host),\n 'Owner': host.owner,\n 'Kernel': host_kernel_release(host),\n 'Latest kernel available': host_latest_applicable_rpm_version(host, 'kernel')\n ) -%>\n<%- end -%>\n<%= report_render -%>\n","default":true,"created_at":"2019-02-25 10:08:59 UTC","updated_at":"2019-02-25 10:09:04 UTC","name":"Registered hosts clone","id":154,"locations":[{"id":3,"name":"Pune","title":"Pune","description":""}],"organizations":[{"id":10,"name":"RedHat","title":"RedHat","description":""}]} 2- webUI shows Report Template properly when selecting the specific Organization & Location.