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 - organization, organization-id and organization-title of 'hammer http-proxy update' command fails with error 'Resource http_proxy not found by id '3''
Summary: organization, organization-id and organization-title of 'hammer http-proxy up...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer - Content
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks: 1774325
TreeView+ depends on / blocked
 
Reported: 2019-12-04 13:39 UTC by Jameer Pathan
Modified: 2020-01-06 11:09 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-06 11:09:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.