Devnet 2192
Devnet 2192
Devnet 2192
with Nornir
Python automation framework
DEVNET-2192
Cisco Webex Teams
Questions?
Use Cisco Webex Teams to chat
with the speaker after the session
How
1 Find this session in the Cisco Events Mobile App
2 Click “Join the Discussion”
3 Install Webex Teams or go directly to the team space
4 Enter messages/questions in the team space
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
Agenda
• What is Nornir
• Nornir vs Ansible
• Demo
• Wrap-up
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Code
https://github.com/dmfigol/nornir-apps
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
“I am not sure why they are
reinventing Ansible.”
Me in 2018
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
”I would like to help you maintain
Nornir”
Also me 9 months later
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Pluggable multi-
threaded Python
framework with
Nornir inventory
management to help
operate collections
of devices
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Why not Ansible
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Nornir advantages
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
Nornir advantages (cont.)
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
”The more I work with Nornir; the
more I like it.
The more I work with Ansible; the
more I like Nornir”
Kirk Byers
Twin Bridges Technology
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Development focus
• Backwards compatibility
• Semantic versioning is strictly followed
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Use-cases
• Run as a standalone script
• Integrate with a web framework
• Integrate with pytest for network testing
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Latest features
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
What we are working on
• Exploring asyncio support
• Customization of task runners (e.g. retry mechanisms)
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Demo
Summary
• Nornir is a flexible multi-threaded Python network automation
framework which abstracts inventory and task execution
• Everything is in Python so it’s very easy to integrate with any other
Python code
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
Resources and where to go next
• Code: https://github.com/dmfigol/nornir-apps
• Nornir documentation: https://nornir.readthedocs.io
• Talk to the developer team on:
• Our forum: https://nornir.discourse.group/
• Network To Code Slack, #nornir channel
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
Complete your
online session
survey • Please complete your session survey
after each session. Your feedback
is very important.
• Complete a minimum of 4 session
surveys and the Overall Conference
survey (starting on Thursday) to
receive your Cisco Live t-shirt.
• All surveys can be taken in the Cisco Events
Mobile App or by logging in to the Content
Catalog on ciscolive.com/emea.
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
Continue your education
Demos in the
Walk-In Labs
Cisco Showcase
DEVNET-2192 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Thank you