On Mon, Jan 14, 2019 at 04:24:55PM +0100, Thomas Lamprecht wrote:
> > +   send($sock, $packet, 0, $to) or die "Unable to send wake on LAN magic 
> > packet!\n";
> > +   close($sock);
> > +
> > +   return undef;
> > +    }});
> >  
> >  __PACKAGE__->register_method({
> >      name => 'rrd', 
> > diff --git a/PVE/NodeConfig.pm b/PVE/NodeConfig.pm
> > index af1c782b..3cc8ba48 100644
> > --- a/PVE/NodeConfig.pm
> > +++ b/PVE/NodeConfig.pm
> > @@ -61,6 +61,12 @@ my $confdesc = {
> >     description => 'Node description/comment.',
> >     optional => 1,
> >      },
> > +    mac => {
> 
> I'd prefer something like 'wol-mac' as mac is just to general. But currently
> this config parser does not supports a - separator (only _) so either we 
> settle
> for wol-mac or allow '-'.

I'd prefer "wol" or even "wakeonlan", with the MAC as value. that way,
it is easy to upgrade to a property string if we want to in the future,
with the MAC as default key inside the property string.

> I'd to the latter, if there isn't any reason against it (@Fabian, I guess that
> there wasn't?)

none of the existing keys needed a '-' (but then again, neither is there
a '_' anywhere in sight so far ;)). '_' is a bit nicer as it doesn't
need to be quoted when accessing hashes in perl, but in PVE the general
tendency is to avoid either in config keys and just use alphanumeric
wherever reasonably possible.

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to