]>
git.proxmox.com Git - pve-firewall.git/blob - Host.pm
0ebdcceb494baa4688254b6abf82c883ade25a4e
1 package PVE
::API2
::Firewall
::Host
;
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 ({
15 subclass
=> "PVE::API2::Firewall::HostRules",
19 __PACKAGE__-
>register_method({
23 permissions
=> { user
=> 'all' },
24 description
=> "Directory index.",
26 additionalProperties
=> 0,
28 node
=> get_standard_option
('pve-node'),
37 links
=> [ { rel
=> 'child', href
=> "{name}" } ],
44 { name
=> 'options' },
50 __PACKAGE__-
>register_method({
51 name
=> 'get_options',
54 description
=> "Get host firewall options.",
57 additionalProperties
=> 0,
59 node
=> get_standard_option
('pve-node'),
69 my $hostfw_conf = PVE
::Firewall
::load_hostfw_conf
();
71 my $options = $hostfw_conf->{options
} || {};
73 my $digest = $hostfw_conf->{digest
};
75 $options->{digest
} = $digest;