>
> - If so, can someone provide some pointers on how to properly accomplish
> > this?
> >
> >
> My understanding of WOL is that the IP address of the machine itself does
> not correspond to the address used for the magic packet (the MAC address):
>
> https://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet
>
> If this is the case, then access to the connection parameters is not
> necessary. I suggest instead leveraging the decoration aspect of the API to
> add additional attributes to connections, exposed through fields such that
> the admin can manually set the MAC address to be used for WOL. The
> technique involved would be similar to what is done with TOTP:
>
>
Sorry, I should have been more clear about why I'm trying to get the
hostname from the original configuration.  It isn't for the part that sends
the WOL packet, it's for the status check.  So, basically what I'm trying
to do with this extension is verify whether or not a host is up by opening
a connection to that host using the hostname and port number specified in
the configuration, and then also provide the ability to wake up the host
via the Magic Packet.  I do understand the hostname/IP is not required (or
even really useful) for sending the Magic Packet - you need the MAC
address, and, potentially, a IP broadcast address.  It's the status check
piece of it that I was trying to implement using existing information.  It
doesn't make a whole lot of sense to implement the status check using an
additional arbitrary attribute field that contains the hostname or IP when
that is already available in the configuration.

I could pass the status check through the web UI, using the REST API to
pull the information info the AngularJS webapp, and then feed that back to
a REST endpoint, but this seems like a lot of extra work/code, both writing
it and when running it, to get at a piece of information that might be just
as easily passed in the Java code on the backend.  Also, if you look at my
code you'll see I was playing with using the executor process scheduling to
have the status checked periodically and stored in an attribute - another
reason I wanted to do everything on the backend and not have to try passing
it all through the rest API.

Any hints on how to accomplish would be welcome.

Thanks,
Nick

Reply via email to