Description of problem: No Validation for --limit with negative number for activation_key update module, Should have the Validation failed message if update the --limit with negative number. Version-Release number of selected component (if applicable): Subscription Asset Manager Version: 1.2.5-1h.el6_3 How reproducible: 100% Steps to Reproduce: [root@i18nsamtest ~]# headpin -u admin -p admin activation_key update --name=test --org=test --new_name=test --environment=test --description=test --limit=-1 アクティベーションキー [ test ] が正常に更新されました [root@i18nsamtest ~]# headpin -u admin -p admin activation_key update --name=test --org=test --new_name=test --environment=test --description=test --limit=test Validation failed: Usage limit must be higher than current usage (0) or unlimited [root@i18nsamtest ~]# headpin -u admin -p admin activation_key update --name=test --org=test --new_name=test --environment=test --description=test --limit=0 Validation failed: Usage limit must be higher than current usage (0) or unlimited [root@i18nsamtest ~]# LANG=en_US.UTF-8 headpin -u admin -p admin activation_key update --name=test --org=test --new_name=test --environment=test --description=test --limit=2 Successfully updated activation key [ test ] [root@i18nsamtest ~]# LANG=en_US.UTF-8 headpin -u admin -p admin activation_key update --name=test --org=test --new_name=test --environment=test --description=test --limit=-1 Successfully updated activation key [ test ] ^^^^^^^^^^^^^^No Validation for --limit with negative number Actual results: No Validation for --limit with negative number. Expected results: Should have the Validation failed message if update the --limit with negative number. Additional info:
--limit=-1 denotes "unlimited" as stated in the help output. [ root@pepsi ~ ] ==> headpin -u admin -p admin activation_key update --help Usage: headpin <options> activation_key update <options> Options: -h, --help show this help message and exit --name=NAME activation key name (required) --org=ORG name of organization e.g.: ACME_Corporation (required) --environment=ENV new environment name e.g.: dev --new_name=NEW_NAME new template name --description=DESCRIPTION new description --template=TEMPLATE new template name eg: servers --limit=USAGE_LIMIT usage limit (set -1 for no limit) --add_subscription=ADD_POOLID add a pool to the activation key --remove_subscription=REMOVE_POOLID remove a pool from the activation key -g grep friendly output -v verbose, more structured output -d DELIMITER column delimiter in grep friendly output, works only with option -g --noheading Suppress any heading output. Useful if grepping the output. numbers less than -1 do not pass validation.