]> git.proxmox.com Git - pmg-docs.git/blob - gen-pmg.conf.5-opts.pl
gen-pmg.conf.5-opts.pl - skip digest and delete properties
[pmg-docs.git] / gen-pmg.conf.5-opts.pl
1 #!/usr/bin/perl
2
3 use lib '.';
4 use strict;
5 use warnings;
6 use PVE::RESTHandler;
7
8 use Data::Dumper;
9
10 use PMG::Config;
11
12 my $types = PMG::Config::Base->lookup_types;
13
14 foreach my $section (@$types) {
15 my $plugin = PMG::Config::Base->lookup($section);
16 my $schema = $plugin->updateSchema(1);
17 my $properties = $schema->{properties};
18
19 print ".Section '$section'\n\n";
20
21 my $filter = sub {
22 my ($key, $phash) = @_;
23 return 1 if $key eq 'digest';
24 return 1 if $key eq 'delete';
25 return 0;
26 };
27
28 print PVE::RESTHandler::dump_properties(
29 $properties, 'asciidoc', 'config', $filter);
30 }
31
32 exit(0);