{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "properties": {
        "SelenaManagementNet": {
            "description": "Configuration of the virtual network which Selena uses as a back-channel to manage an experiment's VMs",
            "properties": {
                "SELENA_MGMT_NETADDR": {
                    "_format": "ipv4",
                    "description": "Domain-0 management net interface: network address",
                    "type": "string"
                },
                "SELENA_MGMT_NET_IP": {
                    "_format": "ipv4",
                    "description": "Domain-0 management net interface: IP address",
                    "type": "string"
                },
                "SELENA_MGMT_NET_MASK": {
                    "_format": "ipv4",
                    "description": "Domain-0 management net interface: network mask",
                    "type": "string"
                },
                "SELENA_MGMT_NET_NAME": {
                    "description": "Keyword to add in Selena's management network description",
                    "pattern": "^[a-zA-z0-9_-]+$",
                    "type": "string"
                }
            },
            "required": [
                "SELENA_MGMT_NET_NAME",
                "SELENA_MGMT_NET_IP",
                "SELENA_MGMT_NETADDR",
                "SELENA_MGMT_NET_MASK"
            ],
            "type": "object"
        },
        "SelenaMetaInfo": {
            "description": "Keywords used to identify deployed Selena VMs / Networks / disks",
            "properties": {
                "SELENA_NET_KEYWORD": {
                    "description": "Keyword to add in Network description",
                    "pattern": "^[a-zA-z0-9_-]+$",
                    "type": "string"
                },
                "SELENA_VBD_KEYWORD": {
                    "description": "Keyword to add in VBD description",
                    "pattern": "^[a-zA-z0-9_-]+$",
                    "type": "string"
                },
                "SELENA_VDI_KEYWORD": {
                    "description": "Keyword to add in VDI description",
                    "pattern": "^[a-zA-z0-9_-]+$",
                    "type": "string"
                },
                "SELENA_VM_KEYWORD": {
                    "description": "Keyword to add in VM description",
                    "pattern": "^[a-zA-z0-9_-]+$",
                    "type": "string"
                }
            },
            "required": [
                "SELENA_VM_KEYWORD",
                "SELENA_NET_KEYWORD",
                "SELENA_VDI_KEYWORD",
                "SELENA_VBD_KEYWORD"
            ],
            "type": "object"
        },
        "SelenaTemplates": {
            "items": {
                "description": "VM template definition: used to represent a unique node type in Selena network experiments",
                "properties": {
                    "Name": {
                        "description": "Name of the template",
                        "pattern": "^[a-zA-z_]+$",
                        "type": "string"
                    },
                    "PV_args": {
                        "description": "VM kernel boot args",
                        "type": "string"
                    },
                    "PV_bootloader": {
                        "description": "Boot loader selection for PV",
                        "type": "string"
                    },
                    "PV_bootloader_args": {
                        "description": "PV bootloader args",
                        "type": "string"
                    },
                    "PV_kernel": {
                        "description": "Location of the VM kernel",
                        "type": "string"
                    },
                    "PV_ramdisk": {
                        "description": "Location of the VM RAM disk",
                        "type": "string"
                    },
                    "VDI_UUID": {
                        "description": "The UUID of Xen VDI, used as a template",
                        "pattern": "(^$)|(^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$)",
                        "type": "string"
                    }
                },
                "required": [
                    "Name",
                    "PV_kernel",
                    "PV_ramdisk",
                    "PV_args",
                    "PV_bootloader",
                    "PV_bootloader_args",
                    "VDI_UUID"
                ],
                "type": "object"
            },
            "minItems": 1,
            "type": "array",
            "_uniqueItems": true
        },
        "XenServerConfig": {
            "description": "Information required to use the Xen API",
            "properties": {
                "XCP_passwd": {
                    "description": "The password for Xen API",
                    "type": "string"
                },
                "XCP_uname": {
                    "description": "The username for Xen API",
                    "pattern": "^[a-z_][a-z0-9_-]*$",
                    "type": "string"
                },
                "XCP_url": {
                    "_format": "uri",
                    "description": "The URL of the XenServer management interface",
                    "type": "string"
                }
            },
            "required": [
                "XCP_url",
                "XCP_uname",
                "XCP_passwd"
            ],
            "type": "object"
        }
    },
    "required": [
        "XenServerConfig",
        "SelenaMetaInfo",
        "SelenaManagementNet",
        "SelenaTemplates"
    ],
    "title": "Product set",
    "type": "object"
}