Bug 1324508

Summary: [RFE] Accept 'organization' and 'location' parameters for POST/PUT requests for discovery rules
Product: Red Hat Satellite Reporter: Andrii Balakhtar <abalakht>
Component: Discovery PluginAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bkearney, lzap
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14637
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 12:34:46 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 Andrii Balakhtar 2016-04-06 13:49:16 UTC
Description of problem:
For UI, we can create a discovery rule associated with any specific Organization or Location. Via API we can't create/update a discovery rule with org/loc - satellite doesn't accept 'organization' or 'location' params, there's also no references to such params in apidocs. It's problematic as discovery rules created via API can't be seen via UI in any specific location/organization (except the case of 'any context').

Version-Release number of selected component (if applicable):
Sat6.2 Beta Snap6

How reproducible:
Always

Steps to Reproduce:
1. Try to create a discovery rule via API with 'organization' and 'location' parameters specified
2. Try to update existing discovery rule via API with any 'organization' and 'location'
3.

Actual results:
'organization' and 'location' parameters are not accepted

Expected results:
User should be able to create a discovery rule with organization and location specified as well as update existing discovery rule with new org/loc combination.

Additional info:

Comment 3 Lukas Zapletal 2016-04-14 08:39:55 UTC
Indeed, this is a bug - we are missing the support completely. Scheduling for Discovery 6.0 upstream release.

Comment 4 Bryan Kearney 2016-06-28 14:15:01 UTC
Upstream bug assigned to szadok

Comment 5 Bryan Kearney 2016-06-28 14:15:03 UTC
Upstream bug assigned to szadok

Comment 6 Bryan Kearney 2016-07-21 16:04:02 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14637 has been closed

Comment 8 Andrii Balakhtar 2016-10-21 09:34:29 UTC
VERIFIED in Sat 6.3.0 Snap 4
Now it's possible to either create or update discovery rule with location and organization. There's one issue though - parameters `location-ids` and `organization-ids` are accepted, but not returned via POST/PUT requests. I'll fill a separate bug for that.

Comment 12 errata-xmlrpc 2018-02-21 12:34:46 UTC
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, 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-2018:0336