2020-07-01 02:28:31 +00:00
import os
2020-04-30 13:14:32 +00:00
2021-05-07 12:14:37 +00:00
# Common NeoFS variables can be declared from neofs-dev-env env variables.
# High priority is accepted for those envs.
2021-10-07 11:28:31 +00:00
CONTAINER_WAIT_INTERVAL = " 1m "
2022-05-24 13:36:17 +00:00
SIMPLE_OBJ_SIZE = 1000
COMPLEX_OBJ_SIZE = 2000
2021-05-07 12:14:37 +00:00
2022-02-17 15:20:56 +00:00
MAINNET_BLOCK_TIME = os . getenv ( ' MAINNET_BLOCK_TIME ' , " 1s " )
2021-05-07 12:14:37 +00:00
MAINNET_TIMEOUT = os . getenv ( ' MAINNET_TIMEOUT ' , " 1min " )
2021-04-20 09:51:53 +00:00
MORPH_BLOCK_TIME = os . getenv ( " MORPH_BLOCK_TIME " , ' 1s ' )
2021-04-20 13:11:27 +00:00
NEOFS_CONTRACT_CACHE_TIMEOUT = os . getenv ( " NEOFS_CONTRACT_CACHE_TIMEOUT " , " 30s " )
2021-11-08 09:57:19 +00:00
2022-06-09 13:08:11 +00:00
# TODO: change to NEOFS_STORAGE_DEFAULT_GC_REMOVER_SLEEP_INTERVAL
2021-11-08 09:57:19 +00:00
2021-10-04 16:16:49 +00:00
SHARD_0_GC_SLEEP = os . getenv ( " NEOFS_STORAGE_SHARD_0_GC_REMOVER_SLEEP_INTERVAL " , " 1m " )
2021-05-07 12:14:37 +00:00
2021-04-20 13:11:27 +00:00
NEOFS_ENDPOINT = os . getenv ( " NEOFS_ENDPOINT " , " s01.neofs.devenv:8080 " )
2021-07-08 09:49:46 +00:00
NEOGO_CLI_EXEC = os . getenv ( " NEOGO_EXECUTABLE " , " neo-go " )
2021-04-25 10:43:39 +00:00
2022-03-04 13:37:24 +00:00
NEO_MAINNET_ENDPOINT = os . getenv ( " NEO_MAINNET_ENDPOINT " , ' http://main-chain.neofs.devenv:30333 ' )
2022-06-13 20:33:09 +00:00
MORPH_ENDPOINT = os . getenv ( " MORPH_ENDPOINT " , ' http://morph-chain.neofs.devenv:30333 ' )
2021-04-20 13:11:27 +00:00
HTTP_GATE = os . getenv ( " HTTP_GATE " , ' http://http.neofs.devenv ' )
S3_GATE = os . getenv ( " S3_GATE " , ' https://s3.neofs.devenv:8080 ' )
2021-09-09 13:36:34 +00:00
GAS_HASH = ' 0xd2a4cff31913016155e38e474a2c06d08be276cf '
2021-04-20 09:51:53 +00:00
2022-06-13 20:33:09 +00:00
NEOFS_CONTRACT = os . getenv ( " NEOFS_IR_CONTRACTS_NEOFS " )
2021-04-25 10:43:39 +00:00
2021-06-01 12:07:31 +00:00
ASSETS_DIR = os . getenv ( " ASSETS_DIR " , " TemporaryDir/ " )
2022-07-11 10:58:40 +00:00
DEVENV_PATH = os . getenv ( " DEVENV_PATH " , " ../neofs-dev-env " )
2022-07-12 08:23:48 +00:00
CLI_CONFIGS_PATH = os . getenv ( " CLI_CONFIGS_PATH " , f " { os . getcwd ( ) } /neofs_cli_configs " )
2021-06-25 13:44:42 +00:00
2022-06-09 13:08:11 +00:00
MORPH_MAGIC = os . getenv ( " MORPH_MAGIC " )
2021-09-09 08:13:37 +00:00
2022-07-11 10:58:40 +00:00
STORAGE_RPC_ENDPOINT_1 = os . getenv ( " STORAGE_RPC_ENDPOINT_1 " , " s01.neofs.devenv:8080 " )
STORAGE_RPC_ENDPOINT_2 = os . getenv ( " STORAGE_RPC_ENDPOINT_2 " , " s02.neofs.devenv:8080 " )
STORAGE_RPC_ENDPOINT_3 = os . getenv ( " STORAGE_RPC_ENDPOINT_3 " , " s03.neofs.devenv:8080 " )
STORAGE_RPC_ENDPOINT_4 = os . getenv ( " STORAGE_RPC_ENDPOINT_4 " , " s04.neofs.devenv:8080 " )
2022-07-05 11:55:16 +00:00
2022-07-11 10:58:40 +00:00
STORAGE_CONTROL_ENDPOINT_1 = os . getenv ( " STORAGE_CONTROL_ENDPOINT_1 " , " s01.neofs.devenv:8081 " )
STORAGE_CONTROL_ENDPOINT_2 = os . getenv ( " STORAGE_CONTROL_ENDPOINT_2 " , " s02.neofs.devenv:8081 " )
STORAGE_CONTROL_ENDPOINT_3 = os . getenv ( " STORAGE_CONTROL_ENDPOINT_3 " , " s03.neofs.devenv:8081 " )
STORAGE_CONTROL_ENDPOINT_4 = os . getenv ( " STORAGE_CONTROL_ENDPOINT_4 " , " s04.neofs.devenv:8081 " )
2022-07-14 07:33:45 +00:00
STORAGE_CONTROL_ENDPOINT_PRIVATE = os . getenv ( " STORAGE_CONTROL_ENDPOINT_PRIVATE " , " false " ) . lower ( ) == " true "
2022-07-05 11:55:16 +00:00
2022-07-11 10:58:40 +00:00
STORAGE_WALLET_PATH_1 = os . getenv ( " STORAGE_WALLET_PATH_1 " , f " { DEVENV_PATH } /services/storage/wallet01.json " )
STORAGE_WALLET_PATH_2 = os . getenv ( " STORAGE_WALLET_PATH_2 " , f " { DEVENV_PATH } /services/storage/wallet02.json " )
STORAGE_WALLET_PATH_3 = os . getenv ( " STORAGE_WALLET_PATH_3 " , f " { DEVENV_PATH } /services/storage/wallet03.json " )
STORAGE_WALLET_PATH_4 = os . getenv ( " STORAGE_WALLET_PATH_4 " , f " { DEVENV_PATH } /services/storage/wallet04.json " )
STORAGE_WALLET_PATH = STORAGE_WALLET_PATH_1
2022-07-05 11:55:16 +00:00
NEOFS_NETMAP_DICT = {
' s01 ' : {
' rpc ' : STORAGE_RPC_ENDPOINT_1 ,
' control ' : STORAGE_CONTROL_ENDPOINT_1 ,
2022-07-11 10:58:40 +00:00
' wallet_path ' : STORAGE_WALLET_PATH_1 ,
2022-07-05 11:55:16 +00:00
' UN-LOCODE ' : ' RU MOW '
} ,
' s02 ' : {
' rpc ' : STORAGE_RPC_ENDPOINT_2 ,
' control ' : STORAGE_CONTROL_ENDPOINT_2 ,
2022-07-11 10:58:40 +00:00
' wallet_path ' : STORAGE_WALLET_PATH_2 ,
2022-07-05 11:55:16 +00:00
' UN-LOCODE ' : ' RU LED '
} ,
' s03 ' : {
' rpc ' : STORAGE_RPC_ENDPOINT_3 ,
' control ' : STORAGE_CONTROL_ENDPOINT_3 ,
2022-07-11 10:58:40 +00:00
' wallet_path ' : STORAGE_WALLET_PATH_3 ,
2022-07-05 11:55:16 +00:00
' UN-LOCODE ' : ' SE STO '
} ,
' s04 ' : {
' rpc ' : STORAGE_RPC_ENDPOINT_4 ,
' control ' : STORAGE_CONTROL_ENDPOINT_4 ,
2022-07-11 10:58:40 +00:00
' wallet_path ' : STORAGE_WALLET_PATH_4 ,
2022-07-05 11:55:16 +00:00
' UN-LOCODE ' : ' FI HEL '
} ,
}
2021-11-08 09:57:19 +00:00
NEOFS_NETMAP = [ i [ ' rpc ' ] for i in NEOFS_NETMAP_DICT . values ( ) ]
2021-11-03 12:48:31 +00:00
NEOGO_EXECUTABLE = os . getenv ( ' NEOGO_EXECUTABLE ' , ' neo-go ' )
NEOFS_CLI_EXEC = os . getenv ( ' NEOFS_CLI_EXEC ' , ' neofs-cli ' )
2022-02-01 13:42:41 +00:00
2022-07-13 14:30:57 +00:00
# Config of user's wallet that we use to run the tests
2022-07-12 08:23:48 +00:00
WALLET_CONFIG = f " { CLI_CONFIGS_PATH } /empty_passwd.yml "
2022-07-13 14:30:57 +00:00
2022-07-11 10:58:40 +00:00
MAINNET_WALLET_PATH = os . getenv ( " MAINNET_WALLET_PATH " , f " { DEVENV_PATH } /services/chain/node-wallet.json " )
2022-07-13 14:30:57 +00:00
MAINNET_WALLET_CONFIG = os . getenv ( " MAINNET_WALLET_CONFIG " , f " { CLI_CONFIGS_PATH } /one_wallet_password.yml " )
MAINNET_SINGLE_ADDR = " NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP "
2022-07-12 08:23:48 +00:00
MAINNET_WALLET_PASS = os . getenv ( " MAINNET_WALLET_PASS " , " one " )
2022-07-13 14:30:57 +00:00
2022-07-11 10:58:40 +00:00
IR_WALLET_PATH = os . getenv ( " IR_WALLET_PATH " , f " { DEVENV_PATH } /services/ir/wallet01.json " )
2022-07-12 08:23:48 +00:00
IR_WALLET_CONFIG = os . getenv ( " IR_WALLET_CONFIG " , f " { CLI_CONFIGS_PATH } /one_wallet_password.yml " )
IR_WALLET_PASS = os . getenv ( " IR_WALLET_PASS " , " one " )
2022-07-13 14:30:57 +00:00
2022-07-12 08:23:48 +00:00
S3_GATE_WALLET_PATH = os . getenv ( " S3_GATE_WALLET_PATH " , f " { DEVENV_PATH } /services/s3_gate/wallet.json " )
S3_GATE_WALLET_PASS = os . getenv ( " S3_GATE_WALLET_PASS " , " s3 " )
2022-07-01 17:30:07 +00:00
2022-07-14 07:33:45 +00:00
# Parameters that control SSH connection to storage node
STORAGE_NODE_SSH_USER = os . getenv ( " STORAGE_NODE_SSH_USER " )
STORAGE_NODE_SSH_PASSWORD = os . getenv ( " STORAGE_NODE_SSH_PASSWORD " )
STORAGE_NODE_SSH_PRIVATE_KEY_PATH = os . getenv ( " STORAGE_NODE_SSH_PRIVATE_KEY_PATH " )
# Parameters that control resources located on the storage node:
# STORAGE_NODE_BIN_PATH - path to directory that contains CLI tools
# STORAGE_NODE_CONFIG_PATH - configuration file for neofs-cli on the storage node
STORAGE_NODE_BIN_PATH = os . getenv ( " STORAGE_NODE_BIN_PATH " , f " { DEVENV_PATH } /vendor " )
2022-07-13 14:30:57 +00:00
STORAGE_NODE_CONFIG_PATH = os . getenv ( " STORAGE_NODE_CONFIG_PATH " , f " { DEVENV_PATH } /services/storage/cli-cfg.yml " )
2022-07-14 07:33:45 +00:00
STORAGE_NODE_WALLET_PATH = os . getenv ( " STORAGE_NODE_WALLET_PATH " ) # allows to override path to wallet that was given in STORAGE_NODE_CONFIG_PATH, this is temp parameter, should be fixed in environment setup
2022-07-13 14:30:57 +00:00
# Path and config for neofs-adm utility. Optional if tests are running against devenv
NEOFS_ADM_EXEC = os . getenv ( " NEOFS_ADM_EXEC " )
NEOFS_ADM_CONFIG_PATH = os . getenv ( " NEOFS_ADM_CONFIG_PATH " )
2022-07-05 10:17:36 +00:00
2022-07-14 07:33:45 +00:00
FREE_STORAGE = os . getenv ( " FREE_STORAGE " , " false " ) . lower ( ) == " true "