|
115 | 115 | "firewall_policy": { |
116 | 116 | "type": "string", |
117 | 117 | "enum": ["ACCEPT", "REJECT", "DROP"], |
118 | | - "options": { |
119 | | - "enum_titles": [ |
120 | | - "Accept", "Reject", "Drop"] |
121 | | - }, |
122 | | - "default": "REJECT" |
| 118 | + "options": {"enum_titles": ["Accept", "Reject", "Drop"]}, |
| 119 | + "default": "REJECT", |
123 | 120 | }, |
124 | 121 | "zone_policy": { |
125 | 122 | "type": "string", |
126 | 123 | "enum": ["ACCEPT", "REJECT", "DROP"], |
127 | | - "options": { |
128 | | - "enum_titles": [ |
129 | | - "Accept", "Reject", "Drop"] |
130 | | - }, |
131 | | - "default": "DROP" |
| 124 | + "options": {"enum_titles": ["Accept", "Reject", "Drop"]}, |
| 125 | + "default": "DROP", |
132 | 126 | }, |
133 | 127 | "rule_policy": { |
134 | 128 | "type": "string", |
135 | 129 | "enum": ["ACCEPT", "REJECT", "DROP", "MARK", "NOTRACK"], |
136 | 130 | "options": { |
137 | | - "enum_titles": [ |
138 | | - "Accept", "Reject", "Drop", "Mark", "Notrack"] |
| 131 | + "enum_titles": ["Accept", "Reject", "Drop", "Mark", "Notrack"] |
139 | 132 | }, |
140 | | - "default": "DROP" |
| 133 | + "default": "DROP", |
141 | 134 | }, |
142 | 135 | "base_radio_settings": { |
143 | 136 | "properties": { |
|
410 | 403 | "interval": {"type": "integer", "propertyOrder": 8}, |
411 | 404 | "message": {"type": "string", "propertyOrder": 9}, |
412 | 405 | "mode": {"type": "string", "propertyOrder": 10}, |
413 | | - } |
414 | | - } |
| 406 | + }, |
| 407 | + }, |
415 | 408 | }, |
416 | 409 | "firewall": { |
417 | 410 | "type": "object", |
|
433 | 426 | "title": "input", |
434 | 427 | "description": "policy for the INPUT chain of the filter table", |
435 | 428 | "propertyOrder": 2, |
436 | | - } |
| 429 | + }, |
437 | 430 | ] |
438 | 431 | }, |
439 | 432 | "output": { |
|
443 | 436 | "title": "output", |
444 | 437 | "description": "policy for the OUTPUT chain of the filter table", |
445 | 438 | "propertyOrder": 3, |
446 | | - } |
| 439 | + }, |
447 | 440 | ] |
448 | 441 | }, |
449 | 442 | "forward": { |
|
453 | 446 | "title": "forward", |
454 | 447 | "description": "policy for the FORWARD chain of the filter table", |
455 | 448 | "propertyOrder": 4, |
456 | | - } |
| 449 | + }, |
457 | 450 | ] |
458 | 451 | }, |
459 | 452 | "forwardings": { |
|
464 | 457 | "type": "object", |
465 | 458 | "title": "Forwarding", |
466 | 459 | "additionalProperties": False, |
467 | | - "required": [ |
468 | | - "src", |
469 | | - "dest", |
470 | | - ], |
| 460 | + "required": ["src", "dest",], |
471 | 461 | "properties": { |
472 | 462 | "src": { |
473 | 463 | "type": "string", |
474 | 464 | "title": "src", |
475 | 465 | "description": "specifies the traffic source zone and must " |
476 | | - "refer to one of the defined zone names", |
| 466 | + "refer to one of the defined zone names", |
477 | 467 | "propertyOrder": 1, |
478 | 468 | }, |
479 | 469 | "dest": { |
480 | 470 | "type": "string", |
481 | 471 | "title": "dest", |
482 | 472 | "description": "specifies the traffic destination zone and must " |
483 | | - "refer to one of the defined zone names", |
| 473 | + "refer to one of the defined zone names", |
484 | 474 | "propertyOrder": 2, |
485 | 475 | }, |
486 | 476 | "family": { |
487 | 477 | "type": "string", |
488 | 478 | "title": "family", |
489 | 479 | "description": "protocol family (ipv4, ipv6 or any) to generate " |
490 | | - "iptables rules for", |
| 480 | + "iptables rules for", |
491 | 481 | "enum": ["ipv4", "ipv6", "any"], |
492 | 482 | "default": "any", |
493 | | - "propertyOrder": 3 |
494 | | - } |
495 | | - } |
496 | | - } |
| 483 | + "propertyOrder": 3, |
| 484 | + }, |
| 485 | + }, |
| 486 | + }, |
497 | 487 | }, |
498 | 488 | "zones": { |
499 | 489 | "type": "array", |
|
503 | 493 | "type": "object", |
504 | 494 | "title": "Zones", |
505 | 495 | "additionalProperties": True, |
506 | | - "required": [ |
507 | | - "name" |
508 | | - ], |
| 496 | + "required": ["name"], |
509 | 497 | "properties": { |
510 | 498 | "name": { |
511 | 499 | "type": "string", |
512 | 500 | "title": "name", |
513 | 501 | "description": "unique zone name", |
514 | 502 | "maxLength": 11, |
515 | | - "propertyOrder": 1 |
| 503 | + "propertyOrder": 1, |
516 | 504 | }, |
517 | 505 | "network": { |
518 | 506 | "type": "array", |
|
524 | 512 | "title": "Network", |
525 | 513 | "type": "string", |
526 | 514 | "maxLength": 15, |
527 | | - "pattern": "^[a-zA-z0-9_\\.\\-]*$" |
528 | | - } |
| 515 | + "pattern": "^[a-zA-z0-9_\\.\\-]*$", |
| 516 | + }, |
529 | 517 | }, |
530 | 518 | "masq": { |
531 | 519 | "type": "boolean", |
532 | 520 | "title": "masq", |
533 | 521 | "description": "specifies wether outgoing zone traffic should be " |
534 | | - "masqueraded", |
| 522 | + "masqueraded", |
535 | 523 | "default": False, |
536 | 524 | "format": "checkbox", |
537 | | - "propertyOrder": 3 |
| 525 | + "propertyOrder": 3, |
538 | 526 | }, |
539 | 527 | "mtu_fix": { |
540 | 528 | "type": "boolean", |
|
551 | 539 | "title": "input", |
552 | 540 | "description": "default policy for incoming zone traffic", |
553 | 541 | "propertyOrder": 5, |
554 | | - } |
| 542 | + }, |
555 | 543 | ] |
556 | 544 | }, |
557 | 545 | "output": { |
|
561 | 549 | "title": "output", |
562 | 550 | "description": "default policy for outgoing zone traffic", |
563 | 551 | "propertyOrder": 6, |
564 | | - } |
| 552 | + }, |
565 | 553 | ] |
566 | 554 | }, |
567 | 555 | "forward": { |
|
571 | 559 | "title": "forward", |
572 | 560 | "description": "default policy for forwarded zone traffic", |
573 | 561 | "propertyOrder": 7, |
574 | | - } |
| 562 | + }, |
575 | 563 | ] |
576 | | - } |
577 | | - } |
578 | | - } |
| 564 | + }, |
| 565 | + }, |
| 566 | + }, |
579 | 567 | }, |
580 | 568 | "rules": { |
581 | 569 | "type": "array", |
|
585 | 573 | "type": "object", |
586 | 574 | "title": "Rules", |
587 | 575 | "additionalProperties": True, |
588 | | - "required": [ |
589 | | - "src", |
590 | | - "target" |
591 | | - ], |
| 576 | + "required": ["src", "target"], |
592 | 577 | "properties": { |
593 | 578 | "name": { |
594 | 579 | "type": "string", |
595 | 580 | "title": "name", |
596 | 581 | "description": "name of the rule", |
597 | | - "propertyOrder": 1 |
| 582 | + "propertyOrder": 1, |
598 | 583 | }, |
599 | 584 | "src": { |
600 | 585 | "type": "string", |
601 | 586 | "title": "src", |
602 | 587 | "description": "specifies the traffic source zone and must " |
603 | | - "refer to one of the defined zone names", |
604 | | - "propertyOrder": 2 |
| 588 | + "refer to one of the defined zone names", |
| 589 | + "propertyOrder": 2, |
605 | 590 | }, |
606 | 591 | "src_ip": { |
607 | 592 | "type": "string", |
608 | 593 | "title": "src_ip", |
609 | 594 | "description": "match incoming traffic from the specified " |
610 | | - "source ip address", |
611 | | - "propertyOrder": 3 |
| 595 | + "source ip address", |
| 596 | + "propertyOrder": 3, |
612 | 597 | }, |
613 | 598 | "src_mac": { |
614 | 599 | "type": "string", |
615 | 600 | "title": "src_mac", |
616 | 601 | "description": "match incoming traffic from the specified " |
617 | | - "mac address", |
| 602 | + "mac address", |
618 | 603 | "pattern": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$", |
619 | 604 | "minLength": 17, |
620 | 605 | "maxLength": 17, |
621 | | - "propertyOrder": 4 |
| 606 | + "propertyOrder": 4, |
622 | 607 | }, |
623 | 608 | "src_port": { |
624 | 609 | "type": "string", |
625 | 610 | "title": "src_port", |
626 | 611 | "description": "match incoming traffic from the specified " |
627 | | - "source port or port range, if relevant proto " |
628 | | - "is specified. Multiple ports can be specified " |
629 | | - "separated by blanks", |
630 | | - "propertyOrder": 5 |
| 612 | + "source port or port range, if relevant proto " |
| 613 | + "is specified. Multiple ports can be specified " |
| 614 | + "separated by blanks", |
| 615 | + "propertyOrder": 5, |
631 | 616 | }, |
632 | 617 | "proto": { |
633 | 618 | "type": "string", |
634 | 619 | "title": "proto", |
635 | 620 | "description": "match incoming traffic using the given protocol. " |
636 | | - "Can be one of tcp, udp, tcpudp, udplite, icmp, esp, " |
637 | | - "ah, sctp, or all or it can be a numeric value, " |
638 | | - "representing one of these protocols or a different one. " |
639 | | - "A protocol name from /etc/protocols is also allowed. " |
640 | | - "The number 0 is equivalent to all", |
| 621 | + "Can be one of tcp, udp, tcpudp, udplite, icmp, esp, " |
| 622 | + "ah, sctp, or all or it can be a numeric value, " |
| 623 | + "representing one of these protocols or a different one. " |
| 624 | + "A protocol name from /etc/protocols is also allowed. " |
| 625 | + "The number 0 is equivalent to all", |
641 | 626 | "default": "tcpudp", |
642 | | - "propertyOrder": 6 |
| 627 | + "propertyOrder": 6, |
643 | 628 | }, |
644 | 629 | "icmp_type": { |
645 | 630 | "title": "icmp_type", |
646 | 631 | "description": "for protocol icmp select specific icmp types to match. " |
647 | | - "Values can be either exact icmp type numbers or type names", |
| 632 | + "Values can be either exact icmp type numbers or type names", |
648 | 633 | "type": "array", |
649 | 634 | "uniqueItems": True, |
650 | 635 | "additionalItems": True, |
651 | 636 | "propertyOrder": 7, |
652 | | - "items": { |
653 | | - "title": "ICMP type", |
654 | | - "type": "string" |
655 | | - } |
| 637 | + "items": {"title": "ICMP type", "type": "string"}, |
656 | 638 | }, |
657 | 639 | "dest": { |
658 | 640 | "type": "string", |
659 | 641 | "title": "dest", |
660 | 642 | "description": "specifies the traffic destination zone and must " |
661 | | - "refer to one of the defined zone names, or * for " |
662 | | - "any zone. If specified, the rule applies to forwarded " |
663 | | - "traffic; otherwise, it is treated as input rule", |
664 | | - "propertyOrder": 8 |
| 643 | + "refer to one of the defined zone names, or * for " |
| 644 | + "any zone. If specified, the rule applies to forwarded " |
| 645 | + "traffic; otherwise, it is treated as input rule", |
| 646 | + "propertyOrder": 8, |
665 | 647 | }, |
666 | 648 | "dest_ip": { |
667 | 649 | "type": "string", |
668 | 650 | "title": "dest_ip", |
669 | 651 | "description": "match incoming traffic directed to the specified " |
670 | | - "destination ip address. With no dest zone, this " |
671 | | - "is treated as an input rule", |
672 | | - "propertyOrder": 9 |
| 652 | + "destination ip address. With no dest zone, this " |
| 653 | + "is treated as an input rule", |
| 654 | + "propertyOrder": 9, |
673 | 655 | }, |
674 | 656 | "dest_port": { |
675 | 657 | "type": "string", |
676 | 658 | "title": "dest_port", |
677 | 659 | "description": "match incoming traffic directed at the given " |
678 | | - "destination port or port range, if relevant " |
679 | | - "proto is specified. Multiple ports can be specified " |
680 | | - "separated by blanks", |
681 | | - "propertyOrder": 10 |
| 660 | + "destination port or port range, if relevant " |
| 661 | + "proto is specified. Multiple ports can be specified " |
| 662 | + "separated by blanks", |
| 663 | + "propertyOrder": 10, |
682 | 664 | }, |
683 | 665 | "target": { |
684 | 666 | "allOf": [ |
685 | 667 | {"$ref": "#/definitions/rule_policy"}, |
686 | 668 | { |
687 | 669 | "title": "target", |
688 | 670 | "description": "firewall action for matched traffic", |
689 | | - "propertyOrder": 11 |
690 | | - } |
| 671 | + "propertyOrder": 11, |
| 672 | + }, |
691 | 673 | ] |
692 | 674 | }, |
693 | 675 | "family": { |
|
696 | 678 | "description": "protocol family to generate iptables rules for", |
697 | 679 | "enum": ["ipv4", "ipv6", "any"], |
698 | 680 | "default": "any", |
699 | | - "propertyOrder": 12 |
| 681 | + "propertyOrder": 12, |
700 | 682 | }, |
701 | 683 | "limit": { |
702 | 684 | "type": "string", |
703 | 685 | "title": "limit", |
704 | 686 | "description": "maximum average matching rate; specified as a number, " |
705 | | - "with an optional /second, /minute, /hour or /day suffix", |
706 | | - "propertyOrder": 13 |
| 687 | + "with an optional /second, /minute, /hour or /day suffix", |
| 688 | + "propertyOrder": 13, |
707 | 689 | }, |
708 | 690 | "enabled": { |
709 | 691 | "type": "boolean", |
710 | 692 | "title": "enable rule", |
711 | 693 | "default": True, |
712 | 694 | "format": "checkbox", |
713 | | - "propertyOrder": 14 |
714 | | - } |
715 | | - } |
716 | | - } |
717 | | - } |
718 | | - } |
719 | | - } |
720 | | - } |
721 | | - } |
| 695 | + "propertyOrder": 14, |
| 696 | + }, |
| 697 | + }, |
| 698 | + }, |
| 699 | + }, |
| 700 | + }, |
| 701 | + }, |
| 702 | + }, |
| 703 | + }, |
722 | 704 | ) |
723 | 705 |
|
724 | 706 |
|
|
0 commit comments