Hello my friend,
It took a while since our latest post from the Code Express (CEX) series. During this time we were working heavy to launch an advanced version of our industry-leading network automation training. However, this time we were working on something special…
1
2
3
4
5 No part of this blogpost could be reproduced, stored in a
retrieval system, or transmitted in any form or by any
means, electronic, mechanical or photocopying, recording,
or otherwise, for commercial purposes without the
prior permission of the author.
Automate all the network things
Each and every element in the network can be automated. It is always the question, if it shall be. Both of these questions are subject to our training:
- We teach you how automate each and every network function in your network.
- We teach you how to identify, what makes sense to automate, what not, and how to make your network automation successful.
At our network automation training (either live or self-paced) you will guide you from the foundation of the automation for the small networks till advanced automation use cases in big data centres, and clouds. You will lean how to structure the data using YANG modules, how to serialise it using JSON, XML, Protobuf depending on the application requirements and how to manage the fleet of your IT and network workloads using gRPC, gNMI, NETCONF, REST API and many others.
Brief description
The gNMI, is getting more and more popular in the data centre world and outside it. However, there is still no good Python library, which would allow you to interact with the network function over gNMI. That’s why we decided to create our own module and cover its process of the creation in a series of the blogposts. Today is the first one, which will cover the idea.
The idea itself is pretty straightforward:
- We want to create a pure Python gNMI client to interact with the network functions.
- This library should be available as a Python module (priority 1) so that you can use it your programs, and as a CLI tool in Linux (priority 2) so that you can run it directly from CLI to interact with the network function.
It may sound very vague; hence, we have more clear requirements in terms of gNMI itself:
- It shall be possible to perform any operation out of the gNMI specification (Capabilities, Get, Set, Subscribe).
- The output of all the operations shall be converted from Protobuf format (default gNMI/gRPC format) into a Python dictionary, so that you can use it in your automated workflows.
- The tool should support both the insecure (without SSL protection) and secure (with SSL protection) channels.
Besides that, we have some other ideas, which we want to implement:
- Performance: we want to create module, which will leverage asynchronous operation (asyncio) to improve performance in case you want to interact simultaneously with numerous network elements.
- Ease to use: whenever you are working with the Python modules, you might figure out, that it is very easy to work with some, but others require quite a lot of efforts. We want to create a module, which you will love to use.
- Don’t reinvent the wheel: there are already good libraries, such as asyncio (which does heavy lifting of asynchronous operation) or grpcio (which provides the gRPC transport), which will build our module on top of.
That’s what we want to build. We’ll see where we land.
At our network automation training we teach you all the details, so that you can work with any module (including ours) for the network automation.
Where to follow us?
As usual, you could follow us on the GitHub in the dedicated repository. We will be posting there updates regularly. I don’t say we have perfect code now, or that we will ever have that in future. But that is a path we would like to go and do as much as we can to give the networking community great pure Python tool to work with the gNMI.
The first time ever in our history we put the module to Pypi.org. The PyPI will have stable releases, which you can download and use in your projects. In a short time frame we will share with you the details how to use the module.
Lessons learned
Building a new Python module for network automation and its public distribution is a challenging activity. However, it is also a good opportunity to create something good for a community of the network automators, which is growing.
Conclusion
The intention is shared, so now we need just a tiny thing. We need to make that happen. Hopefully, you will enjoy this journey following the new series in our blog. Stay tuned. Take care and good bye.
Support us
P.S.
If you have further questions or you need help with your networks, I’m happy to assist you, just send me message. Also don’t forget to share the article on your social media, if you like it.
BR,
Anton Karneliuk