Bug 1087247

Summary: Hammer Cli : Unable to create a content view using content-view create
Product: Red Hat Satellite Reporter: Tazim Kolhar <tkolhar>
Component: HammerAssignee: Dustin Tsang <dtsang>
Status: CLOSED CURRENTRELEASE QA Contact: Tazim Kolhar <tkolhar>
Severity: high Docs Contact:
Priority: high    
Version: NightlyCC: bbuckingham, bkearney, cwelton, jmontleo, mmccune, omaciel, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 14:05:08 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 Tazim Kolhar 2014-04-14 07:34:15 UTC
Description of problem:
Unable to create a content view using content-view create

Version-Release number of selected component (if applicable):

# rpm -qa | grep foreman
foreman-1.5.0-0.develop.201404091711git73f99b5.el6.noarch
foreman-compute-1.5.0-0.develop.201404091711git73f99b5.el6.noarch
rubygem-hammer_cli_foreman-0.1.0-1.201404011518git2abbfd3.git.0.37211af.el6.noarch
foreman-release-1.5.0-0.develop.201404091711git73f99b5.el6.noarch
foreman-selinux-1.5.0-0.develop.201402261344git2f43f94.el6.noarch
qetello01.usersys.redhat.com-foreman-proxy-1.0-1.noarch
foreman-libvirt-1.5.0-0.develop.201404091711git73f99b5.el6.noarch
foreman-proxy-1.5.0-0.develop.201404021018git3824d18.el6.noarch
rubygem-foreman_api-0.1.11-1.el6.noarch
qetello01.usersys.redhat.com-foreman-client-1.0-1.noarch
ruby193-rubygem-foreman-tasks-0.5.2-1.el6.noarch
foreman-postgresql-1.5.0-0.develop.201404091711git73f99b5.el6.noarch
rubygem-hammer_cli_foreman_tasks-0.0.2-1.201403312028gitdf60592.git.0.b4ebd5a.el6.noarch

How reproducible:
everytime

Steps to Reproduce:
1. hammer organization create --name testorg
Organization created

2. hammer organization info --name testorg
Id:          326
Name:        testorg
Created at:  2014/04/14 07:29:54
Updated at:  2014/04/14 07:29:55
Label:       testorg
Description:

3.hammer content-view create --name testcon --organization-id 326
Could not create the content view:
  Couldn't find organization '326'


Actual results:
unable to create content-view for Organization valid id 

Expected results:
Content-View create works

Additional info:

Comment 1 RHEL Program Management 2014-04-14 07:45:13 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Og Maciel 2014-04-14 14:29:45 UTC
Shouldn't organization-id be the organization label???

Comment 6 Sachin Ghai 2014-04-14 16:44:56 UTC
Thanks Og, I can create CV with organization label. But the help part is saying organization-id is required. I'll keep this bug open and removing the testblocker tag. thanks

[root@qetello01 ~]# hammer organization create --name s786
Organization created
[root@qetello01 ~]#  hammer organization info --name s786
Id:          327
Name:        s786
Created at:  2014/04/14 07:41:57
Updated at:  2014/04/14 07:41:58
Label:       s786
Description:

[root@qetello01 ~]# hammer content-view create --name cvq --organization-id 327
Could not create the content view:
  Couldn't find organization '327'
[root@qetello01 ~]# hammer content-view create --name cvq
Could not create the content view:
  Error: option '--organization-id' is required
  
  See: 'hammer content-view create --help'
[root@qetello01 ~]# hammer content-view create --name cvq --organization-id s786
Content view created

Comment 7 Dustin Tsang 2014-05-08 23:58:49 UTC
The latest changes in hammer prompt for "missing option to search organization" now.

$ hammer content-view create --name cvq
Could not create the content view:
  Error: Missing options to search organization

Comment 9 Tazim Kolhar 2014-05-20 07:33:46 UTC
# hammer content-view create --name testcon --organization-id 1
Content view created

Comment 10 Bryan Kearney 2014-07-02 14:05:08 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.