]> git.proxmox.com Git - pve-firewall.git/blobdiff - src/pvefw
start API
[pve-firewall.git] / src / pvefw
index 1eff5caaae015a816c9836b8f97cc019f6e5eb8d..1671f557ef21b9aa7d79ee1a95e47da6aaf9375d 100755 (executable)
--- a/src/pvefw
+++ b/src/pvefw
@@ -1,6 +1,8 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -T
 
 use strict;
+use warnings;
+
 use lib qw(.);
 use PVE::Firewall;
 
@@ -12,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');
@@ -232,6 +237,13 @@ my $cmddef = {
        }
     }],
     stop => [ __PACKAGE__, 'stop', []],
+
+    # This is for debugging 
+    listgroups => [ 'PVE::API2::Firewall::Groups', 'list', [], 
+                   { node => $nodename }, sub {
+                       my $res = shift;
+                       print Dumper($res);
+                   }],
 };
 
 my $cmd = shift;