Skip to content

Commit

Permalink
Update ipverify_custom_action.py
Browse files Browse the repository at this point in the history
  • Loading branch information
phate999 authored May 2, 2024
1 parent fa26825 commit f36fc8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ipverify_custom_action/ipverify_custom_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Log examples:
# 11:58:41 AM INFO ipverify_custom_action VPN Monitor Failed - Resetting Tunnel.


from csclient import EventingCSClient
import time

Expand All @@ -22,5 +21,10 @@ def custom_action(path, value, *args):
cp = EventingCSClient('ipverify_custom_action')
cp.log('Starting...')
ipverify_uid = cp.get('config/identities/ipverify/0/_id_')
while not ipverify_uid:
cp.log('Waiting for ipverify configuration...')
ipverify_uid = cp.get('config/identities/ipverify/0/_id_')
time.sleep(10)
cp.log(f'Watching ipverify test {ipverify_uid}')
cp.on('put', f'status/ipverify/{ipverify_uid}/pass', custom_action)
time.sleep(999999)

0 comments on commit f36fc8a

Please sign in to comment.