Project

General

Profile

Bug #26871

API in satellite 6.3 to view location parameter does not resolve the location name with location ID as it used to in satellite 6.2

Added by Marek Hulán almost 2 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1566630

Description of problem:

We create parameters in Locations using API. An example of the location XYZ

In Satellite 6.2, we can list the parameters with the URL:

https://satellite62.example.com/api/v2/locations/XYZ/parameters/

However, in Satellite 6.3, we don't have the same results, we get the error:
"Location with id XYZ not found"

We have to use the ID (id of XYZ is 10) instead to get correct parameters:

https://satellite63.example.com/api/v2/locations/api/v2/locations/10/parameters/

Version-Release number of selected component (if applicable):
satellite 6.3.0

How reproducible:

100% reproducible by URL mentioned and step mentioned in the description.

API call is same in the APIDOC of satellite 6.2 and satellite 6.3 for listing out parameters associated with a location.

"GET /api/locations/:location_id/parameters"

however, in 6.2 somehow it was resolving the name of the location to its id whereas in 6.3 it is not doing the same thing, might be there is some change in code.

Actual results:

while listing the parameters with the URL:

https://satellite62.example.com/api/v2/locations/XYZ/parameters/

in Satellite 6.3, we get the error:
"Location with id XYZ not found" -->> XYZ is the location name

Expected results:

while listing the parameters with the URL:

https://satellite62.example.com/api/v2/locations/XYZ/parameters/

in Satellite 6.3, we should get parameters listed for XYZ location i.e: hostname should resolve id automatically as it used to do in satellite 6.2.

Associated revisions

Revision 68922e2d (diff)
Added by Marek Hulán 6 months ago

Fixes #26871 - restore taxonomy name as ID in API

Revision a600617c (diff)
Added by Marek Hulán 6 months ago

Refs #26871 - migrate to scope_by_resource_id

History

#1 Updated by The Foreman Bot almost 2 years ago

  • Assignee set to Marek Hulán
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6797 added

#2 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases 2.4.0 added

#3 Updated by Marek Hulán 6 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF