+ properties => {
+ group => get_standard_option('pve-security-group-name'),
+ digest => get_standard_option('pve-config-digest', { optional => 0} ),
+ comment => {
+ type => 'string',
+ optional => 1,
+ }
+ },
+ },
+ links => [ { rel => 'child', href => "{group}" } ],
+ },
+ code => sub {
+ my ($param) = @_;
+
+ my $cluster_conf = PVE::Firewall::load_clusterfw_conf();
+
+ return &$get_security_group_list($cluster_conf);
+ }});
+
+__PACKAGE__->register_method({
+ name => 'create_security_group',
+ path => '',
+ method => 'POST',
+ description => "Create new security group.",
+ protected => 1,
+ permissions => {
+ check => ['perm', '/', [ 'Sys.Modify' ]],
+ },
+ parameters => {
+ additionalProperties => 0,
+ properties => {
+ group => get_standard_option('pve-security-group-name'),
+ comment => {
+ type => 'string',
+ optional => 1,
+ },
+ rename => get_standard_option('pve-security-group-name', {
+ description => "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.",
+ optional => 1,
+ }),
+ digest => get_standard_option('pve-config-digest'),