問題 coverage-300635-gnmi-keyed-path-construction・第2版

問題

Ethernet1/1のoper-statusだけを指定するgNMIパスを組み立てる。PathElemのnameをスラッシュで区切って表した候補のうち、適切なものはどれか。括弧内はその要素のkeyである。

  1. A 

    interfaces / Ethernet1/1 / state / oper-status

  2. B 

    interfaces / interface(name=Ethernet1/1) / config / oper-status

  3. C 

    interfaces / interface(name=Ethernet1/1) / state / oper-status

  4. 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名が逆になっている。

参考資料

お問い合わせ

演習する →