From e28e31072477c2ea10fd52b5c856d0a7c23771d5 Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Thu, 5 Dec 2024 16:22:23 -0800 Subject: [PATCH] #2375: scripts: add lb_iterations to JSON data file schema validator --- scripts/LBDatafile_schema.py | 60 +++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/scripts/LBDatafile_schema.py b/scripts/LBDatafile_schema.py index a25f6d6e7e..1096750040 100644 --- a/scripts/LBDatafile_schema.py +++ b/scripts/LBDatafile_schema.py @@ -93,7 +93,65 @@ def validate_ids(field): 'bytes': float } ], - Optional('user_defined'): dict + Optional('user_defined'): dict, + Optional('lb_iterations'): [ + { + 'id': int, + 'tasks': [ + { + 'entity': And({ + Optional('collection_id'): int, + 'home': int, + Optional('id'): int, + Optional('seq_id'): int, + Optional('index'): [int], + 'type': str, + 'migratable': bool, + Optional('objgroup_id'): int + }, validate_ids), + 'node': int, + 'resource': str, + Optional('subphases'): [ + { + 'id': int, + 'time': float, + } + ], + 'time': float, + Optional('user_defined'): dict, + Optional('attributes'): dict + }, + ], + Optional('communications'): [ + { + 'type': str, + 'to': And({ + 'type': str, + Optional('id'): int, + Optional('seq_id'): int, + Optional('home'): int, + Optional('collection_id'): int, + Optional('migratable'): bool, + Optional('index'): [int], + Optional('objgroup_id'): int, + }, validate_ids), + 'messages': int, + 'from': And({ + 'type': str, + Optional('id'): int, + Optional('seq_id'): int, + Optional('home'): int, + Optional('collection_id'): int, + Optional('migratable'): bool, + Optional('index'): [int], + Optional('objgroup_id'): int, + }, validate_ids), + 'bytes': float + } + ], + Optional('user_defined'): dict + } + ] }, ] }