Bug 1190890

Summary: hammer capsule content synchronization needs --help to indicate which fields are required and/or optional
Product: Red Hat Satellite Reporter: Dave Sullivan <dsulliva>
Component: HammerAssignee: Zach Huntington-Meath <zhunting>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.7CC: andrew.schofield, bbuckingham, cwelton, ehelms, kabbott, kbidarka, lpramuk, mmccune, sauchter, xdmoon
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14656
Whiteboard:
Fixed In Version: rubygem-hammer_cli_katello-0.0.22.11-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:35:30 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:

Comment 2 Dave Sullivan 2015-09-11 14:14:02 UTC
Description of problem:

When using hammer cli to synchronize content to the capsule we need to know which fields are required versus optional.

e.g. we have found that we can synchronize by --environment-id but not by --environment

[root@lonlxt90001 script]# hammer -u admin -p changeme capsule content synchronize --environment 'development' --name 'lonlxt90002.acme.com'
Could not synchronize capsule content:
  Error: environment not found
[root@lonlxt90001 script]#
 
 
[root@lonlxt90001 script]# hammer -u admin -p changeme lifecycle-environment list --organization ACME
---|-------------|------------
ID | NAME        | PRIOR
---|-------------|------------
2  | Library     |
5  | production  | stage
8  | STG         | Library
4  | stage       | development
7  | Dev         | Library
3  | development | Library
9  | PROD        | Library
---|-------------|------------
[root@lonlxt90001 script]#
 
This one works ""[root@lonlxt90001 script]# hammer -u admin -p changeme capsule content synchronize --environment-id 3 --id 2""
 


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

6.0.7


How reproducible:


see above

Actual results:


Expected results:


Additional info:

Comment 4 Zach Huntington-Meath 2016-04-14 21:10:57 UTC
Created redmine issue http://projects.theforeman.org/issues/14656 from this bug

Comment 5 Kedar Bidarkar 2016-05-24 11:18:33 UTC
[root@xyz ~]# hammer -u admin -p changeme capsule content synchronize --environment DEV --name abc.redhat.com
Could not synchronize capsule content:
  Error: Missing options to search organization
[root@xyz ~]# hammer -u admin -p changeme capsule content synchronize --environment DEV --name abc.redhat.com --help 
Usage:
    hammer capsule content synchronize [OPTIONS]

Options:
 --async                         Do not wait for the task
 --environment ENVIRONMENT_NAME  Name to search by
 --environment-id ENVIRONMENT_ID  
 --id ID                         Id of the capsule
 --name NAME                     Name to search by
 --organization NAME             Organization name
 --organization-id ID            Organization ID

[root@xyz ~]# hammer -u admin -p changeme capsule content synchronize --environment DEV --name abc.redhat.com --organization "Default Organization"
[............................................................................................................................................                                               ] [75%]


VERIFIED with sat62-snap12.1

Comment 6 Bryan Kearney 2016-07-27 11:35:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501