forked from TrueCloudLab/frostfs-testcases
Replace prepare_container*** fixtures with a function.
The change is motivated by variety of standard ACLs that will be hard to manage with set of fixtures. Remove logic that initializes wallet from remote devenv host. This setup action should be handled outside tests. Add ability to establish SSH connection using SSH key instead of password. Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
This commit is contained in:
parent
ffa40112a1
commit
84230d12e3
11 changed files with 142 additions and 199 deletions
|
@ -1,16 +1,8 @@
|
|||
"""
|
||||
A bunch of functions which might rearrange some data or
|
||||
change their representation.
|
||||
"""
|
||||
|
||||
from functools import reduce
|
||||
|
||||
|
||||
def dict_to_attrs(attrs: dict):
|
||||
def dict_to_attrs(attrs: dict) -> str:
|
||||
"""
|
||||
This function takes dictionary of object attributes and converts them
|
||||
into the string. The string is passed to `--attributes` key of the
|
||||
neofs-cli.
|
||||
This function takes a dictionary of object's attributes and converts them
|
||||
into string. The string is passed to `--attributes` key of neofs-cli.
|
||||
|
||||
Args:
|
||||
attrs (dict): object attributes in {"a": "b", "c": "d"} format.
|
||||
|
@ -18,4 +10,4 @@ def dict_to_attrs(attrs: dict):
|
|||
Returns:
|
||||
(str): string in "a=b,c=d" format.
|
||||
"""
|
||||
return reduce(lambda a, b: f"{a},{b}", map(lambda i: f"{i}={attrs[i]}", attrs))
|
||||
return ",".join(f"{key}={value}" for key, value in attrs.items())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue