Bug 1012282

Summary: [fork][origin_ui_99] Error message output when add member with both login and ids
Product: OpenShift Online Reporter: weiwei jiang <wjiang>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-27 02:51:14 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 weiwei jiang 2013-09-26 07:57:57 UTC
Description of problem:
When add member use both login and ids(`rhc member add yujzhang --ids 5243a1ca1df48bd9dd0000e6`), the error message "There is no account with identifier yujzhang." output. 
But if just use login or ids, it will add successfully.

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

How reproducible:
always

Steps to Reproduce:
1.rhc setup with two different users (make sure users are in openshift_broker_dev.cloud_users)
2.use another user add step 1 users to domain with both login and ids
3.check the output content

Actual results:
# rhc member add yujzhang --ids 5243a1ca1df48bd9dd0000e6
Adding 2 editors to domain ... There is no account with identifier yujzhang.
rhc member add yujzhang 
Adding 1 editor to domain ... done
# rhc member add --ids 5243a1ca1df48bd9dd0000e6
Adding 1 editor to domain ... done

Expected results:
It should prompt messages to tell user can not mix login and ids to member-add or add successfully.

Additional info:

Comment 1 Clayton Coleman 2013-09-27 02:51:14 UTC
--ids is actually a flag (it doesn't take an argument) so when you say 

  rhc member add yujzhang --ids 5243a1ca1df48bd9dd0000e6

you're actually doing:

  rhc member add yujzhang 5243a1ca1df48bd9dd0000e6 --ids 

and both values are treated as ids.  That's why the message is "There is no account with identifier ..." rather than "There is no account with login ..."