Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-121797 / 23.10 / CLI for ixdiagnose (by Qubad786) #71

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

bugclerk
Copy link

Context

This PR addresses the request to enhance the ixdiagnose command-line interface (CLI). We've added subcommands and multiple options to provide users with increased flexibility when generating system debug from command line.

Features

Streamlined debugging with Python Click framework.
Added CLI commands: run, artifact, plugin.
Options for serialization, compression, exclude, timeout etc.

Example use:

ixdiagnose run --compress --serialized --> generates complete structured debug and compresses it.

ixdiagnose plugin --debug-path /tmp/debug -X vm,network --> generates only plugins' debug excluding vm,network and saves it at /tmp/debug

Appropriate help text for each command and subcommand is added.

Docs and Testing

Edited docs accordingly
Added unit tests of the feature using click.testing CliRunner

Original PR: #61
Jira URL: https://ixsystems.atlassian.net/browse/NAS-121797

(cherry picked from commit fff77e0)
(cherry picked from commit d0bc086)
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #71 (0a1fdde) into stable/cobia (5c433db) will increase coverage by 1.96%.
Report is 3 commits behind head on stable/cobia.
The diff coverage is 99.46%.

@@               Coverage Diff                @@
##           stable/cobia      #71      +/-   ##
================================================
+ Coverage         93.13%   95.09%   +1.96%     
================================================
  Files                89       90       +1     
  Lines              1675     1836     +161     
================================================
+ Hits               1560     1746     +186     
+ Misses              115       90      -25     
Files Changed Coverage Δ
ixdiagnose/plugins/smb.py 70.37% <ø> (ø)
ixdiagnose/plugins/system.py 100.00% <ø> (ø)
ixdiagnose/cli.py 98.91% <98.91%> (ø)
ixdiagnose/artifact.py 91.30% <100.00%> (+1.30%) ⬆️
ixdiagnose/config.py 100.00% <100.00%> (ø)
ixdiagnose/plugin.py 91.30% <100.00%> (+0.39%) ⬆️
...diagnose/test/pytest/integration/test_artifacts.py 100.00% <100.00%> (ø)
ixdiagnose/test/pytest/integration/test_plugins.py 100.00% <100.00%> (ø)
ixdiagnose/test/pytest/unit/run/test_cli.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yocalebo yocalebo merged commit 380799e into stable/cobia Sep 22, 2023
6 checks passed
@yocalebo yocalebo deleted the NAS-121797-23.10 branch September 22, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants