Skip to content
Snippets Groups Projects
Commit 8c4a9a74 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

QA: Convert configuration from YAML to JSON

We no longer use YAML in Ganeti at all. This patch converts the QA
configuration from YAML to JSON. JSON doesn't support comments and
I had to use a hack with fields starting with '#'.

Reviewed-by: ultrotter
parent 34290825
No related branches found
No related tags found
No related merge requests found
{
"name": "xen-test",
"rename": "xen-test-rename",
"hypervisor-type": "xen-3.0",
"os": "debian-etch",
"os-size": "10G",
"swap-size": "1G",
"mem": "512M",
"nodes": [
{
"# Master node": null,
"primary": "xen-test-0",
"secondary": "192.168.1.1"
},
{
"primary": "xen-test-1",
"secondary": "192.168.1.2"
}
],
"instances": [
{
"name": "xen-test-inst1"
},
{
"name": "xen-test-inst2"
}
],
"tests": {
"env": true,
"os": true,
"tags": true,
"rapi": true,
"cluster-verify": true,
"cluster-info": true,
"cluster-burnin": true,
"cluster-command": true,
"cluster-copyfile": true,
"cluster-master-failover": true,
"cluster-destroy": true,
"cluster-rename": true,
"node-info": true,
"node-volumes": true,
"node-readd": true,
"# This test needs at least three nodes": null,
"node-evacuate": false,
"# This test needs at least two nodes": null,
"node-failover": false,
"instance-add-plain-disk": true,
"instance-add-drbd-disk": true,
"instance-list": true,
"instance-failover": true,
"instance-info": true,
"instance-modify": true,
"instance-export": true,
"instance-import": true,
"instance-reinstall": true,
"instance-reboot": true,
"instance-shutdown": true,
"instance-automatic-restart": false,
"instance-consecutive-failures": false,
"# This test might fail with certain hypervisor types, depending on whether": null,
"# they support the `gnt-instance console' command.": null,
"instance-console": false,
"# Disabled by default because it takes rather long": null,
"instance-replace-disks": false,
"# Make sure not to include the disk(s) required for Dom0 to be included in": null,
"# the volume group used for instances. Otherwise the whole system may stop": null,
"# working until restarted.": null,
"instance-disk-failure": false
},
"options": {
"burnin-instances": 2,
"burnin-disk-template": "drbd"
}
}
# Cluster name
name: xen-test
rename: xen-test-rename
hypervisor-type: xen-3.0
# System to use
os: debian-etch
os-size: 10G
swap-size: 1G
mem: 512M
# Nodes to use
nodes:
# Master node
- primary: xen-test-0
secondary: 192.168.1.1
# Other nodes
- primary: xen-test-1
secondary: 192.168.1.2
# Instance names to use
instances:
- name: xen-test-inst1
- name: xen-test-inst2
# Tests to run
tests:
env: True
os: True
tags: True
rapi: True
cluster-verify: True
cluster-info: True
cluster-burnin: True
cluster-command: True
cluster-copyfile: True
cluster-master-failover: True
cluster-destroy: True
cluster-rename: True
node-info: True
node-volumes: True
node-readd: True
# This test needs at least three nodes
node-evacuate: False
# This test needs at least two nodes
node-failover: False
instance-add-plain-disk: True
# Requires DRBD 8.x
instance-add-drbd-disk: True
instance-list: True
instance-failover: True
instance-info: True
instance-modify: True
instance-export: True
instance-import: True
instance-reinstall: True
instance-reboot: True
instance-shutdown: True
instance-automatic-restart: False
instance-consecutive-failures: False
# This test might fail with certain hypervisor types, depending on whether
# they support the `gnt-instance console' command.
instance-console: False
# Disabled by default because it takes rather long
instance-replace-disks: False
# Make sure not to include the disk(s) required for Dom0 to be included in
# the volume group used for instances. Otherwise the whole system may stop
# working until restarted.
instance-disk-failure: False
# Other settings
options:
burnin-instances: 2
burnin-disk-template: drbd
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
""" """
import yaml import simplejson
import qa_error import qa_error
...@@ -41,7 +41,7 @@ def Load(path): ...@@ -41,7 +41,7 @@ def Load(path):
f = open(path, 'r') f = open(path, 'r')
try: try:
cfg = yaml.load(f.read()) cfg = simplejson.load(f)
finally: finally:
f.close() f.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment