NX-OSのBash・Guest ShellとPython2 / 13
Guest Shellの分離
Guest ShellはLinux container内でPythonや対応するRPMパッケージを実行する。CPUの割当は、他の処理とCPUが競合したときの使用割合を制限する。memoryとrootfsにも割当があり、変更後はGuest Shellの再起動で反映する。パッケージのOSとCPU architectureを、使用するGuest Shellに合わせる。
NX-OS hostのBashと、分離されたLinux containerのGuest Shellは異なる実行環境である。Guest Shellからhost CLIを使う場合、対応するdohost utilityを使う。
dohost "show interface Ethernet1/1"
chvrf management ping -c 3 192.0.2.50
dohostの実効権限はGuest Shell userのrole等へ依存する。古い全操作network-adminという説明をすべての版へ当てはめない。Guest Shell内で見えるinterfaceのnetwork stateと、host側設定の変更は別である。containerでのpacket captureも、全ASIC transit packetが自動で見えるものではない。
参考資料
- 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 ↗