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

feat(CLI): StorageTransferAction support #228

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

ketiltrout
Copy link
Member

This is based on my suggestion to remove the action group in #202, which I think was ill-defined.

Instead:

  • Adds an --actions flag to node show and group show to show relevant StorageTransferActions affecting the node/group.
  • Adds an --all flag to node show and group show to provide a way to list everything without having to know what lists what.
  • Adds two new commands to manipulate StorageTransferActions:
    • group auto-sync GROUP NODE to set/clear the autosync flag
    • node auto-clean NODE GROUP to set/clear the autoclean flag

For a given (NODE, GROUP) pair, these two commands modify the same row in the StorageTransferAction table (the pair has to be unique in the table). So, there's ambiguity over which command goes with which "noun". The way I've done it, the command is associated with the object that the auto-action modifies (auto-sync adds files to GROUP; auto-clean deletes files from NODE). There's probably an argument for doing it the other way; I'm not sure it matters much, so long as we are consistent about it.

Also: should the command names have a dash in them? Or would group autosync GROUP NODE etc. be better?

@ketiltrout ketiltrout requested review from ljgray and rikvl November 14, 2024 07:39
alpenhorn/cli/group/__init__.py Outdated Show resolved Hide resolved
alpenhorn/cli/node/__init__.py Outdated Show resolved Hide resolved
This is based on my suggestion to remove the `action` group in #202,
which I think was ill-defined.

Instead:

* Adds an `--actions` flag to `node show` and `group show` to
  show relevant `StorageTransferAction`s affecting the node/group.
* Adds an `--all` flag to `node show` and `group show` to provide a
  way to list everything without having to know what lists what.
* Adds two new commands to manipulate `StorageTransferAction`s:
  * `group auto-sync GROUP NODE` to set/clear the autosync flag
  * `node auto-clean NODE GROUP` to set/clear the autoclean flag

For a given (NODE, GROUP) pair, these two commands modify the same row
in the `StorageTransferAction` table (the pair has to be unique in the
table).  So, there's ambiguity over which command goes with which "noun".
The way I've done it, the command is associated with the object that the
auto-action modifies (auto-sync adds files to GROUP; auto-clean deletes
files from NODE).  There's probably an argument for doing it the other
way; I'm not sure it matters much, so long as we are consistent about
it.

Also: should the command names have a dash in them?  Or would `group
autosync GROUP NODE` etc. be better?
@ketiltrout ketiltrout force-pushed the client_transfer_actions branch from c22981c to 1f66d8d Compare November 14, 2024 20:21
@ketiltrout ketiltrout merged commit 1608a46 into master Nov 14, 2024
3 checks passed
@ketiltrout ketiltrout deleted the client_transfer_actions branch November 14, 2024 20:28
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.

2 participants