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

NSFS | NC | CLI | add filter to list #7681

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

liranmauda
Copy link
Contributor

Explain the changes

add a filter to lis: using the flags --uid or/and --gid we can filter the account list
If we would like to add more fields then we can add them to the _.pick

Issues: Fixed #xxx / Gap #xxx

  1. Fixes: NSFS | NC | CLI | Extend list command with filters #7673
  2. Fixes: Account should get deleted with uid:gid combination instead of accesskey  #7585

Testing Instructions:

  1. run sudo npx jest test_nc_nsfs_account_cli.test.js
  2. run sudo node --allow-natives-syntax ./node_modules/.bin/_mocha src/test/unit_tests/test_nc_nsfs_cli.js
  • Tests added

@liranmauda
Copy link
Contributor Author

@romayalon @guymguym This PR adds the filter but only allows the filter by UID and GID or a combination.
if we would like to add fields, it is easy to add them to the _.pick

If we add a filter to the name, it will, with a combination of the wide flag, be exact as status.

In that case, I think we should also have the status, as it is more straight forward, but it is also redundant, so we can go with removing it if we choose.

@liranmauda liranmauda force-pushed the liran-manage-nsfs-fixes-2 branch from 2bcff87 to 79b008d Compare December 24, 2023 16:15
src/cmd/manage_nsfs.js Show resolved Hide resolved
src/cmd/manage_nsfs.js Show resolved Hide resolved
@romayalon
Copy link
Contributor

@liranmauda please remove the automatic closure of the github issues and add a request validation label and a comment tagging the person who opened the issue. thanks!

src/cmd/manage_nsfs.js Outdated Show resolved Hide resolved
src/cmd/manage_nsfs.js Show resolved Hide resolved
src/cmd/manage_nsfs.js Outdated Show resolved Hide resolved
@liranmauda liranmauda force-pushed the liran-manage-nsfs-fixes-2 branch from bad0bdb to ed2f010 Compare January 2, 2024 08:04
NSFS | NC | CLI | add filter to list

Signed-off-by: liranmauda <liran.mauda@gmail.com>
@liranmauda liranmauda force-pushed the liran-manage-nsfs-fixes-2 branch from ed2f010 to 8007ca2 Compare January 2, 2024 08:30
@liranmauda liranmauda merged commit 627fab9 into noobaa:master Jan 2, 2024
8 of 9 checks passed
@liranmauda liranmauda deleted the liran-manage-nsfs-fixes-2 branch January 8, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants