Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-30754

/hosts/bulk/applicable_errata API is listing installable hosts

XMLWordPrintable

    • None
    • None
    • None
    • Automated

      Description of problem:

      The following REST API is listing installable hosts but it should list applicable hosts.

      curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -u admin:redhat -d '{"included":{"ids":[<host id>]}}' https://satellite.example.com/api/v2/hosts/bulk/applicable_errata | jq 

      This is because both installable_errata and applicable_errata are calling the same partial "katello/api/v2/hosts_bulk_actions/erratum". See below:

      $ cat installable_errata.json.rabl 
      object false
      
      extends "katello/api/v2/common/metadata"
      
      node :results do
        partial("katello/api/v2/hosts_bulk_actions/erratum", :object => @collection[:results])
      end
      
      
      $ cat applicable_errata.json.rabl 
      object false
      
      extends "katello/api/v2/common/metadata"
      
      node :results do
        partial("katello/api/v2/hosts_bulk_actions/erratum", :object => @collection[:results])
      end
       

       

      How reproducible:

      Always

       

      Is this issue a regression from an earlier version:

      Not sure. Maybe not.

       

              rh-ee-pshekar Pavan Soma Shekar
              rhn-support-hyu Hao Chang Yu
              Vladimír Sedmík Vladimír Sedmík
              Ian Ballou Ian Ballou
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: