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 可编程网络自动化
384
10
这只是自动化验证及测试的众多可能性之一。
Templatizer
也是一个
Python
项目,我们可
以探究该生态系统中存在的部分工具,运行一些
Python
特定的验证和测试
,作为此
CI
道的一部分。例如,
To
x
是一个流行的工具,可以在
Python
项目中进行各种自动化测试。
OpenStack
社区通过
To
x
汇总出一小段命令中的一系列任务,实实在在地简化了
CI
流程。
test:
script:
- cd tools/ && python validate_yaml.py
- tox -epep8 # 检查PEP8Python文件的合规性
- tox -epy27 # 运行单元测试
- tox -ecover # 检查单元测试覆盖率
同样,所有这些命令必须完全无误,才能“通过”构建过程。当评审人收到合并请求,显
示已通过了这些检查时,他们就知道已经可以开始真正的评审了。
管道的这部分至关重要,是保持工作流效率的好方法,同时也有助于确保过去的错误不
再重演。下面一些想法可能在管道的这个阶段会有所帮助——探索网络自动化之旅中的
每一步。
对所有代码进行单元测试(如
Python
)。
进行集成测试,确保所有代码都能与其他项目和
API
互操作。
验证语法和风格(包括源代码和
Y
AML
这类数据格式)。
10.3.3
 测试
/
开发
/
类生产环境
在完成一些诸如语法或风格之类的基本的自动化测试之后,最好能对变更进行更“现实”
的测试。在
T
emplatizer
的例子中,我们可能想使用
Jinja
模板和 ...
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