janani b | ebb143d | 2016-07-14 19:35:22 +0530 | [diff] [blame^] | 1 | module topology { |
| 2 | yang-version 1; |
| 3 | namespace "onos-yang-19:level1:newlevel"; |
| 4 | prefix test; |
| 5 | organization "huawei"; |
| 6 | contact "adarsh.m@huawei.com"; |
| 7 | description "leaf scenario"; |
| 8 | container networks { |
| 9 | list network { |
| 10 | key "network-id"; |
| 11 | description |
| 12 | "Describes a network. |
| 13 | A network typically contains an inventory of nodes, |
| 14 | topological information (augmented through |
| 15 | network-topology model), as well as layering |
| 16 | information."; |
| 17 | container network-types { |
| 18 | description |
| 19 | "Serves as an augmentation target. |
| 20 | The network type is indicated through corresponding |
| 21 | presence containers augmented into this container."; |
| 22 | } |
| 23 | leaf network-id { |
| 24 | type string; |
| 25 | description |
| 26 | "Identifies a network."; |
| 27 | } |
| 28 | } |
| 29 | leaf network-ip { |
| 30 | type uint8; |
| 31 | description |
| 32 | "Identifies a network."; |
| 33 | } |
| 34 | } |
| 35 | augment "/networks/network" { |
| 36 | container config { |
| 37 | description |
| 38 | "Configuration data."; |
| 39 | choice bundle-stack-level { |
| 40 | description |
| 41 | "The TE link can be partitioned into bundled |
| 42 | links, or component links."; |
| 43 | case bundle { |
| 44 | container bundled-links { |
| 45 | description |
| 46 | "A set of bundled links."; |
| 47 | reference |
| 48 | "RFC4201: Link Bundling in MPLS Traffic Engineering |
| 49 | (TE)."; |
| 50 | list bundled-link { |
| 51 | key "src-tp-ref"; |
| 52 | leaf src-tp-ref { |
| 53 | type leafref { |
| 54 | path "../../../../../network-ip"; |
| 55 | require-instance true; |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | } |