You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gen-pve-firewall-rules-opts.pl 448B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/perl
  2. use lib '.';
  3. use strict;
  4. use warnings;
  5. use PVE::RESTHandler;
  6. use PVE::Firewall;
  7. my $prop = {};
  8. PVE::Firewall::add_rule_properties($prop);
  9. my $skip = {
  10. action => 1,
  11. enable => 1,
  12. type => 1,
  13. digest => 1,
  14. macro => 1,
  15. pos => 1,
  16. comment => 1,
  17. };
  18. my $filterFn = sub {
  19. my ($k, $phash) = @_;
  20. return $skip->{$k} || 0;
  21. };
  22. print PVE::RESTHandler::dump_properties($prop, 'asciidoc', 'arg', $filterFn);