This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
forked from saschpe/libvirt-hook-qemu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhooks.schema.json
73 lines (73 loc) · 3.07 KB
/
hooks.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"$schema": "http://json-schema.org/schema#",
"title": "Libvirt port-forwarding hook configuration schema",
"type" : "object",
"patternProperties": {
"^[A-Za-z_\\-]": {
"title": "Libvirt domain name",
"type": "object",
"properties": {
"interface": { "type": "string" },
"private_ip": { "type": "string" },
"public_ip": { "type": "string" },
"port_map": {
"type": "object",
"patternProperties": {
"^tcp|udp|icmp": {
"title": "Per-protocol port mapping",
"type": "array",
"items": {
"oneOf": [{
"title": "public and private port",
"type": "integer"
}, {
"title": "Public / private port map list",
"type": "array",
"items": {
"title": "Public / private port pair",
"type": "integer"
},
"minItems": 2,
"maxItems": 2,
"additionalItems": false
}]
},
"additionalItems": false,
"minItems": 1,
"uniqueItems": true
}
},
"additionalProperties": false,
"minProperties": 1
},
"port_range" : {
"title": "Per-protocol port mapping",
"type": "array",
"items": {
"title": "Range port map list",
"type": "object",
"properties": {
"init_port": {
"title": "First port of the range",
"type": "integer" },
"ports_num": {
"title": "Number of ports in the range",
"type": "integer" },
"protocol": { "title": "Per protocol port mapping",
"type": "string",
"enum": ["tcp", "udp", "icmp"] }
},
"required": ["init_port", "port_num", "protocol"],
"additionalItems": false
},
"additionalItems": false,
"minItems": 1,
"uniqueItems": true
}
},
"required": ["private_ip"],
"additionalProperties": false
}
},
"minProperties": 1
}