[#189] Remove wif from the output of Get Control Endpoint

Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
Elizaveta Chichindaeva 2022-06-24 15:19:25 +03:00
parent ebc0737518
commit c8a5a63791
5 changed files with 42 additions and 35 deletions

View file

@ -57,22 +57,31 @@ def verify_head_tombstone(wallet_path: str, cid: str, oid_ts: str, oid: str):
msg="Header Session OID is wrong")
@keyword('Get control endpoint with wif')
def get_control_endpoint_with_wif(endpoint_number: str = ''):
@keyword('Get control endpoint and wallet')
def get_control_endpoint_and_wallet(endpoint_number: str = ''):
"""
Gets control endpoint for a random or given node
Args:
endpoint_number (optional, str): the number of the node
in the form of 's01', 's02', etc.
given in NEOFS_NETMAP_DICT as keys
Returns:
(str): the number of the node
(str): endpoint control for the node
(str): the wallet of the respective node
"""
if endpoint_number == '':
netmap = []
for key in NEOFS_NETMAP_DICT.keys():
netmap.append(key)
endpoint_num = random.sample(netmap, 1)[0]
endpoint_num = random.choice(list(NEOFS_NETMAP_DICT.keys()))
logger.info(f'Random node chosen: {endpoint_num}')
else:
endpoint_num = endpoint_number
endpoint_values = NEOFS_NETMAP_DICT[f'{endpoint_num}']
endpoint_control = endpoint_values['control']
wif = endpoint_values['wif']
wlt = endpoint_values['wallet_path']
return endpoint_num, endpoint_control, wif
return endpoint_num, endpoint_control, wlt
@keyword('Get Locode')