Thanks for the suggestion, I have looked into this but could not find where this is stored on the device.
I tried testing a simple reboot router on lan down for a test and work up from there but I am clearly not understanding something.
my scri
import ops # Import the OPS module.
import sys # Import the sys module.
# Subscription processing function
def ops_condition (o):
ops.interface.ifstat_subscribe(lan_down, 2, Ethernet0/0/0, 1)
# Monitor the changes of lan Ethernet0/0/0 and triggers on down
# Work processing function
def ops_execute (o):
ops.cli.open()
ops.cli.execute(handle, "reboot fast", "y")
ops.cli.close(handle)
# reboot router
return 0
|
this is the error I get when trying to assign it to the script assistant
Error: Found exception in script.
Exception info:
Traceback (most recent call last):
File ".lib/frame.py", line 111, in <module>
ret = m.ops_condition(o)
File "flash:$_user/lewis.py", line 6, in ops_condition
ops.interface.ifstat_subscribe(lan_down, 2, Ethernet0/0/0, 1)
AttributeError: 'module' object has no attribute 'ifstat_subscribe'
Sorry like I said Im brand new to this so learning as I go and cant find enough material online to correct my errors.