Skip to content

Commit 21b49fe

Browse files
committed
remove version from schema
1 parent 2dcea66 commit 21b49fe

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

src/warnet/graph_schema.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616
"node": {
1717
"type": "object",
1818
"properties": {
19-
"version": {
20-
"type": "string",
21-
"comment": "Bitcoin Core version with an available Warnet tank image on Dockerhub. May also be a GitHub repository with format user/repository:branch to build from source code"
22-
},
2319
"image": {
2420
"type": "string",
21+
"default": "bitcoindevproject/bitcoin:v27.0",
2522
"comment": "Bitcoin Core Warnet tank image on Dockerhub with the format repository/image:tag"
2623
},
2724
"bitcoin_config": {
@@ -74,10 +71,6 @@
7471
"default": "{'requests':{'cpu':'500m', 'memory':'500Mi'}, 'limits':{'cpu':'1000m', 'memory':'1500Mi'}}"
7572
}
7673
},
77-
"oneOf": [
78-
{"required": ["version"]},
79-
{"required": ["image"]}
80-
],
8174
"additionalProperties": false,
8275
"required": []
8376
},

src/warnet/utils.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,15 +424,7 @@ def create_cycle_graph(
424424

425425
# populate our custom fields
426426
graph_schema = load_schema()
427-
for i, node in enumerate(graph.nodes()):
428-
if random_version:
429-
graph.nodes[node]["version"] = random.choice(WEIGHTED_TAGS)
430-
else:
431-
# One node demoing the image tag
432-
if i == 1:
433-
graph.nodes[node]["image"] = f"bitcoindevproject/bitcoin:{version}"
434-
else:
435-
graph.nodes[node]["version"] = version
427+
for node in graph.nodes():
436428
for property, specs in graph_schema["node"]["properties"].items():
437429
value = graph.nodes[node].get(property, specs.get("default"))
438430
graph.nodes[node][property] = value

0 commit comments

Comments
 (0)