NX-OSのBash・Guest ShellとPython11 / 13
Python辞書へkeyとvalueを追加する
dict.updateは指定key/valueを辞書へ追加し、同じkeyがあれば値を更新する。
switch_id_list.update({"N9K-Spine-2": "1498323434"})
appendはlistのmethodである。変数名にlistという文字があっても、値がdictなら辞書のmethodを使う。
参考資料
- 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 ↗