X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=openmano_schemas.py;h=7404022ca5a8c53242d01959e38d9840618ad913;hb=1ae5134493bbe3d013ea61dbc3b53edc4c11b8a6;hp=a8c92a0f911922b9676b3934404498a4a6bcd86c;hpb=59f45266ae0e573d0d4e6dcfec04f4a715faeaf2;p=osm%2FRO.git diff --git a/openmano_schemas.py b/openmano_schemas.py index a8c92a0f..7404022c 100644 --- a/openmano_schemas.py +++ b/openmano_schemas.py @@ -107,10 +107,12 @@ config_schema = { "log_level_vim": log_level_schema, "log_level_nfvo": log_level_schema, "log_level_http": log_level_schema, + "log_level_console": log_level_schema, "log_file_db": path_schema, "log_file_vim": path_schema, "log_file_nfvo": path_schema, "log_file_http": path_schema, + "log_file_console": path_schema, "log_socket_host": nameshort_schema, "log_socket_port": port_schema, "log_file": path_schema, @@ -495,6 +497,37 @@ numa_schema = { #"required": ["memory"] } +config_files_schema = { + "title": "Config files for cloud init schema", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "dest": path_schema, + "encoding": {"type": "string", "enum": ["b64", "base64", "gz", "gz+b64", "gz+base64", "gzip+b64", "gzip+base64"]}, #by default text + "content": {"type": "string"}, + "permissions": {"type": "string"}, # tiypically octal notation '0644' + "owner": {"type": "string"}, # format: owner:group + + }, + "additionalProperties": False, + "required": ["dest", "content"], +} + +boot_data_vdu_schema = { + "title": "Boot data (Cloud-init) configuration schema", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties":{ + "key-pairs": {"type" : "array", "items": {"type":"string"}}, + "users": {"type" : "array", "items": cloud_config_user_schema}, + "user-data": {"type" : "string"}, # scrip to run + "config-files": {"type": "array", "items": config_files_schema}, + # NOTE: “user-data” are mutually exclusive with users and config-files because user/files are injected using user-data + "boot-data-drive": {"type": "boolean"}, + }, + "additionalProperties": False, +} + vnfc_schema = { "type":"object", "properties":{ @@ -529,7 +562,8 @@ vnfc_schema = { "items": numa_schema }, "bridge-ifaces": bridge_interfaces_schema, - "devices": devices_schema + "devices": devices_schema, + "boot-data" : boot_data_vdu_schema }, "required": ["name"],