flux-framework / flux-accounting

bank/accounting interface for the Flux resource manager
https://flux-framework.readthedocs.io/projects/flux-accounting/en/latest/index.html
GNU Lesser General Public License v3.0
3 stars 10 forks source link

`view-user`: add a new `--list-banks` optional argument #479

Open cmoussa1 opened 3 months ago

cmoussa1 commented 3 months ago

Problem

Mentioned in #478, there is no concise way to just view a list of banks that a user belongs to without having to parse through the rest of the accounting information associated with it.


This PR adds a new optional argument to view-user called --list-banks, which just outputs a newline-delimited list of banks that a user belongs to.

$ flux account view-user testuser --list-banks
bankA
bankB
bankC

A basic test file is also added which calls this optional argument. For now, this is just built on top of #477, but I can always make it separate in case this gets reviewed first. :-)

Fixes #478

cmoussa1 commented 2 weeks ago

I force-pushed to catch up after #526, but I'm thinking now that flux-accounting has its own formatter class, perhaps I should hold off on getting this PR landed until I restructure view-user to use the new class. Then adding this feature probably becomes cleaner