Giter Club home page Giter Club logo

junos_automation_with_rest_calls's People

Contributors

ksator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

junos_automation_with_rest_calls's Issues

[QUESTION] how-to enable boolean arguments

Thank you for this explanatory guide on using the JUNOS REST API.

Would you be so kind to explain how to enable a boolean argument when making a query ?

For example,

In [5]: requests.get("http://127.0.0.1:10001/rpc/get-route-information?table=inet.0&receive-protocol-name=bgp&peer=x.x.x.x&destination=1.1.1.1&extensive", verify=False, auth=("xxx", "xxx"), headers={"host": "glass.junos.ip-spotlight.xxx.xxx", "accept": "application/json"}).json()                                                                                                                                    
Out[5]: 
{'route-information': [{'route-table': [{'table-name': [{'data': 'inet.0'}],
     'destination-count': [{'data': '864074'}],
     'total-route-count': [{'data': '10546835'}],
     'active-route-count': [{'data': '864074'}],
     'holddown-route-count': [{'data': '0'}],
     'hidden-route-count': [{'data': '0'}],
     'rt': [{'attributes': {'junos:style': 'bgp-brief'},
       'rt-destination': [{'data': '1.1.1.0/24'}],
       'rt-entry': [{'active-tag': [{}],
         'protocol-name': [{'data': 'BGP'}],
         'med': [{'data': '0'}],
         'local-preference': [{'data': '250'}],
         'as-path': [{'data': '3356 13335 I'}],
         'nh': [{'to': [{'data': 'x.x.x.x'}]}]}]}]}]}]}

No matter if I pass &extensive the output states {'junos:style': 'bgp-brief'}

How to enable the extensive version of a command output, in the above case to get the BGP communities for example ?

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.