Python library to interact with Junos devices. Based on jnpr-pyez and jsnapy
Project description
vicmiko
Python library to interact with Junos devices. Based on jnpr-pyez and jsnapy.
Install
pip install vicmiko
Feature supported
- junos_get: get from junos box, support pipe
- junos_compare: show diffs of config
- junos_commit: commit config to box
- jsnapy_pre
- jsnapy_post
- jsnapy_check
- junos_rpc
- junos_view
- junos_ping
- junos_traceroute
- junos_commit_file
- junos_compare_file
- junos_install
Example
from vicmiko.junos import JunOSDriver
from vicmiko import junos
jnpr = JunOSDriver(hostname='192.168.0.1',username="admin",password="admin")
jnpr.open()
jnpr.junos_get(['show version'])
jnpr.junos_rpc('get-software-information')
jnpr.junos_rpc('get-software-information',to_str=0)
jnpr.junos_compare(['set interfaces ge-0/0/0 description "to SRX300 port 01"'])
jnpr.load_junos_view('view.yml')
mem = junos.junos_routing_engine_table(jnpr.device)
jnpr.jsnapy_pre(['test_memory.yml'])
jnpr.junos_commit(mode='exclusive', commands=['set interfaces ge-0/0/0 description "to SRX300 port 00"'], commit_comments='vicmiko test')
jnpr.junos_ping(host= '111.69.2.29')
jnpr.junos_traceroute(host= '111.69.2.29')
jnpr.junos_scp(mode='put',local = 'test.txt', remote = '/var/tmp/')
jnpr.junos_scp(mode='get',local = '.', remote = '/var/tmp/test.txt')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vicmiko-0.0.3.tar.gz
(6.2 kB
view details)
Built Distribution
vicmiko-0.0.3-py3.7.egg
(12.8 kB
view details)
File details
Details for the file vicmiko-0.0.3.tar.gz
.
File metadata
- Download URL: vicmiko-0.0.3.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e6a4bdf9f6ab403307ede8e01a3ac964178458f246fb2f2ad67cfa41112e513 |
|
MD5 | 615774ae1089583a6a098ca7cb69f6eb |
|
BLAKE2b-256 | a9e9430b10b373143e4502ee865733aacab15733922c203f8cd593fc8d0af928 |
File details
Details for the file vicmiko-0.0.3-py3.7.egg
.
File metadata
- Download URL: vicmiko-0.0.3-py3.7.egg
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740548bcd731c6f4d05cc2e8d14557e80d6b4094b8c2ddeaf076be8ee6b510d0 |
|
MD5 | 136c45883df48fccd9f63351daac4b31 |
|
BLAKE2b-256 | 74493476f6ab772ee5ba107b2dccfde1bed39ca57bcfe1b421b84f291ad92cf3 |