ttt.yang 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. module ttt {
  2. namespace "urn:ttt";
  3. prefix ttt;
  4. import ietf-interfaces {
  5. prefix if;
  6. }
  7. leaf topleaf {
  8. type string;
  9. }
  10. leaf topleaf2 {
  11. type string;
  12. }
  13. leaf topempty {
  14. type empty;
  15. }
  16. container test {
  17. list iface {
  18. key "name";
  19. leaf name {
  20. type string;
  21. }
  22. leaf comment {
  23. type string;
  24. }
  25. leaf-list multi {
  26. type string;
  27. }
  28. leaf type {
  29. type enumeration {
  30. enum ethernet;
  31. enum ppp;
  32. enum dummy;
  33. }
  34. }
  35. leaf empty {
  36. type empty;
  37. }
  38. }
  39. }
  40. list acl {
  41. ordered-by user;
  42. key "name";
  43. leaf name {
  44. type string;
  45. }
  46. leaf iflink {
  47. type leafref {
  48. path "../../test/iface/name";
  49. }
  50. }
  51. leaf absiflink {
  52. type leafref {
  53. path "/if:interfaces/if:interface/if:name";
  54. }
  55. }
  56. leaf comment {
  57. type string;
  58. }
  59. leaf-list multi {
  60. ordered-by user;
  61. type leafref {
  62. path "../../test/iface/name";
  63. }
  64. }
  65. }
  66. list ref {
  67. ordered-by user;
  68. key "name";
  69. leaf name {
  70. type leafref {
  71. path "../../test/iface/name";
  72. }
  73. }
  74. }
  75. list rule {
  76. key "from to";
  77. leaf from {
  78. type string;
  79. }
  80. leaf to {
  81. type string;
  82. }
  83. leaf comment {
  84. type string;
  85. }
  86. leaf-list multi {
  87. ordered-by user;
  88. type string;
  89. }
  90. }
  91. }