]>
Commit | Line | Data |
---|---|---|
f872534d DM |
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 | ||
7608b70c DM |
14 | my $single_section = shift; |
15 | my $found = 0; | |
16 | ||
f872534d DM |
17 | foreach my $section (@$types) { |
18 | my $plugin = PMG::Config::Base->lookup($section); | |
19 | my $schema = $plugin->updateSchema(1); | |
20 | my $properties = $schema->{properties}; | |
7608b70c DM |
21 | |
22 | if (defined($single_section)) { | |
23 | next if $section ne $single_section; | |
24 | } else { | |
25 | print ".Section '$section'\n\n"; | |
26 | } | |
27 | ||
28 | $found = 1; | |
a18c67c0 DM |
29 | |
30 | my $filter = sub { | |
31 | my ($key, $phash) = @_; | |
32 | return 1 if $key eq 'digest'; | |
33 | return 1 if $key eq 'delete'; | |
34 | return 0; | |
35 | }; | |
f872534d | 36 | |
a18c67c0 DM |
37 | print PVE::RESTHandler::dump_properties( |
38 | $properties, 'asciidoc', 'config', $filter); | |
f872534d | 39 | } |
7608b70c DM |
40 | |
41 | if (defined($single_section)) { | |
42 | die "no such section '$single_section'" if !$found; | |
43 | } | |
f872534d DM |
44 | |
45 | exit(0); |