Rally does not show "missing argument" error raised by argparse while parsing cli args
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rally |
Fix Released
|
Undecided
|
Piyush |
Bug Description
Consider following command- "rally verify compare"
Correct usage-
[root@piyush-104 custom_rally]# rally verify compare --uuid-1 C1 --uuid-2 C2
EXISTING BEHAVIOR-
[root@piyush-104 custom_rally]# rally verify compare
usage: rally verify compare [-h] --uuid-1 <uuid_1> --uuid-2 <uuid_2> [--csv]
Compare two verification results.
optional arguments:
-h, --help show this help message and exit
--uuid-1 <uuid_1> UUID of the first verification
--uuid-2 <uuid_2> UUID of the second verification
--csv Display results in CSV format
--html Display results in HTML format
--json Display results in JSON format
--output-file <output_file>
--threshold <threshold>
<<NO ERROR MESSAGE FOR MISSING ARGUMENT>>
EXPECTED BEHAVIOR-
Rally should also display ERROR MESSAGE saying "Missing arguments" like it does in the following case-
[root@piyush-104 custom_rally]# rally task start
Start benchmark task.
If both task_args and task_args_file are specified, they will
be merged. task_args has a higher priority so it will override
values from task_args_file.
......
......
......
Command categories:
{version,
Missing arguments: <<< ERROR MESSAGE DISPLAYED INFORMING MISSING ARGUMENT
--task
REASON-
This happens because during "rally task start" the MissingArgs exception is raised by validate_args() function at https:/
However, in case of "rally verify compare", the error is thrown at https:/
SOLUTION-
Display missing argument based on error message at https:/
Changed in rally: | |
assignee: | nobody → Piyush Raman Srivastava (pirsriva) |
Fix proposed to branch: master /review. openstack. org/298349
Review: https:/