附录A. 示例YANG模块

本文档中使用的示例YANG模块代表一个简单的媒体点播机界面。

example-jukebox”模块的YANG树图:

  1. +--rw jukebox!
  2. +--rw library
  3. | +--rw artist* [name]
  4. | | +--rw name string
  5. | | +--rw album* [name]
  6. | | +--rw name string
  7. | | +--rw genre? identityref
  8. | | +--rw year? uint16
  9. | | +--rw admin
  10. | | | +--rw label? string
  11. | | | +--rw catalogue-number? string
  12. | | +--rw song* [name]
  13. | | +--rw name string
  14. | | +--rw location string
  15. | | +--rw format? string
  16. | | +--rw length? uint32
  17. | +--ro artist-count? uint32
  18. | +--ro album-count? uint32
  19. | +--ro song-count? uint32
  20. +--rw playlist* [name]
  21. | +--rw name string
  22. | +--rw description? string
  23. | +--rw song* [index]
  24. | +--rw index uint32
  25. | +--rw id instance-identifier
  26. +--rw player
  27. +--rw gap? decimal64

rpcs:

  1. +---x play
  2. +--ro input
  3. +--ro playlist string
  4. +--ro song-number uint32