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.

Bug 1779671

Summary: organization, organization-id and organization-title of 'hammer http-proxy update' command fails with error 'Resource http_proxy not found by id '3''
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: Hammer - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: apatel, kgaikwad, mshira, ofedoren, paji, rabajaj, vijsingh
Target Milestone: 6.7.0Keywords: 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: 2020-01-06 11:09:22 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:
Bug Depends On:    
Bug Blocks: 1774325    

Description Jameer Pathan 2019-12-04 13:39:55 UTC
Description of problem:
organization, organization-id, organization-title of 'hammer http-proxy update' command fails with error 'Resource http_proxy not found by id '3''

Version-Release number of selected component (if applicable):
- Satellite 6.7.0 snap 4
- tfm-rubygem-hammer_cli

How reproducible:
- Always

Steps to Reproduce:
1. Create Http-proxy
2. Try to update organization of the Http-proxy using option organization, organization-id or organization-title.

Actual results:
hammer> http-proxy update --id 3 --organization 'Default Organization'
Could not update the http proxy:
  Resource http_proxy not found by id '3'
hammer> http-proxy update --id 3 --organization-id 3
Could not update the http proxy:
  Resource http_proxy not found by id '3'
hammer> http-proxy update --id 3 --organization-title 'Default Organization'
Could not update the http proxy:
  Resource http_proxy not found by id '3'
hammer> http-proxy update --id 3 --organization-ids 3
Http proxy updated.


Expected results:
- Http proxy should be updated.

Additional info:
- Able to update Http-proxy organization using organizations, organization-ids and organization-titles options.

Comment 3 Partha Aji 2020-01-03 20:26:26 UTC
"""

hammer> http-proxy update --id 3 --organization 'Default Organization'
Could not update the http proxy:
  Resource http_proxy not found by id '3'
hammer> http-proxy update --id 3 --organization-id 3
Could not update the http proxy:
  Resource http_proxy not found by id '3'
hammer> http-proxy update --id 3 --organization-title 'Default Organization'
Could not update the http proxy:
  Resource http_proxy not found by id '3'
hammer> http-proxy update --id 3 --organization-ids 3
Http proxy updated.
"""

--organization-id/organization/organization-title flags are used to search for the proxy itself. So if you specified a proxy via --id flag and set organization-id to some org that is not already associated to the proxy, you will see a "Resource http_proxy not found by id '3'" . That --organization-id is more of a way to "doubly verify" if that proxy or domain belongs to that org.

OTOH
 --organization-ids/organizations/organization-titles flag are used to associate the proxy to the organization. So as long as you have the right permissions you should be able to set orgs there.

BTW this behaviour is true not just for http-proxies but also things like medium, domains, compute-resource and other foreman objects.

The reported functionality seems to be working as designed. Feel free to mark it as NOTABUG unless you have concerns.

Comment 4 Jameer Pathan 2020-01-06 11:09:22 UTC
Thanks Partha for clarification, closing this issue as NOTABUG.