Skip to content

Instantly share code, notes, and snippets.

@mwiget
Last active May 18, 2017 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwiget/5f77416cce02e5e3eaa9bae17fb98289 to your computer and use it in GitHub Desktop.
Save mwiget/5f77416cce02e5e3eaa9bae17fb98289 to your computer and use it in GitHub Desktop.
fetch Junos op script from URL at startup
'''
Configure script in Junos:
set system scripts op file say-hello.py
set system scripts language python
Create an event-policy that gets triggered during startup to fetch me:
set event-options policy fetch-my-scripts events JTASK_TASK_BEGIN
set event-options policy fetch-my-scripts then execute-commands commands "request system scripts refresh-from op file say-hello.py url https://gist.githubusercontent.com/mwiget/5f77416cce02e5e3eaa9bae17fb98289/raw/3db9f896383d8fe8ca087ed1a336bfb33854095f/say-hello.py"
'''
print "Hi! I'm from GitHubGist."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment