From 6a15b155b2d69c78a183a5f11fa5a070dc3cde5a Mon Sep 17 00:00:00 2001 From: JGStew Date: Wed, 7 Aug 2024 23:51:34 -0400 Subject: [PATCH] make it easier to wake --- examples/wake_on_lan.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/wake_on_lan.py b/examples/wake_on_lan.py index 2a98862..420d1ae 100644 --- a/examples/wake_on_lan.py +++ b/examples/wake_on_lan.py @@ -5,6 +5,7 @@ Related: +- https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0023378 - http://localhost:__WebReportsPort__/json/wakeonlan?cid=_ComputerID_&cid=_NComputerID_ - POST(binary) http://localhost:52311/data/wake-on-lan - https://localhost:52311/rd-proxy?RequestUrl=cgi-bin/bfenterprise/BESGatherMirrorNew.exe/-triggergatherdb?forwardtrigger @@ -16,6 +17,11 @@ import besapi +SESSION_RELEVANCE_COMPUTER_IDS = """ + ids of bes computers + whose(root server flag of it AND now - last report time of it < 10 * day) +""" + def main(): """Execution starts here""" @@ -27,10 +33,7 @@ def main(): # SessionRelevance for computer ids you wish to wake: # this currently returns the root server itself, which should have no real effect. # change this to a singular or plural result of computer ids you wish to wake. - session_relevance = """ - ids of bes computers - whose(root server flag of it AND now - last report time of it < 10 * day) - """ + session_relevance = SESSION_RELEVANCE_COMPUTER_IDS computer_id_array = bes_conn.session_relevance_array(session_relevance)