Repository navigation
mgr/dashboard: NVMeoF CLI fix the error message when not providing a required param - #70774
Conversation
There was a problem hiding this comment.
Pull request overview
Improves NVMe-oF CLI feedback when required parameters are omitted.
Changes:
- Adds required-parameter validation.
- Adds a regression test for missing
--trsvcid.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/pybind/mgr/dashboard/services/nvmeof_cli.py |
Adds required-argument error handling. |
src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py |
Tests missing listener port behavior. |
2d77d2e to
e33fe89
Compare
e33fe89 to
0c8369f
Compare
0c8369f to
13f9e5d
Compare
| "traddr": "10.0.65.113", | ||
| # trsvcid intentionally omitted | ||
| } | ||
| result = cmd.call(mgr=None, cmd_dict=cmd_dict, inbuf=None) |
There was a problem hiding this comment.
Nit: move import errno as _errno to the top of the file with the other imports instead of inside the test body. The module-level import errno should already be available or can be added once at the top.
Otherwise the fix and test look correct. The _check_required_params logic correctly stops at first_default and skips KNOWN_ARGS.
There was a problem hiding this comment.
haha it turns out an errno import is already there at the top of the file, so I just removed those lines. thanks for catching that!!
…required param Signed-off-by: Tomer Haskalovitch <[email protected]>
13f9e5d to
3d3e7d2
Compare
|
jenkins test make check arm64 |
replaced the cryptic error message with a clear one for the case of missing required parameter.
before:
after:
fixes: https://tracker.ceph.com/issues/78959
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.