<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<b>Bonjour</b><b><br>
</b><b><br>
</b><b>J'ai commencée a regarder comment modifier mon problème</b><b><br>
</b><b><br>
</b><b>J'ai compris que cela se passe dans waptserver.py dans la
fonction </b><b><span class="pl-k">def</span></b><b> </b><b><span
class="pl-en">trigger_wakeonlan</span></b><b>():</b><b><br>
</b><br>
<font color="#666666"><i><br>
</i><i>
def trigger_wakeonlan():</i><i><br>
</i><i>
try:</i><i><br>
</i><i>
uuid = request.args['uuid']</i><i><br>
</i><i>
host_data = hosts().find_one({ "uuid":
uuid},fields={'uuid':1,'host':1,'computer_fqdn':1})</i><i><br>
</i><i>
</i><i><br>
</i><i>
macs = host_data['host']['mac']</i><i><br>
</i><i>
msg = u''</i><i><br>
</i><i>
if macs:</i><i><br>
</i><i>
logger.info(_("Sending magic wakeonlan packets to {}
for machine
{}").format(macs,host_data['host']['computer_fqdn']))</i><i><br>
</i><i>
wakeonlan.wol.send_magic_packet(*macs)</i></font><br>
<br>
<b>J'ai vu également que le fichier wol.py est déjà capable de
prendre en charge l'argument ip_address pour résoudre mon soucis.:</b><b><br>
</b><br>
<font color="#666666"><i>def send_magic_packet(*macs, **kwargs):</i><i><br>
</i><i> """</i><i><br>
</i><i> Wakes the computer with the given mac address if wake
on lan is</i><i><br>
</i><i> enabled on that host.</i><i><br>
</i><i><br>
</i><i> Keyword arguments:</i><i><br>
</i><i> :arguments macs: One or more macaddresses of machines
to wake.</i><i><br>
</i><i> :key ip_address: the ip address of the host to send the
magic packet</i><i><br>
</i><i> to (default "255.255.255.255")</i><i><br>
</i><i> :key port: the port of the host to send the magic
packet to</i><i><br>
</i><i> (default 9)</i><i><br>
</i><i><br>
</i><i> """</i></font><br>
<br>
<b><br>
</b><b>Je voudrais maintenant récupérer le champ broadcast dans
dispo dans la base de wapt.</b><b><br>
</b><b><br>
</b><b>J'ai donc essayée avec
host_data['host']['networking']['broadcast']<br>
<br>
Mais j'ai du mal a comprendre<br>
<br>
Un petit coup de main ?<br>
<br>
Simon<br>
<br>
<br>
</b><br>
<br>
<br>
<br>
<div class="moz-cite-prefix">Le 24/02/2016 15:59, Fonteneau Simon a
écrit :<br>
</div>
<blockquote cite="mid:56CDC538.70408@stemarie-aizenay.fr"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
Pour ceux qui tomberai sur ce poste plus tard<br>
Le broadcast wakeonlan est défini ici <br>
/opt/wapt/lib/site-packages/wakeonlan/wol.py <br>
<br>
Merci <br>
<br>
Simon<br>
<div class="moz-signature">
<p style="font-family: Helvetica, Arial, sans-serif; font-size:
10px; line-height: 12px; margin-bottom: 10px;"> <a
moz-do-not-send="true" style="text-decoration:none"
href="https://www.stemarie-aizenay.fr" class="clink
logo-container"> <img
src="cid:part1.02010406.06000300@stemarie-aizenay.fr"
alt="Collège Privé Ste Marie" class="sig-logo" border="0"
height="91" width="116"> </a> </p>
<p style="font-family: Helvetica, Arial, sans-serif; font-size:
10px; line-height: 12px; color: rgb(33, 33, 33);
margin-bottom: 10px;"><span style="font-weight: bold; color:
rgb(33, 33, 33); display: inline;" class="txt
signature_name-target sig-hide">Fonteneau Simon</span> <span
class="title-sep sep" style="display: inline;">/</span> <span
style="color: rgb(33, 33, 33); display: inline;" class="txt
signature_jobtitle-target sig-hide">Administrateur Réseaux</span>
<span class="email-sep break" style="display: inline;"><br>
</span> <a moz-do-not-send="true" class="link email
signature_email-target sig-hide"
href="mailto:sfonteneau@stemarie-aizenay.fr" style="color:
rgb(71, 124, 204); text-decoration: none; display: inline;">sfonteneau@stemarie-aizenay.fr</a><span
class="signature_email-sep sep" style="display: inline;"> /
</span><span style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_mobilephone-target sig-hide">0648761484</span></p>
<p style="font-family: Helvetica, Arial, sans-serif; font-size:
10px; line-height: 12px; margin-bottom: 10px;"> <span
style="font-weight: bold; color: rgb(33, 33, 33); display:
inline;" class="txt signature_companyname-target sig-hide">Collège
Privé Ste Marie</span> <span class="company-sep break"
style="display: inline;"><br>
</span> <span style="color: rgb(33, 33, 33); display:
inline;" class="txt office-sep sep">Tel: </span> <span
style="color: rgb(33, 33, 33); display: inline;" class="txt
signature_officephone-target sig-hide">0251946200 </span> <span
style="color: rgb(33, 33, 33); display: inline;" class="txt
fax-sep sep">/ Fax: </span> <span style="color: rgb(33,
33, 33); display: inline;" class="txt signature_fax-target
sig-hide">0251946856</span> <span class="address-sep break"
style="display: inline;"><br>
</span> <span style="color: rgb(33, 33, 33); display:
inline;" class="txt signature_address-target sig-hide">24
route de Nantes</span> <span class="address2-sep break"
style="display: block;"></span> <span style="color: rgb(33,
33, 33); display: inline;" class="txt
signature_address2-target sig-hide">85190 Aizenay</span> <span
class="website-sep break" style="display: inline;"><br>
</span> <a moz-do-not-send="true" class="link
signature_website-target sig-hide"
href="https://www.stemarie-aizenay.fr" style="color: rgb(71,
124, 204); text-decoration: none; display: inline;">https://www.stemarie-aizenay.fr</a>
</p>
<p class="social-list" style="font-size: 0px; line-height: 0;
font-family: Helvetica, Arial, sans-serif;"> <a
moz-do-not-send="true" style="text-decoration: none;
display: inline;" class="social signature_facebook-target
sig-hide" href="https://www.facebook.com/saintemarieaizenay"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="facebook.png"
src="cid:part5.06070502.01020602@stemarie-aizenay.fr"
alt="Facebook" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_facebook-sep"><img
src="cid:part7.04060405.01030603@stemarie-aizenay.fr"
width="2"></span> <a moz-do-not-send="true"
style="text-decoration: none; display: inline;"
class="social signature_googleplus-target sig-hide"
href="https://plus.google.com/105273696200535069375"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="googleplus.png"
src="cid:part8.01050608.02040305@stemarie-aizenay.fr"
alt="Google +" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_googleplus-sep"><img
src="cid:part10.00010608.05090803@stemarie-aizenay.fr"
width="2"></span> <a moz-do-not-send="true"
style="text-decoration: none; display: inline;"
class="social signature_linkedin-target sig-hide"
href="https://fr.linkedin.com/in/simon-fonteneau-b13382b0"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="linkedin.png"
src="cid:part11.09070906.03090601@stemarie-aizenay.fr"
alt="LinkedIn" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_linkedin-sep"><img
src="cid:part10.00010608.05090803@stemarie-aizenay.fr"
width="2"></span> <a moz-do-not-send="true"
style="display: inline; text-decoration: none;"
class="social signature_maps-target sig-hide"
href="https://goo.gl/maps/Jbyn8JUpumq"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="maps.png"
src="cid:part14.01050909.01030906@stemarie-aizenay.fr"
alt="Maps" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_maps-sep"><img
src="cid:part10.00010608.05090803@stemarie-aizenay.fr"
width="2"></span> </p>
<br>
<br>
<br>
<br>
</div>
<div class="moz-cite-prefix">Le 24/02/2016 15:29, Fonteneau Simon
a écrit :<br>
</div>
<blockquote cite="mid:56CDBE46.6070808@stemarie-aizenay.fr"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
Bonjour<br>
<br>
Je viens de tester le wakeonlan de wapt.<br>
Si je ne me trompe pas le wakeonlan est envoyée a
255.255.255.255<br>
<br>
Chez moi le wakeonlan est derrière une gateway, et le serveur
wapt n'est pas dans le même vlan que mes clients<br>
<br>
Il me faut donc envoyer sur wakeonlan -i 172.21.255.255
BC:EE:7B:9E:51:E2<br>
Au lieu de wakeonlan -i 255.255.255.255 BC:EE:7B:9E:51:E2<br>
<br>
Il y a t'il possibilités d'adaptée cela en lisant l'adresse ip
et le netmask du client ??<br>
<br>
Envoie a 255.255.255.255 et le au broadcast du dernier réseaux
de la dernière ip connue pour gérer les poste nomade.<br>
<br>
Merci Qu'en pensez vous<br>
<br>
Simon<br>
<div class="moz-signature">-- <br>
<p style="font-family: Helvetica, Arial, sans-serif;
font-size: 10px; line-height: 12px; margin-bottom: 10px;"> <a
moz-do-not-send="true" style="text-decoration:none"
href="https://www.stemarie-aizenay.fr" class="clink
logo-container"> <img
src="cid:part17.08070405.00020608@stemarie-aizenay.fr"
alt="Collège Privé Ste Marie" class="sig-logo"
border="0" height="91" width="116"> </a> </p>
<p style="font-family: Helvetica, Arial, sans-serif;
font-size: 10px; line-height: 12px; color: rgb(33, 33, 33);
margin-bottom: 10px;"><span style="font-weight: bold; color:
rgb(33, 33, 33); display: inline;" class="txt
signature_name-target sig-hide">Fonteneau Simon</span> <span
class="title-sep sep" style="display: inline;">/</span> <span
style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_jobtitle-target sig-hide">Administrateur
Réseaux</span> <span class="email-sep break"
style="display: inline;"><br>
</span> <a moz-do-not-send="true" class="link email
signature_email-target sig-hide"
href="mailto:sfonteneau@stemarie-aizenay.fr" style="color:
rgb(71, 124, 204); text-decoration: none; display:
inline;">sfonteneau@stemarie-aizenay.fr</a><span
class="signature_email-sep sep" style="display: inline;">
/ </span><span style="color: rgb(33, 33, 33); display:
inline;" class="txt signature_mobilephone-target sig-hide">0648761484</span></p>
<p style="font-family: Helvetica, Arial, sans-serif;
font-size: 10px; line-height: 12px; margin-bottom: 10px;"> <span
style="font-weight: bold; color: rgb(33, 33, 33); display:
inline;" class="txt signature_companyname-target sig-hide">Collège
Privé Ste Marie</span> <span class="company-sep break"
style="display: inline;"><br>
</span> <span style="color: rgb(33, 33, 33); display:
inline;" class="txt office-sep sep">Tel: </span> <span
style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_officephone-target sig-hide">0251946200
</span> <span style="color: rgb(33, 33, 33); display:
inline;" class="txt fax-sep sep">/ Fax: </span> <span
style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_fax-target sig-hide">0251946856</span>
<span class="address-sep break" style="display: inline;"><br>
</span> <span style="color: rgb(33, 33, 33); display:
inline;" class="txt signature_address-target sig-hide">24
route de Nantes</span> <span class="address2-sep break"
style="display: block;"></span> <span style="color:
rgb(33, 33, 33); display: inline;" class="txt
signature_address2-target sig-hide">85190 Aizenay</span> <span
class="website-sep break" style="display: inline;"><br>
</span> <a moz-do-not-send="true" class="link
signature_website-target sig-hide"
href="https://www.stemarie-aizenay.fr" style="color:
rgb(71, 124, 204); text-decoration: none; display:
inline;">https://www.stemarie-aizenay.fr</a> </p>
<p class="social-list" style="font-size: 0px; line-height: 0;
font-family: Helvetica, Arial, sans-serif;"> <a
moz-do-not-send="true" style="text-decoration: none;
display: inline;" class="social signature_facebook-target
sig-hide"
href="https://www.facebook.com/saintemarieaizenay"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="facebook.png"
src="cid:part21.07090208.07010705@stemarie-aizenay.fr"
alt="Facebook" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_facebook-sep"><img
src="cid:part23.01080901.02040304@stemarie-aizenay.fr"
width="2"></span> <a moz-do-not-send="true"
style="text-decoration: none; display: inline;"
class="social signature_googleplus-target sig-hide"
href="https://plus.google.com/105273696200535069375"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="googleplus.png"
src="cid:part24.04020909.06010102@stemarie-aizenay.fr"
alt="Google +" height="16" width="16"></a><span
style="white-space:nowrap;"
class="signature_googleplus-sep"><img
src="cid:part26.06010001.08000207@stemarie-aizenay.fr"
width="2"></span> <a moz-do-not-send="true"
style="text-decoration: none; display: inline;"
class="social signature_linkedin-target sig-hide"
href="https://fr.linkedin.com/in/simon-fonteneau-b13382b0"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="linkedin.png"
src="cid:part27.07080406.04010308@stemarie-aizenay.fr"
alt="LinkedIn" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_linkedin-sep"><img
src="cid:part26.06010001.08000207@stemarie-aizenay.fr"
width="2"></span> <a moz-do-not-send="true"
style="display: inline; text-decoration: none;"
class="social signature_maps-target sig-hide"
href="https://goo.gl/maps/Jbyn8JUpumq"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="maps.png"
src="cid:part30.04040905.09020600@stemarie-aizenay.fr"
alt="Maps" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_maps-sep"><img
src="cid:part26.06010001.08000207@stemarie-aizenay.fr"
width="2"></span> </p>
<br>
<br>
<br>
<br>
</div>
</blockquote>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<p style="font-family: Helvetica, Arial, sans-serif; font-size:
10px; line-height: 12px; margin-bottom: 10px;"> <a
style="text-decoration:none"
href="https://www.stemarie-aizenay.fr" class="clink
logo-container"> <img
src="cid:part33.07090608.07080000@stemarie-aizenay.fr"
alt="Collège Privé Ste Marie" class="sig-logo" border="0"
height="91" width="116"> </a> </p>
<p style="font-family: Helvetica, Arial, sans-serif; font-size:
10px; line-height: 12px; color: rgb(33, 33, 33); margin-bottom:
10px;"><span style="font-weight: bold; color: rgb(33, 33, 33);
display: inline;" class="txt signature_name-target sig-hide">Fonteneau
Simon</span> <span class="title-sep sep" style="display:
inline;">/</span> <span style="color: rgb(33, 33, 33);
display: inline;" class="txt signature_jobtitle-target
sig-hide">Administrateur Réseaux</span> <span
class="email-sep break" style="display: inline;"><br>
</span> <a class="link email signature_email-target sig-hide"
href="mailto:sfonteneau@stemarie-aizenay.fr" style="color:
rgb(71, 124, 204); text-decoration: none; display: inline;">sfonteneau@stemarie-aizenay.fr</a><span
class="signature_email-sep sep" style="display: inline;"> / </span><span
style="color: rgb(33, 33, 33); display: inline;" class="txt
signature_mobilephone-target sig-hide">0648761484</span></p>
<p style="font-family: Helvetica, Arial, sans-serif; font-size:
10px; line-height: 12px; margin-bottom: 10px;"> <span
style="font-weight: bold; color: rgb(33, 33, 33); display:
inline;" class="txt signature_companyname-target sig-hide">Collège
Privé Ste Marie</span> <span class="company-sep break"
style="display: inline;"><br>
</span> <span style="color: rgb(33, 33, 33); display: inline;"
class="txt office-sep sep">Tel: </span> <span style="color:
rgb(33, 33, 33); display: inline;" class="txt
signature_officephone-target sig-hide">0251946200 </span> <span
style="color: rgb(33, 33, 33); display: inline;" class="txt
fax-sep sep">/ Fax: </span> <span style="color: rgb(33, 33,
33); display: inline;" class="txt signature_fax-target
sig-hide">0251946856</span> <span class="address-sep break"
style="display: inline;"><br>
</span> <span style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_address-target sig-hide">24 route de
Nantes</span> <span class="address2-sep break"
style="display: block;"></span> <span style="color: rgb(33,
33, 33); display: inline;" class="txt
signature_address2-target sig-hide">85190 Aizenay</span> <span
class="website-sep break" style="display: inline;"><br>
</span> <a class="link signature_website-target sig-hide"
href="https://www.stemarie-aizenay.fr" style="color: rgb(71,
124, 204); text-decoration: none; display: inline;">https://www.stemarie-aizenay.fr</a>
</p>
<p class="social-list" style="font-size: 0px; line-height: 0;
font-family: Helvetica, Arial, sans-serif;"> <a
style="text-decoration: none; display: inline;" class="social
signature_facebook-target sig-hide"
href="https://www.facebook.com/saintemarieaizenay"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="facebook.png"
src="cid:part37.08070303.03090608@stemarie-aizenay.fr"
alt="Facebook" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_facebook-sep"><img
src="cid:part39.03040403.01020200@stemarie-aizenay.fr"
width="2"></span> <a style="text-decoration: none; display:
inline;" class="social signature_googleplus-target sig-hide"
href="https://plus.google.com/105273696200535069375"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="googleplus.png"
src="cid:part40.06070304.05040508@stemarie-aizenay.fr"
alt="Google +" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_googleplus-sep"><img
src="cid:part39.03040403.01020200@stemarie-aizenay.fr"
width="2"></span> <a style="text-decoration: none; display:
inline;" class="social signature_linkedin-target sig-hide"
href="https://fr.linkedin.com/in/simon-fonteneau-b13382b0"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="linkedin.png"
src="cid:part43.00060306.08010907@stemarie-aizenay.fr"
alt="LinkedIn" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_linkedin-sep"><img
src="cid:part39.03040403.01020200@stemarie-aizenay.fr"
width="2"></span> <a style="display: inline;
text-decoration: none;" class="social signature_maps-target
sig-hide" href="https://goo.gl/maps/Jbyn8JUpumq"><img
style="margin-bottom:2px; border:none; display:inline;"
data-filename="maps.png"
src="cid:part46.08000404.04060906@stemarie-aizenay.fr"
alt="Maps" height="16" width="16"></a><span
style="white-space:nowrap;" class="signature_maps-sep"><img
src="cid:part39.03040403.01020200@stemarie-aizenay.fr"
width="2"></span>
</p>
</div>
</body>
</html>