[#152] Allow to set mix of policies for containers and buckets #152

Merged
fyrchik merged 1 commits from abereziny/xk6-frostfs:feature-multi-load-policy into master 2024-07-03 07:59:42 +00:00
Collaborator

Signed-off-by: a.berezin a.berezin@yadro.com

Signed-off-by: a.berezin <a.berezin@yadro.com>
abereziny force-pushed feature-multi-load-policy from 53e64370c5 to 80c8d0d652 2024-07-02 15:09:41 +00:00 Compare
fyrchik requested changes 2024-07-02 15:15:07 +00:00
@ -26,3 +26,3 @@
parser.add_argument(
"--policy",
help="Container placement policy",
help="Comma-separated container placement policies",

It breaks policies with commas in attributes being filtered.
Does parser module support list natively?

Some CLI frameworks parse --policy 1 --policy 2 as a list [1,2] -- this would be a better interface IMO

It breaks policies with commas in attributes being filtered. Does `parser` module support list natively? Some CLI frameworks parse `--policy 1 --policy 2` as a list `[1,2]` -- this would be a better interface IMO
parser.add_argument('-l','--list', action='append', help='<Required> Set flag', required=True)
# Use like:
# python arg.py -l 1234 -l 2345 -l 3456 -l 4567

from https://stackoverflow.com/questions/15753701/how-can-i-pass-a-list-as-a-command-line-argument-with-argparse

``` parser.add_argument('-l','--list', action='append', help='<Required> Set flag', required=True) # Use like: # python arg.py -l 1234 -l 2345 -l 3456 -l 4567 ``` from https://stackoverflow.com/questions/15753701/how-can-i-pass-a-list-as-a-command-line-argument-with-argparse
Poster
Collaborator

Well, it requires elimination of default=REP 2 for backward compatibility, because action=append cannot work with str, and if we define default as default=["REP 2"], it will be there always.

Testing is in progress with action='append'

Well, it requires elimination of `default=REP 2` for backward compatibility, because `action=append` cannot work with str, and if we define default as `default=["REP 2"]`, it will be there always. Testing is in progress with `action='append'`
Poster
Collaborator

Reworked with action=append

Reworked with `action=append`

The default can be made explicit in code (like if len is zero, use default)

The default can be made explicit in code (like if len is zero, use default)
fyrchik marked this conversation as resolved
abereziny force-pushed feature-multi-load-policy from 80c8d0d652 to 9b9db46a07 2024-07-02 17:45:44 +00:00 Compare
fyrchik approved these changes 2024-07-03 05:09:07 +00:00
acid-ant approved these changes 2024-07-03 07:26:42 +00:00
aarifullin approved these changes 2024-07-03 07:51:36 +00:00
fyrchik merged commit 9b9db46a07 into master 2024-07-03 07:59:42 +00:00
Sign in to join this conversation.
There is no content yet.