Skip to content

Commit

Permalink
add wake on lan medic
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Jun 7, 2024
1 parent 7ce0484 commit e6e4218
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions examples/setup_server_plugin_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main():
args, _unknown = parser.parse_known_args()

# allow set global scoped vars
global bes_conn, verbose, config_ini, invoke_folder
global bes_conn, verbose, invoke_folder
verbose = args.verbose

# get folder the script was invoked from:
Expand Down Expand Up @@ -169,7 +169,7 @@ def main():
)
)

# print(root_id)
logging.info("Root server computer id: %s", root_id)

InstallPluginService_id = int(
bes_conn.session_relevance_string(
Expand All @@ -192,6 +192,17 @@ def main():
ConfigureCredentials_id,
)

EnableWakeOnLAN_id = int(
bes_conn.session_relevance_string(
'unique value of ids of fixlets whose(name of it contains "Enable Wake-on-LAN Medic") of bes sites whose(name of it = "BES Support")'
)
)

logging.info(
"Enable Wake-on-LAN Medic content id: %s",
EnableWakeOnLAN_id,
)

# NOTE: Work in progress
XML_String_MultiActionGroup = f"""<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
Expand Down Expand Up @@ -224,6 +235,13 @@ def main():
<Parameter Name="RESTURL"><![CDATA[https://localhost:52311/api]]></Parameter>
<SecureParameter Name="RESTPassword"><![CDATA[{password}]]></SecureParameter>
</SourcedMemberAction>
<SourcedMemberAction>
<SourceFixlet>
<Sitename>BES Support</Sitename>
<FixletID>{EnableWakeOnLAN_id}</FixletID>
<Action>Action1</Action>
</SourceFixlet>
</SourcedMemberAction>
<Settings>
<HasEndTime>true</HasEndTime>
<EndDateTimeLocalOffset>P7D</EndDateTimeLocalOffset>
Expand Down

0 comments on commit e6e4218

Please sign in to comment.