forked from TrueCloudLab/frostfs-testcases
syntax fixes in neofs_verbs.py
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
parent
7a21456201
commit
040f648c61
1 changed files with 6 additions and 7 deletions
|
@ -133,8 +133,8 @@ def delete_object(wif: str, cid: str, oid: str, bearer: str="", options: str="")
|
||||||
'''
|
'''
|
||||||
cmd = (
|
cmd = (
|
||||||
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} '
|
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} '
|
||||||
f'object delete --cid {cid} --oid {oid} {options}'
|
f'object delete --cid {cid} --oid {oid} {options} '
|
||||||
f'{"--bearer " + bearer if bearer else ""} '
|
f'{"--bearer " + bearer if bearer else ""}'
|
||||||
)
|
)
|
||||||
output = _cmd_run(cmd)
|
output = _cmd_run(cmd)
|
||||||
id_str = output.split('\n')[1]
|
id_str = output.split('\n')[1]
|
||||||
|
@ -162,7 +162,7 @@ def get_range(wif: str, cid: str, oid: str, range_file: str, bearer: str,
|
||||||
cmd = (
|
cmd = (
|
||||||
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} '
|
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} '
|
||||||
f'object range --cid {cid} --oid {oid} --range {range_cut} '
|
f'object range --cid {cid} --oid {oid} --range {range_cut} '
|
||||||
f'--file {ASSETS_DIR}/{range_file} {options}'
|
f'--file {ASSETS_DIR}/{range_file} {options} '
|
||||||
f'{"--bearer " + bearer if bearer else ""} '
|
f'{"--bearer " + bearer if bearer else ""} '
|
||||||
)
|
)
|
||||||
_cmd_run(cmd)
|
_cmd_run(cmd)
|
||||||
|
@ -190,13 +190,12 @@ def search_object(wif: str, cid: str, keys: str="", bearer: str="", filters: dic
|
||||||
if filters:
|
if filters:
|
||||||
filters_result += "--filters "
|
filters_result += "--filters "
|
||||||
logger.info(filters)
|
logger.info(filters)
|
||||||
for key, value in filters.items():
|
filters_result += ','.join(map(lambda i: f"'{i} EQ {filters[i]}'", filters))
|
||||||
filters_result += f"'{key} EQ {value}' "
|
|
||||||
|
|
||||||
cmd = (
|
cmd = (
|
||||||
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} '
|
f'{NEOFS_CLI_EXEC} --rpc-endpoint {NEOFS_ENDPOINT} --wallet {wif} '
|
||||||
f'object search {keys} --cid {cid} {filters_result} {options}'
|
f'object search {keys} --cid {cid} {filters_result} {options} '
|
||||||
f'{"--bearer " + bearer if bearer else ""} '
|
f'{"--bearer " + bearer if bearer else ""}'
|
||||||
)
|
)
|
||||||
output = _cmd_run(cmd)
|
output = _cmd_run(cmd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue