@usex/mikrotik-mcp 6.15.0 → 6.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2509 -614
- package/dist/index.d.ts +10 -1
- package/dist/index.js +24 -10
- package/dist/shared/{cli-b7rbwm6j.js → cli-8hn9vb7c.js} +8 -2
- package/dist/shared/{cli-5hgbedxa.js → cli-8j89p9xc.js} +1 -1
- package/dist/shared/cli-kb8zq3rx.js +9 -0
- package/dist/shared/{cli-57nggfz3.js → cli-p7bt2fa3.js} +1 -1
- package/dist/shared/{cli-4aqtcr9k.js → cli-rmtax5nd.js} +1 -1
- package/dist/shared/{cli-9x2ne7hp.js → cli-rs00sr7q.js} +1 -1
- package/dist/shared/{cli-4n039739.js → cli-vf68spka.js} +5058 -1921
- package/dist/shared/cli-znnh8xtd.js +15 -0
- package/dist/shared/{library-28w0j1ny.js → library-m6wrdeqa.js} +1 -1
- package/dist/shared/{library-nt9fygza.js → library-nbtg49vh.js} +1 -1
- package/dist/shared/{library-1sy0ph9r.js → library-rc32xwsh.js} +1 -1
- package/dist/shared/{library-7qr2sc9x.js → library-rrzzp9qg.js} +4731 -1569
- package/dist/shared/{library-twpgma2r.js → library-s31n8vk4.js} +1 -1
- package/dist/ui/observability.html +144 -175
- package/package.json +23 -19
- package/schemas/README.md +5 -5
- package/schemas/config.schema.json +274 -6
- package/schemas/devtools-manifest.json +301 -5
- package/schemas/tool-catalog.json +1116 -42
- package/schemas/tools/add_alert_rule.json +1 -1
- package/schemas/tools/apply_config_template.json +56 -0
- package/schemas/tools/apply_wireless_to_wifi_migration.json +30 -0
- package/schemas/tools/deploy_container_stack.json +112 -0
- package/schemas/tools/design_zone_firewall.json +81 -0
- package/schemas/tools/discover_unmanaged_devices.json +49 -0
- package/schemas/tools/enrol_device.json +56 -0
- package/schemas/tools/expire_wireguard_users.json +19 -0
- package/schemas/tools/export_logs.json +2 -1
- package/schemas/tools/find_tools.json +1 -1
- package/schemas/tools/firmware_check.json +0 -5
- package/schemas/tools/firmware_post_upgrade.json +29 -0
- package/schemas/tools/firmware_repo_fetch.json +30 -0
- package/schemas/tools/firmware_repo_list.json +7 -0
- package/schemas/tools/firmware_stage_from_repo.json +19 -0
- package/schemas/tools/follow_ipv6_prefix.json +51 -0
- package/schemas/tools/generate_hotspot_vouchers.json +37 -1
- package/schemas/tools/get_container_logs.json +20 -0
- package/schemas/tools/get_logs.json +2 -1
- package/schemas/tools/get_logs_by_severity.json +2 -1
- package/schemas/tools/get_logs_by_topic.json +2 -1
- package/schemas/tools/get_security_logs.json +2 -1
- package/schemas/tools/get_system_events.json +2 -1
- package/schemas/tools/list_config_templates.json +7 -0
- package/schemas/tools/list_voucher_batches.json +7 -0
- package/schemas/tools/list_wireguard_users.json +12 -0
- package/schemas/tools/onboard_wireguard_user.json +17 -2
- package/schemas/tools/plan_wireless_to_wifi_migration.json +14 -0
- package/schemas/tools/protect_hotspot_login.json +32 -0
- package/schemas/tools/remove_config_template.json +14 -0
- package/schemas/tools/remove_threat_feed.json +1 -0
- package/schemas/tools/remove_voucher_batch.json +24 -0
- package/schemas/tools/remove_zone_firewall.json +14 -0
- package/schemas/tools/revoke_wireguard_user.json +1 -0
- package/schemas/tools/run_routeros_command.json +6 -1
- package/schemas/tools/save_config_template.json +20 -0
- package/schemas/tools/search_logs.json +2 -1
- package/schemas/tools/subscribe_threat_feed.json +1 -0
- package/schemas/tools/test_alert_channel.json +1 -1
- package/schemas/tools/unfollow_ipv6_prefix.json +18 -0
- package/schemas/tools/unprotect_hotspot_login.json +7 -0
- package/schemas/tools/update_alert_rule.json +1 -1
- package/schemas/tools/upgrade_container_image.json +29 -0
- package/schemas/tools/validate_routeros_command.json +13 -0
- package/scripts/service.ts +2 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "apply_config_template",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,40}$",
|
|
9
|
+
"description": "Template name"
|
|
10
|
+
},
|
|
11
|
+
"devices": {
|
|
12
|
+
"minItems": 1,
|
|
13
|
+
"maxItems": 50,
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"description": "Routers to apply the template to"
|
|
19
|
+
},
|
|
20
|
+
"variables": {
|
|
21
|
+
"default": {},
|
|
22
|
+
"description": "Values for every router",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"propertyNames": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"per_device": {
|
|
32
|
+
"default": {},
|
|
33
|
+
"description": "Values for one router: { router: { variable: value } }",
|
|
34
|
+
"type": "object",
|
|
35
|
+
"propertyNames": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"propertyNames": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"apply": {
|
|
49
|
+
"default": false,
|
|
50
|
+
"description": "false = show the commands; true = apply",
|
|
51
|
+
"type": "boolean"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["name", "devices", "variables", "per_device", "apply"],
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "apply_wireless_to_wifi_migration",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"passwords_from": {
|
|
7
|
+
"default": {},
|
|
8
|
+
"description": "For each security profile: where its password is (a secret reference)",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"propertyNames": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"ignore_blockers": {
|
|
19
|
+
"default": false,
|
|
20
|
+
"type": "boolean"
|
|
21
|
+
},
|
|
22
|
+
"apply": {
|
|
23
|
+
"default": false,
|
|
24
|
+
"description": "false = show the commands; true = apply",
|
|
25
|
+
"type": "boolean"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["passwords_from", "ignore_blockers", "apply"],
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "deploy_container_stack",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"services": {
|
|
7
|
+
"minItems": 1,
|
|
8
|
+
"maxItems": 12,
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,40}$",
|
|
16
|
+
"description": "Container name; also names its env list and mounts"
|
|
17
|
+
},
|
|
18
|
+
"image": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "Image to pull, e.g. 'pihole/pihole:latest'"
|
|
22
|
+
},
|
|
23
|
+
"veth": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"name": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,40}$"
|
|
29
|
+
},
|
|
30
|
+
"address": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Address with prefix, e.g. '172.20.0.2/24'"
|
|
33
|
+
},
|
|
34
|
+
"gateway": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Gateway, e.g. '172.20.0.1'"
|
|
37
|
+
},
|
|
38
|
+
"bridge": {
|
|
39
|
+
"description": "Add the veth as a port of this existing bridge",
|
|
40
|
+
"type": "string"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required": ["name", "address", "gateway"],
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"description": "The container's network interface, created when it does not exist"
|
|
46
|
+
},
|
|
47
|
+
"env": {
|
|
48
|
+
"default": {},
|
|
49
|
+
"type": "object",
|
|
50
|
+
"propertyNames": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,80}$"
|
|
53
|
+
},
|
|
54
|
+
"additionalProperties": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"mounts": {
|
|
59
|
+
"default": [],
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"name": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,40}$",
|
|
67
|
+
"description": "Mount name (used by older RouterOS versions)"
|
|
68
|
+
},
|
|
69
|
+
"src": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"description": "Path on the router, e.g. '/usb1/pihole/etc'"
|
|
73
|
+
},
|
|
74
|
+
"dst": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1,
|
|
77
|
+
"description": "Path in the container, e.g. '/etc/pihole'"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": ["name", "src", "dst"],
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"root_dir": {
|
|
85
|
+
"description": "Where the image is unpacked, e.g. 'usb1/pihole/root'",
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"cmd": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"logging": {
|
|
92
|
+
"default": true,
|
|
93
|
+
"type": "boolean"
|
|
94
|
+
},
|
|
95
|
+
"start_on_boot": {
|
|
96
|
+
"default": true,
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": ["name", "image", "veth", "env", "mounts", "logging", "start_on_boot"],
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"apply": {
|
|
105
|
+
"default": false,
|
|
106
|
+
"description": "false = show the commands; true = create",
|
|
107
|
+
"type": "boolean"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": ["services", "apply"],
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "design_zone_firewall",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"zones": {
|
|
7
|
+
"minItems": 1,
|
|
8
|
+
"maxItems": 16,
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Zone name: lowercase letters, digits, '-'"
|
|
16
|
+
},
|
|
17
|
+
"interfaces": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"description": "Interfaces in this zone"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": ["name", "interfaces"],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"policies": {
|
|
31
|
+
"default": [],
|
|
32
|
+
"maxItems": 64,
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"from": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Source zone, or 'router'"
|
|
40
|
+
},
|
|
41
|
+
"to": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Destination zone, or 'router'"
|
|
44
|
+
},
|
|
45
|
+
"action": {
|
|
46
|
+
"default": "accept",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": ["accept", "drop", "reject"]
|
|
49
|
+
},
|
|
50
|
+
"protocol": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": ["tcp", "udp", "icmp"]
|
|
53
|
+
},
|
|
54
|
+
"ports": {
|
|
55
|
+
"description": "Destination ports, e.g. '443' or '80,443'",
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"note": {
|
|
59
|
+
"description": "A short note for the rule comment",
|
|
60
|
+
"type": "string",
|
|
61
|
+
"maxLength": 60
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": ["from", "to", "action"],
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"protect_router": {
|
|
69
|
+
"default": false,
|
|
70
|
+
"description": "Also drop traffic to the router itself that no policy allows",
|
|
71
|
+
"type": "boolean"
|
|
72
|
+
},
|
|
73
|
+
"apply": {
|
|
74
|
+
"default": false,
|
|
75
|
+
"description": "false = show the commands; true = apply",
|
|
76
|
+
"type": "boolean"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": ["zones", "policies", "protect_router", "apply"],
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "discover_unmanaged_devices",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"devices": {
|
|
7
|
+
"description": "Routers to ask. Omit to ask every configured router that is not disabled.",
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"listen_seconds": {
|
|
14
|
+
"default": 0,
|
|
15
|
+
"description": "Also listen for MikroTik discovery (MNDP, UDP 5678) on the MCP host itself for this many seconds. Finds devices on the host's own network segment, also with no managed router.",
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"minimum": 0,
|
|
18
|
+
"maximum": 30
|
|
19
|
+
},
|
|
20
|
+
"scan": {
|
|
21
|
+
"description": "Also scan a subnet from one router (`/tool ip-scan`). Finds hosts that announce nothing, by address and MAC. It sends probes on that network.",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"device": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The router that runs the scan"
|
|
27
|
+
},
|
|
28
|
+
"interface": {
|
|
29
|
+
"description": "Scan the subnet on this interface",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"address_range": {
|
|
33
|
+
"description": "Range or CIDR, e.g. '192.168.88.0/24'",
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"seconds": {
|
|
37
|
+
"default": 8,
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 1,
|
|
40
|
+
"maximum": 60
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required": ["device", "seconds"],
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": ["listen_seconds"],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "enrol_device",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9 ._-]{0,40}$",
|
|
9
|
+
"description": "Name for the device in this server"
|
|
10
|
+
},
|
|
11
|
+
"host": {
|
|
12
|
+
"description": "IP address or host name (SSH)",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"mac": {
|
|
16
|
+
"description": "MAC address, for a device with no IP (MAC-Telnet)",
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"port": {
|
|
20
|
+
"default": 22,
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 1,
|
|
23
|
+
"maximum": 65535
|
|
24
|
+
},
|
|
25
|
+
"username": {
|
|
26
|
+
"default": "admin",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"password_from": {
|
|
31
|
+
"description": "Where the password is: env:NAME, file:/path or keyring:service/account",
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
|
|
34
|
+
},
|
|
35
|
+
"ssh_agent": {
|
|
36
|
+
"default": false,
|
|
37
|
+
"description": "Sign in with the SSH agent of the host",
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
},
|
|
40
|
+
"key_filename": {
|
|
41
|
+
"description": "Path of a private key file on the host",
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"host_key_sha256": {
|
|
45
|
+
"description": "Pin the SSH host key (SHA256:…)",
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"apply": {
|
|
49
|
+
"default": false,
|
|
50
|
+
"description": "false = test the connection; true = add",
|
|
51
|
+
"type": "boolean"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["name", "port", "username", "ssh_agent", "apply"],
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "expire_wireguard_users",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"action": {
|
|
7
|
+
"default": "disable",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": ["disable", "remove"]
|
|
10
|
+
},
|
|
11
|
+
"apply": {
|
|
12
|
+
"default": false,
|
|
13
|
+
"description": "false = list only (default); true = act",
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["action", "apply"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"query": {
|
|
7
7
|
"type": "string",
|
|
8
8
|
"minLength": 1,
|
|
9
|
-
"description": "What you want to do, in words or keywords (e.g. 'add ipv4 nat masquerade rule')."
|
|
9
|
+
"description": "What you want to do, in English words or keywords (e.g. 'add ipv4 nat masquerade rule'). Translate a request in another language to English first."
|
|
10
10
|
},
|
|
11
11
|
"limit": {
|
|
12
12
|
"description": "Max results to return (default 8).",
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
"title": "firmware_check",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
|
-
"channel": {
|
|
7
|
-
"description": "Set the update channel before checking (default: keep current).",
|
|
8
|
-
"type": "string",
|
|
9
|
-
"enum": ["stable", "long-term", "testing"]
|
|
10
|
-
},
|
|
11
6
|
"fleet": {
|
|
12
7
|
"default": false,
|
|
13
8
|
"description": "Check all configured devices instead of just one.",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "firmware_post_upgrade",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"expected_version": {
|
|
7
|
+
"description": "Stop when the router does not run this version, for example '7.25.1'",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^\\d+\\.\\d+(?:\\.\\d+)?(?:(?:beta|rc)\\d+)?$"
|
|
10
|
+
},
|
|
11
|
+
"upgrade_routerboard": {
|
|
12
|
+
"default": false,
|
|
13
|
+
"description": "Queue the RouterBOOT upgrade when its version differs",
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
},
|
|
16
|
+
"commands": {
|
|
17
|
+
"default": [],
|
|
18
|
+
"description": "RouterOS commands to run after the checks, in order",
|
|
19
|
+
"maxItems": 50,
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": ["upgrade_routerboard", "commands"],
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "firmware_repo_fetch",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"version": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^\\d+\\.\\d+(?:\\.\\d+)?(?:(?:beta|rc)\\d+)?$",
|
|
9
|
+
"description": "RouterOS version, for example '7.25.1'"
|
|
10
|
+
},
|
|
11
|
+
"architecture": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["arm", "arm64", "mipsbe", "mmips", "smips", "ppc", "tile", "x86"],
|
|
14
|
+
"description": "Package architecture. Use x86 for CHR and x86_64 routers."
|
|
15
|
+
},
|
|
16
|
+
"packages": {
|
|
17
|
+
"default": ["routeros"],
|
|
18
|
+
"description": "Package names without version, for example ['routeros','wireless']",
|
|
19
|
+
"minItems": 1,
|
|
20
|
+
"maxItems": 20,
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[a-z][a-z0-9-]{0,40}$"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["version", "architecture", "packages"],
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "firmware_stage_from_repo",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"version": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^\\d+\\.\\d+(?:\\.\\d+)?(?:(?:beta|rc)\\d+)?$",
|
|
9
|
+
"description": "The version to stage, for example '7.25.1'"
|
|
10
|
+
},
|
|
11
|
+
"apply": {
|
|
12
|
+
"default": false,
|
|
13
|
+
"description": "false = show the plan (default); true = upload",
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["version", "apply"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "follow_ipv6_prefix",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"interface": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Interface of the DHCPv6 client, e.g. 'ether1' or 'pppoe-out1'"
|
|
9
|
+
},
|
|
10
|
+
"list": {
|
|
11
|
+
"default": "isp-prefix",
|
|
12
|
+
"description": "Address list that gets the whole delegated prefix",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,30}$"
|
|
15
|
+
},
|
|
16
|
+
"hosts": {
|
|
17
|
+
"default": [],
|
|
18
|
+
"maxItems": 32,
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,30}$",
|
|
26
|
+
"description": "Short name, becomes list '<list>-<name>'"
|
|
27
|
+
},
|
|
28
|
+
"suffix": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^::[0-9a-f]{1,4}(?::[0-9a-f]{1,4}){0,4}$",
|
|
31
|
+
"description": "Fixed part of the address, e.g. '::10'"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": ["name", "suffix"],
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"replace": {
|
|
39
|
+
"default": false,
|
|
40
|
+
"description": "Replace a script this tool did not write",
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"apply": {
|
|
44
|
+
"default": false,
|
|
45
|
+
"description": "false = show the script; true = install",
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["interface", "list", "hosts", "replace", "apply"],
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
}
|
|
@@ -9,6 +9,42 @@
|
|
|
9
9
|
"minimum": 1,
|
|
10
10
|
"maximum": 200
|
|
11
11
|
},
|
|
12
|
+
"batch": {
|
|
13
|
+
"description": "Batch name, e.g. 'hotel-2026-11'",
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,30}$"
|
|
16
|
+
},
|
|
17
|
+
"print": {
|
|
18
|
+
"default": false,
|
|
19
|
+
"description": "Write a printable HTML sheet and a CSV file",
|
|
20
|
+
"type": "boolean"
|
|
21
|
+
},
|
|
22
|
+
"title": {
|
|
23
|
+
"default": "Guest Wi-Fi",
|
|
24
|
+
"description": "Printed on each card",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"maxLength": 60
|
|
27
|
+
},
|
|
28
|
+
"validity": {
|
|
29
|
+
"description": "Printed text, e.g. '1 day'",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"maxLength": 40
|
|
32
|
+
},
|
|
33
|
+
"price": {
|
|
34
|
+
"description": "Printed text, e.g. '5 EUR'",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"maxLength": 20
|
|
37
|
+
},
|
|
38
|
+
"note": {
|
|
39
|
+
"description": "Small print, e.g. how to connect",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"maxLength": 120
|
|
42
|
+
},
|
|
43
|
+
"login_url": {
|
|
44
|
+
"description": "Hotspot login address, e.g. 'http://hotspot.lan/login', for a QR code",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"format": "uri"
|
|
47
|
+
},
|
|
12
48
|
"uptime_limit": {
|
|
13
49
|
"description": "Per-voucher uptime, e.g. '1h', '1d'",
|
|
14
50
|
"type": "string"
|
|
@@ -28,6 +64,6 @@
|
|
|
28
64
|
"type": "boolean"
|
|
29
65
|
}
|
|
30
66
|
},
|
|
31
|
-
"required": ["count", "code_prefix", "apply"],
|
|
67
|
+
"required": ["count", "print", "title", "code_prefix", "apply"],
|
|
32
68
|
"additionalProperties": false
|
|
33
69
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "get_container_logs",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"contains": {
|
|
7
|
+
"description": "Keep only lines with this text",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"maxLength": 80
|
|
10
|
+
},
|
|
11
|
+
"lines": {
|
|
12
|
+
"default": 50,
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"minimum": 1,
|
|
15
|
+
"maximum": 500
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["lines"],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|