]> git.proxmox.com Git - pve-firewall.git/blobdiff - src/PVE/API2/Firewall/Cluster.pm
prefix ipset chains with PVEFW-
[pve-firewall.git] / src / PVE / API2 / Firewall / Cluster.pm
index ce56a6d65cea908d75b7a2d315e534bdb1d75636..5923aa84bd219f33f220a7ba820d6b3b940b5785 100644 (file)
@@ -6,6 +6,7 @@ use PVE::Exception qw(raise raise_param_exc raise_perm_exc);
 use PVE::JSONSchema qw(get_standard_option);
 
 use PVE::Firewall;
+use PVE::API2::Firewall::Rules;
 use PVE::API2::Firewall::Groups;
 
 #fixme: locking?
@@ -19,6 +20,11 @@ __PACKAGE__->register_method ({
     path => 'groups',
 });
 
+__PACKAGE__->register_method ({
+    subclass => "PVE::API2::Firewall::ClusterRules",  
+    path => 'rules',
+});
+
 __PACKAGE__->register_method({
     name => 'index',
     path => '',
@@ -99,6 +105,7 @@ __PACKAGE__->register_method({
     path => 'options',
     method => 'PUT',
     description => "Set Firewall options.",
+    protected => 1,
     parameters => {
        additionalProperties => 0,
        properties => &$add_option_properties({
@@ -127,7 +134,6 @@ __PACKAGE__->register_method({
            $cluster_conf->{options}->{enable} = $param->{enable} ? 1 : 0;
        }
 
-
        PVE::Firewall::save_clusterfw_conf($cluster_conf);
 
        return undef;