Skip to Content
可编程网络自动化
book

可编程网络自动化

by Jason Edelman, Scott S. Lowe, Matt Oswalt
January 2023
Intermediate to advanced
458 pages
14h 16m
Chinese
Posts & Telecom Press
Content preview from 可编程网络自动化
430
附录
B
可以看到,最终的
OSPF
配置和
ospf-2.conf
中的内容一模一样。无须发送多个“
no
”命令
来删除用不着的
network
语句
。在此工作流中,
OSPF
进程不会被删除和重新添加。
OSPF
邻接关系也不会丢失。当然,你也得自己测试一下。
B.2
 使用
NAPALM
检索数据
NAPALM
的第二项主要功能是以统一的方式检索网络设备数据。
NAPALM
返回的所有数
据都经过了标准化处理,对
NAP
ALM
所支持的设备都是一样的。
如果你还记得,第
7
章在介绍各种
API
,每个厂商或设备都会返回厂商特定的“键
值”对。要注意设备是否支持不依赖于厂商的数据模型,比如第
5
章中讲过的
OpenConfig
工作组的
Y
ANG
模型,该模型目前尚未被网络厂商广泛采用。
对已实例化的对象
device
使用
dir()
函数(参见第
4
章),以查看
NAPALM
设备对象支
持的方法。
>>> dir(device)
[...omitted methods..., 'cli', 'close', 'commit_config', 'compare_config',
compliance_report', 'config_session', 'device', 'discard_config', 'enablepwd',
'get_arp_table', 'get_bgp_config', 'get_bgp_neighbors',
'get_bgp_neighbors_detail', 'get_config', 'get_environment', ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

弱监督学习实用指南

弱监督学习实用指南

Wee Hyong Tok, Amit Bahree, Senja Filipi
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787115606181