Move virtio module list into "system". Fixes #5

This commit is contained in:
Anders Ingemann 2014-02-23 20:48:42 +01:00
parent ff968c3869
commit 6c18bca05a
3 changed files with 18 additions and 17 deletions

View file

@ -2,20 +2,20 @@
"provider": "kvm",
"bootstrapper": {
"workspace": "/target",
"mirror": "http://ftp.fr.debian.org/debian/",
"virtio" : [ "virtio_pci", "virtio_blk" ]
"mirror": "http://ftp.fr.debian.org/debian/"
},
"image": {
"name": "debian-{system.release}-{system.architecture}-{%y}{%m}{%d}",
"description": "Debian {system.release} {system.architecture}"
},
"system": {
"release": "wheezy",
"architecture": "amd64",
"bootloader": "grub",
"timezone": "UTC",
"locale": "en_US",
"charmap": "UTF-8"
"release": "wheezy",
"architecture": "amd64",
"bootloader": "grub",
"timezone": "UTC",
"locale": "en_US",
"charmap": "UTF-8",
"virtio_modules": [ "virtio_pci", "virtio_blk" ]
},
"packages": {},
"volume": {

View file

@ -3,21 +3,22 @@
"title": "KVM manifest",
"type": "object",
"properties": {
"bootstrapper": {
"system": {
"type": "object",
"properties": {
"virtio": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"enum": ["virtio",
"virtio_pci",
"virtio_balloon",
"virtio_blk",
"virtio_net",
"virtio_ring"]
},
"minItems": 1
}
}
},
"system": {
"type": "object",
"properties": {
},
"bootloader": {
"type": "string",
"enum": ["grub", "extlinux"]

View file

@ -12,5 +12,5 @@ class VirtIO(Task):
modules = os.path.join(info.root, '/etc/initramfs-tools/modules')
with open(modules, "a") as modules_file:
modules_file.write("\n")
for module in info.manifest.bootstrapper.get('virtio', []):
for module in info.manifest.system.get('virtio', []):
modules_file.write(module + "\n")