-
Notifications
You must be signed in to change notification settings - Fork 10
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
command suite: add new list-projects
command
#496
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,16 @@ test_expect_success 'add some queues to the DB' ' | |
flux account add-queue special --priority=99999 | ||
' | ||
|
||
test_expect_success 'list contents of project_table before adding projects' ' | ||
flux account list-projects > project_table.test && | ||
cat <<-EOF >project_table.expected | ||
project_id | project | usage | ||
-----------+---------+------ | ||
1 | * | 0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usage is reported in what unit? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usage in accounting is calculated as a product of |
||
EOF | ||
grep -f project_table.expected project_table.test | ||
' | ||
|
||
test_expect_success 'add some projects to the project_table' ' | ||
flux account add-project project_1 && | ||
flux account add-project project_2 && | ||
|
@@ -131,6 +141,18 @@ test_expect_success 'reset the projects list for an association' ' | |
grep "\"projects\": \"*\"" user5018.json | ||
' | ||
|
||
test_expect_success 'list all of the projects currently registered in project_table' ' | ||
flux account list-projects > project_table.test && | ||
cat <<-EOF >project_table.expected | ||
project_id | project | usage | ||
-----------+-----------+------ | ||
1 | * | 0.0 | ||
3 | project_2 | 0.0 | ||
4 | project_3 | 0.0 | ||
EOF | ||
grep -f project_table.expected project_table.test | ||
' | ||
|
||
test_expect_success 'remove flux-accounting DB' ' | ||
rm $(pwd)/FluxAccountingTest.db | ||
' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sorry for another newbie question but... In my mental map projects were subsidiaries of banks. So does this list only the projects for one bank, or can projects cut across banks altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Projects are created and managed separately from banks. My understanding of projects is that they can be thought of as annotations on a job that multiple users (who might belong to different banks) can make. So, this command will list all registered projects that the flux-accounting database knows about, i.e ones that are added via
flux account add-project my_project
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much @cmoussa1 for all the clarifications. I created more work for you by trying to use these reviews to learn about the interfaces we might use to solve some issues raised by our users at Sandia. I really appreciate the explanations!