Nornir是一个纯Python自动化框架,可以直接从Python使用
Nornir是一个纯Python自动化框架,可以直接从Python使用
Nornir
Nornir is a pure Python automation framework intented to be used directly from Python. While most automation frameworks use their own Domain Specific Language (DSL) which you use to describe what you want to have done, Nornir lets you control everything from Python.
One of the benefits we want to highlight with this approach is the ease of troubleshooting, if something goes wrong you can just use your existing debug tools directly from Python (just add a line of import pdb & pdb.set_trace() and you're good to go). Doing the same using a DSL can be quite time consuming.
What Nornir brings to the table is that it takes care of dealing with your inventory and manages the job of dispatching the tasks you want to run against your nodes and devices. The framework provides a very simple way to write plugins if you aren't happy with the ones we ship. Of course if you have written a plugin you think can be useful to others, please send us your code and test cases as a pull request.
Install
Please note that Nornir requires Python 3.6.2 or higher. Install Nornir with pip.
pip install nornir
Development version
If you want to clone the repo and install it from there you will need to use poetry.
Documentation
Read the Nornir documentation online or review it's code here
Examples
You can find some examples and already made tools here
External Resources
Below you can find links to talks, blog posts, podcasts and other resources:
April 2019 - Packet Pushers podcast - Heavy Networking 445: An Introduction To The Nornir Automation FrameworkMay 2018 - Software Gone Wild podcast - IPSpace podcast about nornirSep 2018 - IPSpace network automation solutions - Nornir workshop (slides)May 2018 - Networklore - Introducing Nornir - The Python automation frameworkMay 2018 - Cisco blogs - Exploring Nornir, the Python Automation Framework
Bugs & New features
If you think you have bug or would like to request a new feature, please register a GitHub account and open an issue.
Contact & Support
While we are happy to help, the GitHub issues are intended for bugs and discussions about new features. If are struggling to get something to work you have two options:
You can go to our discourse community and see if your problem has already been discussed there or post it if it hasn't.You can also head to our #nornir channel in the networktoCode Slack team.
Contributing to Nornir
If you want to help the project, the Contribution Guidelines is the best place to start.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~