{
  "description": "Schema for IOx application descriptor - version 2.7", 
  "additionalProperties": false, 
  "definitions": {
    "descriptorschema_2_7.StartupDocker_2": {
      "additionalProperties": false, 
      "required": [
        "image-name", 
        "tag", 
        "target"
      ], 
      "type": "object", 
      "properties": {
        "image-name": {
          "type": "string"
        }, 
        "tag": {
          "type": "string"
        }, 
        "target": {
          "oneOf": [
            {
              "pattern": "^[/a-zA-Z]([^/]+(/)?)+$", 
              "type": "string"
            }, 
            {
              "items": {
                "type": "string"
              }, 
              "type": "array"
            }
          ]
        }
      }
    }, 
    "descriptorschema_2_7.Stop": {
      "additionalProperties": false, 
      "required": [
        "target"
      ], 
      "type": "object", 
      "properties": {
        "target": {
          "pattern": "^[a-zA-Z]([^/]+(/)?)+$", 
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.StartupGenericLinux": {
      "additionalProperties": false, 
      "required": [
        "runtime", 
        "target"
      ], 
      "type": "object", 
      "properties": {
        "runtime": {
          "enum": [
            "generic-linux"
          ], 
          "type": "string"
        }, 
        "target": {
          "pattern": "^[a-zA-Z]([^/]+(/)?)+$", 
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.CharDev": {
      "additionalProperties": false, 
      "required": [
        "dev", 
        "type"
      ], 
      "type": "object", 
      "properties": {
        "type": {
          "type": "string"
        }, 
        "dev": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.ServiceBundle": {
      "additionalProperties": false, 
      "required": [
        "provides"
      ], 
      "type": "object", 
      "properties": {
        "security-schemas": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.ServiceSecuritySchemas"
          }, 
          "type": "array"
        }, 
        "provides": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.Service"
          }, 
          "type": "array"
        }
      }
    }, 
    "descriptorschema_2_7.StartupLXC": {
      "additionalProperties": false, 
      "required": [
        "rootfs", 
        "target"
      ], 
      "type": "object", 
      "properties": {
        "target": {
          "pattern": "^[/a-zA-Z]([^/]+(/)?)+$", 
          "type": "string"
        }, 
        "rootfs": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.Network": {
      "additionalProperties": false, 
      "required": [
        "interface-name"
      ], 
      "type": "object", 
      "properties": {
        "ports": {
          "anyOf": [
            {
              "type": "object", 
              "properties": {
                "tcp": {
                  "items": [
                    {
                      "anyOf": [
                        {
                          "type": "string"
                        }, 
                        {
                          "type": "integer"
                        }, 
                        {
                          "$ref": "#/definitions/descriptorschema_2_7.Ports"
                        }
                      ]
                    }
                  ], 
                  "type": "array"
                }
              }
            }, 
            {
              "type": "object", 
              "properties": {
                "udp": {
                  "items": [
                    {
                      "anyOf": [
                        {
                          "type": "string"
                        }, 
                        {
                          "type": "integer"
                        }, 
                        {
                          "$ref": "#/definitions/descriptorschema_2_7.Ports"
                        }
                      ]
                    }
                  ], 
                  "type": "array"
                }
              }
            }
          ]
        }, 
        "ipv6_required": {
          "type": "boolean"
        }, 
        "interface-name": {
          "type": "string"
        }, 
        "description": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.HostMounts": {
      "additionalProperties": false, 
      "required": [
        "target_mount"
      ], 
      "type": "object", 
      "properties": {
        "description": {
          "type": "string"
        }, 
        "target_mount": {
          "type": "string"
        }, 
        "host_mount_path": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.ServiceSecuritySchemas": {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "default-scopes": {
          "items": {
            "type": "string"
          }, 
          "type": "array"
        }, 
        "type": {
          "enum": [
            "oauth2"
          ], 
          "type": "string"
        }, 
        "available-scopes": {
          "items": {
            "type": "string"
          }, 
          "type": "array"
        }
      }
    }, 
    "descriptorschema_2_7.Service": {
      "additionalProperties": false, 
      "required": [
        "id", 
        "api-version", 
        "version"
      ], 
      "type": "object", 
      "properties": {
        "api-version": {
          "type": "number"
        }, 
        "port-mapping": {
          "items": {
            "pattern": "^[\\w]+:(tcp|udp){1}:[0-9-]+$", 
            "type": "string"
          }, 
          "type": "array"
        }, 
        "version": {
          "type": "string"
        }, 
        "id": {
          "type": "string"
        }, 
        "description": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.AppVM": {
      "additionalProperties": false, 
      "required": [
        "cpuarch", 
        "type", 
        "startup"
      ], 
      "type": "object", 
      "properties": {
        "cpu-core": {
          "type": "string"
        }, 
        "monitor": {
          "$ref": "#/definitions/descriptorschema_2_7.Monitor"
        }, 
        "startup": {
          "oneOf": [
            {
              "$ref": "#/definitions/descriptorschema_2_7.StartupVM_2_1_RFS"
            }, 
            {
              "$ref": "#/definitions/descriptorschema_2_7.StartupVM_2_1_DISKS"
            }
          ]
        }, 
        "depends-on": {
          "oneOf": [
            {
              "required": [
                "packages"
              ], 
              "type": "object", 
              "properties": {
                "packages": {
                  "items": {
                    "$ref": "#/definitions/descriptorschema_2_7.PackageDependsOn"
                  }, 
                  "type": "array"
                }
              }
            }
          ]
        }, 
        "cpuarch": {
          "type": "string"
        }, 
        "env": {
          "additionalProperties": true, 
          "type": "object", 
          "properties": {}
        }, 
        "type": {
          "enum": [
            "vm"
          ], 
          "type": "string"
        }, 
        "resources": {
          "$ref": "#/definitions/descriptorschema_2_7.Resources"
        }, 
        "system-capabilities": {
          "type": "object", 
          "properties": {}
        }
      }
    }, 
    "descriptorschema_2_7.StartupVM_2_1_RFS": {
      "additionalProperties": false, 
      "required": [
        "rootfs", 
        "kernel"
      ], 
      "type": "object", 
      "properties": {
        "ostype": {
          "type": "string"
        }, 
        "kernel": {
          "type": "string"
        }, 
        "qemu-guest-agent": {
          "type": "boolean"
        }, 
        "rootfs": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.CartridgeDependsOn": {
      "additionalProperties": false, 
      "required": [
        "id", 
        "version"
      ], 
      "type": "object", 
      "properties": {
        "version": {
          "type": "number"
        }, 
        "id": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.StartupVM_2_1_DISKS": {
      "additionalProperties": false, 
      "required": [
        "disks"
      ], 
      "type": "object", 
      "properties": {
        "ostype": {
          "type": "string"
        }, 
        "disks": {
          "items": {
            "type": "object", 
            "properties": {
              "target-dev": {
                "type": "string"
              }, 
              "file": {
                "type": "string"
              }
            }
          }, 
          "type": "array"
        }, 
        "qemu-guest-agent": {
          "type": "boolean"
        }
      }
    }, 
    "descriptorschema_2_7.Ports": {
      "additionalProperties": false, 
      "required": [
        "port"
      ], 
      "type": "object", 
      "properties": {
        "port": {
          "type": "string"
        }, 
        "description": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.SourceDetails": {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "usage": {
          "type": "integer"
        }, 
        "name": {
          "type": "string"
        }, 
        "file": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.FileSystem": {
      "additionalProperties": false, 
      "required": [
        "fstype"
      ], 
      "type": "object", 
      "properties": {
        "target": {
          "type": "string"
        }, 
        "permission": {
          "type": "string"
        }, 
        "accessmode": {
          "type": "string"
        }, 
        "driver": {
          "$ref": "#/definitions/descriptorschema_2_7.Driver"
        }, 
        "fstype": {
          "type": "string"
        }, 
        "source": {
          "$ref": "#/definitions/descriptorschema_2_7.SourceDetails"
        }
      }
    }, 
    "descriptorschema_2_7.AppDocker_2_2": {
      "additionalProperties": false, 
      "required": [
        "cpuarch", 
        "type", 
        "startup"
      ], 
      "type": "object", 
      "properties": {
        "cpu-core": {
          "type": "string"
        }, 
        "monitor": {
          "$ref": "#/definitions/descriptorschema_2_7.Monitor"
        }, 
        "startup": {
          "oneOf": [
            {
              "$ref": "#/definitions/descriptorschema_2_7.StartupDocker_2"
            }, 
            {
              "$ref": "#/definitions/descriptorschema_2_7.StartupDocker"
            }
          ]
        }, 
        "depends-on": {
          "oneOf": [
            {
              "required": [
                "packages"
              ], 
              "type": "object", 
              "properties": {
                "packages": {
                  "items": {
                    "$ref": "#/definitions/descriptorschema_2_7.PackageDependsOn"
                  }, 
                  "type": "array"
                }
              }
            }
          ]
        }, 
        "cpuarch": {
          "type": "string"
        }, 
        "env": {
          "additionalProperties": true, 
          "type": "object", 
          "properties": {}
        }, 
        "type": {
          "enum": [
            "docker"
          ], 
          "type": "string"
        }, 
        "resources": {
          "$ref": "#/definitions/descriptorschema_2_7.Resources"
        }, 
        "system-capabilities": {
          "type": "object", 
          "properties": {}
        }
      }
    }, 
    "descriptorschema_2_7.StartupDocker": {
      "additionalProperties": false, 
      "required": [
        "rootfs", 
        "target"
      ], 
      "type": "object", 
      "properties": {
        "os-mode": {
          "type": "boolean"
        }, 
        "workdir": {
          "type": "string"
        }, 
        "group": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "target": {
          "oneOf": [
            {
              "pattern": "^[/a-zA-Z]([^/]+(/)?)+$", 
              "type": "string"
            }, 
            {
              "items": {
                "type": "string"
              }, 
              "type": "array"
            }
          ]
        }, 
        "args": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "items": {
                "type": "string"
              }, 
              "type": "array"
            }
          ]
        }, 
        "user": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "rootfs": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.ResourcesRecommendations": {
      "additionalProperties": false, 
      "required": [
        "profile", 
        "label", 
        "description"
      ], 
      "type": "object", 
      "properties": {
        "profile": {
          "type": "string"
        }, 
        "description": {
          "type": "string"
        }, 
        "label": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.ServiceDependsOn": {
      "additionalProperties": false, 
      "required": [
        "id"
      ], 
      "type": "object", 
      "properties": {
        "label": {
          "type": "string"
        }, 
        "required": {
          "type": "boolean"
        }, 
        "max-api-version": {
          "type": "number"
        }, 
        "id": {
          "type": "string"
        }, 
        "min-api-version": {
          "type": "number"
        }
      }
    }, 
    "descriptorschema_2_7.AppLXC": {
      "additionalProperties": false, 
      "required": [
        "cpuarch", 
        "type", 
        "kernel-version", 
        "startup"
      ], 
      "type": "object", 
      "properties": {
        "cpu-core": {
          "type": "string"
        }, 
        "monitor": {
          "$ref": "#/definitions/descriptorschema_2_7.Monitor"
        }, 
        "startup": {
          "$ref": "#/definitions/descriptorschema_2_7.StartupLXC"
        }, 
        "kernel-version": {
          "type": "string"
        }, 
        "depends-on": {
          "oneOf": [
            {
              "required": [
                "packages"
              ], 
              "type": "object", 
              "properties": {
                "packages": {
                  "items": {
                    "$ref": "#/definitions/descriptorschema_2_7.PackageDependsOn"
                  }, 
                  "type": "array"
                }
              }
            }
          ]
        }, 
        "cpuarch": {
          "type": "string"
        }, 
        "env": {
          "additionalProperties": true, 
          "type": "object", 
          "properties": {}
        }, 
        "type": {
          "enum": [
            "lxc"
          ], 
          "type": "string"
        }, 
        "resources": {
          "$ref": "#/definitions/descriptorschema_2_7.Resources"
        }, 
        "system-capabilities": {
          "type": "object", 
          "properties": {}
        }
      }
    }, 
    "descriptorschema_2_7.Resources": {
      "additionalProperties": false, 
      "required": [
        "profile"
      ], 
      "type": "object", 
      "properties": {
        "host_mounts": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.HostMounts"
          }, 
          "type": "array"
        }, 
        "datastore": {
          "type": "boolean"
        }, 
        "platform-env": {
          "items": {
            "type": "string"
          }, 
          "type": "array"
        }, 
        "visualization": {
          "type": "boolean"
        }, 
        "disk": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "network": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.Network"
          }, 
          "type": "array"
        }, 
        "vcpu": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "memory": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "rootfs_expanded_size": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "access-control": {
          "$ref": "#/definitions/descriptorschema_2_7.ServiceSecurity"
        }, 
        "privileged": {
          "type": "boolean"
        }, 
        "profile": {
          "type": "string"
        }, 
        "rootfs_size": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "filesystem": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.FileSystem"
          }, 
          "type": "array"
        }, 
        "device-info": {
          "items": {
            "enum": [
              "udi"
            ], 
            "type": "string"
          }, 
          "type": "array"
        }, 
        "broker": {
          "items": {
            "enum": [
              "BrokerClient", 
              "Broker"
            ], 
            "type": "string"
          }, 
          "type": "array"
        }, 
        "graphics": {
          "$ref": "#/definitions/descriptorschema_2_7.Graphics"
        }, 
        "oauth": {
          "items": {
            "enum": [
              "OauthClient", 
              "OauthValidator"
            ], 
            "type": "string"
          }, 
          "type": "array"
        }, 
        "cpu-topology": {
          "oneOf": [
            {
              "$ref": "#/definitions/descriptorschema_2_7.CpuTopologyParams"
            }
          ]
        }, 
        "devices": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.Devices"
          }, 
          "type": "array"
        }, 
        "chardev": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.CharDev"
          }, 
          "type": "array"
        }, 
        "recommendations": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.ResourcesRecommendations"
          }, 
          "type": "array"
        }, 
        "cpu": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }
      }
    }, 
    "descriptorschema_2_7.StartupNotGenericLinux": {
      "additionalProperties": false, 
      "required": [
        "target", 
        "runtime-version"
      ], 
      "type": "object", 
      "properties": {
        "runtime-version": {
          "oneOf": [
            {
              "type": "number"
            }, 
            {
              "type": "string"
            }
          ]
        }, 
        "runtime-options": {
          "$ref": "#/definitions/descriptorschema_2_7.RuntimeOptions"
        }, 
        "runtime": {
          "not": {
            "enum": [
              "generic-linux"
            ], 
            "type": "string"
          }
        }, 
        "target": {
          "pattern": "^[a-zA-Z]([^/]+(/)?)+$", 
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.RuntimeOptions": {
      "additionalProperties": true, 
      "required": [
        "classpath"
      ], 
      "type": "object", 
      "properties": {
        "classpath": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.Devices": {
      "additionalProperties": false, 
      "required": [
        "type", 
        "label"
      ], 
      "type": "object", 
      "properties": {
        "function": {
          "type": "string"
        }, 
        "vendorID": {
          "type": "string"
        }, 
        "mandatory": {
          "type": "boolean"
        }, 
        "device-id": {
          "type": "string"
        }, 
        "device-directory-to-mount": {
          "type": "string"
        }, 
        "label": {
          "type": "string"
        }, 
        "mount-point": {
          "type": "string"
        }, 
        "usage": {
          "type": "string"
        }, 
        "type": {
          "type": "string"
        }, 
        "productID": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.AppInfo": {
      "additionalProperties": false, 
      "required": [
        "name", 
        "version"
      ], 
      "type": "object", 
      "properties": {
        "author-name": {
          "type": "string"
        }, 
        "version": {
          "type": "string"
        }, 
        "author-link": {
          "type": "string"
        }, 
        "name": {
          "type": "string"
        }, 
        "description": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.Monitor": {
      "additionalProperties": false, 
      "required": [
        "script"
      ], 
      "type": "object", 
      "properties": {
        "period_seconds": {
          "type": "number"
        }, 
        "initial_delay_seconds": {
          "type": "number"
        }, 
        "script": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.CpuTopologyParams": {
      "additionalProperties": false, 
      "required": [
        "sockets-per-core", 
        "cores"
      ], 
      "type": "object", 
      "properties": {
        "cores": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }, 
        "sockets-per-core": {
          "oneOf": [
            {
              "type": "string"
            }, 
            {
              "type": "integer"
            }
          ]
        }
      }
    }, 
    "descriptorschema_2_7.ServiceSecurity": {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "type": {
          "enum": [
            "oauth2"
          ], 
          "type": "string"
        }, 
        "role": {
          "items": {
            "enum": [
              "OauthClient", 
              "OauthValidator"
            ], 
            "type": "string"
          }, 
          "type": "array"
        }, 
        "scopes": {
          "items": {
            "type": "string"
          }, 
          "type": "array"
        }
      }
    }, 
    "descriptorschema_2_7.AppPaas": {
      "additionalProperties": false, 
      "required": [
        "type", 
        "startup"
      ], 
      "type": "object", 
      "properties": {
        "monitor": {
          "$ref": "#/definitions/descriptorschema_2_7.Monitor"
        }, 
        "stop": {
          "$ref": "#/definitions/descriptorschema_2_7.Stop"
        }, 
        "startup": {
          "oneOf": [
            {
              "$ref": "#/definitions/descriptorschema_2_7.StartupGenericLinux"
            }, 
            {
              "$ref": "#/definitions/descriptorschema_2_7.StartupNotGenericLinux"
            }
          ]
        }, 
        "depends-on": {
          "anyOf": [
            {
              "required": [
                "cartridges"
              ], 
              "type": "object", 
              "properties": {
                "cartridges": {
                  "items": {
                    "$ref": "#/definitions/descriptorschema_2_7.CartridgeDependsOn"
                  }, 
                  "type": "array"
                }
              }
            }, 
            {
              "required": [
                "packages"
              ], 
              "type": "object", 
              "properties": {
                "packages": {
                  "items": {
                    "$ref": "#/definitions/descriptorschema_2_7.PackageDependsOn"
                  }, 
                  "type": "array"
                }
              }
            }
          ]
        }, 
        "cpuarch": {
          "type": "string"
        }, 
        "env": {
          "additionalProperties": true, 
          "type": "object", 
          "properties": {}
        }, 
        "type": {
          "enum": [
            "paas"
          ], 
          "type": "string"
        }, 
        "resources": {
          "$ref": "#/definitions/descriptorschema_2_7.Resources"
        }, 
        "system-capabilities": {
          "type": "object", 
          "properties": {}
        }
      }
    }, 
    "descriptorschema_2_7.PackageDependsOn": {
      "additionalProperties": false, 
      "required": [
        "name", 
        "version"
      ], 
      "type": "object", 
      "properties": {
        "services": {
          "items": {
            "$ref": "#/definitions/descriptorschema_2_7.ServiceDependsOn"
          }, 
          "type": "array"
        }, 
        "version": {
          "type": "string"
        }, 
        "name": {
          "type": "string"
        }
      }
    }, 
    "descriptorschema_2_7.Graphics": {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "vnc": {
          "type": "boolean"
        }
      }
    }, 
    "descriptorschema_2_7.Driver": {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "type": {
          "type": "string"
        }, 
        "name": {
          "type": "string"
        }, 
        "wrpolicy": {
          "type": "string"
        }
      }
    }
  }, 
  "$schema": "http://json-schema.org/draft-04/schema#", 
  "required": [
    "descriptor-schema-version", 
    "info", 
    "app"
  ], 
  "type": "object", 
  "properties": {
    "info": {
      "$ref": "#/definitions/descriptorschema_2_7.AppInfo"
    }, 
    "service-bundle": {
      "$ref": "#/definitions/descriptorschema_2_7.ServiceBundle"
    }, 
    "app": {
      "oneOf": [
        {
          "$ref": "#/definitions/descriptorschema_2_7.AppPaas"
        }, 
        {
          "$ref": "#/definitions/descriptorschema_2_7.AppLXC"
        }, 
        {
          "$ref": "#/definitions/descriptorschema_2_7.AppVM"
        }, 
        {
          "$ref": "#/definitions/descriptorschema_2_7.AppDocker_2_2"
        }
      ]
    }, 
    "descriptor-schema-version": {
      "oneOf": [
        {
          "type": "string"
        }, 
        {
          "type": "number"
        }
      ]
    }
  }
}