bootstrap-vz/bootstrapvz/base/manifest-schema.json

211 lines
4.6 KiB
JSON
Raw Normal View History

2013-06-23 23:37:21 +02:00
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Generic manifest",
"type": "object",
"properties": {
"provider": {
"type": "string"
},
2013-06-27 23:26:29 +02:00
"bootstrapper": {
"type": "object",
"properties": {
"workspace": { "$ref": "#/definitions/path" },
"mirror": { "type": "string", "format": "uri" },
"tarball": { "type": "boolean" },
"include_packages": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[^/]+$"
},
"minItems": 1
},
"exclude_packages": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[^/]+$"
},
"minItems": 1
}
2013-06-27 23:26:29 +02:00
},
"required": ["workspace"]
2013-06-27 23:26:29 +02:00
},
"image": {
"type": "object",
"properties": {
"name": { "type": "string" }
},
"required": ["name"]
},
2013-06-27 23:26:29 +02:00
"system": {
"type": "object",
"properties": {
"release": {
"enum": [
"squeeze", "wheezy", "jessie", "sid",
"oldstable", "stable", "testing", "unstable"
]
},
"architecture": { "enum": ["i386", "amd64"] },
"bootloader": { "enum": ["pvgrub", "grub", "extlinux"] },
"timezone": { "type": "string" },
"locale": { "type": "string" },
"charmap": { "type": "string" },
"hostname": {
"type": "string",
"pattern": "^\\S+$"
}
2013-06-27 23:26:29 +02:00
},
"required": ["release", "architecture", "bootloader", "timezone", "locale", "charmap"]
},
"packages": {
"type": "object",
"properties": {
"mirror": { "type": "string", "format": "uri" },
"sources": {
"type": "object",
"patternProperties": {
"^[^\/\\0]+$": {
"type": "array",
2014-01-09 17:24:47 +01:00
"items": {
"type": "string",
"pattern": "^(deb|deb-src)\\s+(\\[\\s*(.+\\S)?\\s*\\]\\s+)?\\S+\\s+\\S+(\\s+(.+\\S))?\\s*$"
},
"minItems": 1
}
},
"additionalProperties": false,
"minItems": 1
},
"components": {
"type": "array",
"items": {"type": "string"},
"minItems": 1
},
2014-04-04 10:16:19 +02:00
"preferences": {
"type": "object",
"patternProperties": {
"^[^\/\\0]+$": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pin": {
"type": "string"
},
"package": {
"type": "string"
},
"pin-priority": {
"type": "integer"
}
},
"required": ["pin", "package", "pin-priority"],
"additionalProperties": false
},
"minItems": 1
}
},
"additionalProperties": false,
"minItems": 1
},
"trusted-keys": {
"type": "array",
"items": { "$ref": "#/definitions/absolute_path" },
"minItems": 1
},
"install": {
"type": "array",
"items": {
"anyOf": [
{ "pattern": "^[^/]+(/[^/]+)?$" },
{ "$ref": "#/definitions/absolute_path" }
]
},
"minItems": 1
},
"install_standard": {
"type": "boolean"
}
},
"additionalProperties": false
},
2013-06-24 19:05:46 +02:00
"volume": {
"type": "object",
"properties": {
"backing": { "type": "string" },
"partitions": {
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/no_partitions" },
{ "$ref": "#/definitions/partition_table" }
]
}
},
"required": ["partitions"]
2013-06-24 19:05:46 +02:00
},
2013-06-23 23:37:21 +02:00
"plugins": {
"type": "object",
"patternProperties": {
"^\\w+$": {
"type": "object"
2013-06-23 23:37:21 +02:00
}
},
"additionalProperties": false
2013-06-27 23:26:29 +02:00
}
},
2014-02-23 20:53:58 +01:00
"required": ["provider", "bootstrapper", "system", "volume"],
"definitions": {
"path": {
"type": "string",
"pattern": "^[^\\0]+$"
},
"absolute_path": {
"type": "string",
"pattern": "^/[^\\0]+$"
},
"bytes": {
"type": "string",
"pattern": "^\\d+([KMGT]i?B|B)$"
},
"no_partitions": {
"type": "object",
"properties": {
"type": { "enum": ["none"] },
"root": { "$ref": "#/definitions/partition" }
},
"required": ["root"],
"additionalProperties": false
},
"partition_table": {
"type": "object",
"properties": {
"type": { "enum": ["msdos", "gpt"] },
"boot": { "$ref": "#/definitions/partition" },
"root": { "$ref": "#/definitions/partition" },
"swap": {
"type": "object",
"properties": { "size": { "$ref": "#/definitions/bytes" } },
"required": ["size"]
}
},
"required": ["root"],
"additionalProperties": false
},
"partition": {
"type": "object",
"properties": {
"size": { "$ref": "#/definitions/bytes" },
2014-02-23 17:52:05 +01:00
"filesystem": { "enum": ["ext2", "ext3", "ext4", "xfs"] },
"format_command": {
"type": "array",
"items": {"type": "string"},
"minItems": 1
}
},
"required": ["size", "filesystem"]
}
2014-02-23 20:53:58 +01:00
}
2013-06-23 23:37:21 +02:00
}