/
config.schema.json
58 lines (57 loc) · 1.81 KB
/
config.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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/gdsotirov/mrcb/master/config.schema.json",
"title": "MRCB Configuration",
"description": "The schema for MRCB configuration validation",
"type": "object",
"properties": {
"backup_dir": {
"description": "The directory with export backups would be stored. It is ./backup by default",
"type": "string"
},
"backup_dir_per_device": {
"description": "Defines whether there should be directory per device in 'backup_dir'. True by default",
"type": "boolean"
},
"routers": {
"description": "List of devices to backup configuration from",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Short name for the device. Used also for per device directory name",
"type": "string"
},
"hostname": {
"description": "Fully qualified domain name (FQDN) or IP address for the device",
"type": "string"
},
"port": {
"description": "Port for SSH/SFTP connection",
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"username": {
"description": "SSH/SFTP username",
"type": "string"
},
"password": {
"description": "SSH/SFT password",
"type": "string"
},
"priv_key": {
"description": "Path to SSH private key to use as identity",
"type": "string"
}
},
"required": ["name", "hostname", "username"],
"additionalProperties": false
},
"minItems": 1
}
},
"required": ["routers"],
"additionalProperties": false
}