]> git.proxmox.com Git - pve-firewall.git/blobdiff - pvefw
remove shorewall specific commands
[pve-firewall.git] / pvefw
diff --git a/pvefw b/pvefw
index 70a2beecd954f867174c45fe7758d4812b22d65b..f7273943add07401682da8daa83feff5f294eed0 100755 (executable)
--- a/pvefw
+++ b/pvefw
@@ -204,7 +204,7 @@ __PACKAGE__->register_method ({
     name => 'start',
     path => 'start',
     method => 'POST',
-    description => "Start firewall.",
+    description => "Start (or restart if already active) firewall.",
     parameters => {
        additionalProperties => 0,
        properties => {},
@@ -219,49 +219,11 @@ __PACKAGE__->register_method ({
        return undef;
     }});
 
-__PACKAGE__->register_method ({
-    name => 'restart',
-    path => 'restart',
-    method => 'POST',
-    description => "Restart firewall.",
-    parameters => {
-       additionalProperties => 0,
-       properties => {},
-    },
-    returns => { type => 'null' },
-
-    code => sub {
-       my ($param) = @_;
-
-       PVE::Firewall::compile_and_start(1);
-
-       return undef;
-    }});
-
 __PACKAGE__->register_method ({
     name => 'stop',
     path => 'stop',
     method => 'POST',
-    description => "Stop firewall.",
-    parameters => {
-       additionalProperties => 0,
-       properties => {},
-    },
-    returns => { type => 'null' },
-
-    code => sub {
-       my ($param) = @_;
-
-       PVE::Tools::run_command(['shorewall', 'stop']);
-
-       return undef;
-    }});
-
-__PACKAGE__->register_method ({
-    name => 'clear',
-    path => 'clear',
-    method => 'POST',
-    description => "Clear will remove all rules installed by this script. The host is then unprotected.",
+    description => "Stop firewall. This will remove all rules installed by this script. The host is then unprotected.",
     parameters => {
        additionalProperties => 0,
        properties => {},
@@ -271,7 +233,7 @@ __PACKAGE__->register_method ({
     code => sub {
        my ($param) = @_;
 
-       PVE::Tools::run_command(['shorewall', 'clear']);
+       die "implement me";
 
        return undef;
     }});
@@ -283,7 +245,6 @@ my $cmddef = {
     start => [ __PACKAGE__, 'start', []],
     restart => [ __PACKAGE__, 'restart', []],
     stop => [ __PACKAGE__, 'stop', []],
-    clear => [ __PACKAGE__, 'clear', []],
     enablevmfw => [ __PACKAGE__, 'enablevmfw', []],
     disablevmfw => [ __PACKAGE__, 'disablevmfw', []],
     enablehostfw => [ __PACKAGE__, 'enablehostfw', []],