NX-OSのBash・Guest ShellとPython10 / 13
CLI moduleのconfiguration mode
一つのcli呼出しへ、空白付きsemicolonでcommandを連結すると設定modeを保つ。
from cli import cli
cli("conf t ; interface eth1/4 ; shut")
cliを別々に呼んだ場合、前の呼出しのmodeは後へ残らない。
参考資料
- Cisco 350-601 v1.2 Exam Topics ↗
- NX-OS10.5 programmability ↗
- ncclient manager API ↗
- NX-OS NETCONF Agent 10.6 ↗
- Cisco POAP implementation and verification ↗
- NX-OS Linux shell tools ↗
- Python subprocess ↗
- Nexus Dashboard LAN Template Library 4.2.1 ↗
- Nexus Dashboard configuration policies 4.2.1 ↗
- NX-API CLI 10.6 ↗
- Cisco onbox-shell-python ↗
- Cisco technical documentation ↗
- Technical specification ↗
- Technical specification ↗
- Technical specification ↗
- Pythonの辞書 ↗
- NX-OS 10.5のGuest Shell ↗
- NX-OSのGuest Shell ↗
- NX-OSのGuest Shell ↗
- NX-OSのCLI module ↗
- Pythonのdict.update ↗
- Pythonの文字列結合 ↗
- RPMのupgrade option ↗