diff --git a/node_cli/configs/routes.py b/node_cli/configs/routes.py index 336fea3e..d26dccb9 100644 --- a/node_cli/configs/routes.py +++ b/node_cli/configs/routes.py @@ -36,7 +36,8 @@ 'set-domain-name', 'update-safe', ], - 'health': ['containers', 'schains', 'sgx'], + 'health': ['containers', 'schains'], + 'info': ['sgx'], 'schains': ['config', 'list', 'dkg-statuses', 'firewall-rules', 'repair', 'get'], 'ssl': ['status', 'upload'], 'wallet': ['info', 'send-eth'], diff --git a/node_cli/core/health.py b/node_cli/core/health.py index 72eb23ed..b4e7b0ee 100644 --- a/node_cli/core/health.py +++ b/node_cli/core/health.py @@ -26,6 +26,7 @@ BLUEPRINT_NAME = 'health' +INFO_BLUEPRINT_NAME = 'info' def get_containers(_all): @@ -53,7 +54,7 @@ def get_schains_checks(json_format: bool = False) -> None: def get_sgx_info(): - status, payload = get_request(blueprint=BLUEPRINT_NAME, method='sgx') + status, payload = get_request(blueprint=INFO_BLUEPRINT_NAME, method='sgx') if status == 'ok': data = payload table_data = [ diff --git a/pyproject.toml b/pyproject.toml index b2c09ef8..1401ad34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ dependencies = [ "requests-mock==1.12.1", "redis==7.1.1", "PyInstaller==6.18.0", - "skale.py-core==7.13.dev4", + "skale.py-core==7.14.dev2", ] [project.urls] diff --git a/tests/cli/schains_test.py b/tests/cli/schains_test.py index e450800a..ffefdea8 100644 --- a/tests/cli/schains_test.py +++ b/tests/cli/schains_test.py @@ -34,28 +34,48 @@ def test_ls(): { 'name': 'test_schain1', 'mainnet_owner': '0x123', - 'index_owner_list': 3, + 'index_in_owner_list': 3, 'part_of_node': 0, 'lifetime': 5, 'start_date': 1570115385, + 'start_block': 1000, 'deposit': 1000000000000000000, 'index': 3, 'generation': 1, 'originator': '0x465', - 'options': {'allocation_type': 0}, # noqa + 'schain_hash': 'c55c12fc3ded931fbc34715443023a4a72e53f32aaafa42659cbef7b60e7d06a', + 'options': { + 'multitransaction_mode': True, + 'threshold_encryption': True, + 'allocation_type': 0, + 'external_gas_difficulty': '0x01', + 'min_gas_price': None, + 'max_gas_price': None, + }, + 'active': True, }, { 'name': 'crazy_cats1', 'mainnet_owner': '0x321', - 'index_owner_list': 8, + 'index_in_owner_list': 8, 'part_of_node': 0, 'lifetime': 5, 'start_date': 1570469410, + 'start_block': 1000, 'deposit': 1000000000000000000, 'index': 8, 'generation': 0, 'originator': '0x0', - 'options': {'allocation_type': 0}, # noqa + 'schain_hash': '139f942ee2f304b59143e340621139f58a7bb37d58e30a0ec46fdd1aaf79632a', + 'options': { + 'multitransaction_mode': True, + 'threshold_encryption': True, + 'allocation_type': 0, + 'external_gas_difficulty': '0x01', + 'min_gas_price': None, + 'max_gas_price': None, + }, + 'active': True, }, ] resp_mock = response_mock(requests.codes.ok, json_data={'payload': payload, 'status': 'ok'}) diff --git a/tests/routes_test.py b/tests/routes_test.py index 39490ab3..9a346748 100644 --- a/tests/routes_test.py +++ b/tests/routes_test.py @@ -20,7 +20,7 @@ '/api/v1/node/update-safe', '/api/v1/health/containers', '/api/v1/health/schains', - '/api/v1/health/sgx', + '/api/v1/info/sgx', '/api/v1/schains/config', '/api/v1/schains/list', '/api/v1/schains/dkg-statuses',