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 可编程网络自动化
使用网络
API
221
</community>
</snmp-server>
</native>
</config>
"""
还是相同的
<edit-config>
请求,确保
只有
<snmp-server>
配置才是唯一的团体字符串
secure
尤其要注意
operation="replace"
这一行,它在
XML
层次结构中所处的位置与上一个例子
不同。将其作为
<snmp-server>
的属性会替换掉
SNMP
的所有配置。如果在调用
API
的时
候改用
operation="delete"
,则会
删除
SNMP
相关的
所有
配置。我们当时对
RESTCONF
PUT
的建议也适用于
NETCONF
replace
操作。一定要小心该操作的强大威力。
在尝试
delete
操作和
replace
操作时,务必留心。
merge
作为默认操作是有
原因的——这样就只能添加或更新配置。更重要的是,如果把
operation=
"delete"
放在了
XML
层次结构的错误位置,则会对网络造成灾难性的后果。
一定要在实验室或沙盒环境中做测试。千万不要在生产环境中练手。
8.
使用
ncclient
更改
Juniper vMX Junos
配置
我们已经看过了几个
ncclient
Cisco IOS-XE NETCONF
API
的用法示例。再来看一些
Juniper Junos
的例子。
我们的
Juniper vMX
已配置了
4
条静态路由。
下列输出直接取自命令
show
show | display xml
的输出。
routing-options {
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.
Start your free trial

You might also like

Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

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

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉
弱监督学习实用指南

弱监督学习实用指南

Wee Hyong Tok, Amit Bahree, Senja Filipi
Python实用技能学习指南

Python实用技能学习指南

Posts & Telecom Press, Robert Smallshire, Austin Bingham

Publisher Resources

ISBN: 9787115606181