Bug 1649187

Summary: Smart class parameter override values API has issue with PAGE param
Product: Red Hat Satellite Reporter: hprakash
Component: Smart VariablesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.4CC: akarsale, apatel, hprakash, inecas, mhulan, orabin, redhat, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-24 11:54:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hprakash 2018-11-13 04:54:56 UTC
Description of problem:
https://<satellite-fqdn>/api/v2/smart_class_parameters/<smart-class-param-id>/override_values?per_page=10&page=2

Note: in the above URL, considering there are > 10 records in total. In this scenario if the value of PAGE is greater than 1 then it does not work. Log shows below error-

2018-11-06 07:23:23 e53c6589 [app] [I] Started GET "/api/v2/smart_class_parameters/1332/override_values?per_page=10&page=2" for 10.76.1.131 at 2018-11-06 07:23:23 +0530
2018-11-06 07:23:23 e53c6589 [app] [I] Processing by Api::V2::OverrideValuesController#index as JSON
2018-11-06 07:23:23 e53c6589 [app] [I]   Parameters: {"per_page"=>"1", "page"=>"2", "apiv"=>"v2", "smart_class_parameter_id"=>"<smart-class-param-id>", "override_value"=>{}}
2018-11-06 07:23:23 e53c6589 [app] [I] Current user: admin (administrator)
2018-11-06 07:23:23 e53c6589 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.2ms)
2018-11-06 07:23:23 e53c6589 [app] [I] Filter chain halted as :return_if_smart_mismatch rendered or redirected
2018-11-06 07:23:23 e53c6589 [app] [I] Completed 404 Not Found in 78ms (Views: 0.4ms | ActiveRecord: 8.5ms)

Version-Release number of selected component (if applicable):
satellite-6.3.4-2.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
[root@satellite ~]# curl -k -u admin:<password> -X GET https://<satellite-fqdn>/api/v2/smart_class_parameters/<smart-class-param-id>/override_values?per_page=10&page=2
Actual results:
"Completed 404 Not Found" error

Expected results:
Respective page records should be fetched.


Additional info:

Comment 1 orabin 2018-11-13 19:08:39 UTC
How many smart class parameters do you have?

This sounds like: https://bugzilla.redhat.com/show_bug.cgi?id=1385217
The search is on the top level resource (smart class parameters) and not override values.

Comment 3 orabin 2018-12-24 11:54:31 UTC
The upstream issue connected is the same for: https://bugzilla.redhat.com/show_bug.cgi?id=1385217 so I'm closing this one as a duplicate.

*** This bug has been marked as a duplicate of bug 1385217 ***