- Mastering Python Networking
- Eric Chou
- 207字
- 2021-07-02 21:42:39
Lab Software Installation and Device Preparation
Here are the Ubuntu packages that we will install, you may already have some of the packages such as Python development, pip, and Git:
$ sudo apt-get install -y python3-dev libxml2-dev libxslt1-dev libffi-dev libssl-dev zlib1g-dev python3-pip git python3-requests
If you are using Python 2, use the following packages instead: sudo apt-get install -y python-dev libxml2-dev libxslt1-dev libffi-dev libssl-dev zlib1g-dev python-pip git python-requests
The ncclient (https://github.com/ncclient/ncclient) library is a Python library for NETCONF clients, so we will install this from the GitHub repository to install the latest version:
$ git clone https://github.com/ncclient/ncclient
$ cd ncclient/
$ sudo python3 setup.py install
$ sudo python setup.py install
NX-API on Nexus devices is off by default, so we will need to turn it on. We can either use the user that is already created or create a new user for the NETCONF procedures:
feature nxapi
username cisco password 5 $1$Nk7ZkwH0$fyiRmMMfIheqE3BqvcL0C1 role network-opera
tor
username cisco role network-admin
username cisco passphrase lifetime 99999 warntime 14 gracetime 3
For our lab, we will turn on both HTTP and the sandbox configuration, as they should be turned off in production:
nx-osv-2(config)# nxapi http port 80
nx-osv-2(config)# nxapi sandbox
We are now ready to look at our first NX-API example.
推薦閱讀
- Flask Web全棧開發(fā)實(shí)戰(zhàn)
- INSTANT OpenCV Starter
- 自己動(dòng)手實(shí)現(xiàn)Lua:虛擬機(jī)、編譯器和標(biāo)準(zhǔn)庫(kù)
- PyTorch Artificial Intelligence Fundamentals
- Building an RPG with Unity 2018
- Mastering ArcGIS Enterprise Administration
- Learning VMware vSphere
- 數(shù)據(jù)結(jié)構(gòu):Python語(yǔ)言描述
- Responsive Web Design with jQuery
- Getting Started with JUCE
- Java編程指南:語(yǔ)法基礎(chǔ)、面向?qū)ο蟆⒑瘮?shù)式編程與項(xiàng)目實(shí)戰(zhàn)
- 軟技能2:軟件開發(fā)者職業(yè)生涯指南
- JavaScript程序設(shè)計(jì)實(shí)例教程(第2版)
- Learning Ext JS(Fourth Edition)
- Android Application Programming with OpenCV 3