Extend frostfs-cli container policy-playground
with ability to load configuration from files #1332
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1332
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
The most frustrated in "frostfs-cli container policy-playground" expirience is press of Ctrl+C... Next you have to recover configuration and Replication Policy. I do suggest to add ability to load conifguration and replication policy from files at launch time.
Describe the solution you'd like
--netmap-config
--rep-policy
[--one-time] - optional key to exit on complition
Each batch of "frostfs-cli container policy-playground" would return result in execution of the rep-policy over the netmap-config.
If --one-time option specified the utility would exit to bash on completion.
Possible benefit - file with Replication Policy could contain multiline policy (makes notalition more clear).
At launch utility could easily concatenate all lines to single line loading --rep-policy config.
Sounds like new feature. But depending to this request.
Add ability to export netmap properties of existing System in format of "frostfs-cli container policy-playground --netmap-config". Extremely useful to experiment with policies based on real system atttibutes. Requires valid endpoint, wallet and password of existing System.
Describe alternatives you've considered
Add command "load" for online mode to load configuration from config.
Create script to dump/convert frostfs-cli netmap to format of add rules for "frostfs-cli container policy-playground" and load rules one by one.
Don't forget to add labels!
Suggested improvement for version 1.6 - 1.7
Extend frostfs-cli container policy-playground with ability to load configuration from filesto Extendfrostfs-cli container policy-playground
with ability to load configuration from filesCtrl+C
not exit but cancel the input currently being entered.To exit need to press
Ctrl+C
twice. Maybe exit onCtrl+D
.See other interactive CLI for inspiration.
This task is big, let's split it to multiple PRs.
Fix help of
-r
key, it fetches an actual netmap from the endpoint.Add
help
command, which lists all other commands.@fyrchik don't you find this behavior misleading?
Also, could you please see the issue I created recently? I found that
readline
offers lots of shortcuts we could use. What do you think?