Project

General

Profile

Bug #15889

Content-view filter and content-view update cmds should not requires --organization-id or --organization option

Added by Andrew Kofink about 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1359665
Description of problem:
In ou automation we saw that bunch of cv filter and CV update tests are failing with below error:

Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.

Earlier, automation was executing those tests without this error. I tried those tests manually and found same error like:

Create CV filter requires --organization/--organization-label/--organization-id.

----
~]# hammer v -u admin -p changeme --output=csv content-view filter create --type="rpm" --content-view-id="1" --name="test" --inclusion="true"
[ERROR 2016-07-25 01:57:53 Exception] Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
Could not create the filter:
Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
----

with --organization-id it was created. However, I think it should be created without passing --organization-id option since we are passing cv id.

~]# hammer -v -u admin -p changeme --output=csv content-view filter create --type="rpm" --content-view-id="1" --name="test" --inclusion="true" --organization-id=1
Message,Id,Name
Filter created,1,test

Similar issue with following cmds:

- content-view update
- cv filter create/update/delete

2016-07-23 17:52:31 - robottelo.ssh - DEBUG - >>> [qe-sat6-rhel6.satqe.lab.eng.rdu2.redhat.com] LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output=csv content-view update --component-ids="327" --id="355"
2016-07-23 17:52:31 - robottelo.ssh - INFO - Instantiated Paramiko client 0x7f698efcfcd0
2016-07-23 17:52:33 - robottelo.ssh - INFO - Destroying Paramiko client 0x7f698efcfcd0
2016-07-23 17:52:33 - robottelo.ssh - INFO - Destroyed Paramiko client 0x7f698efcfcd0
2016-07-23 17:52:33 - robottelo.ssh - DEBUG - <<< stderr
[ERROR 2016-07-23 17:52:33 Exception] Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
Could not update the content view:
Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
[ERROR 2016-07-23 17:52:33 Exception]

Version-Release number of selected component (if applicable):
sat62 GA snap21.1 RC build

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
cv filter create/update/delete cmds requires --organization-id option

Expected results:
--organization-id was not required earlier. Moreover when user is passing CV-id then explicitly --organization/otganization-id option should not be required.

similar issue is with cv update, why user need to pass --organization-id

Additional info:


Related issues

Related to Katello - Tracker #15825: Sprint 1 : Content-FocusedNew2016-07-24

Associated revisions

Revision 610fae67 (diff)
Added by Andrew Kofink about 3 years ago

Fixes #15889 - Resolve IDs when there are names (#426)

Resolve repository_ids only when there are repository_names

History

#1 Updated by Andrew Kofink about 3 years ago

  • Assignee set to Andrew Kofink
  • Legacy Backlogs Release (now unused) set to 143

#2 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/426 added

#3 Updated by Anonymous about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Brad Buckingham about 3 years ago

#5 Updated by The Foreman Bot about 3 years ago

  • Pull request https://github.com/Katello/katello/pull/6220 added

#6 Updated by Andrew Kofink about 3 years ago

  • Pull request deleted (https://github.com/Katello/katello/pull/6220)

Also available in: Atom PDF