Skip to content

Commit

Permalink
CP-49920: Moved power-on.py from scripts/poweron to python3/poweron
Browse files Browse the repository at this point in the history
- Modified Makefile to include  power-on.py under python3 directory
- Removed  power-on.py from scripts/Makefile

Signed-off-by: Ashwinh <ashwin.h@cloud.com>
  • Loading branch information
ashwin9390 committed Jun 26, 2024
1 parent 0d77a71 commit ced62bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions python3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ install:
$(IPROG) bin/perfmon $(DESTDIR)$(OPTDIR)/bin
$(IPROG) bin/xe-scsi-dev-map $(DESTDIR)$(OPTDIR)/bin
$(IPROG) plugins/disk-space $(DESTDIR)$(PLUGINDIR)
# poweron
$(IPROG) poweron/wlan.py $(DESTDIR)$(PLUGINDIR)/wlan.py
$(IPROG) poweron/wlan.py $(DESTDIR)$(PLUGINDIR)/wake-on-lan
$(IPROG) poweron/DRAC.py $(DESTDIR)$(PLUGINDIR)/DRAC.py
$(IPROG) poweron/power-on.py $(DESTDIR)$(PLUGINDIR)/power-on-host
5 changes: 3 additions & 2 deletions scripts/poweron/power-on.py → python3/poweron/power-on.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Example script which shows how to use the XenAPI to find a particular Host's management interface
# and send it a wake-on-LAN packet.

import sys
import syslog
import time

Expand All @@ -26,8 +27,8 @@ def waitForXapi(session, host):
metrics = session.xenapi.host.get_metrics(host)
try:
finished = session.xenapi.host_metrics.get_live(metrics)
except:
pass
except Exception as e:
print(type(e).__name__, "occurred:", e, file=sys.stderr)
return str(finished)


Expand Down
2 changes: 0 additions & 2 deletions scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ endif
$(IDATA) examples/python/inventory.py $(DESTDIR)$(SITE3_DIR)/
$(IPROG) examples/python/echo.py $(DESTDIR)$(PLUGINDIR)/echo
$(IPROG) examples/python/shell.py $(DESTDIR)$(LIBEXECDIR)/shell.py
# poweron
$(IPROG) poweron/power-on.py $(DESTDIR)$(PLUGINDIR)/power-on-host
# YUM plugins
$(IPROG) yum-plugins/accesstoken.py $(DESTDIR)$(YUMPLUGINDIR)
$(IDATA) yum-plugins/accesstoken.conf $(DESTDIR)$(YUMPLUGINCONFDIR)
Expand Down

0 comments on commit ced62bd

Please sign in to comment.