diff options
Diffstat (limited to 'lib/spack/spack/schema/os_container_mapping.py')
-rw-r--r-- | lib/spack/spack/schema/os_container_mapping.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/spack/spack/schema/os_container_mapping.py b/lib/spack/spack/schema/os_container_mapping.py new file mode 100644 index 0000000000..0476e98945 --- /dev/null +++ b/lib/spack/spack/schema/os_container_mapping.py @@ -0,0 +1,50 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +"""Schema for os-container-mapping.yaml configuration file. + +.. literalinclude:: ../spack/schema/os_container_mapping.py + :lines: 32- +""" + + +schema = { + '$schema': 'http://json-schema.org/schema#', + 'title': 'Spack release builds os/container mapping config file schema', + 'type': 'object', + 'additionalProperties': False, + 'patternProperties': { + r'containers': { + 'type': 'object', + 'default': {}, + 'patternProperties': { + r'[\w\d\-_\.]+': { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'required': ['image'], + 'properties': { + 'image': {'type': 'string'}, + 'setup_script': {'type': 'string'}, + 'compilers': { + 'type': 'array', + 'default': [], + 'items': { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'required': ['name'], + 'properties': { + 'name': {'type': 'string'}, + 'path': {'type': 'string'}, + }, + }, + }, + }, + }, + }, + }, + }, +} |