Git Product home page Git Product logo

nso_action_show's Introduction

nso_action_show

Se require instalar textfsm en python pip install textfsm

ncs-make-package --service-skeleton python --action-example show_action

y luego remplazar el show_action.yang y main.py con los archivos anexos.

En Python estoy usanto textFSM, para esto tengo un directorio "templates" donde están los archivo "index" y "sh_ip_route.template".

En el main.py está el path completo, en mi caso '/home/cisco/ncs-run/templates' esto hace el parsing particularmente para el "show ip route", otros show regresa la salida de cli

cisco@u22:/ncs-run$ ls -l total 56 drwxrwxr-x 2 cisco cisco 4096 Apr 5 01:09 logs -rw-rw-r-- 1 cisco cisco 3572 Apr 4 03:23 Makefile drwxrwxr-x 2 cisco cisco 4096 Apr 5 01:09 ncs-cdb -rw-rw-r-- 1 cisco cisco 9906 Apr 4 03:04 ncs.conf drwxrwxr-x 7 cisco cisco 4096 Apr 4 23:40 netsim drwxrwxr-x 4 cisco cisco 4096 Apr 5 00:54 packages -rw-rw-r-- 1 cisco cisco 908 Apr 4 03:04 README.ncs drwxrwxr-x 4 cisco cisco 4096 Apr 4 03:04 scripts drwxrwxr-x 5 cisco cisco 4096 Apr 5 01:09 state -rw-rw-r-- 1 cisco cisco 311 Apr 4 23:42 storedstate drwxrwxr-x 3 cisco cisco 4096 Apr 4 03:07 target drwxrwxr-x 2 cisco cisco 4096 Apr 5 01:05 templates cisco@u22:/ncs-run$ ls -l templates/ total 8 -rw-rw-r-- 1 cisco cisco 349 Apr 5 01:02 index -rw-rw-r-- 1 cisco cisco 2360 Apr 5 01:02 sh_ip_route.template

nso_action_show's People

Contributors

i9t6 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.