Skip to content

Commit

Permalink
updated schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
XaverStiensmeier committed Nov 7, 2024
1 parent deea4e4 commit 68a1abb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions bibigrid/core/utility/validate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@
Optional('terminate'): bool,
Optional('size'): int
},
Optional('volumes'): [{
Optional('name'): str,
Optional('snapshot'): str, # optional; to create volume from
# one or none of these
Optional('permanent'): bool,
Optional('semiPermanent'): bool,
Optional('exists'): bool,
Optional('mountPoint'): str,
Optional('size'): int,
Optional('fstype'): str,
Optional('type'): str}]
}
MASTER = VPN = {'type': str, 'image': str, Optional('onDemand'): bool, Optional('partitions'): [str],
Optional('features'): [str],
Expand All @@ -19,6 +30,15 @@
Optional('terminate'): bool,
Optional('size'): int
},
Optional('volumes'): {
Optional('snapshot'): str, # optional; to create volume from
# one or none of these
Optional('permanent'): bool,
Optional('semiPermanent'): bool,
Optional('mountPoint'): str,
Optional('size'): int,
Optional('fstype'): str,
Optional('type'): str}
}

# Define the schema for the configuration file
Expand Down
3 changes: 2 additions & 1 deletion documentation/markdown/features/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ workerInstance:
- holdsinformation
volumes: # optional
- name: volumeName
snapshot: snapshotName # to create volume from
snapshot: snapshotName # optional; to create volume from
# one or none of these
# permanent: False
# semiPermanent: False
# exists: False
mountPoint: /vol/test
size: 50
fstype: ext4
Expand Down

0 comments on commit 68a1abb

Please sign in to comment.