Bug #15889
closedContent-view filter and content-view update cmds should not requires --organization-id or --organization option
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: