items => {
type => "object",
properties => {
- name => {
- description => "Security group name.",
- type => 'string',
- },
+ name => get_standard_option('pve-security-group-name'),
},
},
links => [ { rel => 'child', href => "{name}" } ],
return $res;
}});
+
__PACKAGE__->register_method ({
subclass => "PVE::API2::Firewall::GroupRules",
path => '{group}',
use strict;
use warnings;
+use PVE::JSONSchema qw(get_standard_option);
use base qw(PVE::API2::Firewall::RulesBase);
-__PACKAGE__->additional_parameters({ group => {
- description => "Security group name.",
- type => 'string',
- maxLength => 20, # fixme: what length?
-}});
+__PACKAGE__->additional_parameters({ group => get_standard_option('pve-security-group-name') });
sub allow_groups {
return 0;
description => "IP set name.",
type => 'string',
pattern => '[A-Za-z][A-Za-z0-9\-\_]+',
- minLength => 2,
- maxLength => 20,
+ minLength => 2,
+ maxLength => 20,
+});
+
+PVE::JSONSchema::register_standard_option('pve-security-group-name', {
+ description => "Security Group name.",
+ type => 'string',
+ pattern => '[A-Za-z][A-Za-z0-9\-\_]+',
+ minLength => 2,
+ maxLength => 20,
});
my $feature_ipset_nomatch = 0;