問題
Ethernet1/1のoper-statusだけを指定するgNMIパスを組み立てる。PathElemのnameをスラッシュで区切って表した候補のうち、適切なものはどれか。括弧内はその要素のkeyである。
- A
interfaces / Ethernet1/1 / state / oper-status
- B
interfaces / interface(name=Ethernet1/1) / config / oper-status
- C
interfaces / interface(name=Ethernet1/1) / state / oper-status
- D
interfaces / interface(name=oper-status) / state / Ethernet1/1
正解:C
理由
interfaceというlistをnameキーで識別し、その項目のstate配下のoper-statusを指定する。インターフェース名をモデルのノード名として使わない。
選択肢ごとの説明
- A.
interfaces / Ethernet1/1 / state / oper-status
Ethernet1/1はlistのキー値であり、interfaceというノードの代わりにはならない。
- B.
interfaces / interface(name=Ethernet1/1) / config / oper-status
oper-statusは運用状態のstate配下にある。
- C.
interfaces / interface(name=Ethernet1/1) / state / oper-status
listのキーと取得する運用状態の階層を正しく指定している。
- D.
interfaces / interface(name=oper-status) / state / Ethernet1/1
listのキー値と状態のleaf名が逆になっている。