Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from jnpr.junos import Device
- from jnpr.junos.utils.config import Config
- dev = Device('juniper.device.example.com', user='netconf-user',
- password='some-pass', port=22, gather_facts=True)
- dev.open()
- cu = Config(dev)
- try:
- cu.lock()
- except:
- print 'Unable to lock'
- try:
- load_args = {'path': './test.set'}
- cu.load(**load_args)
- except Exception as e:
- print 'Exception'
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement