X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=src%2Fpvefw;h=4cc2fe28195aa435b828421caf09c5d0028fdb43;hb=d1c53b3e0daad6891ad6a97b6e79d03d7e781a78;hp=e943a38944313c84f1c019ed24edcc75e9a39f67;hpb=c2dca0861eec2f4ef99dc22390725a58ec34561a;p=pve-firewall.git diff --git a/src/pvefw b/src/pvefw index e943a38..4cc2fe2 100755 --- a/src/pvefw +++ b/src/pvefw @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -T use strict; use warnings; @@ -14,9 +14,12 @@ use PVE::RPCEnvironment; use PVE::JSONSchema qw(get_standard_option); use PVE::CLIHandler; +use PVE::API2::Firewall::Groups; use base qw(PVE::CLIHandler); +use Data::Dumper; + $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; initlog ('pvefw'); @@ -234,6 +237,18 @@ my $cmddef = { } }], stop => [ __PACKAGE__, 'stop', []], + + # This is for debugging + listgroups => [ 'PVE::API2::Firewall::Groups', 'list', [], + { node => $nodename }, sub { + my $res = shift; + print Dumper($res); + }], + grouprules => [ 'PVE::API2::Firewall::Groups', 'get_rules', ['group'], + { node => $nodename }, sub { + my $res = shift; + print Dumper($res); + }], }; my $cmd = shift;