33 lines
1.0 KiB
Python
33 lines
1.0 KiB
Python
from ._util import validate
|
|
|
|
__all__ = [
|
|
'linux_boards_validator'
|
|
]
|
|
|
|
|
|
def linux_boards_validator(data) -> None:
|
|
validate({
|
|
'type': 'dict',
|
|
'valuesrules': {
|
|
'type': 'dict',
|
|
'schema': {
|
|
'mdns': {'type': 'string', 'required': True},
|
|
'board': {'type': 'string', 'required': True},
|
|
'network': {'type': 'list', 'required': True, 'empty': False},
|
|
'ram': {'type': 'integer', 'required': True},
|
|
'ext_hdd': {
|
|
'type': 'list',
|
|
'schema': {
|
|
'type': 'dict',
|
|
'schema': {
|
|
'mountpoint': {'type': 'string', 'required': True},
|
|
'size': {'type': 'integer', 'required': True}
|
|
}
|
|
},
|
|
},
|
|
'services': {'type': 'list', 'empty': False},
|
|
'online': {'type': 'boolean', 'required': True}
|
|
}
|
|
}
|
|
}, data)
|