Status: allow IPs and move properties to base class

We only allowed servers with the dns-name format, as such status
server may often be in internal networks and with no hostname
(testing, small network so no dns, ...) do not limit the
configuration possibilities with no reason.

Also move the base property part to the base Status class, all
current plugins use server and port so no need for double
declaration of format/descriptions.

If a future plugin doesn't need them it can omit them by not
returning the respective properties in the options method
inherited by SectionConfig.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2016-05-20 12:07:38 +02:00 committed by Dietmar Maurer
parent f51fdaa6a8
commit 4caf47e9e2
2 changed files with 8 additions and 8 deletions

View File

@ -20,14 +20,6 @@ sub type {
sub properties { sub properties {
return { return {
server => {
type => 'string', format => 'dns-name',
description => "server dns name",
},
port => {
type => 'integer',
description => "network port",
},
path => { path => {
type => 'string', format => 'graphite-path', type => 'string', format => 'graphite-path',
description => "root graphite path (ex: proxmox.mycluster.mykey)", description => "root graphite path (ex: proxmox.mycluster.mykey)",

View File

@ -26,6 +26,14 @@ my $defaultData = {
type => 'boolean', type => 'boolean',
optional => 1, optional => 1,
}, },
server => {
type => 'string', format => 'address',
description => "server dns name or IP address",
},
port => {
type => 'integer',
description => "server network port",
},
}, },
}; };