Skip to content

Commit

Permalink
make it easier to wake
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Aug 8, 2024
1 parent 9d39d58 commit 6a15b15
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/wake_on_lan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"""
Expand All @@ -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)

Expand Down

0 comments on commit 6a15b15

Please sign in to comment.