Skip to content

Commit

Permalink
Add delay to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoeders committed Nov 8, 2024
1 parent 574ba27 commit 51e2fd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yinstruments/pdu/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def main():
choices=("on", "off", "is_on", "reboot", "get_status"),
)
arguments.add_argument("port_num", type=str, help="Port number to perform action on")
arguments.add_argument("--delay", type=float, help="Delay time for command")
args = arguments.parse_args()

# These four variables are your arguments you will enter into the command line
Expand All @@ -35,7 +36,10 @@ def main():

if dev_type.lower() == "netbooter":
port = 23
pdu = Netbooter(ip_address, port)
if args.delay:
pdu = Netbooter(ip_address, port, command_delay=args.delay)
else:
pdu = Netbooter(ip_address, port)
elif dev_type == "lindy":
port = 80
pdu = Lindy(ip_address, port)
Expand Down

0 comments on commit 51e2fd7

Please sign in to comment.