X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=openmano_schemas.py;h=c325b00d812db6eb8b0116759afce3870e734f92;hb=96af9f4a92b158d07417cacf2e3573339680895b;hp=013234f5ff6c061c1c45dc158b0bcf01a0d09873;hpb=0c8def04e7d1519e0bc29be4c4c52ba495e71cc6;p=osm%2FRO.git diff --git a/openmano_schemas.py b/openmano_schemas.py index 013234f5..c325b00d 100644 --- a/openmano_schemas.py +++ b/openmano_schemas.py @@ -450,7 +450,9 @@ bridge_interfaces_schema={ "bandwidth":bandwidth_schema, "vpci":pci_schema, "mac_address": mac_schema, - "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139"]} + "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139"]}, + "port-security": {"type" : "boolean"}, + "floating-ip": {"type" : "boolean"} }, "additionalProperties": False, "required": ["name"] @@ -493,6 +495,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":{ @@ -527,7 +560,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"],