Bug 766647

Summary: duplicate env creation - better error message needed
Product: [Retired] Katello Reporter: Garik Khachikyan <gkhachik>
Component: Webservice APIAssignee: Petr Chalupa <pchalupa>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 1.0CC: lzap, mkoci, pchalupa, sghai, tsanders
Target Milestone: ---Keywords: Triaged
Target Release: 1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 13:09:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Garik Khachikyan 2011-12-12 14:23:37 UTC
Description of problem:
execute `environment create --name Dev1 --org ACME_Corporation --prior=Locker` two times
On the second execution error is returning back:
---
Validation failed: Environments is invalid
---


Version-Release number of selected component (if applicable):
katello-0.1.135-2.el6.x86_64
katello-cli-0.1.23-3.el6.noarch
candlepin-0.5.4-1.el6.noarch
pulp-0.0.254-4.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. see above
2.
3.
  
Actual results:
error like "Validation failed: Environments is invalid"

Expected results:
a message telling user about environment name already taken or so.

Additional info:

Comment 1 Petr Chalupa 2012-04-24 08:21:39 UTC
fixed in 52e93499e123243cf3d800b21472790bea9e622d

Comment 2 Sachin Ghai 2012-05-16 07:24:43 UTC
verified with following katello build:

katello-0.2.35-1.el6.noarch

Error message is improved now, following message appeared when we can create duplicate env:

katello> environment create --name test --prior Library --org ACME_Corporation
Successfully created environment [ test ]
katello> environment create --name test --prior Library --org ACME_Corporation
Validation failed: Name must be unique within one organization

Comment 3 Bryan Kearney 2012-07-17 13:09:54 UTC
Moving all community bugs with fixes to closed.