#-*-coding:utf-8-*- """ @package bshotgun.schema @brief defines schemas we use when querying configuration @author Sebastian Thiel @copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html) """ __all__ = ['sql_shotgun_schema', 'shotgun_schema', 'type_factory_schema', 'combined_shotgun_schema'] from butility import Path from bkvstore import (KeyValueStoreSchema, KeyValueStoreSchemaValidator) shotgun_schema = KeyValueStoreSchema('shotgun', {'host' : str, 'api_script' : str, 'api_token' : str, 'http_proxy' : str}) type_factory_schema = KeyValueStoreSchema(shotgun_schema.key(), {'schema_cache_tree' : Path}) sql_shotgun_schema = KeyValueStoreSchemaValidator.merge_schemas( (shotgun_schema, KeyValueStoreSchema(shotgun_schema.key(), {'sql_cache_url' : str }))) # this one should contain all the keys combined_shotgun_schema = KeyValueStoreSchemaValidator.merge_schemas((sql_shotgun_schema, type_factory_schema))
'python': { # A list of modules that is to be imported 'import': StringList, # A list of python files to be executed. This will also make their code # in available, or register plugins # May contain directories, from which all python files will be loaded # non-recursively 'plugin_paths': PathList } } # see python_package_schema package_meta_data_schema = { 'requires': package_schema.requires, 'name': str, 'url': str, 'description': str, 'version': package_schema.version } proxy_delegate_package_schema = { # A package to use for retrieving the delegate to proxy. Will be resolved # using standard traversal 'requires': package_schema.requires, 'delegate': NamedServiceProcessControllerDelegate(), 'proxy': str, } controller_schema = KeyValueStoreSchema('packages', {package_schema.key(): package_schema})