裏取りステータス: code-verified(preset l2 部分)
sonic-buildimage/src/sonic-config-engine/sonic-cfggen (l.354) で --preset 引数が get_available_config()(config_samples モジュール)の choices として取り込まれ、l.551 で generate_sample_config(data, args.preset) が呼ばれる。data/l2switch.j2 テンプレートが同梱。tests/test_j2files.py で --preset l2 引数のテストもあり。sonic-mgmt 側 fdb / vlan / snmp テストは別 repo(本 cache 対象外)のためカバレッジは未裏取り。
SONiC Basic L2 モードテストプラン(FDB / VLAN / SNMP の最小機能検証)¶
概要¶
SONiC を basic L2 switch として構成した場合の最小機能を T0 トポロジで検証する1。範囲は意図的に絞られており、L3 / BGP / ACL は対象外。L2 モードの構成手順は SONiC wiki: L2-Switch-mode に従う。
動作仕様¶
設定生成¶
-Hで MAC を埋め込み、-k/-pで port_config.ini を渡す1- 全ポートが admin-up + Vlan 1000 の untagged member になる構成
テストケース1¶
| # | 項目 | sonic-mgmt パス | 期待 |
|---|---|---|---|
| 1 | sanity | tests/common/sanity_check.py |
orchagent / syncd 起動、リンク Up |
| 2 | FDB | tests/fdb/test_fdb.py |
全ポートで MAC 学習 |
| 3 | VLAN + ARP + PING | tests/vlan/test_vlan.py(一部要修正: PortChannel 想定箇所) |
Vlan IF への IP 設定後、ARP / ping 成立 |
| 4 | SNMP | tests/snmp/test_snmp_interfaces.py / test_snmp_cpu.py / test_snmp_psu.py |
Walk 成功(MAC / IF / CPU / PSU 取得) |
サニティチェックは 各テストの前後 で走らせる1。
制限事項¶
- 既存
vlan_configureは PortChannel 前提箇所があり、basic L2 mode では修正必要1 - L3 / BGP / ACL / DHCP relay 等は本テストの範囲外
干渉する機能¶
- VLAN テストフレームワーク: PortChannel 前提箇所の修正が必要
- SNMP:
publiccommunity 設定(How-to-Check-SNMP-Configuration)