Cisco Cisco DWDM Transceiver Modules 白皮書

下载
页码 19
 
 
© 2016 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public Information. 
Page 16 of 19 
Figure 13.    Programmatic Access to Cisco Nexus 9000 Series Through Cisco NX-API 
 
Python Scripting 
Python is an easy-to-learn, powerful programming language. It has efficient high-level data structures and a simple 
but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with 
its interpreted nature, make it an excellent language for scripting and rapid application development in many areas 
on most platforms. The Python interpreter and the extensive standards library are freely available in source or 
binary form for all major platforms from the Python website: 
. 
The same site also contains distributions of and pointers to many free third-party Python modules, programs, and 
tools and additional documentation. 
The Cisco Nexus 9000 Series supports Python Release 2.7.5 in both interactive and noninteractive (script) modes. 
The Python scripting capability on the Cisco Nexus 9000 Series Switches gives programmatic access to the switch 
CLI to perform various tasks and POAP and Cisco Embedded Event Manager (EEM) actions. Responses to 
Python calls that invoke a Cisco NX-OS CLI return a JSON output instead of just text output: a powerful feature 
that makes Python scripting easy and helps ensure that the scripts are forward compatible.