Hi,

On 03/31/2017 10:54 AM, Pavel Andreev wrote:
Hi Dominik,

1. Did you read the http://pve.proxmox.com/wiki/Developer_Documentation ?
specially the part about the license and the Harmony CLA?
if not, please do so

yes, I did.

did you also send the signed cla ?


I thought of this approach and even looked exactly to the Storage code
and the header section but seemed to me my fix is simpler.
Would you be able to advise a bit further how to give the entries names?


the code in pve/status/plugin.pm
which is relevant is this:


sub parse_section_header {
    my ($class, $line) = @_;

    if ($line =~ m/^(\S+):\s*$/) { <-- here we parse the "graphite: " line
        my $type = lc($1);
        my $errmsg = undef; # set if you want to skip whole section
        eval { PVE::JSONSchema::pve_verify_configid($type); };
        $errmsg = $@ if $@;
        my $config = {}; # to return additional attributes
return ($type, $type, $errmsg, $config); <--- here the second return value is the id
    }
    return undef;
}

so you would have to parse

graphite: name

or so

and return (type, name,...)

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to