Skip to main content

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

  1. junos_get: get from junos box, support pipe
  2. junos_compare: show diffs of config
  3. junos_commit: commit config to box
  4. jsnapy_pre
  5. jsnapy_post
  6. jsnapy_check
  7. junos_rpc
  8. junos_view
  9. junos_ping
  10. junos_traceroute
  11. junos_commit_file
  12. junos_compare_file
  13. 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


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.7.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file vicmiko-0.0.7.tar.gz.

File metadata

  • Download URL: vicmiko-0.0.7.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.5

File hashes

Hashes for vicmiko-0.0.7.tar.gz
Algorithm Hash digest
SHA256 d594b290dc1ed4c1b0462b06cd60fdc4a585a5dbf9d65b6c67c02a2af7aa0a52
MD5 56b7b53dc26465f0512ca9ad54b52c13
BLAKE2b-256 af27e57482cd2e008538b5b259f0f2b59963a83790b2fcda4a533f55f893d356

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page