Fix #1971: display firewall rule properties
authorRhonda D'Vine <rhonda@proxmox.com>
Mon, 12 Nov 2018 14:14:45 +0000 (15:14 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Nov 2018 09:42:01 +0000 (10:42 +0100)
This is the list of the properties that should get returned in the
pretty print format, too, not just in yaml/json output.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
src/PVE/API2/Firewall/Rules.pm

index 1aa6d27..b2a81a1 100644 (file)
@@ -122,9 +122,55 @@ sub register_get_rule {
        returns => {
            type => "object",
            properties => {
+               action => {
+                   type => 'string',
+               },
+               comment => {
+                   type => 'string',
+                   optional => 1,
+               },
+               dest => {
+                   type => 'string',
+                   optional => 1,
+               },
+               dport => {
+                   type => 'string',
+                   optional => 1,
+               },
+               enable => {
+                   type => 'integer',
+                   optional => 1,
+               },
+               iface => {
+                   type => 'string',
+                   optional => 1,
+               },
+               ipversion => {
+                   type => 'integer',
+                   optional => 1,
+               },
+               macro => {
+                   type => 'integer',
+                   optional => 1,
+               },
                pos => {
                    type => 'integer',
-               }
+               },
+               proto => {
+                   type => 'string',
+                   optional => 1,
+               },
+               source => {
+                   type => 'string',
+                   optional => 1,
+               },
+               sport => {
+                   type => 'string',
+                   optional => 1,
+               },
+               type => {
+                   type => 'string',
+               },
            },
        },
        code => sub {