-
Notifications
You must be signed in to change notification settings - Fork 326
Expand file tree
/
Copy pathel_admin_node_info.star
More file actions
41 lines (39 loc) · 1.2 KB
/
el_admin_node_info.star
File metadata and controls
41 lines (39 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
def get_enode_enr_for_node(plan, service_name, port_id):
recipe = PostHttpRequestRecipe(
endpoint="",
body='{"method":"admin_nodeInfo","params":[],"id":1,"jsonrpc":"2.0"}',
content_type="application/json",
port_id=port_id,
extract={
"enode": """.result.enode | split("?") | .[0]""",
"enr": ".result.enr",
},
)
response = plan.wait(
recipe=recipe,
field="extract.enode",
assertion="!=",
target_value="",
timeout="30m",
service_name=service_name,
)
return (response["extract.enode"], response["extract.enr"])
def get_enode_for_node(plan, service_name, port_id):
recipe = PostHttpRequestRecipe(
endpoint="",
body='{"method":"admin_nodeInfo","params":[],"id":1,"jsonrpc":"2.0"}',
content_type="application/json",
port_id=port_id,
extract={
"enode": """.result.enode | split("?") | .[0]""",
},
)
response = plan.wait(
recipe=recipe,
field="extract.enode",
assertion="!=",
target_value="",
timeout="30m",
service_name=service_name,
)
return response["extract.enode"]