|
756 | 756 | }, |
757 | 757 | } |
758 | 758 |
|
| 759 | +firewall_includes_properties = { |
| 760 | + "name": {"$ref": "#/definitions/firewall/name"}, |
| 761 | + "enabled": {"$ref": "#/definitions/firewall/enabled"}, |
| 762 | + "family": {"$ref": "#/definitions/firewall/family"}, |
| 763 | + "script_type": { # Note: corresponds to UCI variable "type" |
| 764 | + "type": "string", |
| 765 | + "title": "The type of the script", |
| 766 | + "description": 'Specifies the type of the include, can be "script" for traditional ' |
| 767 | + 'shell script includes or restore for plain files in iptables-restore format.', |
| 768 | + "enum": ["script", "restore"], |
| 769 | + "propertyOrder": 101, |
| 770 | + }, |
| 771 | + "path": { |
| 772 | + "type": "string", |
| 773 | + "title": "Script to include", |
| 774 | + "description": "Specifies a shell script to execute on boot or firewall restarts", |
| 775 | + "default": "/etc/firewall.user", |
| 776 | + "propertyOrder": 102, |
| 777 | + }, |
| 778 | + "reload": { |
| 779 | + "type": "boolean", |
| 780 | + "title": "Reload the included file when reloading firewall rules", |
| 781 | + "description": "This specifies whether or not the included file should be " |
| 782 | + "reloaded when the firewall rules are reloaded. This is only needed if " |
| 783 | + "the included file injects rules into internal OpenWRT chains.", |
| 784 | + "default": False, |
| 785 | + "propertyOrder": 103, |
| 786 | + }, |
| 787 | +} |
| 788 | + |
759 | 789 | firewall_redirect_properties = { |
760 | 790 | "name": {"$ref": "#/definitions/firewall/name"}, |
761 | 791 | "enabled": {"$ref": "#/definitions/firewall/enabled"}, |
|
1230 | 1260 | "properties": firewall_redirect_properties, |
1231 | 1261 | }, |
1232 | 1262 | }, |
| 1263 | + "includes": { |
| 1264 | + "type": "array", |
| 1265 | + "title": "Includes", |
| 1266 | + "propertyOrder": 9, |
| 1267 | + "items": { |
| 1268 | + "type": "object", |
| 1269 | + "title": "Include", |
| 1270 | + "additionalProperties": False, |
| 1271 | + "properties": firewall_includes_properties, |
| 1272 | + }, |
| 1273 | + }, |
1233 | 1274 | } |
1234 | 1275 |
|
1235 | 1276 | firewall = { |
|
0 commit comments