]>
git.proxmox.com Git - pve-firewall.git/blob - src/PVE/API2/Firewall/Groups.pm
23b33efa9b93bdd7e71270b36c2b66234bb27820
1 package PVE
::API2
::Firewall
::Groups
;
5 use PVE
::JSONSchema
qw(get_standard_option);
8 use PVE
::API2
::Firewall
::Rules
;
10 use Data
::Dumper
; # fixme: remove
12 use base
qw(PVE::RESTHandler);
14 __PACKAGE__-
>register_method({
18 description
=> "List security groups.",
20 additionalProperties
=> 0,
27 name
=> get_standard_option
('pve-security-group-name'),
30 links
=> [ { rel
=> 'child', href
=> "{name}" } ],
35 my $cluster_conf = PVE
::Firewall
::load_clusterfw_conf
();
38 foreach my $group (keys %{$cluster_conf->{groups
}}) {
39 push @$res, { name
=> $group, count
=> scalar(@{$cluster_conf->{groups
}->{$group}}) };
46 __PACKAGE__-
>register_method ({
47 subclass
=> "PVE::API2::Firewall::GroupRules",