Bug 1313976

Summary: hammer lifecycle-environment create requires 'prior-id' if 'prior' parameter is set
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: HammerAssignee: David Davis <daviddavis>
Status: CLOSED ERRATA QA Contact: Og Maciel <omaciel>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, cwelton, omaciel, sthirugn
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/13875
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:24:34 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:

Description Roman Plevka 2016-03-02 18:10:30 UTC
Description of problem:
it's not possible to create a lifecycle environment with specifying only a prior environment by its name (using --prior paramter).
Hammer requires --prior-id to be set, rendering --prior parameter quite useless

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


How reproducible:
always

Steps to Reproduce:
1. hammer --output=csv lifecycle-environment create --prior="Library" --organization-id="1" --name="foo"


Actual results:
Missing arguments for 'prior_id'
Could not create environment:
Missing arguments for 'prior_id'


Expected results:
Lifecycle environment is created.

Additional info:
tested with snap2

Comment 7 Og Maciel 2016-03-18 20:51:41 UTC
Closed this by mistake.

Comment 8 Og Maciel 2016-03-18 20:55:26 UTC
[root@ibm-x3250m4-01 ~]# hammer -v -u admin -p changeme lifecycle-environment create --prior="Library" --organization-id="1" --name="DEV"
Environment created
[root@ibm-x3250m4-01 ~]# hammer -v -u admin -p changeme lifecycle-environment list --organization-id="1"
---|---------|--------
ID | NAME    | PRIOR
---|---------|--------
1  | Library |
2  | DEV     | Library
---|---------|--------
[root@ibm-x3250m4-01 ~]# hammer -v -u admin -p changeme lifecycle-environment create --prior="DEV" --organization-id="1" --name="QE"
Environment created
[root@ibm-x3250m4-01 ~]# hammer -v -u admin -p changeme lifecycle-environment list --organization-id="1"---|---------|--------
ID | NAME    | PRIOR
---|---------|--------
3  | QE      | DEV
1  | Library |
2  | DEV     | Library
---|---------|--------
[root@ibm-x3250m4-01 ~]# hammer -v -u admin -p changeme lifecycle-environment create --prior="Library" --organization-id="1" --name="GA"
Environment created
[root@ibm-x3250m4-01 ~]# hammer -v -u admin -p changeme lifecycle-environment list --organization-id="1"---|---------|--------
ID | NAME    | PRIOR
---|---------|--------
3  | QE      | DEV
1  | Library |
4  | GA      | Library
2  | DEV     | Library
---|---------|--------

Comment 9 Og Maciel 2016-03-18 20:56:02 UTC
Verified on Satellite 6.2.0 SNAP 4.0 Build.

Comment 12 Bryan Kearney 2016-07-27 11:24:34 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